Commit ba987fe24d for ffmpeg

commit ba987fe24d6713c4d4b3a15cebaeca18c41fbd31
Author: Niklas Haas <git@haasn.dev>
Date:   Fri Oct 9 17:53:49 2026 +0200

    swscale/format: remove switch/case hack (cosmetic)

    Signed-off-by: Niklas Haas <git@haasn.dev>

diff --git a/libswscale/format.c b/libswscale/format.c
index a6530c2cd3..f8c6462982 100644
--- a/libswscale/format.c
+++ b/libswscale/format.c
@@ -1522,10 +1522,11 @@ int ff_sws_decode_colors(SwsContext *ctx, SwsPixelType type,
         .lin  = fmt_decode_range(fmt, incomplete),
     }));

-    /* Final step, decode colorspace. XYZ formats carry no colorspace
-     * matrix; their transfer/primaries are handled by the color mapping
-     * layer, so treat them like RGB here. */
-    switch (fmt->desc->flags & AV_PIX_FMT_FLAG_XYZ ? AVCOL_SPC_RGB : fmt->csp) {
+    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:
         return 0;
     case AVCOL_SPC_UNSPECIFIED: