umezawatakeshi / utvideo

Ut Video Codec Suite - fast lossless video codec
http://umezawatakeshi.github.io/utvideo/
GNU General Public License v2.0
288 stars 12 forks source link

YUV option to switch between limited TV (16-235) and full PC (0-255) colorspace #38

Closed Walcund closed 3 years ago

Walcund commented 3 years ago

Hi Umezawatakeshi!

Can you implement a YUV option to switch between limited TV (16-235) and full PC (0-255) colorspace?

It would be very important! Thank you very much!

umezawatakeshi commented 3 years ago

You have to explain why/how it is important for you or for other users.

Walcund commented 3 years ago

Hi!

Lossless codecs (like the Ut video) are mostly used for video capture from analog or digital sources. This would be just an option to enforce the legal TV (16-235) spectrum, which is World standard for all major (Sony Panasonic JVC Canon etc... ) camcorder manufacturers and TV producers. This function would be further ensure the right TV color spectrum if the user activate it optionally (if he want). When YUV sources are played back on RGB (monitor like) computer color standard, the full spectrum (0-255) can cause brutal black in the dark parts of a picture and blown out in the lighter areas of the picture.

See the picture: http://s018.radikal.ru/i526/1402/0a/2568d4334e88.jpg

umezawatakeshi commented 3 years ago

I'm afraid that I don't understand why YUV fullrange is needed from that explanation. hmm...

Walcund commented 3 years ago

I'm afraid that I don't understand why YUV fullrange is needed from that explanation. hmm...

You have right.

It is enough to give only one 1 click option. An option for limited range (TV 16-235), and if it is not selected than Ut video will interpret it automatically as Full range (0-255). And it is enough only for the YUV 4:2:0 encoders.

umezawatakeshi commented 3 years ago

Wait a minute. Do you mean that you think the current UtVideo handles YUV as fullrange?

Walcund commented 3 years ago

Hi Umezawatakeshi! I can not prove it, but I recorded video from an SONY FDR-AX53 camcorder, first with the internal 4K AVC encoder of the camcorder, than with UT video from a Cam-Link-4K HDMI-to-USB3 converter adapter to a LAPTOP SSD with the help of Ut-video and Virtualdub2.

Of course it is a very long chain....until the the signals of the image sensor transforms into an ut video file on the SSD drive of the laptop. In every step of the above mentioned chain can have a bad interpretation of the TV range and Full range. That's why I said I am can not be 100% sure in this. :(

umezawatakeshi commented 3 years ago

Anyway, as written in readme, UtVideo handles YUV in a limited range. Make sure you know what's going on in your environment before you come back.