Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab Passkey and copy Blu-ray and DVDs! :)

# Gamma-corrected to IRE

1. I have the following code for gamma correcting a reflectance value. For example, if the reflectance is 18% (0.18) and the gamma is 0.45, this gives me a value of 40.9. The 40.9 value agrees with everything I've read.

=(1.099*0.18^0.45-0.099)*100

The question is, what is the math to convert this to IRE units? I am expecting to see a value of 43.4 according to everything I've read.

If I change the reflectance to 90% as found on a typical test chart:

=(1.099*0.9^0.45-0.099)*100

I get a value of 94.9. I believe this is correct. After conversion to IRE units it should be 100.

What is the correct way to convert these gamma-corrected numbers based on reflectance to IRE units?

Thank you.
2. To translate from your 0-to-100 scale to IRE (assuming 7.5 IRE setup), you would use
(100-7.5)/100 * x + 7.5

to do the reverse,
100/(100-7.5) * (x - 7.5)
3. Originally Posted by raffriff42
To translate from your 0-to-100 scale to IRE (assuming 7.5 IRE setup), you would use
(100-7.5)/100 * x + 7.5

to do the reverse,
100/(100-7.5) * (x - 7.5)
If there's no setup then:

(100 - 0)/100 * ( x + 0)

or

1 * x

This puts Y' at 90 IRE for 90% reflectance. It should be 100 IRE or 235 digital.

I realize the IRE value for 18% reflectance is only off by a little (43.1 vs 43.4), but it seems more like simple rounding error and makes me wonder if I'm doing the calculation correctly.
4. 7.5 IRE setup is only applicable to analog video. Digital video has IRE 0 at Y=16, IRE 100 at Y=235.
5. Originally Posted by jagabo
7.5 IRE setup is only applicable to analog video. Digital video has IRE 0 at Y=16, IRE 100 at Y=235.
I know that. 7.5 setup doesn't even enter the discussion. See my response above.
6. (delete)
7. the formulas used in that spreadsheet:

Corrected reflectance =IF(B4>=0.018,1.099*B4^B\$25-0.099,B4*B\$25)
or
(Reflectance>=0.018)
? 1.099 * Reflectance^Gamma - 0.099
: Reflectance * Gamma

IRE Units =((100*\$C4))*(1/\$C\$4)
or
100 * CorrectedReflectance * 1 / (CorrectedReflectance @ 90%)
8. Originally Posted by raffriff42
the formulas used in that spreadsheet:

Corrected reflectance =IF(B4>=0.018,1.099*B4^B\$25-0.099,B4*B\$25)
or
(Reflectance>=0.018)
? 1.099 * Reflectance^Gamma - 0.099
: Reflectance * Gamma

IRE Units =((100*\$C4))*(1/\$C\$4)
or
100 * CorrectedReflectance * 1 / (CorrectedReflectance @ 90%)
9. Your question in post #1 was:
What is the correct way to convert these gamma-corrected numbers based on reflectance to IRE units?
I tried to answer it, based on your assumed 90% reflectance = 100 IRE.
10. Isn't that what I already have in cell D4?

Does cell D12 look right? If it is right, why does every reference I've read say the value should be 43.4 IRE for an 18% gray card instead of 43.1? It seems like more than just rounding error.
11. OK the problem was using 90% reflectance as "white" without normalizing it so that "white" == full scale == 1.00. Make that adjustment and the result comes out as expected: 18% reflectance => 43.4 IRE.

[Attachment 45658 - Click to enlarge]

EDIT fixed an error in the spreadsheet...
12. Sure enough, that fixed it! Thank you very, very much for your help!