sRGB and ITU-R BT.709

Started by user_nle, October 02, 2015, 10:01:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

user_nle

 https://en.wikipedia.org/wiki/Rec._709
Rec. 709 coding uses SMPTE reference levels (a.k.a. "studio-swing", legal-range, narrow-range) levels where reference black is defined as 8-bit interface code 16 and reference white is defined as 8-bit interface code 235.

https://en.wikipedia.org/wiki/SRGB
sRGB uses the ITU-R BT.709 primaries, the same as are used in studio monitors and HDTV


However, I was looking for information about sRGB and found this:

http://www.imagemagick.org/script/color.php
The format of an sRGB value in the functional notation is 'rgb(r,g,b)', where r, g, and b are either three integer or float values in the range 0—255 or three integer or float percentage values in the range 0—100%.
and this
..sRGB values having a range of 0-255..

I'm a little confused. I can not understand this contradiction. What is the range of sRGB ?
Explain please.

Andy600

sRGB and Rec709 are virtually identical. They share the same D65 white point and RGB chromaticity (primaries) but there is a difference in gamma. sRGB is 2.2 gamma and rec709 is typically 2.4 gamma but can be between 2.2 and 2.4 gamma.

I think the confusion comes from how these values are shown relative to bit depth i.e. the scale you use. A white pixel that has RGB values of 255, 255, 255 in 8bit (2^8) is also 1023, 1023, 1023 in 10bit (2^10), 4095, 4095, 4095 in 12 bit (2^12) and so on.

sRGB is typically represented in 8bits with integer values between 0-255 (256 total code values) or 2^8 which would also be 0-100% or 0-100IRE depending how you look at it.

The range of sRGB is 0-255.

The difference between rec709 full range 0-255 and rec709 legal range (video levels) 16-235 is the remapping of black and white levels to provide some footroom and headroom in the signal to account for over brights and super blacks.

If you produce broadcast work in HD you should always output your final video with Rec709 legal levels and make sure RGB pixel values don't go out of range - some apps like Resolve have features to help you stay broadcast legal. Its good practice to do this for Vimeo and Youtube too.

Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

user_nle

QuoteThe range of sRGB is 0-255.
But why is it contrary to the standard  BT.709 ?  The standard says that the range is 16 35.

Andy600

sRGB and rec709 share primaries and white point but they are 2 different standards. There is no legal level in sRGB, it's simply sRGB.
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

JADURCA

@Andy600 - Thanks for explaining. Very useful to understand this technical standards. So, it's better to maintain the levels "legal range" when color correcting so people using different PC monitors calibrations or TV's settings, can have all the details of the image within blacks and whites thanks to the headroom? Or it only applies when broadcasting a video?

But, what about if you want a more contrast image with more blacks or even highlights, is not that a limitation when color correcting with an artistic expression like that on mind?

Andy600

It applies to broadcast HD. Deliverable codecs like h.264 will encode legal levels. The legal requirement was mainly so that viewers watching older CRT TVs would be able to watch digital broadcasts.

Whatever you do when grading is your own artistic choice but if the grade has extreme contrast or color you should test render a small amount in a deliverable codec to make sure there are no nasty surprises. It's good practice to do this anyway.

Its more important to grade on a calibrated monitor (preferably a reference monitor) in the colorspace that the video will be seen. This makes you aware of any problems early in the process and saves a lot of time later. You typically grade full range then legalize for delivery. legalizing will reduce chroma and/or luminance to a permitted level. If you are uploading to Youtube or Vimeo the metadata in the video file will tell the site how to encode it but it's not fool proof and again, it's worth uploading a test to check for gamma and levels consistency.
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

ItsMeLenny

I actually only thought it was 601 that used that colour range, which I swear wikipedia for 709 used to say it was 0 to 255, then again I've always classed wikipedia as one of the most unreliable resources (opinion).

On a somewhat related note though (more to 601) there was a DVD release of a movie (I think 'back to the future') which rather than compressing the contrast to fit in the 601 DVD luma range they instead clipped the blacks and whites to fit the luma range resulting in areas that were un-see-able in the darkness.

Andy600

Are you sure it wasn't a pirated DVD?  ;D no, but seriously it's not the only time that has happened. There were a couple of high profile product recalls of DVDs in the UK where levels were encoded wrongly. I'd hate to be the guy that was responsible for that  :D

