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

Git pushed a commit to branch master
in repository ffmpeg.

commit 80a94eb669b09c721fd9f82ba7fdabbf3ecac347
Author:     Niklas Haas <[email protected]>
AuthorDate: Sun Oct 25 18:29:15 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Wed Oct 28 15:32:15 2026 +0000

    Revert "swscale: treat XYZ formats as colorspace-less in color 
(de|en)coding"
    
    This reverts commit 2ed5830108f92093cffb696e88706f970ce6bc6b.
    This was wrong from the beginning, leading to the mess we're in.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/format.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/libswscale/format.c b/libswscale/format.c
index 0d2a07b5bc..f0a2670a96 100644
--- a/libswscale/format.c
+++ b/libswscale/format.c
@@ -1520,9 +1520,6 @@ static int decode_colors(SwsContext *ctx, SwsPixelType 
type, SwsOpList *ops,
         .lin  = fmt_decode_range(fmt, type, incomplete),
     }));
 
-    if (fmt->desc->flags & AV_PIX_FMT_FLAG_XYZ)
-        return 0; /* XYZ formats are treated as colorspaceless */
-
     /* Final step, decode colorspace */
     switch (fmt->csp) {
     case AVCOL_SPC_RGB:
@@ -1595,8 +1592,7 @@ static int encode_colors(SwsContext *ctx, SwsPixelType 
type, SwsOpList *ops,
     if (!pixel_type)
          return AVERROR(ENOTSUP);
 
-    /* See ff_sws_decode_colors(): XYZ formats have no colorspace matrix */
-    switch (dst->desc->flags & AV_PIX_FMT_FLAG_XYZ ? AVCOL_SPC_RGB : dst->csp) 
{
+    switch (dst->csp) {
     case AVCOL_SPC_RGB:
         break;
     case AVCOL_SPC_UNSPECIFIED:
@@ -1838,11 +1834,6 @@ int ff_sws_op_list_generate(SwsContext *ctx, const 
SwsFormat *src,
         ctx->alpha_blend != SWS_ALPHA_BLEND_NONE)
         return AVERROR(ENOTSUP);
 
-    /* XYZ<->RGB conversion requires application of a gamma function which
-     * are not currently implemented */
-    if ((src->desc->flags ^ dst->desc->flags) & AV_PIX_FMT_FLAG_XYZ)
-        return AVERROR(ENOTSUP);
-
     SwsOpList *ops = ff_sws_op_list_alloc();
     if (!ops)
         return AVERROR(ENOMEM);

-- 
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