[FFmpeg-devel] [PATCH] vf_colorspace: Added linear trc.
Andrew Klaassen
clawsoon at yahoo.com
Thu Sep 24 22:00:52 EEST 2020
This patch adds the coefficients for the linear gamma function (1,0,1,0)
to the colorspace filter.
Signed-off-by: Andrew Klaassen <clawsoon at yahoo.com>
---
libavfilter/vf_colorspace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 34f13d9d3c..39af74c221 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -179,6 +179,7 @@ static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_N
[AVCOL_TRC_GAMMA28] = { 1.0, 0.0, 1.0 / 2.8, 0.0 },
[AVCOL_TRC_SMPTE170M] = { 1.099, 0.018, 0.45, 4.5 },
[AVCOL_TRC_SMPTE240M] = { 1.1115, 0.0228, 0.45, 4.0 },
+ [AVCOL_TRC_LINEAR] = { 1.0, 0.0, 1.0, 0.0 },
[AVCOL_TRC_IEC61966_2_1] = { 1.055, 0.0031308, 1.0 / 2.4, 12.92 },
[AVCOL_TRC_IEC61966_2_4] = { 1.099, 0.018, 0.45, 4.5 },
[AVCOL_TRC_BT2020_10] = { 1.099, 0.018, 0.45, 4.5 },
@@ -990,6 +991,7 @@ static const AVOption colorspace_options[] = {
ENUM("gamma28", AVCOL_TRC_GAMMA28, "trc"),
ENUM("smpte170m", AVCOL_TRC_SMPTE170M, "trc"),
ENUM("smpte240m", AVCOL_TRC_SMPTE240M, "trc"),
+ ENUM("linear", AVCOL_TRC_LINEAR, "trc"),
ENUM("srgb", AVCOL_TRC_IEC61966_2_1, "trc"),
ENUM("iec61966-2-1", AVCOL_TRC_IEC61966_2_1, "trc"),
ENUM("xvycc", AVCOL_TRC_IEC61966_2_4, "trc"),
--
2.26.2
More information about the ffmpeg-devel
mailing list