Thread: Avisynth+
View Single Post
Old 11th January 2017, 01:54   #2833  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Avisynth has functions to convert between full and limited range (just pointing that out, because it does seem like you might have somehow missed this) but does not have metadata flagging to keep track of which range a given clip has.

YUV limited range ("TV range") numerical limits for bitdepths above 8 are quite well-defined (see f.ex. the H.264 standard). For any bitdepth, the luma offset is
Code:
16 * (2^(bitdepth - 8))
while the range is
Code:
219 * (2^(bitdepth - 8))
For chroma, the offset is the same, but substitute 224 for 219 to get the range.

Full range YUV on the other hand isn't well defined at all. It's been discussed extensively in this thread before, see here and a number of posts forward.

Last edited by TheFluff; 11th January 2017 at 02:09.
TheFluff is offline