Revision 3a5ba0c3

View differences:

libswscale/swscale_template.c
2152 2152
    }
2153 2153
}
2154 2154

  
2155
static inline void RENAME(mono2Y)(uint8_t *dst, uint8_t *src, long width, int format)
2155
static inline void RENAME(monowhite2Y)(uint8_t *dst, uint8_t *src, long width)
2156 2156
{
2157 2157
    int i, j;
2158 2158
    for (i=0; i<width/8; i++){
2159
        int d= format == PIX_FMT_MONOBLACK ? src[i] : ~src[i];
2159
        int d= ~src[i];
2160
        for(j=0; j<8; j++)
2161
            dst[8*i+j]= ((d>>(7-j))&1)*255;
2162
    }
2163
}
2164

  
2165
static inline void RENAME(monoblack2Y)(uint8_t *dst, uint8_t *src, long width)
2166
{
2167
    int i, j;
2168
    for (i=0; i<width/8; i++){
2169
        int d= src[i];
2160 2170
        for(j=0; j<8; j++)
2161 2171
            dst[8*i+j]= ((d>>(7-j))&1)*255;
2162 2172
    }
......
2416 2426
        RENAME(palToY)(formatConvBuffer, src, srcW, pal);
2417 2427
        src= formatConvBuffer;
2418 2428
    }
2419
    else if (srcFormat==PIX_FMT_MONOBLACK ||srcFormat==PIX_FMT_MONOWHITE)
2429
    else if (srcFormat==PIX_FMT_MONOBLACK)
2430
    {
2431
        RENAME(monoblack2Y)(formatConvBuffer, src, srcW);
2432
        src= formatConvBuffer;
2433
    }
2434
    else if (srcFormat==PIX_FMT_MONOWHITE)
2420 2435
    {
2421
        RENAME(mono2Y)(formatConvBuffer, src, srcW, srcFormat);
2436
        RENAME(monowhite2Y)(formatConvBuffer, src, srcW);
2422 2437
        src= formatConvBuffer;
2423 2438
    }
2424 2439

  

Also available in: Unified diff