I'm having trouble working out an equation to convert IRE units to digital values within studio swing. Such an equation would give the following results:
0 IRE -> digital 0
7.5 IRE -> digital 16
100 IRE -> digital 235
I've tried but am having trouble getting the above results. Any help is appreciated.
Thank you.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 29 of 29
Thread
-
-
For Japanese NTSC (IRE 0-100):
Code:Y = IRE * 2.19 + 16
Code:Y = (IRE-7.5) * 2.37 + 16
If you're wondering where 2.19 and 2.37 come from:
For Japanese NTSC video IRE 0 to 100 is 100 units. That accounts for Y=16-235, 219 units. 219/100 = 2.19.
For North American NTSC video IRE 7.5 to 100 is 92.5 units. That accounts for Y=16-235, 219 units. 219/92.5 ~= 2.37Last edited by jagabo; 16th Oct 2016 at 09:05.
-
Thanks, jagabo.
Your code was returning -2 for 0 IRE so I modified it (yes, this is for North America)
This code is for Libre Office/Excel with IRE in cell A16:
Code:=IF(A16>=0.75, (A16-7.5) * 2.37 + 16,0)
-
MAX also works and is more self-documenting:
Code:=MAX((A16 - 7.5) * 2.37 + 16, 0)
-
Note you can get a little better precision with more digits to the right of the decimal point: 2.3675675... Or do the multiply and divide explicitly:
Code:Y = (IRE-7.5) * 219 / 92.5 + 16
-
The (219/92.5) must be enclosed in parentheses.
This works:
Code:=IF((A4-7.5) * (219/92.5) + 16<0,0,(A4-7.5) * (219/92.5) + 16)
Code:n = (IRE-7.5) * (219/92.5) + 16 if n < 0 n = 0 endif
-
Going back to our discusion of SMPTE RP 219 bars of several months ago, here are the digital values you would use for the percentages given in the spec, confined to studio swing 16 - 235.
Do they look good to you?
Code:Percent Digital 100 235 75 180 40 104 15 49 0 16 4 25 2 20 -2 12
-
-
Mainly a matter of curiosity. There are a few IRE values of interest in NTSC: 7.5 IRE, 100 IRE, various values found in NTSC color bars.
-
Color bars explained here:
http://avisynth.nl/index.php/ColorBars#TV_range
See also, the Rec.601 spec
https://www.itu.int/rec/R-REC-BT.601-7-201103-I/en
Recommendation ITU-R BT.601-7
Studio encoding parameters of digital television
(Annex 1, Table 3)
luminance signal
220 (8-bit) or 877 (10-bit) quantization levels with the black level corresponding to
level 16.00d and the peak white level corresponding to level 235.00d. The signal level
may occasionally excurse beyond level 235.00d or below level 16.00d.
each colour-difference signal
225 (8-bit) or 897 (10-bit) quantization levels in the centre part of the quantization
scale with zero signal corresponding to level 128.00d. The signal level may
occasionally excurse beyond level 240.00d or below level 16.00d. -
-
If this for your own hardware then you may not follow BT.601 rules on digital codes but once again - in market HW pedestal is created by NTSC encoder not coded with signal samples. Usually there is special bit to enable/disable pedestal as such there is always same 220 quantization levels they are squeezed in analog domain between 7.5IRE and 100IRE.
-
-
-
There is an error in the values in avisynth's pluge table. It shows one of the pluge stripes at -4 IRE. This is not allowed in analog NTSC as anything below blanking (0 IRE) interferes with the sync pulses.
See figure 17.5 here:
http://www.xilinx.com/support/documentation/application_notes/xapp514.pdfLast edited by chris319; 16th Oct 2016 at 19:18.
-
No one has suggested that the dreaded NTSC pedestal exists in the digital domain.
In broadcast work (ATSC) digital 0 and 255 are reserved for sync. -
I noticed that earlier today and have made some clarifications:
...a series of black and near-black bars: 0, -4, 0, +4 and 0 IRE relative to black.
Note 'IRE' is used here to mean 'percent luminance', on a scale from 0 (black) to 100 (white), ignoring the varying broadcast standards where black might be 0 IRE or 7.5 IRE depending on the country. -
I know I've seen a lower-than-zero PLUGE somewhere before...
[Attachment 38935 - Click to enlarge]
http://shootdatapost.com/blog/2012/2/21/hd-monitor-calibration-smpte-arib-and-white-balance.html
It's even an EBU recommendation...
[Attachment 38936 - Click to enlarge]
https://www.itu.int/rec/R-REC-BT.814-2-200709-I/en -
I don't know how to read the digital value of the black stripe level in BT.814-2, do you?
It says (12)48. -
-
This takes into account the fact that 0 is reserved for sync:
Code:=IF((A4-7.5) * (219/92.5) + 16<1,1,(A4-7.5) * (219/92.5) + 16)
Code:n = (IRE-7.5) * (219/92.5) + 16 if n < 1 n = 1 endif
-
While we're on the subject of Avisynth, in their table giving the 8-bit RGB values for "TV range" color bars, yellow is shown as R = 180, G = 180, B = 16. http://avisynth.nl/index.php/ColorBars#TV_range
Would it not be proper for, say, yellow to be R = 180, G = 180, B = 1?
I'll have to get out my copy of Ennes but IIRC in analog color bars B equals 0 in the yellow bar. No setup (7.5 IRE) is added, thus making all colors fully saturated. In "TV range", 0 is reserved for sync so the next avaliable value would be digital 1. By making B = 16 in the yellow bar it is not fully saturated.
It's true that 16 is the blackest black in "TV range" video but the values from 1 to 15 are also legal values and can be thought of as super black, just as anything between 0 and just below 7.5 IRE is super black. I consider digital 16 to be comparable to a digital setup or pedestal. -
>It's true that 16 is the blackest black in "TV range" video but the values from 1 to 15 are also legal values and can be thought of as super black...
Right, and the same applies to R, G and B in RGB space. "Yellow" has no blueness, and "zero blue" is digitized as 16 on a 0-to-255 scale.
It's possible to have negative blue, even if if can't be displayed - that's the whole purpose of studio swing.
(EDIT true, studio RGB is unusual, but that's the way ColorBars does it, and its behavior is correctly documented if I do say so myself)
EDIT for full range RGB, use code like
ColorBars(pixel_type="YV24").ConvertToRGB32(matrix ="Rec601")
or
ColorBarsHD.ConvertToRGB32(matrix="Rec709")
>I consider digital 16 to be comparable to a digital setup or pedestal.
Not really. PAL (and NTSC-J) functions perfectly well with no pedestal, and both PAL and NTSC can have occasional signal excursions below zero IRE without causing sync problems.
Besides, computer video has no setup and no sync. The color values 0 and 255 are perfectly legitimate.Last edited by raffriff42; 9th Nov 2016 at 07:41.
-
I got out my copy of Ennes and it clearly states in figure 2-18(c), page 77 that yellow, for example:
R = 1
G = 1
B = 0
In ATSC, 0 is reserved for sync so multiplying by 235 we get:
R = 235
G = 235
B = 1
Again, by making B equal to 16 we do not have a 100% saturated yellow. If a video application implements the yellow color bar with B = 16 then I would suggest that the program's implementation of color bars is flawed. -
Yes,
R = 1
G = 1
B = 0
...on a scale from 0.0 to 1.0.
Transforming to a 16..235 scale, we get
R = 1.0*219+16 = 235
G = 1.0*219+16 = 235
B = 0.0*219+16 = 16 -
The equation for transforming from what I will call normal (black=0.0, white=1.0) to studio (black=16, white=235) is, I believe:
Xstudio := Xnormal*219 + 16
for example,Code:1.055normal*219+16 = 247studio // "superwhite" 1.000normal*219+16 = 235studio // "white" / 100 IRE 0.000normal*219+16 = 16studio // "black" / 0 or 7.5 IRE -0.055normal*219+16 = 4studio // "superblack"
Xnormal := (Xstudio-16)/219
for example,Code:(254studio-16)/219 = 1.087normal // "superwhite" (235studio-16)/219 = 1.000normal // "white" / 100 IRE (16studio-16)/219 = 0.000normal // "black" / 0 or 7.5 IRE (1studio-16)/219 = -0.068normal // "superblack"
Last edited by raffriff42; 23rd Nov 2016 at 19:56.
-
The board software is having a bad day today.
The equation for transforming from what I will call normal (black=0.0, white=1.0) to studio (black=16, white=235) is, I believe:
Xstudio := Xnormal*219 + 16
What you call "normal" is actually the analog voltage normalized to 1 volt. Upon quantization 1 volt is digitized to 255 or 235 depending on whether it's full-scale or studio swing.
As I said in a message which mysteriously disappeared, in an historical context BT.601 did away with the NTSC concept of "setup". -
(16studio-16)/219 = 0.000normal // "black" / 0 or 7.5 IRE
(1studio-16)/219 = -0.068normal // "superblack"
You would need a floating-point variable to represent -0.068.Last edited by chris319; 23rd Nov 2016 at 21:00.
-
>These are not legal ATSC values.
1 and 16 are certainly legal. Those are the values that would be encoded, not -0.068 or 0.000.
>You would need a floating-point variable to represent -0.068.
Yes, my "point" exactly. "R=1, G=1, B=0" implies floating point, and -0.068 is valid in any floating-point representation.
Normalizing values to the zero-to-one range is done when discussing the mathematics of image processing, as was done in your reference.
Actual encoding and transmission are almost always done in some integer format, such as the common eight-bit "studio swing".
Similar Threads
-
IRE settings
By Leoslocks in forum DVD & Blu-ray RecordersReplies: 112Last Post: 25th Sep 2015, 14:48 -
Premiere CC 2015 clips luma values to 0 and 100 IRE
By Hypersonic1 in forum RestorationReplies: 3Last Post: 26th Aug 2015, 13:02 -
What the best way to adjust IRE without affecting image quality?
By premiumcapture in forum CapturingReplies: 3Last Post: 19th May 2015, 19:22 -
Unable to capture full range of IRE
By a2anonymous in forum CapturingReplies: 17Last Post: 2nd May 2014, 04:52 -
Avid Studio vs. Sony Vegas Pro/Studio
By HoosierGuy in forum EditingReplies: 12Last Post: 8th Dec 2011, 20:06