Revision 88e2a9ae libswscale/swscale_template.c

View differences:

libswscale/swscale_template.c
1091 1091
                YSCALEYUV2RGBX
1092 1092
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1093 1093
#ifdef DITHER1XBPP
1094
                "paddusb "MANGLE(b5Dither)", %%mm2\n\t"
1095
                "paddusb "MANGLE(g5Dither)", %%mm4\n\t"
1096
                "paddusb "MANGLE(r5Dither)", %%mm5\n\t"
1094
                "paddusb "BLUE_DITHER"(%0), %%mm2\n\t"
1095
                "paddusb "GREEN_DITHER"(%0), %%mm4\n\t"
1096
                "paddusb "RED_DITHER"(%0), %%mm5\n\t"
1097 1097
#endif
1098 1098

  
1099 1099
                WRITERGB15(%4, %5, %%REGa)
......
1104 1104
                YSCALEYUV2RGBX
1105 1105
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1106 1106
#ifdef DITHER1XBPP
1107
                "paddusb "MANGLE(b5Dither)", %%mm2\n\t"
1108
                "paddusb "MANGLE(g5Dither)", %%mm4\n\t"
1109
                "paddusb "MANGLE(r5Dither)", %%mm5\n\t"
1107
                "paddusb "BLUE_DITHER"(%0), %%mm2\n\t"
1108
                "paddusb "GREEN_DITHER"(%0), %%mm4\n\t"
1109
                "paddusb "RED_DITHER"(%0), %%mm5\n\t"
1110 1110
#endif
1111 1111

  
1112 1112
                WRITERGB16(%4, %5, %%REGa)
......
1151 1151
                YSCALEYUV2RGBX
1152 1152
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1153 1153
#ifdef DITHER1XBPP
1154
                "paddusb "MANGLE(b5Dither)", %%mm2  \n\t"
1155
                "paddusb "MANGLE(g5Dither)", %%mm4  \n\t"
1156
                "paddusb "MANGLE(r5Dither)", %%mm5  \n\t"
1154
                "paddusb "BLUE_DITHER"(%0), %%mm2  \n\t"
1155
                "paddusb "GREEN_DITHER"(%0), %%mm4  \n\t"
1156
                "paddusb "RED_DITHER"(%0), %%mm5  \n\t"
1157 1157
#endif
1158 1158

  
1159 1159
                WRITERGB15(%4, %5, %%REGa)
......
1164 1164
                YSCALEYUV2RGBX
1165 1165
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1166 1166
#ifdef DITHER1XBPP
1167
                "paddusb "MANGLE(b5Dither)", %%mm2  \n\t"
1168
                "paddusb "MANGLE(g5Dither)", %%mm4  \n\t"
1169
                "paddusb "MANGLE(r5Dither)", %%mm5  \n\t"
1167
                "paddusb "BLUE_DITHER"(%0), %%mm2  \n\t"
1168
                "paddusb "GREEN_DITHER"(%0), %%mm4  \n\t"
1169
                "paddusb "RED_DITHER"(%0), %%mm5  \n\t"
1170 1170
#endif
1171 1171

  
1172 1172
                WRITERGB16(%4, %5, %%REGa)
......
1468 1468
                YSCALEYUV2RGB(%%REGBP, %5)
1469 1469
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1470 1470
#ifdef DITHER1XBPP
1471
                "paddusb "MANGLE(b5Dither)", %%mm2      \n\t"
1472
                "paddusb "MANGLE(g5Dither)", %%mm4      \n\t"
1473
                "paddusb "MANGLE(r5Dither)", %%mm5      \n\t"
1471
                "paddusb "BLUE_DITHER"(%5), %%mm2      \n\t"
1472
                "paddusb "GREEN_DITHER"(%5), %%mm4      \n\t"
1473
                "paddusb "RED_DITHER"(%5), %%mm5      \n\t"
1474 1474
#endif
1475 1475

  
1476 1476
                WRITERGB15(%%REGb, 8280(%5), %%REGBP)
......
1489 1489
                YSCALEYUV2RGB(%%REGBP, %5)
1490 1490
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1491 1491
#ifdef DITHER1XBPP
1492
                "paddusb "MANGLE(b5Dither)", %%mm2      \n\t"
1493
                "paddusb "MANGLE(g5Dither)", %%mm4      \n\t"
1494
                "paddusb "MANGLE(r5Dither)", %%mm5      \n\t"
1492
                "paddusb "BLUE_DITHER"(%5), %%mm2      \n\t"
