All About Gamma - Page 2 - AVS Forum
Forum Jump: 
 1Likes
Reply
 
Thread Tools
post #31 of 50 Old 06-10-2014, 05:26 PM
Advanced Member
 
spacediver's Avatar
 
Join Date: May 2013
Location: Toronto
Posts: 791
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 47 Post(s)
Liked: 66
Quote:
Originally Posted by TVOD View Post


I didn't add any compensation for the lowlight linear section of the encoded curve, but then again as this trying to emulate a CRT that may be correct. This adds a toe to the overall curve which if we wanted to avoid would add a linear section to the lowlights of the curve. If the display device used for grading did not have a linear section, then compensation might be built into the video by the colorist.

By encoded curve, are you talking about the camera gamma?

If so, then yes, compensation would be built in by the colorist, perhaps through image rendering protocols or something. From what I understand, things are display referred these days - encoding gamma is all over the place, or linear in the case of RAW I believe - so I think the idea is just to have a standard video gamma function that attempts to be perceptually uniform. Let the studios and film makers worry about the transfer from capture to video rendering smile.gif
spacediver is online now  
Sponsored Links
Advertisement
 
post #32 of 50 Old 06-10-2014, 05:34 PM
AVS Special Member
 
TVOD's Avatar
 
Join Date: Jun 2003
Posts: 4,881
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 74 Post(s)
Liked: 68
Quote:
Originally Posted by spacediver View Post

By encoded curve, are you talking about the camera gamma?
Yes for lack of a better term. Perhaps source gamma would be better.
Quote:
Originally Posted by spacediver View Post

If so, then yes, compensation would be built in by the colorist, perhaps through image rendering protocols or something. From what I understand, things are display referred these days - encoding gamma is all over the place - so I think the idea is just to have a standard video gamma function that attempts to be perceptually uniform. Let the studios and film makers worry about the transfer from capture to video rendering smile.gif
On live cameras I think the gamma is typically set and left alone through a show. On the other hand, for color correction gamma is considered an active control. Turn it 'til it looks purty biggrin.gif
TVOD is offline  
post #33 of 50 Old 06-10-2014, 05:42 PM
Advanced Member
 
spacediver's Avatar
 
Join Date: May 2013
Location: Toronto
Posts: 791
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 47 Post(s)
Liked: 66
Quote:
Originally Posted by TVOD View Post

On live cameras I think the gamma is typically set and left alone through a show. On the other hand, for color correction gamma is considered an active control. Turn it 'til it looks purty biggrin.gif

and hope that a true artist is behind the controls smile.gif

As for your equations, when I have time, I'm gonna spend some time going through your math with matlab so I can understand it better. Also meant to ask - by gain control, do you mean adjusting the number that the function is multiplied by (if gamma was 1.0, then would gain control be the same as "slope control")?
spacediver is online now  
post #34 of 50 Old 06-10-2014, 06:06 PM
AVS Special Member
 
TVOD's Avatar
 
Join Date: Jun 2003
Posts: 4,881
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 74 Post(s)
Liked: 68
Quote:
Originally Posted by spacediver View Post

and hope that a true artist is behind the controls smile.gif

As for your equations, when I have time, I'm gonna spend some time going through your math with matlab so I can understand it better. Also meant to ask - by gain control, do you mean adjusting the number that the function is multiplied by (if gamma was 1.0, then would gain control be the same as "slope control")?
Yes. The multiply function, which is essentially reducing the gain if one thinks in hardware terms, would change the slope of the lines so they start at the offset and go to 1. Another way to say it is 1 remains normalized. In the pdf, they mention no values go below 0 with L = a(max[(V +b),0])^2.4. Clips at 0.
TVOD is offline  
post #35 of 50 Old 06-12-2014, 07:53 PM
ADU
AVS Special Member
 
ADU's Avatar
 
