diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-06 13:26:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-06 13:28:22 +0100 |
commit | 307b6502701b93a8dad82756d91370e1233adb2d (patch) | |
tree | bb8778522af6341a1e5cdf0ad96e0dc9fa250be7 | |
parent | 1e79926f9e8bbfa2920a1d40e36d9ffcf244fe0a (diff) | |
download | ffmpeg-307b6502701b93a8dad82756d91370e1233adb2d.tar.gz |
swscale: Fix packed rgb check for planarRgbToRgbWrapper.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswscale/swscale_unscaled.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index b5d3e76f1c..90603c2280 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -694,7 +694,15 @@ void ff_get_unscaled_swscale(SwsContext *c) && (!needsDither || (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)))) c->swScale= rgbToRgbWrapper; - if (isAnyRGB(srcFormat) && isPlanar(srcFormat) && isAnyRGB(dstFormat) && !isPlanar(dstFormat)) +#define isByteRGB(f) (\ + f == PIX_FMT_RGB32 ||\ + f == PIX_FMT_RGB32_1 ||\ + f == PIX_FMT_RGB24 ||\ + f == PIX_FMT_BGR32 ||\ + f == PIX_FMT_BGR32_1 ||\ + f == PIX_FMT_BGR24) + + if (isAnyRGB(srcFormat) && isPlanar(srcFormat) && isByteRGB(dstFormat)) c->swScale= planarRgbToRgbWrapper; if ((usePal(srcFormat) && ( |