[FFmpeg-devel] [PATCH 1/4, v2] avcodec/amfenc: Fixes the color information in the output.

Araz primeadvice at gmail.com
Mon Sep 9 17:24:28 EEST 2024


> Apologies for missing this prior to merge, but you can't safely make these
> assumptions about primaries and TRC just based on the input bit depth.
Just
> because it's 8-bit content doesn't mean it will be BT.709 and likewise for
> 10-bit and BT.2020+SMPTE 2084 PQ.
>
> Why doesn't amfenc_hevc (and amfenc_av1) use the values from avctx like
> amfenc_h264 does?

Current hardware color space converter does not support transfer
characteristics other than this:
(BT709 for 8-bit output and BT2084 for 10-bit output) so for RGB input
we need them hard-coded. If conversion is done before AMF encoder, the
encoder can accept any value as it is just fields in VUI header.
So, we will come with a separate patch which would reflect this logic.


More information about the ffmpeg-devel mailing list