Join Date: Apr 2003
Posts: 6,204
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 82 Post(s)
Liked: 137
This is a toughy. So I admire Scott and Joel takin a swing at it. I've tried to explore this subject from as many different angles and perspectives as a layperson can. And it still gives me conniptions at times. I'm still a little foggy on exactly how Rec. 1886 is designed to work, for example. And I wonder if one of the more mathematically-minded individuals here could walk us through a simple example of how that works.

To make it easy, let's say I have a TV that's 100 cd/m^2 (or ~29 fL) at 100% stimulus white, and 1.0 cd/m^2 (~0.29 fL) at 0% stimulus black. How would I compute the luminance in cd/m^2 for a 50% stimulus gray on the TV using the reference EOTF equations in Annex 1 of Rec. 1886?

If I compute variables a and b as prescribed there, then I think I get the following values to plug into the equation L = a(max[(V + b),0])^γ...

Lw =100 cd/m^2
Lb=1.0 cd/m^2
V=0.50 (for 50% stimulus)
γ=2.4
a=68.319794966769544905908328292063
b=0.17203055971855843024373678451221

From there, I'm not quite sure what to do with the "max" and "0" components. But if I throw those out, and just solve: L = a(V + b)^γ, then I get...

L=26.319655973940688390413988944723 cd/m^2

Does that seem about right?

ADU

Last edited by ADU; 06-12-2014 at 08:05 PM.
ADU is offline  
post #36 of 50 Old 06-12-2014, 08:02 PM
Advanced Member
 
spacediver's Avatar
 
Join Date: May 2013
Location: Toronto
Posts: 791
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 47 Post(s)
Liked: 66
yep, you've calculated your a and b correctly.

So plugging in those values into the equation, you get:

L = a(V+b)^γ = 68.32* ((0.5+0.172)^2.4)

= 68.32 * (0.672^2.4)
= 68.32 * 0.385
= 26.31 cd/m^2


just saw ur edit - yes, the max function basically says to evaluate the V+b part of the function, compare it to 0, and choose the larger value. Then proceed with the rest of the function. It's there presumably to prevent negative luminance targets that may arise with a negative inputted black level. I suppose this might arise in an automated process where an instrument reads a very dark display and instrument noise results in a negative reading for the black level.

Last edited by spacediver; 06-12-2014 at 08:29 PM.
spacediver is online now  
post #37 of 50 Old 06-12-2014, 08:11 PM
ADU
AVS Special Member
 
ADU's Avatar
 
