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

Git pushed a commit to branch master
in repository ffmpeg.

commit fc5f45bd42c7f9cd203ca260765e549bd15ecaf2
Author:     James Almer <[email protected]>
AuthorDate: Sun Dec 28 15:20:03 2025 -0300
Commit:     James Almer <[email protected]>
CommitDate: Sun Dec 28 15:32:57 2025 -0300

    avcodec/libdav1d: only consider colorspace when choosing between YUV and GBR
    
    Several files use values for primaries and transfer characteristics other 
than
    BT709 and IEC_61966 respectively, while still being GBR.
    Also always set color_range while at it. It's always coded in the bistream.
    
    Fixes part of #21304.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/libdav1d.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 7f63bb1b15..14ec9842a0 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -147,13 +147,10 @@ static void libdav1d_init_params(AVCodecContext *c, const 
Dav1dSequenceHeader *s
         c->colorspace      = (enum AVColorSpace) seq->mtrx;
         c->color_primaries = (enum AVColorPrimaries) seq->pri;
         c->color_trc       = (enum AVColorTransferCharacteristic) seq->trc;
-        c->color_range     = seq->color_range ? AVCOL_RANGE_JPEG : 
AVCOL_RANGE_MPEG;
     }
+    c->color_range = seq->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
 
-    if (seq->layout == DAV1D_PIXEL_LAYOUT_I444 &&
-        c->colorspace      == AVCOL_SPC_RGB &&
-        c->color_primaries == AVCOL_PRI_BT709 &&
-        c->color_trc       == AVCOL_TRC_IEC61966_2_1)
+    if (seq->layout == DAV1D_PIXEL_LAYOUT_I444 && c->colorspace == 
AVCOL_SPC_RGB)
         c->pix_fmt = pix_fmt_rgb[seq->hbd];
     else
         c->pix_fmt = pix_fmt[seq->layout][seq->hbd];

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

Reply via email to