From 5b5c4147d3f9c18f4ab2b36a1fbec1596f5415fe Mon Sep 17 00:00:00 2001 From: Sebastien Cote Date: Fri, 22 Nov 2024 11:31:18 -0700 Subject: [PATCH] vtenc: add support for the HLG color transfer Fixes #4047 Part-of: --- subprojects/gst-plugins-bad/sys/applemedia/vtenc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/applemedia/vtenc.c b/subprojects/gst-plugins-bad/sys/applemedia/vtenc.c index 3571ef4d9b..ccc1a4db67 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/vtenc.c +++ b/subprojects/gst-plugins-bad/sys/applemedia/vtenc.c @@ -1378,6 +1378,14 @@ gst_vtenc_set_colorimetry (GstVTEnc * self, VTCompressionSessionRef session) GST_WARNING_OBJECT (self, "macOS version is too old, the SMPTE2084 " "transfer function is not available"); break; + case GST_VIDEO_TRANSFER_ARIB_STD_B67: + if (__builtin_available (macOS 10.13, *)) + transfer = kCVImageBufferTransferFunction_ITU_R_2100_HLG; + else + GST_WARNING_OBJECT (self, + "macOS version is too old, the ITU-R BT.2100-1 " + "transfer function is not available"); + break; default: GST_WARNING_OBJECT (self, "Unsupported color transfer %u", cm.transfer); }