Is 12K BRAW 12 bit or 16?

The place for questions about shooting with Blackmagic Cameras.
  • Author
  • Message
Offline

Tom Roper

  • Posts: 521
  • Joined: Sat Apr 14, 2018 4:59 pm
  • Real Name: Tom Roper

Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 3:47 am

Everything I have read including the spec sheet on B&H says it is 12 bit, except one source says 16. That source is DaVinci Resolve Studio itself. What's the truth (for 12K BRAW)? No speculating, please. Let's have a solid, definitive answer.
Offline
User avatar

timbutt2

  • Posts: 2835
  • Joined: Tue Nov 12, 2013 10:32 am
  • Location: St. Petersburg, Florida, United States of Amercia

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 4:11 am

I'm pretty sure the definitive answer is: 16-Bit Linear and 12-Bit Log.

Perhaps someone from Blackmagic will give you an official statement, but I've got a feeling this has been answered in the past to be what I wrote above.
"I'm well trained in the art of turning **** to gold." - Tim Buttner (timbutt2)

Cameras: URSA Mini Pro G2 & Pocket 6K Pro
Past: UM4.6K, P6K, BMCC 2.5K
Computers: iMac 5K (Mid 2020) & MacBook Pro Retina 15.4in (Mid 2018)
Offline
User avatar

dondidnod

  • Posts: 633
  • Joined: Sun Nov 25, 2018 7:52 am
  • Location: Castro Valley, CA
  • Real Name: Donald Keller

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 4:39 am

This was discussed in this thread:

"16 bit linear (Sony) is basically the same as 12 bit log (Blackmagic)."

Blackmagic Dynamic Range vs The Rest

https://www.reddit.com/r/bmpcc/comments ... _the_rest/
Offline
User avatar

Jamie LeJeune

  • Posts: 2012
  • Joined: Tue Feb 26, 2013 4:33 am
  • Location: San Francisco

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 4:56 am

The image data is stored in BRAW as 12bit log. Resolve can decode that to 16 bit linear.

For what it’s worth, ARRIRAW is also 12bit log.
www.cinedocs.com
http://www.imdb.com/name/nm4601572/
Offline

CaptainHook

Blackmagic Design

  • Posts: 2054
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 5:26 am

12bit "non-linear" encoded which is different to our "Film" gamma log curves.

As Jamie says ARRIRAW is apparently 12bit log and the new ALEXA35 with LogC4 has moved to 13bit for ARRIRAW to store the extra dynamic range without changing distribution of stops over code values.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline
User avatar

timbutt2

  • Posts: 2835
  • Joined: Tue Nov 12, 2013 10:32 am
  • Location: St. Petersburg, Florida, United States of Amercia

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 5:39 am

CaptainHook wrote:12bit "non-linear" encoded which is different to our "Film" gamma log curves.

As Jamie says ARRIRAW is apparently 12bit log and the new ALEXA35 with LogC4 has moved to 13bit for ARRIRAW to store the extra dynamic range without changing distribution of stops over code values.
Wait?! What?! That’s the first I saw about the Alexa 35 with LogC4 going to 13 Bit. Interesting…

Guess I didn’t pay attention to that detail in their press release.

But thank you for clarifying this Hook!


Sent from my iPhone using Tapatalk
"I'm well trained in the art of turning **** to gold." - Tim Buttner (timbutt2)

Cameras: URSA Mini Pro G2 & Pocket 6K Pro
Past: UM4.6K, P6K, BMCC 2.5K
Computers: iMac 5K (Mid 2020) & MacBook Pro Retina 15.4in (Mid 2018)
Offline

Tom Roper

  • Posts: 521
  • Joined: Sat Apr 14, 2018 4:59 pm
  • Real Name: Tom Roper

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 6:08 am

Yes, thank you all, but somebody break down CaptainHook's explanation for me..do I have this right..BRAW is 12 bit non-linear encoded, not the same as BMD film log though. In Resolve is decoded into 16 bit linear, or I guess anything else, film, extended video etc. Internally then, is fundamentally 16 bit. How is this done? Half float real number. I have a feeling I am way off.
Offline

