Revision e36a545d

View differences:

libswscale/swscale.c
2036 2036
        av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n",
2037 2037
               sws_format_name(srcFormat), sws_format_name(dstFormat));
2038 2038
    else {
2039
    switch(dstFormat) {
2040
    case PIX_FMT_RGB32  : conv = palette8topacked32; break;
2041
    case PIX_FMT_BGR32  : conv = palette8topacked32; break;
2042
    case PIX_FMT_BGR32_1: conv = palette8topacked32; break;
2043
    case PIX_FMT_RGB32_1: conv = palette8topacked32; break;
2044
    case PIX_FMT_RGB24  : conv = palette8topacked24; break;
2045
    case PIX_FMT_BGR24  : conv = palette8topacked24; break;
2046
    default: av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n",
2047
                    sws_format_name(srcFormat), sws_format_name(dstFormat)); break;
2048
    }
2039
        switch (dstFormat) {
2040
        case PIX_FMT_RGB32  : conv = palette8topacked32; break;
2041
        case PIX_FMT_BGR32  : conv = palette8topacked32; break;
2042
        case PIX_FMT_BGR32_1: conv = palette8topacked32; break;
2043
        case PIX_FMT_RGB32_1: conv = palette8topacked32; break;
2044
        case PIX_FMT_RGB24  : conv = palette8topacked24; break;
2045
        case PIX_FMT_BGR24  : conv = palette8topacked24; break;
2046
        default: av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n",
2047
                        sws_format_name(srcFormat), sws_format_name(dstFormat)); break;
2048
        }
2049 2049
    }
2050 2050

  
2051 2051
    if (conv)
2052
    for (i=0; i<srcSliceH; i++) {
2053
        conv(srcPtr, dstPtr, c->srcW, (uint8_t *) c->pal_rgb);
2054
        srcPtr+= srcStride[0];
2055
        dstPtr+= dstStride[0];
2056
    }
2052
        for (i=0; i<srcSliceH; i++) {
2053
            conv(srcPtr, dstPtr, c->srcW, (uint8_t *) c->pal_rgb);
2054
            srcPtr+= srcStride[0];
2055
            dstPtr+= dstStride[0];
2056
        }
2057 2057

  
2058 2058
    return srcSliceH;
2059 2059
}

Also available in: Unified diff