[FFmpeg-cvslog] swscale: Fix packed rgb check for planarRgbToRgbWrapper.
Michael Niedermayer
git at videolan.org
Sun Nov 6 14:01:36 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 6 13:26:50 2011 +0100| [307b6502701b93a8dad82756d91370e1233adb2d] | committer: Michael Niedermayer
swscale: Fix packed rgb check for planarRgbToRgbWrapper.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=307b6502701b93a8dad82756d91370e1233adb2d
---
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 b5d3e76..90603c2 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) && (
More information about the ffmpeg-cvslog
mailing list