ffmpeg | branch: master | Niklas Haas <g...@haasn.dev> | Fri Dec 6 15:29:12 2024 +0100| [7b7c32322d1f754b3cd78c4dab02ac4c3992114c] | committer: Niklas Haas
swscale/utils: fix XYZ primaries tagging Swscale currently handles XYZ by embedding a forced conversion to BT.709 RGB with a hardcoded matrix. This is not ideal, but to preserve the status quo and avoid any unexpected changes in behavior, this patch merely fixes the inferred primaries tag to match the reality. In the future, I would like to handle XYZ properly, via direct conversion to the target colorspace (or possibly simply by using a more fitting RGB intermediate like SMPTE428), but for now just keep the status quo. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b7c32322d1f754b3cd78c4dab02ac4c3992114c --- libswscale/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index da1f4954bc..80752b7fb0 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -2684,7 +2684,7 @@ SwsFormat ff_fmt_from_frame(const AVFrame *frame, int field) } else if (desc->flags & AV_PIX_FMT_FLAG_XYZ) { fmt.csp = AVCOL_SPC_UNSPECIFIED; fmt.color = (SwsColor) { - .prim = AVCOL_PRI_SMPTE428, + .prim = AVCOL_PRI_BT709, /* swscale currently hard-codes this XYZ matrix */ .trc = AVCOL_TRC_SMPTE428, }; } else if (desc->nb_components < 3) { _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".