aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-27 15:52:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-27 16:43:39 +0200
commit7e9830d123a879e6f13c50f2586289b1b37a51f9 (patch)
treed9f294d18aa0ada9f927c5f218ae1dbe5aa75179 /libavcodec
parent8e1f063efcde8173e006705c307c8ebc1ab15637 (diff)
downloadffmpeg-7e9830d123a879e6f13c50f2586289b1b37a51f9.tar.gz
dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()
This should fix the utvideoenc valgrind failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/x86/dsputilenc_mmx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c
index 1110f9c377..f6eadc1f98 100644
--- a/libavcodec/x86/dsputilenc_mmx.c
+++ b/libavcodec/x86/dsputilenc_mmx.c
@@ -850,8 +850,9 @@ static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *src1, c
uint8_t l, lt;
__asm__ volatile(
+ "movq (%1, %0), %%mm0 \n\t" // LT
+ "psllq $8, %%mm0 \n\t"
"1: \n\t"
- "movq -1(%1, %0), %%mm0 \n\t" // LT
"movq (%1, %0), %%mm1 \n\t" // T
"movq -1(%2, %0), %%mm2 \n\t" // L
"movq (%2, %0), %%mm3 \n\t" // X
@@ -866,6 +867,7 @@ static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *src1, c
"psubb %%mm4, %%mm3 \n\t" // dst - pred
"movq %%mm3, (%3, %0) \n\t"
"add $8, %0 \n\t"
+ "movq -1(%1, %0), %%mm0 \n\t" // LT
"cmp %4, %0 \n\t"
" jb 1b \n\t"
: "+r" (i)