This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new d0a84c660a swscale/unscaled: fix rgbToRgbWrapper for non-native-endian 
formats
d0a84c660a is described below

commit d0a84c660a7b40d906e49dc6ae6d243b88d20aff
Author:     Ramiro Polla <[email protected]>
AuthorDate: Tue May 12 15:03:11 2026 +0200
Commit:     Ramiro Polla <[email protected]>
CommitDate: Fri May 15 14:21:50 2026 +0000

    swscale/unscaled: fix rgbToRgbWrapper for non-native-endian formats
    
    The fix from 5fa2a65c11 introduced a regression for non-native-endian
    formats (such as rgb565be on a little-endian system).
    
    Reproducible with:
    $ ./libswscale/tests/swscale -unscaled 1 -src rgb565be -dst rgb24
    
    Also:
    $ ./ffmpeg_g -i /opt/samples/jpegls/128.jls -vf 
"scale=size=512x512,format=rgb24,scale=flags=neighbor,format=rgb565be" -f 
rawvideo -vframes 1 -y rgb565be.raw
    $ magick -size 512x512 -endian MSB RGB565:rgb565be.raw output.png
    $ ./ffplay_g output.png
    
    (note: don't use ffmpeg to convert from rgb565be.raw to output for the
    test above since it will perform the same bug and cancel out the error)
---
 libswscale/swscale_unscaled.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index f1245811bd..0ecef7d44a 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -1847,9 +1847,8 @@ static rgbConvFn findRgbConvFn(SwsInternal *c)
     const int dstId = c->dstFormatBpp;
     rgbConvFn conv = NULL;
 
-#define IS_NOT_NE(bpp, desc) \
-    (((bpp + 7) >> 3) == 2 && \
-     (!(desc->flags & AV_PIX_FMT_FLAG_BE) != !HAVE_BIGENDIAN))
+#define IS_NOT_NE(Bpp, desc) \
+    (Bpp == 2 && (!(desc->flags & AV_PIX_FMT_FLAG_BE) != !HAVE_BIGENDIAN))
 
 #define CONV_IS(src, dst) (srcFormat == AV_PIX_FMT_##src && dstFormat == 
AV_PIX_FMT_##dst)
 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to