comparison i386/dsputil_h264_template_mmx.c @ 4508:240aed40371b libavcodec

maybe fix x86_64 (untested)
author michael
date Sat, 10 Feb 2007 03:56:49 +0000
parents cb5628800a62
children 91ccf7e94441
comparison
equal deleted inserted replaced
4507:b80c704183e9 4508:240aed40371b
261 dst += stride; 261 dst += stride;
262 } 262 }
263 } 263 }
264 264
265 #ifdef H264_CHROMA_MC2_TMPL 265 #ifdef H264_CHROMA_MC2_TMPL
266 static void H264_CHROMA_MC2_TMPL(uint8_t *dst/*align 2*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y) 266 static void H264_CHROMA_MC2_TMPL(uint8_t *dst/*align 2*/, uint8_t *src/*align 1*/, long stride, int h, int x, int y)
267 { 267 {
268 int tmp = ((1<<16)-1)*x + 8; 268 int tmp = ((1<<16)-1)*x + 8;
269 int CD= tmp*y; 269 int CD= tmp*y;
270 int AB= (tmp<<3) - CD; 270 int AB= (tmp<<3) - CD;
271 asm volatile( 271 asm volatile(
304 "packuswb %%mm7, %%mm1\n\t" 304 "packuswb %%mm7, %%mm1\n\t"
305 /* writes garbage to the right of dst. 305 /* writes garbage to the right of dst.
306 * ok because partitions are processed from left to right. */ 306 * ok because partitions are processed from left to right. */
307 H264_CHROMA_OP4((%0), %%mm1, %%mm3) 307 H264_CHROMA_OP4((%0), %%mm1, %%mm3)
308 "movd %%mm1, (%0)\n\t" 308 "movd %%mm1, (%0)\n\t"
309 "addl %4, %0\n\t" 309 "add %4, %0\n\t"
310 "subl $1, %2\n\t" 310 "sub $1, %2\n\t"
311 "jnz 1b\n\t" 311 "jnz 1b\n\t"
312 : "+r" (dst), "+r"(src), "+r"(h) : "m" (ff_pw_32), "r"(stride)); 312 : "+r" (dst), "+r"(src), "+r"(h) : "m" (ff_pw_32), "r"(stride));
313 313
314 } 314 }
315 #endif 315 #endif