Commit 92c7b471 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos
Browse files

Remove g6Dither from libswscale.

Originally committed as revision 27715 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
parent 95137bbb
......@@ -207,7 +207,6 @@ DECLARE_ASM_CONST(8, uint64_t, bm01010101)=0x00FF00FF00FF00FFLL;
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]) = {
......
......@@ -1105,7 +1105,7 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_
/* 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 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_
/* 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
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 @@ FULL_YSCALEYUV2RGB
/* 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 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t *
/* 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 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t *
/* 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 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s
#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)
......
......@@ -58,7 +58,6 @@ DECLARE_ASM_CONST(8, uint64_t, mmx_grnmask) = 0xfcfcfcfcfcfcfcfcULL;
// 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
......
......@@ -144,8 +144,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr
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 @@ YUV2RGB
#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 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr
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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment