comparison libmpcodecs/pullup.c @ 11624:03e8cbee7333

100l bug found by Zoli, wasted time and unfairly delocalized the metrics
author rfelker
date Thu, 11 Dec 2003 04:56:19 +0000
parents ec3dac7d17a0
children a18a54997671
comparison
equal deleted inserted replaced
11623:ecaf7047b6e8 11624:03e8cbee7333
59 59
60 static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s) 60 static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
61 { 61 {
62 int ret; 62 int ret;
63 asm volatile ( 63 asm volatile (
64 "movl $8, %%ecx \n\t" 64 "movl $4, %%ecx \n\t"
65 "pxor %%mm6, %%mm6 \n\t" 65 "pxor %%mm6, %%mm6 \n\t"
66 "pxor %%mm7, %%mm7 \n\t" 66 "pxor %%mm7, %%mm7 \n\t"
67 "subl %%eax, %%edi \n\t" 67 "subl %%eax, %%edi \n\t"
68 68
69 ".balign 16 \n\t" 69 ".balign 16 \n\t"
161 } 161 }
162 162
163 static int licomb_y(unsigned char *a, unsigned char *b, int s) 163 static int licomb_y(unsigned char *a, unsigned char *b, int s)
164 { 164 {
165 int i, j, diff=0; 165 int i, j, diff=0;
166 for (i=8; i; i--) { 166 for (i=4; i; i--) {
167 for (j=0; j<8; j++) 167 for (j=0; j<8; j++)
168 diff += ABS((a[j]<<1) - b[j-s] - b[j]) 168 diff += ABS((a[j]<<1) - b[j-s] - b[j])
169 + ABS((b[j]<<1) - a[j] - a[j+s]); 169 + ABS((b[j]<<1) - a[j] - a[j+s]);
170 a+=s; b+=s; 170 a+=s; b+=s;
171 } 171 }