[FFmpeg-devel] [PATCH] lavc/videotoolboxenc.c: Fix the trc support for iec61966-2-1 (sRGB)
Rick Kern
kernrj at gmail.com
Tue Jul 20 06:14:16 EEST 2021
On Thu, Jul 15, 2021 at 12:47 AM Hao Guan <hguandl at gmail.com> wrote:
> ---
> 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;
> +
>
kCVImageBufferTransferFunction_sRGB is only available starting in iOS 11
and MacOS 10.13, so this will cause a build error for old OS's. This should
be added to compat_keys and accessed from there.
case AVCOL_TRC_BT2020_10:
> case AVCOL_TRC_BT2020_12:
> *transfer_fnc =
> compat_keys.kCVImageBufferTransferFunction_ITU_R_2020;
> --
> 2.30.1 (Apple Git-130)
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list