Mercurial > mplayer.hg
changeset 27485:88f74be78ee2
Fix rgb15/16 vs. bgr part2.
author | michael |
---|---|
date | Thu, 04 Sep 2008 18:24:25 +0000 |
parents | c550b2157eaa |
children | e05965c550fc |
files | libswscale/swscale_template.c |
diffstat | 1 files changed, 24 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/swscale_template.c Thu Sep 04 18:14:29 2008 +0000 +++ b/libswscale/swscale_template.c Thu Sep 04 18:24:25 2008 +0000 @@ -705,7 +705,7 @@ " jb 1b \n\t" #define WRITEBGR32(dst, dstw, index) REAL_WRITEBGR32(dst, dstw, index) -#define REAL_WRITEBGR16(dst, dstw, index) \ +#define REAL_WRITERGB16(dst, dstw, index) \ "pand "MANGLE(bF8)", %%mm2 \n\t" /* B */\ "pand "MANGLE(bFC)", %%mm4 \n\t" /* G */\ "pand "MANGLE(bF8)", %%mm5 \n\t" /* R */\ @@ -731,9 +731,9 @@ "add $8, "#index" \n\t"\ "cmp "#dstw", "#index" \n\t"\ " jb 1b \n\t" -#define WRITEBGR16(dst, dstw, index) REAL_WRITEBGR16(dst, dstw, index) +#define WRITERGB16(dst, dstw, index) REAL_WRITERGB16(dst, dstw, index) -#define REAL_WRITEBGR15(dst, dstw, index) \ +#define REAL_WRITERGB15(dst, dstw, index) \ "pand "MANGLE(bF8)", %%mm2 \n\t" /* B */\ "pand "MANGLE(bF8)", %%mm4 \n\t" /* G */\ "pand "MANGLE(bF8)", %%mm5 \n\t" /* R */\ @@ -760,7 +760,7 @@ "add $8, "#index" \n\t"\ "cmp "#dstw", "#index" \n\t"\ " jb 1b \n\t" -#define WRITEBGR15(dst, dstw, index) REAL_WRITEBGR15(dst, dstw, index) +#define WRITERGB15(dst, dstw, index) REAL_WRITERGB15(dst, dstw, index) #define WRITEBGR24OLD(dst, dstw, index) \ /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */\ @@ -1082,7 +1082,7 @@ : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S ); return; - case PIX_FMT_BGR555: + case PIX_FMT_RGB555: YSCALEYUV2PACKEDX_ACCURATE YSCALEYUV2RGBX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ @@ -1092,10 +1092,10 @@ "paddusb "MANGLE(r5Dither)", %%mm5\n\t" #endif - WRITEBGR15(%4, %5, %%REGa) + WRITERGB15(%4, %5, %%REGa) YSCALEYUV2PACKEDX_END return; - case PIX_FMT_BGR565: + case PIX_FMT_RGB565: YSCALEYUV2PACKEDX_ACCURATE YSCALEYUV2RGBX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ @@ -1105,7 +1105,7 @@ "paddusb "MANGLE(r5Dither)", %%mm5\n\t" #endif - WRITEBGR16(%4, %5, %%REGa) + WRITERGB16(%4, %5, %%REGa) YSCALEYUV2PACKEDX_END return; case PIX_FMT_YUYV422: @@ -1142,7 +1142,7 @@ : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S ); return; - case PIX_FMT_BGR555: + case PIX_FMT_RGB555: YSCALEYUV2PACKEDX YSCALEYUV2RGBX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ @@ -1152,10 +1152,10 @@ "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif - WRITEBGR15(%4, %5, %%REGa) + WRITERGB15(%4, %5, %%REGa) YSCALEYUV2PACKEDX_END return; - case PIX_FMT_BGR565: + case PIX_FMT_RGB565: YSCALEYUV2PACKEDX YSCALEYUV2RGBX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ @@ -1165,7 +1165,7 @@ "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif - WRITEBGR16(%4, %5, %%REGa) + WRITERGB16(%4, %5, %%REGa) YSCALEYUV2PACKEDX_END return; case PIX_FMT_YUYV422: @@ -1454,7 +1454,7 @@ "a" (&c->redDither) ); return; - case PIX_FMT_BGR555: + case PIX_FMT_RGB555: asm volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" @@ -1467,7 +1467,7 @@ "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif - WRITEBGR15(%%REGb, 8280(%5), %%REGBP) + WRITERGB15(%%REGb, 8280(%5), %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" @@ -1475,7 +1475,7 @@ "a" (&c->redDither) ); return; - case PIX_FMT_BGR565: + case PIX_FMT_RGB565: asm volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" @@ -1488,7 +1488,7 @@ "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif - WRITEBGR16(%%REGb, 8280(%5), %%REGBP) + WRITERGB16(%%REGb, 8280(%5), %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" :: "c" (buf0), "d" (buf1), "S" (uvbuf0), "D" (uvbuf1), "m" (dest), @@ -1565,7 +1565,7 @@ "a" (&c->redDither) ); return; - case PIX_FMT_BGR555: + case PIX_FMT_RGB555: asm volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" @@ -1577,7 +1577,7 @@ "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif - WRITEBGR15(%%REGb, 8280(%5), %%REGBP) + WRITERGB15(%%REGb, 8280(%5), %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" @@ -1585,7 +1585,7 @@ "a" (&c->redDither) ); return; - case PIX_FMT_BGR565: + case PIX_FMT_RGB565: asm volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" @@ -1598,7 +1598,7 @@ "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif - WRITEBGR16(%%REGb, 8280(%5), %%REGBP) + WRITERGB16(%%REGb, 8280(%5), %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" @@ -1654,7 +1654,7 @@ "a" (&c->redDither) ); return; - case PIX_FMT_BGR555: + case PIX_FMT_RGB555: asm volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" @@ -1666,7 +1666,7 @@ "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif - WRITEBGR15(%%REGb, 8280(%5), %%REGBP) + WRITERGB15(%%REGb, 8280(%5), %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t" @@ -1674,7 +1674,7 @@ "a" (&c->redDither) ); return; - case PIX_FMT_BGR565: + case PIX_FMT_RGB565: asm volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" @@ -1687,7 +1687,7 @@ "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif - WRITEBGR16(%%REGb, 8280(%5), %%REGBP) + WRITERGB16(%%REGb, 8280(%5), %%REGBP) "pop %%"REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"REG_b" \n\t"