[FFmpeg-user] lut3d define range and input output conversions
Paul B Mahol
onemda at gmail.com
Thu Aug 11 15:57:36 EEST 2016
On 8/11/16, ST <st599 at zepler.net> wrote:
> I'm currently having 2 issues with the FFmpeg implementation of 3D LUTs and
> am wondering if there is any way of fixing the issues.
> LUT Range
> We have some LUTs which are designed to be used over the legal video range
> (64-940) and some which are designed to be used over the full video range
> (4-1019). This is important for maintaining details in superwhites and to
> prevent errors in hue and saturation when changing video from one colour
> volume to another.
> Is there a method for flagging if an RGB LUT should be applied over the
> range 64-940 or 4-1019?
Doesn't that depends on LUT itself?
> Input and output conversions
> 3D LUTs operate in the RGB domain, but many video formats use the YCbCr
> domain. Therefore the video processing must look like (simplified):
> YCbCr video -> YCbCr to RGB -> LUT applied -> RGB to YCbCr -> YCbCr video
> One use for a 3D LUT is converting from ITU-R BT.709 YCbCr video to ITU-R
> BT.2020/2100 YCbCr video. The matrices for converting between YCbCr and RGB
> are different for BT.709 and BT.2020/2100, therefore one needs to flag
> which colour conversion matrix should be used on the input and output of
> the LUT. This cannot be estimated based on frame size as 1920x1080 is
> allowed in both BT.709 and BT.2100.
> Is there a method for flagging which conversion matrices should be applied
> before and after the 3D LUT?
Yes, use zscale filter to do RGB->YUV and YUV->RGB conversion.
More information about the ffmpeg-user