Tom Roper

  • Posts: 521
  • Joined: Sat Apr 14, 2018 4:59 pm
  • Real Name: Tom Roper

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 7:49 am

I think it's worthy of re-reading the Resolve manual because it's pretty specific that Resolve is working internally at 32 bits and always preserving all the data with very few use cases of clipping, one being use of applied input luts as I recall, where data has already been constrained before the 32b internal processing takes place.

Hopefully Captain Hook will clarify first why Resolve reports 12K sourced BRAW as 16 bit, and later answer your question Jamie about what sounds like truncating bits when rendering proxies. I don't think that should happen whether in YRGB color managed or standard display referenced YRGB. I think Hook has said with regards to the latter that non-color managed is working in WG/Intermediate by default or you can choose it in Custom color managed color processing mode, but that as long as your workspace can contain the full data space of your camera there will be no clipping, and that WG/Intermediate is very large, as in larger than ACES.
Offline
User avatar

Jamie LeJeune

  • Posts: 2012
  • Joined: Tue Feb 26, 2013 4:33 am
  • Location: San Francisco

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 8:49 pm

I should explain why I wrote that as far as I know, BRAW decodes to 16 bit linear.

First, from ARRI and other sources it has been my understanding that 12bit log and 16 bit linear, while not 100% identical, when 12 bit log is transformed to 16 bit linear the result is functionally equivilent to if the source had been 16 bit linear. In other words, 12bit log is a very efficient form of virtually lossless compression when compared with 16 bit linear.

The proxy issue from BRAW source clips in projects set to Resolve Color Management may be a clue to how Resolve handles BRAW clips internally. Whenever a project is set to Resolve Color Management, any proxy files made from BRAW source clips will have the highlights clipped unless they are rendered in 16 bit float EXR (which of course totally defeats the purpose of even making a proxy). The fact that Blackmagic still hasn't fixed this basic issue with BRAW proxies in color managed projects might be because internally Resolve always decodes BRAW clips to 16 bit floating point linear before moving it to the chosen working gamma and gamut, which would also explain why it identifies them as 16 bit.

I should be clear that the clipping of highlights in proxies from BRAW source clips does not happen with proxies made in an unmanaged YRGB project. In that case, the proxies will be created based on the option set in project level for BRAW decode and the proxies files made in that mode will appear correctly. It's only an issue in color managed projects where proxy files from BRAW source media appear to be clipped.

Hook, can you provide some clarity here about what is going on?
www.cinedocs.com
http://www.imdb.com/name/nm4601572/
Offline

John Paines

  • Posts: 5787
  • Joined: Tue Jul 28, 2015 4:04 pm

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 8:58 pm

Jamie LeJeune wrote:I should be clear that the clipping of highlights in proxies from BRAW source clips does not happen with proxies made in an unmanaged YRGB project.


Are you sure? It's been a long-standing "feature" that optimized media, rendered in anything but 16-bit float, ProRes 4444, ProRes 4444 XQ, or DNxHR 444, will clip (and I'm sure about these other codecs, either; tests weren't encouraging). The 18 manual is still warning about this one:

Preventing Clipping: You should use 16-bit float, ProRes 4444, ProRes 4444 XQ, or DNxHR 444 if
you plan on grading using optimized media. This is particularly true for HDR grading.


And again:

— Preventing Clipping: Be aware that the format you choose will determine whether out-of bounds
image data is preserved when the signal is optimized. If you find that image data
(typically super-white levels) are clipped after optimization, you should switch to 16-bit float,
ProRes 4444, or ProRes 4444 XQ; in particular, any of these three codecs are appropriate
optimized formats for HDR grading.
Offline
User avatar

Jamie LeJeune

  • Posts: 2012
  • Joined: Tue Feb 26, 2013 4:33 am
  • Location: San Francisco

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 9:15 pm

Those are separate issues regarding data levels and *optimized* media. I am writing here about *proxy* media, which is totally different from optimized media. It would defeat the purpose of creating proxy media if it had to be rendered in linear to work.

