dsp: fix diff_bytes_mmx() with small width n0.5.9
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 17 Mar 2012 19:45:45 +0000 (20:45 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 11 May 2012 20:39:50 +0000 (22:39 +0200)
Fixes Ticket1068

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 73089eccd3e48539555349b36d8aabbf1cea416e)

libavcodec/x86/dsputilenc_mmx.c

index 1717a01..c1a648b 100644 (file)
@@ -882,6 +882,7 @@ static int vsad16_mmx2(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, i
 
 static void diff_bytes_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
     x86_reg i=0;
+    if(w>=16)
     __asm__ volatile(
         "1:                             \n\t"
         "movq  (%2, %0), %%mm0          \n\t"