Revision 39e5f87b libswscale/swscale_template.c

View differences:

libswscale/swscale_template.c
2272 2272
    int16_t *mmx2Filter = c->lumMmx2Filter;
2273 2273
    int canMMX2BeUsed = c->canMMX2BeUsed;
2274 2274
    void *funnyYCode = c->funnyYCode;
2275
    void (*internal_func)(uint8_t *, const uint8_t *, long, uint32_t *) = isAlpha ? c->hascale_internal : c->hyscale_internal;
2275 2276

  
2276 2277
    if (isAlpha) {
2277 2278
        if (srcFormat == PIX_FMT_RGB32   || srcFormat == PIX_FMT_BGR32  )
......
2281 2282
            src += ALT32_CORR;
2282 2283
    }
2283 2284

  
2284
    if (c->hyscale_internal) {
2285
        c->hyscale_internal(formatConvBuffer, src, srcW, pal);
2285
    if (internal_func) {
2286
        internal_func(formatConvBuffer, src, srcW, pal);
2286 2287
        src= formatConvBuffer;
2287 2288
    }
2288 2289

  
......
3114 3115
    }
3115 3116

  
3116 3117
    c->hyscale_internal = NULL;
3118
    c->hascale_internal = NULL;
3117 3119
    switch (srcFormat) {
3118 3120
    case PIX_FMT_YUYV422  :
3119 3121
    case PIX_FMT_GRAY16BE : c->hyscale_internal = RENAME(yuy2ToY); break;
......
3132 3134
    case PIX_FMT_RGB4_BYTE: c->hyscale_internal = RENAME(palToY); break;
3133 3135
    case PIX_FMT_MONOBLACK: c->hyscale_internal = RENAME(monoblack2Y); break;
3134 3136
    case PIX_FMT_MONOWHITE: c->hyscale_internal = RENAME(monowhite2Y); break;
3137
    case PIX_FMT_RGB32  :
3138
    case PIX_FMT_RGB32_1: c->hyscale_internal = RENAME(bgr32ToY); break;
3139
    case PIX_FMT_BGR32  :
3140
    case PIX_FMT_BGR32_1: c->hyscale_internal = RENAME(rgb32ToY); break;
3135 3141
    }
3136 3142
    if (c->alpPixBuf) {
3137 3143
        switch (srcFormat) {
3138 3144
        case PIX_FMT_RGB32  :
3139 3145
        case PIX_FMT_RGB32_1:
3140 3146
        case PIX_FMT_BGR32  :
3141
        case PIX_FMT_BGR32_1: c->hyscale_internal = RENAME(abgrToA); break;
3142
        }
3143
    } else {
3144
        switch (srcFormat) {
3145
        case PIX_FMT_RGB32  :
3146
        case PIX_FMT_RGB32_1: c->hyscale_internal = RENAME(bgr32ToY); break;
3147
        case PIX_FMT_BGR32  :
3148
        case PIX_FMT_BGR32_1: c->hyscale_internal = RENAME(rgb32ToY); break;
3147
        case PIX_FMT_BGR32_1: c->hascale_internal = RENAME(abgrToA); break;
3149 3148
        }
3150 3149
    }
3151 3150
}

Also available in: Unified diff