This highlight clipping in proxy media only happens to BRAW source clips in color managed projects, and it occurs even if rendered to ProRes4444XQ.
It does not happen to proxies made from other raw formats such as R3D and Canon raw in color managed projects regardless of the proxy codec chosen, nor does it happen to proxies made from BRAW source clips in an unmanaged project.

It's a simple issue to recreate. I highly recommend testing it to see for yourself.
www.cinedocs.com
http://www.imdb.com/name/nm4601572/
Offline

John Paines

  • Posts: 5787
  • Joined: Tue Jul 28, 2015 4:04 pm

Re: Is 12K BRAW 12 bit or 16?

PostFri Jun 24, 2022 9:21 pm

Am not sure why it would be any different for proxies -- there can't be a separate conversion process? -- but if you've tested it....
Offline

John Brawley

  • Posts: 4267
  • Joined: Tue Aug 21, 2012 7:57 am
  • Location: Los Angeles California

Re: Is 12K BRAW 12 bit or 16?

PostSat Jun 25, 2022 3:52 am

16bit lin stored as 12 bit LOG.

JB
John Brawley ACS
Cinematographer
Currently - Los Angeles
Offline

Tom Roper

  • Posts: 521
  • Joined: Sat Apr 14, 2018 4:59 pm
  • Real Name: Tom Roper

Re: Is 12K BRAW 12 bit or 16?

PostSat Jun 25, 2022 6:13 am

John Brawley wrote:16bit lin stored as 12 bit LOG.

JB


Thank you JB. That answered my question. The others were right too, Jamie TimButt2 and of course Hook.
Last edited by Tom Roper on Sat Jun 25, 2022 7:02 am, edited 1 time in total.
Offline

Tom Roper

  • Posts: 521
  • Joined: Sat Apr 14, 2018 4:59 pm
  • Real Name: Tom Roper

Re: Is 12K BRAW 12 bit or 16?

PostSat Jun 25, 2022 6:57 am

Jamie LeJeune wrote:I should explain why I wrote that as far as I know, BRAW decodes to 16 bit linear.

First, from ARRI and other sources it has been my understanding that 12bit log and 16 bit linear, while not 100% identical, when 12 bit log is transformed to 16 bit linear the result is functionally equivilent to if the source had been 16 bit linear. In other words, 12bit log is a very efficient form of virtually lossless compression when compared with 16 bit linear.

The proxy issue from BRAW source clips in projects set to Resolve Color Management may be a clue to how Resolve handles BRAW clips internally. Whenever a project is set to Resolve Color Management, any proxy files made from BRAW source clips will have the highlights clipped unless they are rendered in 16 bit float EXR (which of course totally defeats the purpose of even making a proxy). The fact that Blackmagic still hasn't fixed this basic issue with BRAW proxies in color managed projects might be because internally Resolve always decodes BRAW clips to 16 bit floating point linear before moving it to the chosen working gamma and gamut, which would also explain why it identifies them as 16 bit.

I should be clear that the clipping of highlights in proxies from BRAW source clips does not happen with proxies made in an unmanaged YRGB project. In that case, the proxies will be created based on the option set in project level for BRAW decode and the proxies files made in that mode will appear correctly. It's only an issue in color managed projects where proxy files from BRAW source media appear to be clipped.


Jamie, I think you're right. I was going to speculate that the behavioral difference between the other raws and braw in color managed mode might boil down to clipping caused by scene referred gamma in braw versus display referenced gamma in the others, i.e. metadata, a distinction that disappears in non color managed mode where everything becomes display referenced. Which if true, would seem to make it incumbent to use non color managed mode for generating proxies. That's as far as I feel comfortable speculating on but behind it are several behavioral observations, you have a raw palette in the color tab with duplicate controls in the raw palette of the project tab. In color managed mode they are always grayed out in the color tab while not necessarily grayed out in the project tab but, the controls in the project tab still don't work in color managed mode even if they are not grayed out, while they can work in the non color managed mode as with the color tab. And as you know, Resolve doesn't need to be told by you that a file clip is braw, it already knows this behind the scene, but not necessarily so with non-native raws not inherently identifiable so it opens the possibility of each type being treated differently when mixed on a timeline, but would not seem to explain why only the rendered proxy clipped if it otherwise looked correct on the timeline viewer. Bottom line here, is my question has been answered, feel free to take over this topic as far as you want to find the answers.
Offline
User avatar

