Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-06-11 23:13:23 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-06-12 02:26:19 +0400
commit508e7a5c16c93ae3df31d79b7e808cb7bc893b52 (patch)
treee95c38dd557835e134dab8af18daeb6699143899 /libavcodec
parent2cf4d91cf2219e00075e9feda64edbc1231e855e (diff)
x86: huffyuv: fix {add,diff}_int16
They used an extra, undeclared register. Fixes a crash in fate-vsynth3-ffvhuff444p16 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/x86/lossless_videodsp.asm22
1 files changed, 12 insertions, 10 deletions
diff --git a/libavcodec/x86/lossless_videodsp.asm b/libavcodec/x86/lossless_videodsp.asm
index c8222136f6..43958be5c9 100644
--- a/libavcodec/x86/lossless_videodsp.asm
+++ b/libavcodec/x86/lossless_videodsp.asm
@@ -37,19 +37,21 @@ SECTION_TEXT
add wd, wd
test wq, 2*mmsize - 1
jz %%.tomainloop
+ push tmpq
%%.wordloop:
sub wq, 2
%ifidn %2, add
- mov ax, [srcq+wq]
- add ax, [dstq+wq]
+ mov tmpw, [srcq+wq]
+ add tmpw, [dstq+wq]
%else
- mov ax, [src1q+wq]
- sub ax, [src2q+wq]
+ mov tmpw, [src1q+wq]
+ sub tmpw, [src2q+wq]
%endif
- and ax, maskw
- mov [dstq+wq], ax
+ and tmpw, maskw
+ mov [dstq+wq], tmpw
test wq, 2*mmsize - 1
jnz %%.wordloop
+ pop tmpq
%%.tomainloop:
%ifidn %2, add
add srcq, wq
@@ -85,11 +87,11 @@ SECTION_TEXT
%endmacro
INIT_MMX mmx
-cglobal add_int16, 4,4,5, dst, src, mask, w
+cglobal add_int16, 4,4,5, dst, src, mask, w, tmp
INT16_LOOP a, add
INIT_XMM sse2
-cglobal add_int16, 4,4,5, dst, src, mask, w
+cglobal add_int16, 4,4,5, dst, src, mask, w, tmp
test srcq, mmsize-1
jnz .unaligned
test dstq, mmsize-1
@@ -99,11 +101,11 @@ cglobal add_int16, 4,4,5, dst, src, mask, w
INT16_LOOP u, add
INIT_MMX mmx
-cglobal diff_int16, 5,5,5, dst, src1, src2, mask, w
+cglobal diff_int16, 5,5,5, dst, src1, src2, mask, w, tmp
INT16_LOOP a, sub
INIT_XMM sse2
-cglobal diff_int16, 5,5,5, dst, src1, src2, mask, w
+cglobal diff_int16, 5,5,5, dst, src1, src2, mask, w, tmp
test src1q, mmsize-1
jnz .unaligned
test src2q, mmsize-1