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

Git pushed a commit to branch master
in repository ffmpeg.

commit 11afa309fb4b71059f145d887f8013b960399533
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Jun 26 20:58:49 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun Jun 28 00:22:09 2026 +0000

    avcodec: Align bayer pixel formats to 2x2
    
    Fixes: out of array access with odd dimensioned bayer
    Fixes: fa6F4c0xA8el
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/utils.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 550d818572..256fb4ed39 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -315,6 +315,21 @@ void avcodec_align_dimensions2(AVCodecContext *s, int 
*width, int *height,
             h_align = 8;
         }
         break;
+    case AV_PIX_FMT_BAYER_BGGR8:
+    case AV_PIX_FMT_BAYER_RGGB8:
+    case AV_PIX_FMT_BAYER_GBRG8:
+    case AV_PIX_FMT_BAYER_GRBG8:
+    case AV_PIX_FMT_BAYER_BGGR16LE:
+    case AV_PIX_FMT_BAYER_BGGR16BE:
+    case AV_PIX_FMT_BAYER_RGGB16LE:
+    case AV_PIX_FMT_BAYER_RGGB16BE:
+    case AV_PIX_FMT_BAYER_GBRG16LE:
+    case AV_PIX_FMT_BAYER_GBRG16BE:
+    case AV_PIX_FMT_BAYER_GRBG16LE:
+    case AV_PIX_FMT_BAYER_GRBG16BE:
+        w_align = FFMAX(w_align, 2);
+        h_align = FFMAX(h_align, 2);
+        break;
     default:
         break;
     }

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

Reply via email to