diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-27 14:06:54 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2012-09-28 12:25:07 -0400 |
commit | 791b5954bc8fe7c0077d7eb959ebd17e40d0a7c6 (patch) | |
tree | 788999c1839bb4baa083bc013397cb50d1684e42 | |
parent | 97cfa55eea39cef30abe14682c56c1e4e7f6f10d (diff) | |
download | ffmpeg-791b5954bc8fe7c0077d7eb959ebd17e40d0a7c6.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>
-rw-r--r-- | libavcodec/x86/dsputilenc_mmx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c index 7dcc73175c..b7d88f0f36 100644 --- a/libavcodec/x86/dsputilenc_mmx.c +++ b/libavcodec/x86/dsputilenc_mmx.c @@ -849,8 +849,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 @@ -865,6 +866,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) |