Mercurial > mplayer.hg
comparison libswscale/swscale_template.c @ 27683:29d9ec9b1f9d
Remove g6Dither from libswscale.
author | cehoyos |
---|---|
date | Sat, 04 Oct 2008 16:40:35 +0000 |
parents | 4b7f86c4a8b9 |
children | 235164d3b407 |
comparison
equal
deleted
inserted
replaced
27682:25245b3e962f | 27683:29d9ec9b1f9d |
---|---|
1103 YSCALEYUV2PACKEDX_ACCURATE | 1103 YSCALEYUV2PACKEDX_ACCURATE |
1104 YSCALEYUV2RGBX | 1104 YSCALEYUV2RGBX |
1105 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ | 1105 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ |
1106 #ifdef DITHER1XBPP | 1106 #ifdef DITHER1XBPP |
1107 "paddusb "MANGLE(b5Dither)", %%mm2\n\t" | 1107 "paddusb "MANGLE(b5Dither)", %%mm2\n\t" |
1108 "paddusb "MANGLE(g6Dither)", %%mm4\n\t" | 1108 "paddusb "MANGLE(g5Dither)", %%mm4\n\t" |
1109 "paddusb "MANGLE(r5Dither)", %%mm5\n\t" | 1109 "paddusb "MANGLE(r5Dither)", %%mm5\n\t" |
1110 #endif | 1110 #endif |
1111 | 1111 |
1112 WRITERGB16(%4, %5, %%REGa) | 1112 WRITERGB16(%4, %5, %%REGa) |
1113 YSCALEYUV2PACKEDX_END | 1113 YSCALEYUV2PACKEDX_END |
1163 YSCALEYUV2PACKEDX | 1163 YSCALEYUV2PACKEDX |
1164 YSCALEYUV2RGBX | 1164 YSCALEYUV2RGBX |
1165 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ | 1165 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ |
1166 #ifdef DITHER1XBPP | 1166 #ifdef DITHER1XBPP |
1167 "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" | 1167 "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" |
1168 "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" | 1168 "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" |
1169 "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" | 1169 "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" |
1170 #endif | 1170 #endif |
1171 | 1171 |
1172 WRITERGB16(%4, %5, %%REGa) | 1172 WRITERGB16(%4, %5, %%REGa) |
1173 YSCALEYUV2PACKEDX_END | 1173 YSCALEYUV2PACKEDX_END |
1328 case PIX_FMT_BGR565: | 1328 case PIX_FMT_BGR565: |
1329 asm volatile( | 1329 asm volatile( |
1330 | 1330 |
1331 FULL_YSCALEYUV2RGB | 1331 FULL_YSCALEYUV2RGB |
1332 #ifdef DITHER1XBPP | 1332 #ifdef DITHER1XBPP |
1333 "paddusb "MANGLE(g6Dither)", %%mm1 \n\t" | 1333 "paddusb "MANGLE(g5Dither)", %%mm1 \n\t" |
1334 "paddusb "MANGLE(r5Dither)", %%mm0 \n\t" | 1334 "paddusb "MANGLE(r5Dither)", %%mm0 \n\t" |
1335 "paddusb "MANGLE(b5Dither)", %%mm3 \n\t" | 1335 "paddusb "MANGLE(b5Dither)", %%mm3 \n\t" |
1336 #endif | 1336 #endif |
1337 "punpcklbw %%mm7, %%mm1 \n\t" // 0G0G0G0G | 1337 "punpcklbw %%mm7, %%mm1 \n\t" // 0G0G0G0G |
1338 "punpcklbw %%mm7, %%mm3 \n\t" // 0B0B0B0B | 1338 "punpcklbw %%mm7, %%mm3 \n\t" // 0B0B0B0B |
1488 "push %%"REG_BP" \n\t" | 1488 "push %%"REG_BP" \n\t" |
1489 YSCALEYUV2RGB(%%REGBP, %5) | 1489 YSCALEYUV2RGB(%%REGBP, %5) |
1490 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ | 1490 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ |
1491 #ifdef DITHER1XBPP | 1491 #ifdef DITHER1XBPP |
1492 "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" | 1492 "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" |
1493 "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" | 1493 "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" |
1494 "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" | 1494 "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" |
1495 #endif | 1495 #endif |
1496 | 1496 |
1497 WRITERGB16(%%REGb, 8280(%5), %%REGBP) | 1497 WRITERGB16(%%REGb, 8280(%5), %%REGBP) |
1498 "pop %%"REG_BP" \n\t" | 1498 "pop %%"REG_BP" \n\t" |
1600 "push %%"REG_BP" \n\t" | 1600 "push %%"REG_BP" \n\t" |
1601 YSCALEYUV2RGB1(%%REGBP, %5) | 1601 YSCALEYUV2RGB1(%%REGBP, %5) |
1602 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ | 1602 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ |
1603 #ifdef DITHER1XBPP | 1603 #ifdef DITHER1XBPP |
1604 "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" | 1604 "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" |
1605 "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" | 1605 "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" |
1606 "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" | 1606 "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" |
1607 #endif | 1607 #endif |
1608 | 1608 |
1609 WRITERGB16(%%REGb, 8280(%5), %%REGBP) | 1609 WRITERGB16(%%REGb, 8280(%5), %%REGBP) |
1610 "pop %%"REG_BP" \n\t" | 1610 "pop %%"REG_BP" \n\t" |
1689 "push %%"REG_BP" \n\t" | 1689 "push %%"REG_BP" \n\t" |
1690 YSCALEYUV2RGB1b(%%REGBP, %5) | 1690 YSCALEYUV2RGB1b(%%REGBP, %5) |
1691 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ | 1691 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ |
1692 #ifdef DITHER1XBPP | 1692 #ifdef DITHER1XBPP |
1693 "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" | 1693 "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" |
1694 "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" | 1694 "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" |
1695 "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" | 1695 "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" |
1696 #endif | 1696 #endif |
1697 | 1697 |
1698 WRITERGB16(%%REGb, 8280(%5), %%REGBP) | 1698 WRITERGB16(%%REGb, 8280(%5), %%REGBP) |
1699 "pop %%"REG_BP" \n\t" | 1699 "pop %%"REG_BP" \n\t" |
3090 break; //we can't output a dstY line so let's try with the next slice | 3090 break; //we can't output a dstY line so let's try with the next slice |
3091 } | 3091 } |
3092 | 3092 |
3093 #ifdef HAVE_MMX | 3093 #ifdef HAVE_MMX |
3094 b5Dither= ff_dither8[dstY&1]; | 3094 b5Dither= ff_dither8[dstY&1]; |
3095 g6Dither= ff_dither4[dstY&1]; | 3095 if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555) |
3096 g5Dither= ff_dither8[dstY&1]; | 3096 g5Dither= ff_dither8[dstY&1]; |
3097 else | |
3098 g5Dither= ff_dither4[dstY&1]; | |
3097 r5Dither= ff_dither8[(dstY+1)&1]; | 3099 r5Dither= ff_dither8[(dstY+1)&1]; |
3098 #endif | 3100 #endif |
3099 if (dstY < dstH-2) | 3101 if (dstY < dstH-2) |
3100 { | 3102 { |
3101 int16_t **lumSrcPtr= lumPixBuf + lumBufIndex + firstLumSrcY - lastInLumBuf + vLumBufSize; | 3103 int16_t **lumSrcPtr= lumPixBuf + lumBufIndex + firstLumSrcY - lastInLumBuf + vLumBufSize; |