[FFmpeg-devel] [PATCH 17/17] swscale: remove primaries/trc change warning

Niklas Haas ffmpeg at haasn.xyz
Thu Dec 5 13:30:26 EET 2024


From: Niklas Haas <git at haasn.dev>

This is now supported when using the new API.
---
 libswscale/swscale.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 7e77e82c8d..42efccd12b 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1361,17 +1361,6 @@ int sws_frame_setup(SwsContext *ctx, const AVFrame *dst, const AVFrame *src)
             goto fail;
         }
 
-        /* TODO: remove once implemented */
-        if ((dst_fmt.color.prim != src_fmt.color.prim ||
-             dst_fmt.color.trc  != src_fmt.color.trc) &&
-            !s->color_conversion_warned)
-        {
-            av_log(ctx, AV_LOG_WARNING, "Conversions between different primaries / "
-                   "transfer functions are not currently implemented, expect "
-                   "wrong results.\n");
-            s->color_conversion_warned = 1;
-        }
-
         if (!ff_test_fmt(&src_fmt, 0)) {
             err_msg = "Unsupported input";
             ret = AVERROR(ENOTSUP);
-- 
2.47.0



More information about the ffmpeg-devel mailing list