[FFmpeg-cvslog] swscale: use isByteRGB() to simplify check for palToRgbWrapper.

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:30:10 2011 +0100| [b13ba5cb9a1a56883f0a8e7f7b02f7a1330ccb6d] | committer: Michael Niedermayer

swscale: use isByteRGB() to simplify check for palToRgbWrapper.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b13ba5cb9a1a56883f0a8e7f7b02f7a1330ccb6d
---

 libswscale/swscale_unscaled.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 90603c2..79cb74c 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -705,13 +705,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
     if (isAnyRGB(srcFormat) && isPlanar(srcFormat) && isByteRGB(dstFormat))
         c->swScale= planarRgbToRgbWrapper;
 
-    if ((usePal(srcFormat) && (
-        dstFormat == PIX_FMT_RGB32   ||
-        dstFormat == PIX_FMT_RGB32_1 ||
-        dstFormat == PIX_FMT_RGB24   ||
-        dstFormat == PIX_FMT_BGR32   ||
-        dstFormat == PIX_FMT_BGR32_1 ||
-        dstFormat == PIX_FMT_BGR24)))
+    if (usePal(srcFormat) && isByteRGB(dstFormat))
         c->swScale= palToRgbWrapper;
 
     if (srcFormat == PIX_FMT_YUV422P) {



More information about the ffmpeg-cvslog mailing list