aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-01-24 23:24:28 +0000
committerMans Rullgard <mans@mansr.com>2011-01-24 23:24:28 +0000
commit80944df720da98d6e5ee0e355db5814735914ec9 (patch)
tree60783c9be0e8f9b83dc59f8359beaa86c51ce5c7 /libavcodec
parente63dd5fb04ab831ca8f17fa824cfd703e317c1a1 (diff)
downloadffmpeg-80944df720da98d6e5ee0e355db5814735914ec9.tar.gz
x86: fix overflow in h264 8x8 planar prediction
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/x86/h264_intrapred.asm8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
index dbe6b8ad61..28c2f399c3 100644
--- a/libavcodec/x86/h264_intrapred.asm
+++ b/libavcodec/x86/h264_intrapred.asm
@@ -637,10 +637,6 @@ cglobal pred8x8_plane_%1, 2, 7, %2
%endif
paddw m0, m1 ; sum of H coefficients
- pmullw m0, [pw_17]
- paddw m0, [pw_16]
- psraw m0, 5
-
lea r4, [r0+r2*4-1]
lea r3, [r0 -1]
add r4, r2
@@ -694,6 +690,10 @@ cglobal pred8x8_plane_%1, 2, 7, %2
shl r3, 4
movd r1d, m0
movsx r1d, r1w
+ imul r1d, 17
+ add r1d, 16
+ sar r1d, 5
+ movd m0, r1d
add r1d, r5d
sub r3d, r1d
add r1d, r1d