Thread: Avisynth+
View Single Post
Old 8th July 2016, 11:55   #2049  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 308
Quote:
Originally Posted by feisty2 View Post
full range should be
x -> y
0 -> 0
128 -> 32768
255 -> 65535
and obviously not a linear conversion

and "128 -> 32768" is a must in full range case cuz pure black is [0, 128, 128] at uint8_t and [0, 32768, 32768] at uint16_t, and simple * 257 makes [0, 128, 128] go [0, 32896, 32896] and that's not pure black no more so incorrect conversion
… No? Where the hell do you even get these funny ideas?

The midpoint is 127.5 for full-range 8-bit video, and multiplying by 257 just gives you 32767.5, which is the midpoint for full-range 16-bit video.

It is a known problem that this convention for full-range YCbCr fails to accurately represent any pure grey colour, which is why there's another convention where the nominal minimum is 0 and the nominal maximum is 2^n, which in turn runs into the problem of failing to accurately represent pure red (#FF0000) and pure blue (#0000FF).

Neither of these conventions is nonlinear, but what you're proposing is.

Quote:
that's not pure black no more
Also, please type English.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!

Last edited by colours; 8th July 2016 at 11:59.
colours is offline