Jamie LeJeune

  • Posts: 2012
  • Joined: Tue Feb 26, 2013 4:33 am
  • Location: San Francisco

Re: Is 12K BRAW 12 bit or 16?

PostSat Jun 25, 2022 8:04 am

Yes, the proxy issue is best dealt with in its own thread. I only mentioned it as the reason I’d noticed how internally Resolve appears to decode BRAW to linear before transforming it to the working color space in color managed projects.

EDIT #1 — if decoding BRAW to linear wasn’t a necessary step, the proxy problem should have been fixed when I flagged it last year. But they haven’t fixed it which says perhaps it’s something inherent because it is absolutely bizarre to have BMD’s own codec be the only codec that doesn’t yield usable proxies in BMD’s own color management system in Resolve.
EDIT #2 — This has changed in the latest beta, it now seems to use a custom Gen4 gamma.
Last edited by Jamie LeJeune on Sat Jun 25, 2022 11:55 pm, edited 3 times in total.
www.cinedocs.com
http://www.imdb.com/name/nm4601572/
Online

Hendrik Proosa

  • Posts: 3015
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Is 12K BRAW 12 bit or 16?

PostSat Jun 25, 2022 8:50 am

12bit log encoded integer data most probably gets expanded to 16bit linearized integer data , not half-floats, if there is a 16bit intermediate step in decoding at all (I doubt it, because if processing in decoder is not done on shorts it would be unnecessary extra step). Sensor data can’t go outside the range of normalized 0.0-1.0 so floats are not strictly necessary in this expansion step (can’t go over sensor clip level).

Braw decoder itself does internal processing on 32bit floats most probably and can output decoded data as 8bit unsigned, 16bit unsigned short or 32bit float buffer.

So as for original question, braw stores data as 12bit and this data originated as 16bit before encoding which in turn originated as x bits from sensor.
I do stuff.
Offline
User avatar

Jamie LeJeune

  • Posts: 2012
  • Joined: Tue Feb 26, 2013 4:33 am
  • Location: San Francisco

Re: Is 12K BRAW 12 bit or 16?

PostSat Jun 25, 2022 11:53 pm

I did some testing of the latest beta and the proxy issue in RCM hasn't been fixed, but it no longer assumes linear. I posted that in the appropriate thread on the Resolve forum here: https://forum.blackmagicdesign.com/viewtopic.php?f=36&t=158626#p860631
www.cinedocs.com
http://www.imdb.com/name/nm4601572/
Offline
User avatar

Jamie LeJeune

  • Posts: 2012
  • Joined: Tue Feb 26, 2013 4:33 am
  • Location: San Francisco

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 2:48 am

CaptainHook wrote:the new ALEXA35 with LogC4 has moved to 13bit for ARRIRAW to store the extra dynamic range without changing distribution of stops over code values.
An interesting additional detail from this this interview with Harald Brandel from ARRI about the Alexa 35 is that the A/D conversion is to 18 bit linear, for the same reason of holding all the dynamic range.
https://podcasts.apple.com/us/podcast/colorist-meetup-dedicated-to-professional-colorists/id1536205711?i=1000567200794
www.cinedocs.com
http://www.imdb.com/name/nm4601572/
Offline

CaptainHook

Blackmagic Design

  • Posts: 2054
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 5:05 am

Jamie LeJeune wrote:
CaptainHook wrote:the new ALEXA35 with LogC4 has moved to 13bit for ARRIRAW to store the extra dynamic range without changing distribution of stops over code values.
An interesting additional detail from this this interview with Harald Brandel from ARRI about the Alexa 35 is that the A/D conversion is to 18 bit linear, for the same reason of holding all the dynamic range.
https://podcasts.apple.com/us/podcast/colorist-meetup-dedicated-to-professional-colorists/id1536205711?i=1000567200794