1493
                "paddusb "GREEN_DITHER"(%5), %%mm4      \n\t"
1494
                "paddusb "RED_DITHER"(%5), %%mm5      \n\t"
1495 1495
#endif
1496 1496

  
1497 1497
                WRITERGB16(%%REGb, 8280(%5), %%REGBP)
......
1581 1581
                YSCALEYUV2RGB1(%%REGBP, %5)
1582 1582
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1583 1583
#ifdef DITHER1XBPP
1584
                "paddusb "MANGLE(b5Dither)", %%mm2      \n\t"
1585
                "paddusb "MANGLE(g5Dither)", %%mm4      \n\t"
1586
                "paddusb "MANGLE(r5Dither)", %%mm5      \n\t"
1584
                "paddusb "BLUE_DITHER"(%5), %%mm2      \n\t"
1585
                "paddusb "GREEN_DITHER"(%5), %%mm4      \n\t"
1586
                "paddusb "RED_DITHER"(%5), %%mm5      \n\t"
1587 1587
#endif
1588 1588
                WRITERGB15(%%REGb, 8280(%5), %%REGBP)
1589 1589
                "pop %%"REG_BP"                         \n\t"
......
1601 1601
                YSCALEYUV2RGB1(%%REGBP, %5)
1602 1602
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1603 1603
#ifdef DITHER1XBPP
1604
                "paddusb "MANGLE(b5Dither)", %%mm2      \n\t"
1605
                "paddusb "MANGLE(g5Dither)", %%mm4      \n\t"
1606
                "paddusb "MANGLE(r5Dither)", %%mm5      \n\t"
1604
                "paddusb "BLUE_DITHER"(%5), %%mm2      \n\t"
1605
                "paddusb "GREEN_DITHER"(%5), %%mm4      \n\t"
1606
                "paddusb "RED_DITHER"(%5), %%mm5      \n\t"
1607 1607
#endif
1608 1608

  
1609 1609
                WRITERGB16(%%REGb, 8280(%5), %%REGBP)
......
1670 1670
                YSCALEYUV2RGB1b(%%REGBP, %5)
1671 1671
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1672 1672
#ifdef DITHER1XBPP
1673
                "paddusb "MANGLE(b5Dither)", %%mm2      \n\t"
1674
                "paddusb "MANGLE(g5Dither)", %%mm4      \n\t"
1675
                "paddusb "MANGLE(r5Dither)", %%mm5      \n\t"
1673
                "paddusb "BLUE_DITHER"(%5), %%mm2      \n\t"
1674
                "paddusb "GREEN_DITHER"(%5), %%mm4      \n\t"
1675
                "paddusb "RED_DITHER"(%5), %%mm5      \n\t"
1676 1676
#endif
1677 1677
                WRITERGB15(%%REGb, 8280(%5), %%REGBP)
1678 1678
                "pop %%"REG_BP"                         \n\t"
......
1690 1690
                YSCALEYUV2RGB1b(%%REGBP, %5)
1691 1691
                /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
1692 1692
#ifdef DITHER1XBPP
1693
                "paddusb "MANGLE(b5Dither)", %%mm2      \n\t"
1694
                "paddusb "MANGLE(g5Dither)", %%mm4      \n\t"
1695
                "paddusb "MANGLE(r5Dither)", %%mm5      \n\t"
1693
                "paddusb "BLUE_DITHER"(%5), %%mm2      \n\t"
1694
                "paddusb "GREEN_DITHER"(%5), %%mm4      \n\t"
1695
                "paddusb "RED_DITHER"(%5), %%mm5      \n\t"
1696 1696
#endif
1697 1697

  
1698 1698
                WRITERGB16(%%REGb, 8280(%5), %%REGBP)
......
3091 3091
        }
3092 3092

  
3093 3093
#ifdef HAVE_MMX
3094
        b5Dither= ff_dither8[dstY&1];
3094
        c->blueDither= ff_dither8[dstY&1];
3095 3095
        if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555)
3096
            g5Dither= ff_dither8[dstY&1];
3096
            c->greenDither= ff_dither8[dstY&1];
3097 3097
        else
3098
            g5Dither= ff_dither4[dstY&1];
3099
        r5Dither= ff_dither8[(dstY+1)&1];
3098
            c->greenDither= ff_dither4[dstY&1];
3099
        c->redDither= ff_dither8[(dstY+1)&1];
3100 3100
#endif
3101 3101
        if (dstY < dstH-2)
3102 3102
        {

Also available in: Unified diff