[FFmpeg-user] [Cin] FranceBB's LUT collection
Erik Dobberkau
erik.dobberkau at gmail.com
Mon May 19 17:34:55 EEST 2025
>
> Hmmm... I meant FFmpeg's decoders. If a coded source was HDR10 PQ, for
> example, will the decoded
> picture stream (processing pipeline, whatever) be HDR10 PQ? I'm assuming
> it would.
>
> I have a UHD m2ts that FFmpeg identifies "yuv420p10le(tv,
> bt2020nc/bt2020/smpte2084)". To the best
> of my knowledge that means so-called "yuv420" format, planar pixel
> matrices, 10 bits-per-primary,
> little-endian bytes, with limited black..white range and -- now I have to
> guess --
> colorspace=bt2020nc, primaries=bt2020 (i.e. RGB to YUV formula),
> transfer=smpte2084 (i.e. HDR using
> PQ transfer function). Is all that correct?
>
Almost. "colorspace" ("bt2020nc") is the YUV matrix. The primaries are
BT.2020 ("bt2020"). 10bpc planar LE, signal range and transfer function
were assumed correctly. ;-)
Derived from [1], where the mappings from ffmpeg/libav internal enums to
user-facing strings are documented.
> In "bt2020nc", what does "nc" signify?
>
Non-constant luminance as per BT Rec.2020 Table 4. See [2].
> Why is 'colorspace' there at all? Doesn't 'primaries' together with
> 'transfer' tell the whole story?
>
See above, without a YUV matrix you won't get far...
> I understand it's important-imperative to linearize to gbrpf32le and strip
> it down (i.e. convert) to
> SDR in order to prepare the pictures for encoding. To your knowledge, are
> the various CinGG
> color-LUTs bypassing linearization by going directly from HDR-PQ or -HLG
> to SDR, for example?
>
If you are referring to the LUTs at [3], my understanding is these are for
"simply drop in" use.
I find the description in their readme.md a little confusing tbh. My
impression is these LUTs have been defined with tetrahedral interpolation
in mind, which requires them to have fewer points to provide the same
precision compared to a LUT using cubic interpolation, which in turn may
lead to "imperfections" if the processor only supports LUTs with cubic
interpolation.
[1]
https://ffmpeg.org/doxygen/trunk/pixdesc_8c.html#ade35f5fa255d189d9c23fad1e442d97b
[2]
https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-0-201208-S!!PDF-E.pdf
[3] https://github.com/FranceBB/LinearTransformation
More information about the ffmpeg-user
mailing list