PR #20338 opened by ronag
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20338
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20338.patch


>From 4109166438de3072f3a6a098c221e27c282ffee1 Mon Sep 17 00:00:00 2001
From: Robert Nagy <ron...@icloud.com>
Date: Mon, 25 Aug 2025 21:15:40 +0200
Subject: [PATCH 1/2] libavcodec/options_table: gamma22 and gamma28 aliases

---
 libavcodec/options_table.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 25da169343..32d0466432 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -289,7 +289,9 @@ static const AVOption avcodec_options[] = {
 {"bt709",        "BT.709",           0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_BT709 },        INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
 {"unknown",      "Unspecified",      0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_UNSPECIFIED },  INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
 {"gamma22",      "BT.470 M",         0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_GAMMA22 },      INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
+{"bt470m",       "BT.470 M",         0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_GAMMA22 },      INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
 {"gamma28",      "BT.470 BG",        0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_GAMMA28 },      INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
+{"bt470bg",      "BT.470 BG",        0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_GAMMA28 },      INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
 {"smpte170m",    "SMPTE 170 M",      0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_SMPTE170M },    INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
 {"smpte240m",    "SMPTE 240 M",      0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_SMPTE240M },    INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
 {"linear",       "Linear",           0, AV_OPT_TYPE_CONST, {.i64 = 
AVCOL_TRC_LINEAR },       INT_MIN, INT_MAX, V|E|D, .unit = "color_trc_type"},
-- 
2.49.1


>From 96f245aa6503e1a73446e2bfae54e5dc7f61ca5f Mon Sep 17 00:00:00 2001
From: Robert Nagy <ron...@icloud.com>
Date: Mon, 25 Aug 2025 21:15:51 +0200
Subject: [PATCH 2/2] libavfilter/libplacebo: gamma22 and gamma28 aliases

---
 libavfilter/vf_libplacebo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index c35473a44c..3fe8a4e0b2 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -1577,7 +1577,9 @@ static const AVOption libplacebo_options[] = {
     {"auto", "keep the same color transfer",  0, AV_OPT_TYPE_CONST, {.i64=-1}, 
                    INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
     {"bt709",                          NULL,  0, AV_OPT_TYPE_CONST, 
{.i64=AVCOL_TRC_BT709},        INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
     {"unknown",                        NULL,  0, AV_OPT_TYPE_CONST, 
{.i64=AVCOL_TRC_UNSPECIFIED},  INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
+    {"gamma22",                        NULL,  0, AV_OPT_TYPE_CONST, 
{.i64=AVCOL_TRC_GAMMA22},      INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
     {"bt470m",                         NULL,  0, AV_OPT_TYPE_CONST, 
{.i64=AVCOL_TRC_GAMMA22},      INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
+    {"gamma28",                        NULL,  0, AV_OPT_TYPE_CONST, 
{.i64=AVCOL_TRC_GAMMA28},      INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
     {"bt470bg",                        NULL,  0, AV_OPT_TYPE_CONST, 
{.i64=AVCOL_TRC_GAMMA28},      INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
     {"smpte170m",                      NULL,  0, AV_OPT_TYPE_CONST, 
{.i64=AVCOL_TRC_SMPTE170M},    INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
     {"smpte240m",                      NULL,  0, AV_OPT_TYPE_CONST, 
{.i64=AVCOL_TRC_SMPTE240M},    INT_MIN, INT_MAX, STATIC, .unit = "color_trc"},
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-le...@ffmpeg.org

Reply via email to