1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

yuv2rgb: better check if source format have alpha

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Paul B Mahol 2012-01-28 03:02:32 +00:00 committed by Michael Niedermayer
parent 3bc92e34a4
commit 7bab43f29c

View File

@ -531,9 +531,9 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)
case PIX_FMT_RGB48BE:
case PIX_FMT_RGB48LE: return yuv2rgb_c_48;
case PIX_FMT_ARGB:
case PIX_FMT_ABGR: if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) return yuva2argb_c;
case PIX_FMT_ABGR: if (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) return yuva2argb_c;
case PIX_FMT_RGBA:
case PIX_FMT_BGRA: return (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) ? yuva2rgba_c : yuv2rgb_c_32;
case PIX_FMT_BGRA: return (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat)) ? yuva2rgba_c : yuv2rgb_c_32;
case PIX_FMT_RGB24: return yuv2rgb_c_24_rgb;
case PIX_FMT_BGR24: return yuv2rgb_c_24_bgr;
case PIX_FMT_RGB565: