BRAW: Changing Dual-ISO Gain circuits mid-take

Do you have questions about Desktop Video, Converters, Routers and Monitoring?
  • Author
  • Message
Offline

piersdeseilligny

  • Posts: 2
  • Joined: Tue Apr 07, 2020 8:45 pm
  • Real Name: Piers Deseilligny

BRAW: Changing Dual-ISO Gain circuits mid-take

PostFri May 29, 2020 6:57 pm

Hi everyone,

The BMPCC4K allows changing ISO mid-take, including changing between the dual-ISO gain circuits - however the Camera RAW Decode panel in Resolve does not reflect those changes.

For example, I started recording a clip at ISO 1250, and then switched it mid-take to 400. However, Resolve only shows options for the higher ISO range:

Annotation 2020-05-29 194845.jpg
Annotation 2020-05-29 194845.jpg (36.42 KiB) Viewed 594 times


This would be perfectly normal behaviour if the entire clip was recorded on the higher ISO range, but what happens if a clip is "in both"? It's physically impossible for the ISO to be 1250 if I shot with the lower gain circuit, so how does it behave under the hood? How does Resolve behave under the hood, and how do I know what ISO Resolve is actually using?
Offline

Hendrik Proosa

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

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostSat May 30, 2020 2:13 pm

Does it show the iso value in clip metadata in Resolve by the way and does the value change? Can't remember by heart whether iso value was part of braw clip or frame metadata, if it is clip, you can't read the value change from file even if you wanted. If you could upload a sample I could take a peek into it.
I do stuff.
Offline

Hendrik Proosa

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

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostSun May 31, 2020 6:56 pm

Checked the sdk. It is a 50:50 thing, so if you have a demo clip I can read the metadata and see what is in it.

Problem is that while ISO value itself is part of frame attributes, meaning its changes are stored by frame (same applies to exposure, wb and tint), analog gain is clip attribute and thus if you change between dual-gain variants this change might not be actually visible or might be stored wrongly. ISO values list is read based on analog gain and so there is 50:50 chance of whether it works or is messed up. If you don't change the gain level though, iso changes should be properly recoverable.
I do stuff.
Offline

piersdeseilligny

  • Posts: 2
  • Joined: Tue Apr 07, 2020 8:45 pm
  • Real Name: Piers Deseilligny

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostSun May 31, 2020 11:40 pm

Thanks! I shot a few seconds (with the lens cap on) at ISO 3200 and then switched to 200 around 00:00:02:17 (frame 65): https://drive.google.com/file/d/18toXT8 ... sp=sharing
Offline

CaptainHook

Blackmagic Design

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

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostMon Jun 01, 2020 12:22 pm

Hendrik Proosa wrote:Problem is that while ISO value itself is part of frame attributes, meaning its changes are stored by frame (same applies to exposure, wb and tint), analog gain is clip attribute and thus if you change between dual-gain variants this change might not be actually visible or might be stored wrongly.

Blackmagic RAW 1.7 added support for per frame analog gain via blackmagicRawFrameProcessingAttributeAnalogGain (cannot be overridden by the user) but the encoding device also needs to be updated to support it.

Check the changelog file for updates on the interface - the related ones are :

- Added item blackmagicRawClipProcessingAttributeAnalogGainIsConstant to enum BlackmagicRawClipProcessingAttribute
- Added item blackmagicRawFrameProcessingAttributeAnalogGain to enum BlackmagicRawFrameProcessingAttribute

Resolve doesn't support displaying per frame metadata AFAIK so if you change "analog gain brackets" during record I don't believe you will be able to access the relevant ISO list as it changes during a clip in Resolve.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

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

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostMon Jun 01, 2020 5:49 pm

Good to know! I skimmed over my existing code where I used the sdk but haven't ported everything to v1.7 yet so didn't know this.
I do stuff.
Offline

Hendrik Proosa

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

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostMon Jun 01, 2020 7:27 pm

In this example file, both analog gain and iso change are nicely there and visible from metadata so it is up to application to read and show it. Metadata values before and after gain and iso change (or was it the other way around in my screenshot...):
braw_metadata_iso.jpg
braw_metadata_iso.jpg (300.63 KiB) Viewed 503 times
I do stuff.
Offline
User avatar

Nicolas from Autokroma

  • Posts: 3
  • Joined: Thu Oct 10, 2019 9:47 pm
  • Real Name: Nicolas Favre

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostTue Jun 02, 2020 1:26 pm

Hello everyone,

There is something I'm not sure to understand here.

Analog Gain is a value set during the recording in the camera, and it should not be editable with the BRAW API right ? Or did I miss something and this Analog Gain can be modified with the BRAW API ? (And so maybe it should be an available parameter as others in a dropdown maybe ?)

So let's say I well understood and this analog gain should not be editable after the shot. So the available ISO List could change at a time given in the footage if the user changed the Gain during the record.

So, why can we set the ISO without error (and with visual change) to 6400 for example with the BRAW API on the footage sent by piersdeseilligny at any time given ? (I just tested)

Is it because BRAW API is not really ready for Analog Gain change ? (Even if as you said, Analog Gain is now a RAWFrameProcessing so it should be ready ?)

Is it because we need to call something with the BRAW API to handle this case ?

Best,

Nicolas
BRAW Studio plugin for Premiere & Media Encoder (AE in Beta) : https://autokroma.com/BRAW_Studio/
-
Difference with BMD's plugin : https://autokroma.com/blog/BlackmagicRaw-Plugin-BRAW-Studio-Difference/
Offline
User avatar

carlomacchiavello

  • Posts: 1104
  • Joined: Tue Aug 28, 2012 6:04 pm
  • Location: italy

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostTue Jun 02, 2020 6:39 pm

Nicolas from Autokroma wrote:Hello everyone,

There is something I'm not sure to understand here.

Analog Gain is a value set during the recording in the camera, and it should not be editable with the BRAW API right ? Or did I miss something and this Analog Gain can be modified with the BRAW API ? (And so maybe it should be an available parameter as others in a dropdown maybe ?)

So let's say I well understood and this analog gain should not be editable after the shot. So the available ISO List could change at a time given in the footage if the user changed the Gain during the record.

So, why can we set the ISO without error (and with visual change) to 6400 for example with the BRAW API on the footage sent by piersdeseilligny at any time given ? (I just tested)

Is it because BRAW API is not really ready for Analog Gain change ? (Even if as you said, Analog Gain is now a RAWFrameProcessing so it should be ready ?)

Is it because we need to call something with the BRAW API to handle this case ?

Best,

Nicolas

Hi Nicholas, may be an info that resolve (or your plugin) should use to decide how to develop iso (range 1, range2), but analog gain is physical gain in camera, may be energy captured from photosite gained mode1, or mode 2 before to be converted in digital data. different gain spread sensor data along two different range of iso, and give to user two different Gamma range, like in picture form manual
Schermata 2020-06-02 alle 20.38.26.png
Schermata 2020-06-02 alle 20.38.26.png (131.62 KiB) Viewed 471 times

the strange thing of change iso gain step 1 to 2 or reverse during recording should create some problems or not.
Offline

CaptainHook

Blackmagic Design

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

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostWed Jun 03, 2020 1:40 am

Nicolas from Autokroma wrote:Analog Gain is a value set during the recording in the camera, and it should not be editable with the BRAW API right ? Or did I miss something and this Analog Gain can be modified with the BRAW API ?

As mentioned in my post above analog gain it is NOT editable.

Nicolas from Autokroma wrote:So, why can we set the ISO without error (and with visual change) to 6400 for example with the BRAW API on the footage sent by piersdeseilligny at any time given ? (I just tested)

What method are using to set the ISO? Something like IBlackmagicRawFrameProcessingAttributes::SetFrameAttribute(blackmagicRawFrameProcessingAttributeISO, iso) in 1.7 should validate the ISO for the frames analog gain.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline
User avatar

Nicolas from Autokroma

  • Posts: 3
  • Joined: Thu Oct 10, 2019 9:47 pm
  • Real Name: Nicolas Favre

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostThu Jun 04, 2020 9:31 am

Thanks for your answers.

What method are using to set the ISO? Something like IBlackmagicRawFrameProcessingAttributes::SetFrameAttribute(blackmagicRawFrameProcessingAttributeISO, iso) in 1.7 should validate the ISO for the frames analog gain.


Yes I'm using IBlackmagicRawFrameProcessingAttributes::SetFrameAttribute(blackmagicRawFrameProcessingAttributeISO, iso) from BRAW 1.7.

The thing is that in the footage sent by piersdeseilligny, the analog Gain is changing in the middle of the footage, but setting ISO to 6400 (for example, but same idea with other ISOs) works at any given time in the footage. (BRAW API but also in Resolve).

It should not work when the analog Gain change ( because then 6400 is no more in the ISO available List). That's why I wonder why is it working ? Is it normal ? If 6400 is not available in the list for a frame, what does the BRAW API then when setting 6400 ?

To be honnest as we don't support the Analog Gain change in the middle of a BRAW yet, it is good that changing ISO works at any given time for the same ISO available List, but I wonder if this will change or not.

Note : I didn't checked that the ISO gain was actually changing in the BRAW API on this footage and I trusted last messages of this post.
BRAW Studio plugin for Premiere & Media Encoder (AE in Beta) : https://autokroma.com/BRAW_Studio/
-
Difference with BMD's plugin : https://autokroma.com/blog/BlackmagicRaw-Plugin-BRAW-Studio-Difference/
Offline

CaptainHook

Blackmagic Design

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

Re: BRAW: Changing Dual-ISO Gain circuits mid-take

PostFri Jun 05, 2020 3:58 am

Nicolas from Autokroma wrote:The thing is that in the footage sent by piersdeseilligny, the analog Gain is changing in the middle of the footage, but setting ISO to 6400 (for example, but same idea with other ISOs) works at any given time in the footage. (BRAW API but also in Resolve).

I just downloaded the above clip and can confirm as well via the API that the analog gain changes during the clip and the valid ISO list returned from IBlackmagicRawConstants::GetISOListForAnalogGain also changes.

In Resolve if I put the playback head toward the end of the clip and change to ISO6400 the clip becomes "media offline" - so I assume Resolve is checking the result of setting the ISO in the API and finding it doesn't succeed and generates an error (I don't work in the Resolve team so unless I specifically ask them I don't know what their code does/is). What version of Resolve are you checking with?

When you try set any attribute in the SDK are you actually checking the result is successful?
Eg something like :
Code: Select all
verify(SUCCEEDED(frameProcessingAttributes->SetFrameAttribute(blackmagicRawFrameProcessingAttributeISO, &variant)));
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**

Return to Post Production

Who is online

Users browsing this forum: No registered users and 12 guests