Also covered by Harald in page 54 here where I got the 13bit info from:
https://www.fdtimes.com/pdfs/free/115FD ... 04-150.pdf
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Howard Roll

  • Posts: 2506
  • Joined: Fri Jun 03, 2016 7:50 am

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 3:24 pm

According to this quote from the article, 12 bit (4096) Arriraw is only capable of resolving 8 stops of DR.

What am I missing?

So, 18-bit from the sensor results in 13-bit after processing?

Yes. It’s 18-bit linear coming into the processing, and then either before the color processing, it gets encoded into 13-bit ARRIRAW, or after the LogC4 curve it gets encoded in 12-bit LogC4 for Apple ProRes.

ARRIRAW is also a Log-like exposure, which also allocates a fixed amount of digital numbers for each stop. We always had 512 numbers in each stop. So when you look at neutral gray and then one stop over, you have 512 intermediate steps, and if you add yet another stop, you have another 512 numbers.


Good Luck
Online

Hendrik Proosa

  • Posts: 3015
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 7:06 pm

13 bits fit 2^9 * 2^4 numbers == 16 stops at 512 discrete values per stop. Tracing backwards from this does tell that according to same logic 12 bits will only hold 2^3 stops. So I guess there is something important omitted from that description or it has that 512 part wrong.
I do stuff.
Offline
User avatar

Jamie LeJeune

  • Posts: 2012
  • Joined: Tue Feb 26, 2013 4:33 am
  • Location: San Francisco

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 7:46 pm

Isn't it that 512 values is only used for most of the signal, but the lowest few stops are in the toe of the curve, each with fewer code values?
https://www.arri.com/resource/blob/31918/66f56e6abb6e5b6553929edf9aa7483e/2017-03-alexa-logc-curve-in-vfx-data.pdf
CleanShot 2022-06-28 at 12.35.53.png
CleanShot 2022-06-28 at 12.35.53.png (65.25 KiB) Viewed 6389 times
www.cinedocs.com
http://www.imdb.com/name/nm4601572/
Offline
User avatar

Jamie LeJeune

  • Posts: 2012
  • Joined: Tue Feb 26, 2013 4:33 am
  • Location: San Francisco

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 8:18 pm

Kim Janson wrote:I am so confused, what is the remaining problem, to me the "13 bits fit 2^9 * 2^4 numbers == 16 stops at 512 discrete values per stop." is the answer.
The Alexa 35 records 17 stops.
CleanShot 2022-06-28 at 13.16.42.png
CleanShot 2022-06-28 at 13.16.42.png (238.88 KiB) Viewed 6368 times
www.cinedocs.com
http://www.imdb.com/name/nm4601572/
Online

Hendrik Proosa

  • Posts: 3015
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 10:10 pm

Question by Howard was about previous 12bit storage which at 512 values per stop gives 8 stops.
I do stuff.
Offline

Howard Roll

  • Posts: 2506
  • Joined: Fri Jun 03, 2016 7:50 am

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 10:48 pm



This makes more sense
In the linear part, the Log C curve has 73- 78 code values per stop in a 10-bit encoding.


Extrapolated to 12, bit Log-C would contain 292-312 code values per stop. Averaged at ~300 per stop it's about 13.5 stops which is close to reality. I still don't see where the 512 number comes from.

Good Luck
Offline

CaptainHook

Blackmagic Design

  • Posts: 2054
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Is 12K BRAW 12 bit or 16?

PostTue Jun 28, 2022 11:01 pm

If you can, look at SMPTE RDD 30:2014 - "ARRIRAW Image File Structure and Interpretation Supporting Deferred Demosaicing to a Logarithmic Encoding"
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**

Return to Cinematography

Who is online

Users browsing this forum: AdrianEddy, Bing [Bot], Yannick Willox and 79 guests