diff options
-rw-r--r-- | libswscale/swscale.c | 5 | ||||
-rw-r--r-- | libswscale/x86/swscale_template.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index c39f1b6..cbb172f 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2881,8 +2881,8 @@ static av_cold void sws_init_swScale_c(SwsContext *c) } } - if(((isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15) - || c->srcFormat == PIX_FMT_PAL8) && c->scalingBpp == 8) + if((isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15) + || c->srcFormat == PIX_FMT_PAL8) c->hScale16= hScale16N_c; if (c->scalingBpp == 8) { @@ -2902,6 +2902,7 @@ static av_cold void sws_init_swScale_c(SwsContext *c) } } } else { + c->hScale16 = NULL; c->hScale = hScale16_c; c->scale19To15Fw = scale19To15Fw_c; c->scale8To16Rv = scale8To16Rv_c; diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index 8ab5556..84b8dea 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -2438,6 +2438,8 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c) } } #endif /* !COMPILE_TEMPLATE_MMX2 */ - if(isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15 && c->scalingBpp == 8) + if(isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15) c->hScale16= RENAME(hScale16); + if(c->scalingBpp != 8) + c->hScale16 = NULL; } |