[CinCV TNG] VideoScope and CinelerraCV

igor_ubuntu sitelve at gmail.com
Fri Nov 13 21:32:34 CET 2015

Hi everyone !

Patch by Craig Lawson (7 Sep 2007)



*" Add optional waveform graduations for IRE 7.5% black limit, ITU-R
B.601limits, ITU-R B.709 limits.  Add checkboxes to control their display."*
------ ----------------- ---------------

  At present we have in CinCV-interface:

ITU-R B.709 limits - checkbox `HDTV`
ITU-R B.601 limits  - checkbox `MPEG`
IRE 7.5% black limit - checkbox `NTSC`


Ok. Here goes! :-)

PART - 1
Quote from source code:

*655   set_tooltip("Indicate ITU-R BT.709 limits. Use when rendering to
HDTV and sRGB.");*


But these limits (in CV) with patch by Craig Lawson  are incorrect !

BT.709 does not define sRGB encoding.  sRGB is standartRGB.
BT.709  defines `Studio RGB`, which is RGB with black at 16 and white at
"sRGB" is not an abbreviation of "Studio RGB"

-- Rec. 709 defines an R’G’B’ (StudioRGB) encoding and a Y’CbCr encoding
-  Black level -  R, G, B, Y = 16
– Nominal peak -  R, G, B, Y  = 235


*Quote from Rec. ITU-R BT.709-5
<https://www.itu.int/rec/R-REC-BT.709-5-200204-S/en>       Digital
representationCoded signal R, G, B, or Y, CB, CRQuantization levels(– Black
level R, G, B, Y 16  – Achromatic CB, CR 128    – Nominal peak      – R, G,
B, Y 235        – CB, CR 16 and 240Quantization level assignment(3) 8- bit
coding– Video data– Timing references(2)6.12Filter characteristics(4)– R,
G, B, Y 1 through 254– CB, CR 0 and 255*

But in CinCV-Waveform monitor of VideoScope  ITU-R B.709 limits (HDTV
checkbox) = 0-100 (0-255)
It is not right !

CinelerraCV represents the [16 to 235] range as 6.3% to 92% in it’s
waveform monitor (VideoScope).


In the software, apparently it is the percentage of 255.
16/255 = 6.3%
235/255 = 92.2%
Or it is very likely to be one of these two possibilities:
1)  The software uses integer values 0-255, and when reading a Rec.709
Y'CbCr file, it decodes that to black at 16,16,16 and white at 235,235,235
2) The software uses floating point values 0-1, and when reading a Rec.709
Y'CbCr file, it decodes that to black at 16/255,16/255,16/255 and white at

CinelerraCV represents the [0 to 255] range as 0% to 100% in it’s waveform
monitor (VideoScope).


Because of the nature of how CinelerraCV handles media on the timeline, it
is possible to have a RGB- range (0-255) clip on the same timeline next to
a YCbCr-clip (16-235) and levels will be correctly scaled/displayed and
preserved for each in WFM.

***********   *****    **********

        PART - 2
 About   CinCV-checkbox `NTSC`  - IRE 7.5% black limit


