# HG changeset patch # User cehoyos # Date 1223138435 0 # Node ID 29d9ec9b1f9d8fbebbc2d8687a7e2f324cc5a677 # Parent 25245b3e962f73f9e3c3e3c803c8f2d23f48779f Remove g6Dither from libswscale. diff -r 25245b3e962f -r 29d9ec9b1f9d libswscale/swscale.c --- a/libswscale/swscale.c Sat Oct 04 15:11:39 2008 +0000 +++ b/libswscale/swscale.c Sat Oct 04 16:40:35 2008 +0000 @@ -207,7 +207,6 @@ static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; -static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither; static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither; const DECLARE_ALIGNED(8, uint64_t, ff_dither4[2]) = { diff -r 25245b3e962f -r 29d9ec9b1f9d libswscale/swscale_template.c --- a/libswscale/swscale_template.c Sat Oct 04 15:11:39 2008 +0000 +++ b/libswscale/swscale_template.c Sat Oct 04 16:40:35 2008 +0000 @@ -1105,7 +1105,7 @@ /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2\n\t" - "paddusb "MANGLE(g6Dither)", %%mm4\n\t" + "paddusb "MANGLE(g5Dither)", %%mm4\n\t" "paddusb "MANGLE(r5Dither)", %%mm5\n\t" #endif @@ -1165,7 +1165,7 @@ /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif @@ -1330,7 +1330,7 @@ FULL_YSCALEYUV2RGB #ifdef DITHER1XBPP - "paddusb "MANGLE(g6Dither)", %%mm1 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm1 \n\t" "paddusb "MANGLE(r5Dither)", %%mm0 \n\t" "paddusb "MANGLE(b5Dither)", %%mm3 \n\t" #endif @@ -1490,7 +1490,7 @@ /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif @@ -1602,7 +1602,7 @@ /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif @@ -1691,7 +1691,7 @@ /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif @@ -3092,8 +3092,10 @@ #ifdef HAVE_MMX b5Dither= ff_dither8[dstY&1]; - g6Dither= ff_dither4[dstY&1]; - g5Dither= ff_dither8[dstY&1]; + if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555) + g5Dither= ff_dither8[dstY&1]; + else + g5Dither= ff_dither4[dstY&1]; r5Dither= ff_dither8[(dstY+1)&1]; #endif if (dstY < dstH-2) diff -r 25245b3e962f -r 29d9ec9b1f9d libswscale/yuv2rgb.c --- a/libswscale/yuv2rgb.c Sat Oct 04 15:11:39 2008 +0000 +++ b/libswscale/yuv2rgb.c Sat Oct 04 16:40:35 2008 +0000 @@ -58,7 +58,6 @@ // not knowing that these are read in the ASM block. static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; -static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither; static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither; #undef HAVE_MMX diff -r 25245b3e962f -r 29d9ec9b1f9d libswscale/yuv2rgb_template.c --- a/libswscale/yuv2rgb_template.c Sat Oct 04 15:11:39 2008 +0000 +++ b/libswscale/yuv2rgb_template.c Sat Oct 04 16:40:35 2008 +0000 @@ -144,8 +144,7 @@ long index= -h_size/2; b5Dither= ff_dither8[y&1]; - g6Dither= ff_dither4[y&1]; - g5Dither= ff_dither8[y&1]; + g5Dither= ff_dither4[y&1]; r5Dither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ @@ -166,7 +165,7 @@ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm0;" - "paddusb "MANGLE(g6Dither)", %%mm2;" + "paddusb "MANGLE(g5Dither)", %%mm2;" "paddusb "MANGLE(r5Dither)", %%mm1;" #endif /* mask unneeded bits off */ @@ -239,7 +238,6 @@ long index= -h_size/2; b5Dither= ff_dither8[y&1]; - g6Dither= ff_dither4[y&1]; g5Dither= ff_dither8[y&1]; r5Dither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time,