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

Git pushed a commit to branch master
in repository ffmpeg.

commit eeca9d9280a92ef1536c154346c126cfb9d0ed6a
Author:     Niklas Haas <[email protected]>
AuthorDate: Mon Aug 17 11:14:21 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Mon Aug 31 10:51:35 2026 +0000

    avfilter/vf_scdet: add support for MSB-aligned pixel formats
    
    This is trivial since the SAD result is already safe to 16 bits, and
    the result is already normalized by the bit depth.
    
    Sponsored-by: nxtedition AB
    Signed-off-by: Niklas Haas <[email protected]>
---
 libavfilter/vf_scdet.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scdet.c b/libavfilter/vf_scdet.c
index 814aee8f3d..36d312fb58 100644
--- a/libavfilter/vf_scdet.c
+++ b/libavfilter/vf_scdet.c
@@ -71,6 +71,7 @@ static const enum AVPixelFormat pix_fmts[] = {
         AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14,  AV_PIX_FMT_GBRP16,
         AV_PIX_FMT_GBRAP,  AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12,
         AV_PIX_FMT_GBRAP14, AV_PIX_FMT_GBRAP16,
+        AV_PIX_FMT_GBRP10MSB, AV_PIX_FMT_GBRP12MSB,
 
         AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10,
         AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, AV_PIX_FMT_GRAY16,
@@ -95,8 +96,12 @@ static const enum AVPixelFormat pix_fmts[] = {
                                AV_PIX_FMT_YUVA422P12, AV_PIX_FMT_YUVA444P12,
         AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
 
+        AV_PIX_FMT_YUV444P10MSB, AV_PIX_FMT_YUV444P12MSB,
+
         AV_PIX_FMT_NV12, AV_PIX_FMT_NV21, AV_PIX_FMT_NV16,
         AV_PIX_FMT_NV24, AV_PIX_FMT_NV42, AV_PIX_FMT_NV20,
+        AV_PIX_FMT_P010, AV_PIX_FMT_P210, AV_PIX_FMT_P410,
+        AV_PIX_FMT_P012, AV_PIX_FMT_P212, AV_PIX_FMT_P412,
         AV_PIX_FMT_P016, AV_PIX_FMT_P216, AV_PIX_FMT_P416,
 
         AV_PIX_FMT_NONE
@@ -111,7 +116,9 @@ static int config_input(AVFilterLink *inlink)
         (desc->flags & AV_PIX_FMT_FLAG_PLANAR) &&
         desc->nb_components >= 3;
 
-    s->bitdepth = desc->comp[0].depth;
+    /* SAD scores are normalize by the bit-depth, so MSB-aligned formats are
+     * equivalent to their corresponding full depth representation */
+    s->bitdepth = desc->comp[0].depth + desc->comp[0].shift;
     s->nb_planes = is_yuv ? 1 : av_pix_fmt_count_planes(inlink->format);
 
     for (int plane = 0; plane < 4; plane++) {

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to