Wikipedia tends to be correct and yes it does come from 601 but carries through into 709. If in doubt a bit of digging on http://www.poynton.com is a solid reference as he was directly involved in establishing the standards.
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

DeafEyeJedi

5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

st599

Quote from: Andy600 on October 03, 2015, 11:50:01 AM
It applies to broadcast HD. Deliverable codecs like h.264 will encode legal levels. The legal requirement was mainly so that viewers watching older CRT TVs would be able to watch digital broadcasts.

Whatever you do when grading is your own artistic choice but if the grade has extreme contrast or color you should test render a small amount in a deliverable codec to make sure there are no nasty surprises. It's good practice to do this anyway.

Its more important to grade on a calibrated monitor (preferably a reference monitor) in the colorspace that the video will be seen. This makes you aware of any problems early in the process and saves a lot of time later. You typically grade full range then legalize for delivery. legalizing will reduce chroma and/or luminance to a permitted level. If you are uploading to Youtube or Vimeo the metadata in the video file will tell the site how to encode it but it's not fool proof and again, it's worth uploading a test to check for gamma and levels consistency.
Nope, it's to allow for realtime filtering.  If you don't have space, the filter overshoots would create ringing.

Andy600

Yes. Anything outside of usable range 16-235 gets clipped by your HD TV. Sorry I should have said rec709 power law function (it's gamma) is because of legacy CRT, not the range. ???
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

user_nle

Has HDTV  full range Rec709 (0-255) or  legal range (video levels) Rec709 (16-235) ?

ansius

sadly, all of this is rather pointless. why, let me try to explain.

I shoot much of my work on DSLRs and deliver it for broadcast, with rather strict rules (MTG). meaning 16-235 and so on. encoders mostly do not care for the levels, except few, in Adobe world -  I can encode illegal h264 within a blink of an eye, either using dslr material or color grading it wrongly. Broadcast often deals it with making you use codec that would obey either 601 (IMX30 for SD) or 709 (XDCAM).

So you should always before delivery legalize the footage for broadcast use, but for web, does not matter, people screw up their screen setting - do what ever it will be bad. Most of the smart TVs try to adjust for the material (that should contain metadata about profile) and still screw it up by "enhancing" the picture. so honestly there is no telling will or will not the tv clip illegal levels, some codecs do (DNxHD is notoriously misbehaving in Adobe world if contains illegal levels), most of satellite and cable decoders do, not the TV (except old analog ones).

funny, it was harder to encode SD wrongly, that it is with HD today. not to start an other discussion - they really should not make you pay for using a certain standard, it is one of the reasons there are so may to chose from.

few words about my workflow, If I know that I'll have to deliver for broadcast I would use Technicolor CineStyle profile, because it is matching more to the broadcast formats, than all other (there is a con tough it a bit cripples the dynamic range, i've found) - for rest, I like Marvels - easy to grade if white balance is right.

I see no point using AdobeRGB for video - to much hassle to make video legal, and there is no point converting /legalizing footage to 709 unless you use an 709 compliant calibrated external monitor trough SDI or similar. I would stick to sRGB, and grade it using scopes, and legalese it with a custom curve or your favorite tool.
Canon EOS 7D & 40D, EF-S 17-85mm IS USM, EF 28-300mm IS USM, Mir-20, Mir-1, Helios 44-5, Zenitar ME1, Industar 50-2, Industar 61L/Z-MC, Jupiter 37A, TAIR-3
http://www.ansius.lv http://ansius.500px.com

Audionut

Quote from: Andy600 on October 03, 2015, 06:53:07 PM
Anything outside of usable range 16-235 gets clipped by your HD TV.

In my experience, most displays these days will happily accept and display full range signals just fine.  I know mine does.  Look for an option regarding black level, it may have simple option like high or low.

QuotesRGB is a standard RGB color space created cooperatively by HP and Microsoft in 1996 for use on monitors, printers and the Internet.

sRGB uses the ITU-R BT.709 primaries, the same as are used in studio monitors and HDTV,[1] and a transfer function (gamma curve) typical of CRTs. This specification allowed sRGB to be directly displayed on typical CRT monitors of the time, a factorREC which greatly aided its acceptance.

