[FFmpeg-cvslog] libswscale: force a minimum size of the slide for bayer sources

Chema Gonzalez git at videolan.org
Fri Oct 14 13:24:51 EEST 2022


ffmpeg | branch: release/5.1 | Chema Gonzalez <chemag at gmail.com> | Mon Sep 26 09:11:22 2022 -0700| [f5455889fd2a879e1bfeecb7e81c2fd52ebd4baa] | committer: Anton Khirnov

libswscale: force a minimum size of the slide for bayer sources

Bayer sources are read in groups of 2 lines (e.g. for a
BGGR flavor, the first row contains only B and G samples,
while the second row contains only G and R samples). They
need to be read as a whole.

Signed-off-by: Anton Khirnov <anton at khirnov.net>
(cherry picked from commit bf64a75c5ae58ed575303f70b2ab9b2208ded339)
Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libswscale/swscale_unscaled.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 8838cc8b53..9af2e7ecc3 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -2095,6 +2095,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
         c->convert_unscaled = rgbToPlanarRgbWrapper;
 
     if (isBayer(srcFormat)) {
+        c->dst_slice_align = 2;
         if (dstFormat == AV_PIX_FMT_RGB24)
             c->convert_unscaled = bayer_to_rgb24_wrapper;
         else if (dstFormat == AV_PIX_FMT_RGB48)



More information about the ffmpeg-cvslog mailing list