AVS Forum banner

1 - 6 of 6 Posts

·
Registered
Joined
·
3,286 Posts
Discussion Starter #1
HCFR has a "saturation scale" measurement. For video levels of 16 to 235, how would you calculate 25%, 50%, and 75% saturation in RGB? Would the following be correct for a 100% luminance red?


0% sat - 235, 235, 235

25% sat - 235, 180, 180

50% sat - 235, 126, 126

75% sat - 235, 71, 71

100% sat - 235, 16, 16



If the above is correct, would the following be correct?


50% saturation, 75% luminance red - 180, 98, 98



Generally I'm not sure the "view images" option in HCFR is working correctly. 0% saturation is showing red, green, and blue all equal like a 50% gray, but 100% saturation is showing 255, 0, 0 for 100% red saturation even though I have 16-235 set.
 

·
Registered
Joined
·
128 Posts
Hello
Quote:
Originally Posted by alluringreality /forum/post/12872020


HCFR has a "saturation scale" measurement. For video levels of 16 to 235, how would you calculate 25%, 50%, and 75% saturation in RGB? Would the following be correct for a 100% luminance red?


0% sat - 235, 235, 235

25% sat - 235, 180, 180

50% sat - 235, 126, 126

75% sat - 235, 71, 71

100% sat - 235, 16, 16

No, this is not correct. In 0-255 mode, the 0% sat is not (255,255,255). The 0% sat for a color is the gray level which have exactly the same global luminance than corresponding 100% saturated color. For red, the series is the following:


0% sat - 126,126,126

25% sat - 171,111,111

50% sat - 204,92,92

75% sat - 231,67,67

100% sat - 255,0,0


The gray level changes for each color. The darkest is blue, whose 0% sat level is 84,84,84 and the lightest is yellow, with 244,244,244.

Quote:
If the above is correct, would the following be correct?


50% saturation, 75% luminance red - 180, 98, 98

In 16-235 mode, the right values should be the following, for red:


0% sat - 125,125,125

25% sat - 163,111,111

50% sat - 191,95,95

75% sat - 214,73,73

100% sat - 235,16,16


Unfortunately, there is a bug in V2.0, the 16-235 flag is not taken into account for saturations. I'm working on it, it will be fixed in next version (coming very soon).
Quote:
Generally I'm not sure the "view images" option in HCFR is working correctly. 0% saturation is showing red, green, and blue all equal like a 50% gray, but 100% saturation is showing 255, 0, 0 for 100% red saturation even though I have 16-235 set.

Yes, in this particular case, it is true, you found a real bug. Thank you for your help !


Georges
 

·
Registered
Joined
·
1,014 Posts

Quote:
Originally Posted by Georges G /forum/post/12986973



No, this is not correct. In 0-255 mode, the 0% sat is not (255,255,255). The 0% sat for a color is the gray level which have exactly the same global luminance than corresponding 100% saturated color. For red, the series is the following:



Georges

Georges,

So, the problem with our original calculations was that we were allowing luminance as well as saturation to fluctuate?


In other words, we must hold luminance constant while we vary the saturation, correct?
 

·
Registered
Joined
·
3,286 Posts
Discussion Starter #4
I suppose holding luminance for each of 0%, 25%, 50%, 75% would make sense, but I thought 100% red luminance was 0.213 for 709. I don't get where the gray comes from because that seems close to 0.5 as far as I can tell.
 

·
Registered
Joined
·
128 Posts

Quote:
Originally Posted by alluringreality /forum/post/12988914


I suppose holding luminance for each of 0%, 25%, 50%, 75% would make sense, but I thought 100% red luminance was 0.213 for 709. I don't get where the gray comes from because that seems close to 0.5 as far as I can tell.

Yes, it looks strange, but it isn't. If you look at real measures, primary colors and gray scale, you will find blue Y near 30% gray Y, red Y around 50% gray Y, and green Y around 80% gray Y. And if you sum those three Y values, you obtain 100% white Y value (a little less if you sum the three gray levels). But if you add 30%+50%+80%, you do not have 100%, you have 160 ! What's wrong ? In reality, it's simple. Between those two scales, percent levels and Y levels, you have a gamma factor. This factor in 0.45 in a sense, 1/0.45 in the other (the famous 2.22 gamma).


Red is 0.213, and 0.213 ^ 0.45 = 0.499, ie 50%. This is it



In the other sense: 30% ^ 2.22 + 50% ^ 2.22 + 80% ^ 2.22 is near 100% (90% more exactly: this is it too ).


Clearly, Y value for Red is 0.213 * YWhite. To obtain white, you send a RGB value (255,255,255). To obtain a gray whose Y measured value will be 0.213 * YWhite, the RGB triplet has three identical values which are 255 * ( 0.213 ^0.45 ), ie (127,127,127) in Rec709 (in Rec601 it is very little different). Pure red is of course (255,0,0), and measured Y value for both colors must be the same (not absolutely perfectly, because we do not have decimals in RGB triplets...). For intermediate saturations, well, it's some little maths



I hope it will make it clear now



Georges
 

·
Registered
Joined
·
1,014 Posts

Quote:
Originally Posted by Georges G /forum/post/12989766


Yes, it looks strange, but it isn't. If you look at real measures, primary colors and gray scale, you will find blue Y near 30% gray Y, red Y around 50% gray Y, and green Y around 80% gray Y. And if you sum those three Y values, you obtain 100% white Y value (a little less if you sum the three gray levels). But if you add 30%+50%+80%, you do not have 100%, you have 160 ! What's wrong ? In reality, it's simple. Between those two scales, percent levels and Y levels, you have a gamma factor. This factor in 0.45 in a sense, 1/0.45 in the other (the famous 2.22 gamma).


Red is 0.213, and 0.213 ^ 0.45 = 0.499, ie 50%. This is it



In the other sense: 30% ^ 2.22 + 50% ^ 2.22 + 80% ^ 2.22 is near 100% (90% more exactly: this is it too ).


Clearly, Y value for Red is 0.213 * YWhite. To obtain white, you send a RGB value (255,255,255). To obtain a gray whose Y measured value will be 0.213 * YWhite, the RGB triplet has three identical values which are 255 * ( 0.213 ^0.45 ), ie (127,127,127) in Rec709 (in Rec601 it is very little different). Pure red is of course (255,0,0), and measured Y value for both colors must be the same (not absolutely perfectly, because we do not have decimals in RGB triplets...). For intermediate saturations, well, it's some little maths



I hope it will make it clear now



Georges

Excellent, makes sense now. Thanks Georges!
 
1 - 6 of 6 Posts
Top