Join Date: Apr 2003
Posts: 6,204
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 82 Post(s)
Liked: 137
Interesting. So where do the "max" and "0" values in the equation come into play? (It's been along time since I was in algebra class.)

ADU
ADU is offline  
post #38 of 50 Old 06-12-2014, 08:20 PM
ADU
AVS Special Member
 
ADU's Avatar
 
Join Date: Apr 2003
Posts: 6,204
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 82 Post(s)
Liked: 137
Quote:
Originally Posted by spacediver View Post
just saw ur edit - yes, the max function basically says to evaluate the function as you have done, and the look at the output (in this case, 26.31). Then take the max value of 26.31 and 0, and choose that.

the max function is presumably to prevent negative luminance targets that may arise with a negative inputted black level. I suppose this might arise in an automated process where an instrument reads a very dark display and instrument noise results in a negative reading for the black level. shrug
Roger that. And thanks for explaining.

ADU
ADU is offline  
post #39 of 50 Old 06-12-2014, 08:30 PM
Advanced Member
 
spacediver's Avatar
 
Join Date: May 2013
Location: Toronto
Posts: 791
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 47 Post(s)
Liked: 66
no prob
I just fixed my explanation btw - the part you quoted from me contains an error.
spacediver is online now  
post #40 of 50 Old 06-12-2014, 09:37 PM
ADU
AVS Special Member
 
ADU's Avatar
 
Join Date: Apr 2003
Posts: 6,204
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 82 Post(s)
Liked: 137
Quote:
Originally Posted by spacediver View Post
no prob
I just fixed my explanation btw - the part you quoted from me contains an error.
I see it. And sorry for all the cross-posting, while I do my number-crunching.

If the above is correct, then I get the following luminance values for 25%, 50% and 75% stimulus on my hypothetical 1.0 - 100 cd/m^2 display...

L=8.6173 cd/m^2 for 25% stimulus
L=26.3197 cd/m^2 for 50% stimulus
L=56.2258 cd/m^2 for 75% stimulus

...which means the effective gamma of the display is approximately 1.850 at 25% stimulus, 1.967 at 50% stimulus, and 2.029 at 75% stimulus.

All of those effective gamma values are lower than the 2.40 exponent in the Rec. 1886 equation, which means the gamma is being brightened, moreso in the shadow detail, to compensate for the less than ideal (for dark room viewing) black level of 1.0 cd/m^2 on the display.

ADU

Last edited by ADU; 06-12-2014 at 09:39 PM.
ADU is offline  
post #41 of 50 Old 06-12-2014, 10:19 PM
Advanced Member
 
spacediver's Avatar
 
Join Date: May 2013
Location: Toronto
Posts: 791
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 47 Post(s)
Liked: 66
Quote:
Originally Posted by ADU View Post

All of those effective gamma values are lower than the 2.40 exponent in the Rec. 1886 equation, which means the gamma is being brightened, moreso in the shadow detail, to compensate for the less than ideal (for dark room viewing) black level of 1.0 cd/m^2 on the display.
More or less - perhaps instead of "gamma being brightened", it's more accurate to say "the rate of luminance growth is increased" (relative to the rate it grows in a 2.4 function).

As for the point gamma values, I'm actually not super comfortable with the idea of point gamma estimates. Gamma to me is a value that describes the function as a whole, in particular a function of the type V^γ, where V is the video input level, and γ is the gamma.

The important thing in video when it comes to luminance functions is the resulting brightness relationships between video input levels, and I'm not sure how useful a series of point gamma estimates are for illustrating this.
spacediver is online now  
post #42 of 50 Old 06-13-2014, 10:40 AM
AVS Special Member
 
TVOD's Avatar
 
Join Date: Jun 2003
Posts: 4,881
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 74 Post(s)
Liked: 68
Quote:
Originally Posted by ADU View Post
All of those effective gamma values are lower than the 2.40 exponent in the Rec. 1886 equation, which means the gamma is being brightened, moreso in the shadow detail, to compensate for the less than ideal (for dark room viewing) black level of 1.0 cd/m^2 on the display.
Which is to ultimately compensate for the non-linear visual sensitivity which is similar to a 1/2.4 gamma curve.
TVOD is offline  
post #43 of 50 Old 06-13-2014, 09:59 PM
ADU
AVS Special Member
 
ADU's Avatar
 
Join Date: Apr 2003
Posts: 6,204
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 82 Post(s)
Liked: 137
Quote:
Originally Posted by spacediver View Post
More or less - perhaps instead of "gamma being brightened", it's more accurate to say "the rate of luminance growth is increased" (relative to the rate it grows in a 2.4 function).

As for the point gamma values, I'm actually not super comfortable with the idea of point gamma estimates. Gamma to me is a value that describes the function as a whole, in particular a function of the type V^γ, where V is the video input level, and γ is the gamma.

The important thing in video when it comes to luminance functions is the resulting brightness relationships between video input levels, and I'm not sure how useful a series of point gamma estimates are for illustrating this.
Understood.

I come from more of an image creation/processing background where, generally speaking*, lower gamma results in a subjectively brighter image, and higher gamma = a subjectively darker or more contrasty image, as illustrated here. (*Some software apps will invert that relationship though, by treating gamma as a 1/γ quantity instead.) So thinking about the Rec. 1886 EOTF in terms of how it alters the effective display gamma at different stimulus levels actually helps me to better visualize the transfer function's "distortive" effects on the imagery being displayed.

I can see how that might be confusing if you're more accustomed to thinking in terms of measured luminance, or a simple power-law which gets applied to all stimulus levels (like in the good ole NTSC days ). But the net effect of the transfer functions in standards like Rec. 1886, Rec. 709, sRGB, etc. is to vary the effective encoding or decoding gamma based on the stimulus. Since gamma is not constant in these functions, they cannot be accurately represented by a simple power-law like the one you described above (V^γ).

I don't wanna put words in anyone's mouth, but I think that may be the distinction you're really trying to draw attention to in your comments above, namely the difference between an OETF/EOTF approach vs. encoding/decoding gamma represented as a simple power-law. That's something that Scott and Joel sort of glossed-over in the interview.

One important thing to remember when computing the effective display/decoding gamma for a given stimulus is that both the stimulus or "input" value, and the luminance or "output" value need to be normalized to the range 0... 1.

In the first example I gave above, the stimulus is already normalized to V=0.50. To calculate the effective gamma at that stimulus though, L or luminance first needs to be normalized, using (L-Lb)/(Lw-Lb)...

(26.3197-1.0) / (100-1.0) = 0.2558

Then the effective gamma can be computed using the natural log of the normalized luminance divided by the natural log of normalized stimulus V...

ln 0.2558 / ln 0.50 = 1.967

If you don't normalize both the "input" and "output" values then all you're doing is applying a power law to your absolute or relative luminance values vs. stimulus, which may be interesting to look at on a graph,... but it's not "gamma" imho.

ADU

Last edited by ADU; 06-14-2014 at 01:44 PM.
ADU is offline  
post #44 of 50 Old 06-14-2014, 12:06 AM
Advanced Member
 
spacediver's Avatar
 
Join Date: May 2013
Location: Toronto
Posts: 791
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 47 Post(s)
Liked: 66
Quote:
Originally Posted by ADU View Post
So thinking about the Rec. 1886 EOTF in terms of how it alters the effective display gamma at different stimulus levels actually helps me to better visualize the transfer function's "distortive" effects on the imagery being displayed.
I see your point. Also, a point gamma function is a useful way of tracking how well a display tracks the target function. I take back my previous comments on point gamma estimates

Quote:
Originally Posted by ADU View Post
Then the effective gamma can be computed using the natural log of the normalized luminance divided by the natural log of normalized stimulus V...

ln 0.2558 / ln 0.50 = 1.9669

If you don't normalize both the "input" and "output" values then all you're doing is applying a power law to your stimulus vs. absolute or relative luminance values, which may be interesting to look at on a graph,... but it's not "gamma" imho.

yep, if I understand you correctly, this distinction is shown below - the red curves show the point gamma estimates using the normalized approach. (these were calculated a while back using the same log ratios you described, although I don't think I used natural log).


Last edited by spacediver; 06-14-2014 at 12:15 AM.
spacediver is online now  
post #45 of 50 Old 06-14-2014, 11:44 AM
AVS Special Member
 
TVOD's Avatar
 
Join Date: Jun 2003
Posts: 4,881
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 74 Post(s)
Liked: 68
Renormalizing the black point will show the effective resulting gamma, but the actual offset process can use a constant exponential value for the gamma correction. If one is viewing in a brighter environment and raises the brightness to compensate, vision does not renormalize the black level to alter its sensitivity curve. The reason for all this is because the black level is raised to a level where vision is less sensitive to changes in light.

In the reference EOTF case (constant 2.4), one could alter the gamma correction exponent to a lower number (less contrast) based on the increase in offset applied after the gamma correction, or one could apply the offset before a constant gamma correction exponent to do the same thing. Both require adjustment of gain to normalize the 1 point by multiplying by (1-offset).

While it's interesting to show the curves and calculate the effective gamma by renormalizing the black level with an offset added, as vision doesn't do that I don't know how useful it is. It does makes for an interesting discussion.

(Cue the crickets)

Last edited by TVOD; 06-14-2014 at 03:25 PM.
TVOD is offline  
post #46 of 50 Old 06-15-2014, 09:42 PM
ADU
AVS Special Member
 
ADU's Avatar
 
Join Date: Apr 2003
Posts: 6,204
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 82 Post(s)
Liked: 137
Quote:
Originally Posted by spacediver View Post
yep, if I understand you correctly, this distinction is shown below - the red curves show the point gamma estimates using the normalized approach. (these were calculated a while back using the same log ratios you described, although I don't think I used natural log).

The red and black curves on the first graph above would not represent gamma to my way of thinking, because the luminance values aren't normalized to the range 0... 1.

The blue curve on the first graph looks like a plot of a simple 2.4 power law. If so, then that would represent the effective gamma of the Rec. 1886 EOTF when Lb=0 (iow, if the display emitted no light at 0% stimulus).

I don't have enough info to comment on the two "point" graphs. Imo though, there is no such thing as "relative" and "absolute" gamma. And the term "compressed" is something I associate with gamma correction rather than black offsets.

If I wanted to show the effective gamma of the Rec. 1886 EOTF on a luminance versus stimulus plot, then I would normalize both axes on the graph to the range 0... 1.

The Rec. 1886 PDF explains how the 10-bit video codes used for V (stimulus) are normalized. 8-bit consumer video codes would be normalized using (D-16)/(235-16), or (D-16)/219. And the resulting values would be plotted along the horizontal x-axis.

The luminance values in cd/m^2 would be similarly normalized using (L-Lb)/(Lw-Lb), and plotted along the vertical y-axis.

To plot the effective gamma vs. stimulus, I would use the natural log of (L-Lb)/(Lw-Lb) and divide that by the natural log of (D-16)/219 to compute the gamma values for the vertical y-axis.

Others, including some luminaries in the video business, may disagree with the above. But that's the way I personally would calculate the values.

ADU

Last edited by ADU; 06-15-2014 at 09:50 PM.
ADU is offline  
post #47 of 50 Old 06-15-2014, 10:27 PM
ADU
AVS Special Member
 
ADU's Avatar
 
Join Date: Apr 2003
Posts: 6,204
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 82 Post(s)
Liked: 137
Quote:
Originally Posted by TVOD View Post
Which is to ultimately compensate for the non-linear visual sensitivity which is similar to a 1/2.4 gamma curve.
Perception of brightness depends on a variety of factors. In a dim or dark room typical of a video mastering environment, it would probably be somewhat lower than a 1/2.4 power law, on average.

In an "average surround", perception of brightness is generally in between a cubed and squared root. In a dim or dark room it probably averages closer to a cubed root, or 1/3.

Also, the perceptual benefits of nonlinear decoding aren't limited solely to displays calibrated to the Rec. 1886 spec. All televisions in use today (and in the past) have roughly the same nonlinearity, which is generally somewhere around the geometric mean of a cube and square.

ADU
ADU is offline  
post #48 of 50 Old 06-16-2014, 11:30 AM
AVS Special Member
 
TVOD's Avatar
 
Join Date: Jun 2003
Posts: 4,881
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 74 Post(s)
Liked: 68
Key word is "similar". But the reason for increasing the contrast of the dark areas (lowering the effective gamma value) with an offset added is due to vision's non-linear sensitivity. If vision was linear, then adding an offset after gamma correction without a change in effective gamma would have been appropriate.
TVOD is offline  
post #49 of 50 Old 06-16-2014, 12:14 PM
Advanced Member
 
spacediver's Avatar
 
Join Date: May 2013
Location: Toronto
Posts: 791
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 47 Post(s)
Liked: 66
if vision was linear, the ideal gamma would be 1!
spacediver is online now  
post #50 of 50 Old 06-16-2014, 08:37 PM
AVS Special Member
 
TVOD's Avatar
 
Join Date: Jun 2003
Posts: 4,881
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 74 Post(s)
Liked: 68
Quote:
Originally Posted by spacediver View Post
if vision was linear, the ideal gamma would be 1!
Quite true. However, we still may have had gamma as the earliest reason was to compensate CRTs. One can only speculate how digital would have evolved from analog standards if vision was linear, especially with early composite digital.
TVOD is offline  
Reply AVS Forum Podcasts

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off