Preserve source dynamic range

It is no secret that video in the YUV model is encoded in the range of 0-255 but displayed in the range of 16-239. This means that there can be “super-white” and “super-black” colors in the original video. I encounter this often in my work. These are the colors that fall outside the 16-239 range. By reducing the contrast, it is often possible to see what has been clipped. Now, obviously, Video AI clips these areas, meaning that the dynamic range of the video is compressed. If we want to slightly lift the clipped shadows after upscaling, we won’t be able to do that.

This can be avoided by reducing the contrast of the video before upscaling, bringing it into the 16-239 range, and then expanding it back to the 0-255 range after upscaling. This way, we preserve the same full range as in the source video. Currently, I do this manually, but it would be great if the software had an option for “Preserve full source dynamic range.” Thank you.

I understand better, I’ve just been adjusting my colors for 2 hours, doing tests etc. I’m not a pro in color ranges yet so I’m struggling a bit, I’ll try your method of reducing the front contrast

Here is a sample video from “Lake of Tears” band DVD. Try lower contrast to 87% and you will see clipped shadows in “black” (RGB 0,0,0) areas. This is what I call “super black”. Areas “blacker than black”.

Here I show it all:

This information will be lost forever after Video AI processing. I think if the program is positioned as a program for professional processing, such nuances need to be taken into account. Thank you!

I just want TVAI to carefully preserve the brightness data lying beyond the range 16-249 of the YUV model when processing, and not crop them, even if their display is not expected during normal playback.

1 Like

I can’t manage to play with the contrast in hybrid, if I decrease it, the image is darker, if I increase, the whites are too burnt and it brings out more noise, so I tried to play with it the level by setting 0-255 in “in” it gives me this image aspecty which looks clearer but the colors are modified, and I can’t see if it looks more natural with this scene of the video. I will try to produce like this, do a test with vai and see if I can correct the colors afterwards.

I researched this question a little… And it seems that all you need to do when converting to rgb48le (before upscaling) is to add the parameter color_range=pc (so that the full range of brightness is used), and when converting back to YUV specify color_range=tv (to crop again brightness range). If there is one of the developers here, explain what I’m right about and what I’m wrong about.

Oh yes ? I can’t find the setting of rgb48le in hybrid…

TVAI uses modified ffmpeg. First comes the conversion to RGB required for AI image processing. Then, before encoding, it is converted again to the required pixel format for the video codec. And the mistake that I see in this process is that you need to cut off the brightness range not before the work of the AI, but after. Then it will actually be not cut off. The edges of the range will remain outside the displayed limits 16-239, but data will not be lost there.

You should find a better source to experiment with. Take, for example, a video from a rather old DVD, where analog noise is visible on black (seemingly absolutely black) areas when the brightness is raised. The bottom line is that after the work of AI, you can also see this noise by raising the brightness.

Where did you find this information?
Looking in the pages I expect something like that to be in, I’m not finding it.