[FFmpeg-devel] [PATCH] lavc/videotoolboxenc.c: Fix the trc support for iec61966-2-1 (sRGB)

Hao Guan hguandl at gmail.com
Thu Jul 15 07:24:46 EEST 2021


---
 libavcodec/videotoolboxenc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 4eaabed5d8..61eb6e1921 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -990,6 +990,10 @@ static int get_cv_transfer_function(AVCodecContext *avctx,
             *gamma_level = CFNumberCreate(NULL, kCFNumberFloat32Type, &gamma);
             break;
 
+        case AVCOL_TRC_IEC61966_2_1:
+            *transfer_fnc = kCVImageBufferTransferFunction_sRGB;
+            break;
+
         case AVCOL_TRC_BT2020_10:
         case AVCOL_TRC_BT2020_12:
             *transfer_fnc = compat_keys.kCVImageBufferTransferFunction_ITU_R_2020;
-- 
2.30.1 (Apple Git-130)



More information about the ffmpeg-devel mailing list