# HG changeset patch # User michael # Date 1004984809 0 # Node ID 22aba8af94af3766617d2b30b7a2f9b8c719fb42 # Parent b3624c70aba24b2af55a9833c356d22437f438d6 fixed yv12toyuy2 diff -r b3624c70aba2 -r 22aba8af94af postproc/rgb2rgb.c --- a/postproc/rgb2rgb.c Mon Nov 05 18:12:27 2001 +0000 +++ b/postproc/rgb2rgb.c Mon Nov 05 18:26:49 2001 +0000 @@ -291,56 +291,71 @@ } /** * - * num_pixels must be a multiple of 16 for the MMX version + * width must be a multiple of 16 for the MMX version */ -void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, unsigned num_pixels) +void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, int lumStride, int chromStride, int dstStride) { + int y; + const int chromWidth= width>>1; + for(y=0; y>1) - : "memory", "%eax" - ); - + "addl $8, %%eax \n\t" + "cmpl %4, %%eax \n\t" + " jb 1b \n\t" + ::"r"(dst), "r"(ysrc), "r"(usrc), "r"(vsrc), "r" (chromWidth) + : "%eax" + ); #else - int i; - num_pixels>>=1; - for(i=0; i>1; + for(y=0; y>1) - : "memory", "%eax" - ); - + "addl $8, %%eax \n\t" + "cmpl %4, %%eax \n\t" + " jb 1b \n\t" + ::"r"(dst), "r"(ysrc), "r"(usrc), "r"(vsrc), "r" (chromWidth) + : "%eax" + ); #else - int i; - num_pixels>>=1; - for(i=0; i