*Quote from source code:  71         int show_IRE_limits;   // Black =
7.5% 107  int  limit_IRE_black;  // IRE 7.5% 687
set_tooltip("Indicate IRE 7.5% black level.");  684  : BC_CheckBox(x, y,
plugin->config.show_IRE_limits, _("NTSC"))685 {686         this->plugin =
plugin;687         set_tooltip("Indicate IRE 7.5% black level.");*



- Digital video levels are not measured in IRE.
- IRE refers only to analogue video.
- `7.5 IRE Setup` is a purely analogue phenomena, and is only ever relevant
for North American NTSC.
- `7.5 IRE Setup` should only ever be removed or added to an analogue
signal - never a digital one.
- The Waveform monitor of CinCV-VideoScopes does not show what our analog
levels are like.
- CinCV-WFM is not a CinCV-WFM analog waveform monitor.
- CinCV-WFM  doesn't measure IRE-analog video levels, so it can't
accurately represent them.
- CinCV-WFM is just a *digital* waveform monitor.
- 0 IRE or 7.5 IRE, the black levels in the digital data should be the
same: 16.

Thus, the  CinCV-checkbox `NTSC`(IRE 7.5% black limit)  is not meaningful,
it does not correspond to the theory and misleads users.
It is just not right.




Useful links:




Most of the confusion occurs when analog to digital and digital to analog
conversions take place.
In NTSC, a composite analog signal enters a decoder and the 7.5 IRE black
levels are mapped to a digital value of 16.
 In PAL systems, 0 millivolt (black) is also mapped to a digital level of
 NTSC-J systems are similar to NTSC except that there is no set-up. Black
(0 IRE) levels are also mapped to 16.
------------------    --------------------        ---------------


Going from analog to digital and back again, if you're following the spec,
analog black goes to digital black and vice versa.
Whether digitizing from NHK in Tokyo (0 IRE setup) or NBC in New York (7.5
IRE setup), the black levels in the digital data should be the same: 16.
Likewise, the blackest black in a picture coming out of the camera section
of a camcorder should always be laid to tape with a luma level of 16,
regardless of what part of the world the camera is designed for.
And that same tape should play back in Japan with 0 IRE setup, and in the
USA with 7.5 IRE setup.

--------------------    ---------------------    ------------------



Some people confuse the digital luminance value issues discussed in this
article with the analog measurement of brightness, known as IRE (Institute
of Radio Engineers) units. They are indeed both definitions of how to
represent black and white. But they operate in different worlds and are not
interchangeable, nor is one a replacement for the other.

In analog video, the electrical reference for white is generally defined as
100 IRE, using near-identical electrical levels regardless of format. The
electrical reference for black depends on what video format you are using,
and even what country you are in: PAL and the Japanese version of NTSC
always use 0 IRE to define black. Composite NTSC video in North America
uses an electrical value of 7.5 IRE, which is sometimes referred to as
set-up. Component video in North America can use either 0 or 7.5 IRE for
black; 7.5 seems to be more common.

The analog-to-digital and digital-to-analog conversion portions of your
video card or deck decide how to translate luminance values between these
two worlds. For example, if set to 0 IRE and digitizing to a
601-specification data stream, a video signal at 0 IRE would be translated
to a value of 16, and video at 100 IRE would be translated to 235. Hot
spots brighter than 100 IRE would be captured as values above 235.

If this same data stream was output through hardware with 7.5 IRE setup
enabled, a value of 16 would create a video signal at 7.5 IRE, and a value
of 235 would create a 100 IRE signal.
Most video editing systems have a 0/7.5 IRE switch, but note that some -
such as the Media 100 - actually only change this reference on the output,
always keeping the input at 7.5 IRE for NTSC systems.

Some mistakenly assume that a luminance range of 16-235 means 7.5 IRE setup
was used, but this is not true. For example, a value of 16 still defines
black in any 0 IRE system, including PAL and Japanese NTSC. If a videotape
was recorded with 7.5 IRE setup, but digitized through hardware that uses 0
IRE for its black reference, and then translated through a codec that
stretched video black down to a numeric value of 0, "black" on the 7.5 IRE
tape would indeed decode at a value around 16 - but only because someone
made a mistake.

------------------    --------------------        ---------------
Please note that application-based waveform monitors (i.e. in your NLE) are
unable to measure analog levels!
They cannot tell if your digital-analog converter will convert levels
properly or not.
Don't get confused by any settings that mention 7.5 IRE!

--------------          ---------------           -------------------

Digital SMPTE 601 standard video is 16-235. It's always 16-235 - it has
nothing to do with setup, and it's the same for PAL, NTSC and matian (if
martians have digital video).

DV and the Apple DV codec are both 16-235. In PAL land 16 is mapped to
black which is 0 IRE. In NTSC North America 16 is mapped to 7.5 IRE which
is black, and in Japan, it's mapped to 0 IRE which is black. All map 235 to
100 IRE white.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cinelerra-cv.org/pipermail/cinelerra/attachments/20151113/1ee945b2/attachment.html>

More information about the Cinelerra mailing list