This is why sRGB is full range (0-255), because it's target market is computing.  BT.709 is targeted towards broadcasting, hence the reduced levels (16-235).  A proper display chain should happily render either level range without problems, mapping source level range to target level range.

It amazes me to this day, that someone such as myself, who only has an interest in accurate display reproduction, has an apparently far greater understanding of the processes involved (which isn't much), then the content creators themselves.  Calibrate your display any which way you want, you're still at the mercy of errors in the content itself, due to the reference monitor used by the content creator being calibrated god knows how.

It's not likely to get any better with BT.2020, since AFAIK the transfer function is not absolutely defined.  Really, they should agree on a well defined set of specifications (including transfer function) and lock that shit down.  Anything that doesn't obey these standards should be scrubbed from existence.  Then the only issue remaining would likely just be the display characteristics.

DeafEyeJedi

Clearly there's a valid point taken you got there, @Audionut!
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

user_nle

About full range Rec709 (0-255) and  legal range (video levels) Rec709 (16-235) ..

Quote from internet:
As far as I'm aware there is no such thing as "full range Rec709 (0-255)".  It's certainly not in the published spec as posted on the ITU website.  When expressed in 8-bit terms Rec.709 or BT.709 defines values of 0 and 255 as reserved for synchronisation purposes and values from 1 to 15 and 236 to 254 as headroom to handle transient over- and undershoot.  That's it.  There's no ambiguity in the specification.

JADURCA

So, basically sRGB is a color space for distribution for different platforms like YouTube, Vimeo, Cellphones, etc. And REC709 is for HDTV Broadcasting. So they have headroom for more control of the material to be presented.

st599

Quote from: JADURCA on October 05, 2015, 07:15:44 PM
So, basically sRGB is a color space for distribution for different platforms like YouTube, Vimeo, Cellphones, etc. And REC709 is for HDTV Broadcasting. So they have headroom for more control of the material to be presented.
No.  sRGB isn't used in video.  ITU-R BT.601, ITU-R BT.709 and ITU-R BT.2020 define video.

user_nle

Quote from: st599 on October 06, 2015, 11:19:18 PM
No.  sRGB isn't used in video.  ITU-R BT.601, ITU-R BT.709 and ITU-R BT.2020 define video.
But what about RGB-video ?
Uncompressed RGB Video Subtypes

=====
The luma channel in Y′CbCr video (the Y value) can range from 0 to 255, but full black is defined as 16, and full white is defined as 235.
The values from 0 to 16, and 235 to 255, are reserved. CbCr can range from 16 to 240

But what about YUV (analog video:  NTSC, PAL/SECAM, video on VHS tapes ) ?
How defined reference black and how defined reference white in YUV-analog video (not Y′CbC) ?



JADURCA

Quote from: st599 on October 06, 2015, 11:19:18 PM
No.  sRGB isn't used in video.  ITU-R BT.601, ITU-R BT.709 and ITU-R BT.2020 define video.

Then if sRGB is not for video, why it is as an option when processing videos?


Audionut


ansius

because you have DSLRs and other cameras that generate sRGB!
Canon EOS 7D & 40D, EF-S 17-85mm IS USM, EF 28-300mm IS USM, Mir-20, Mir-1, Helios 44-5, Zenitar ME1, Industar 50-2, Industar 61L/Z-MC, Jupiter 37A, TAIR-3
http://www.ansius.lv http://ansius.500px.com

reddeercity

Quote from: JADURCA on October 09, 2015, 04:45:06 PM
Then if sRGB is not for video, why it is as an option when processing videos?
What you are seeing in Sony Vegas Pro is the sLog Workflow , The "ACES RRT sRGB"(Reference Rendering Transform)
Which is for Display Type as there's more then one , So to understand why is because this is the standard color space for Computer displays .
QuotesRGB is a standard RGB color space created cooperatively by HP and Microsoft in 1996 for use on monitors, printers and the Internet
S-Log and ACES workflow in Vegas Pro 13.0 online Help Manual , It explains everything.
QuoteACES RRT (sRGB)- This setting is best for desktop display monitors.
"ACES workflow" in Sony Vegas is pretty easy setup,  Nice  :)
Here is a good read About the sRGB color space , it's obsolete now but still has good information .