[FFmpeg-cvslog] sws: fix unscaled LE<->BE rgb<->bgr

Michael Niedermayer git at videolan.org
Wed Jan 11 05:36:54 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan 11 04:07:02 2012 +0100| [ac7efd336487e265511af3424664ecb0cc504d1f] | committer: Michael Niedermayer

sws: fix unscaled LE<->BE rgb<->bgr

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

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

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

diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index bf79caab..d25c5fa 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -762,7 +762,10 @@ void ff_get_unscaled_swscale(SwsContext *c)
         && srcFormat != PIX_FMT_RGB48BE   && dstFormat != PIX_FMT_RGB48BE
         && srcFormat != PIX_FMT_BGR48LE   && dstFormat != PIX_FMT_BGR48LE
         && srcFormat != PIX_FMT_BGR48BE   && dstFormat != PIX_FMT_BGR48BE
-        && (!needsDither || (c->flags&(SWS_FAST_BILINEAR|SWS_POINT))))
+        && (!needsDither || (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)))
+        && (!(av_pix_fmt_descriptors[srcFormat].flags & PIX_FMT_BE) == !HAVE_BIGENDIAN || (c->srcFormatBpp+7)/8!=2)
+        && (!(av_pix_fmt_descriptors[dstFormat].flags & PIX_FMT_BE) == !HAVE_BIGENDIAN || (c->dstFormatBpp+7)/8!=2)
+    )
         c->swScale= rgbToRgbWrapper;
 
 #define isByteRGB(f) (\



More information about the ffmpeg-cvslog mailing list