Author Topic: CMOS/ADTG/Digic register investigation on ISO  (Read 528367 times)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11902
  • 5D Mark Free
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #700 on: June 11, 2014, 07:47:32 PM »
For temperature, as long as the noise does not depend on the image signal (if it's additive), the current model will include it in the read noise. So, the FWC should not be affected by temperature variations. An easy way to tell would be to retry the first test image at the end of the experiment (so you have a screenshot with camera hot, and another with the camera cold, from which you can check the repeatability).

Possible explanations for the RON difference in 5x vs photo:

- the ISO ends up higher in photo mode (why? the sensor registers are identical though, at least those identified in this thread)
- photo exposure uses mechanical shutter, while LV exposure uses electronic rolling shutter; as a result, the photo exposure (electronically) may be longer than the actual exposure time
- the readout speeds may be different (could this cause noise differences?)

For resolution charts: you can use any of them (even some fine print that gets progressively smaller). This one is well-known: http://www.techradar.com/news/photography-video-capture/cameras/camera-testing-resolution-charts-explained-1027585

SpcCb

  • Member
  • ***
  • Posts: 207
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #701 on: June 11, 2014, 11:30:54 PM »
(...)
- the readout speeds may be different (could this cause noise differences?)
(...)
Yes, RON is function of the read speed.
It could be an explanation _or a part of_ for the RON value differences.

For example, 2~5e- RMS corresponding to a read speed about some 10E+2 MHz and 6~9e- RMS corresponding to a read speed about a couple of 10E+1 MHz.
Note; There's some other hardware characteristics who defined RON, not only the read speed (photodiode current, etc.)

Beside we have to not forget that Canon CMOS are CDS (Correlated Double Sampling), so the extra low RON that we get is 'hardware optimized' and it could be adjusted to fit on demands (specific video operations etc.).

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #702 on: June 14, 2014, 06:03:09 PM »


Wanted: your results


1. grab raw_diag.mo (no need to compile anything, just place it in your MODULES folder).
2. use 1/50 for PAL, 1/60 for NTSC, or any shutter speed if you don't use artificial lights.
3. point the camera to a out-of-focus HDR scene, and adjust ISO and aperture to get a good picture (both clipped highlights and fairly deep shadows).
4. enable Debug->RAW Diagnostics, and from there, select "SNR curve (2 shots)". Disable the other analyses types (unless you want them). Make sure "Auto screenshot" is enabled (it is by default).
5. take the two test pictures from Debug -> RAW Diagnostics -> Dummy bracket. Simply click it once and wait until it's finished.
6. post the screenshot (it's called SNR2.PPM and it's saved under the RAW_DIAG folder; convert it to PNG first to make it smaller, and give it a meaningful name).

I'm looking for results covering all ISOs, for all cameras, both photo and movie mode.

If you wish to review the code or compile yorself, look here.

Have fun!

Canon 6d - all (native) iso's both photo and video mode(1080P), (filename of the png's are describing which mode and which iso):

https://drive.google.com/folderview?id=0B1BxGc3dfMDaUjlnaENVZ2drYUU&usp=sharing

 :D

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #703 on: June 15, 2014, 07:42:31 PM »
See my results in the link posted before this post:

In the lower iso's the full well capacity is about 3,4 times larger in video mode(1080p) VS photo mode on the 6d
In the higher iso's the full well capacity is about 4 times larger in video mode(1080p) VS photo mode on the 6d

Don't know if my understanding about full well capacity is correct, but could that mean that the 6d in video mode uses a 4 pixel binning method ?

List of the results posted in the link before this post

                                            Canon 6D
         Full Well Capacity Dyn.Range             Full Well Capacity Dyn.Range
ISO                Photo mode                                      Video Mode(1080p)
100           79546e           11,48EV                   274301e             11,84EV
200           42220e           11,49EV                   142616e             11,82EV
400           20643e           11,28EV                     75858e             11,75EV
800           10482e           11,00EV                     39219e             11,62EV
1600           5215e           10,55EV                     19868e             11,38EV
3200           2568e             9,87EV                     10092e             10,95EV
6400           1271e             9,11EV                       4931e             10,47EV
12800           556e             8,04EV                       2408e               9,44EV
25600           371e             7,10EV                         X                      X


Greg

  • Hero Member
  • *****
  • Posts: 569
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #704 on: June 15, 2014, 08:20:37 PM »
Don't know if my understanding about full well capacity is correct, but could that mean that the 6d in video mode uses a 4 pixel binning method ?

5472 / 4 = 1368
5472 / 3 = 1824

3 is more likely

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #705 on: June 15, 2014, 08:28:49 PM »
5472 / 4 = 1368
5472 / 3 = 1824

3 is more likely

Ah, forgot about the real world logical numbers... ::) ML raw video live view feed is 1808 pixels wide.
3 pixel wide binning method (and lineskipping) is the most likely indeed.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11902
  • 5D Mark Free
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #706 on: June 15, 2014, 09:56:33 PM »
Can you do the tests in all video modes? (I'm interested in 5x zoom, 1080p and 720p - does the 6D have other video modes?) I guess you should get a ratio closer to 3 if you compare 1080p with 5x zoom (which is also a 1:1 crop).

Tip: turn off global draw to get clean screenshots in LiveView.

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #707 on: June 15, 2014, 10:19:05 PM »
Can you do the tests in all video modes? (I'm interested in 5x zoom, 1080p and 720p - does the 6D have other video modes?) I guess you should get a ratio closer to 3 if you compare 1080p with 5x zoom (which is also a 1:1 crop).

Tip: turn off global draw to get clean screenshots in LiveView.

Ah I already was wondering how I could get rid of the time and histogram... ::) on those screenshots, Will turn global draw off.
I think I can do the rest of the video modes tomorrow (It's 10 in the evening over here).

But just to be sure which modes you need:
In live view in 1080p mode I have 5x zoom  and 10x zoom.
In 720p mode there's also 5x zoom and 10 x zoom.
The 5x zoom turns automatic to ML gray scale preview, 10x zoom is in full color preview.

If I do the 720P (without zoom) and 1080p mode with 5x zoom, would those 2 complete the numbers you'd like to see ?

Oh, forget to mention, there's also a 640x480 25fps mode in the canon menu on the 6D, when I choose it, the framing doesn't change.
So or canon is writing/saving it to a 640x480 format on card or it uses another binning modes, maybe this video mode is interesting too perform the RAW_DIAG test on too...


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11902
  • 5D Mark Free
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #708 on: June 15, 2014, 10:22:36 PM »
5x zoom is the same in all modes (at least on my cameras). So, adding 720p and 5x to the existing graphs will do the trick.

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #709 on: June 15, 2014, 10:24:40 PM »
5x zoom is the same in all modes (at least on my cameras). So, adding 720p and 5x to the existing graphs will do the trick.

Oh, forget to mention, there's also a 640x480 25fps mode in the canon menu on the 6D, when I choose it, the framing doesn't change.
So or canon is writing/saving it to a 640x480 format on card or it uses another binning mode, maybe this video mode is interesting too, to perform the RAW_DIAG test on...

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #710 on: June 16, 2014, 01:28:07 PM »
Can you do the tests in all video modes? (I'm interested in 5x zoom, 1080p and 720p - does the 6D have other video modes?) I guess you should get a ratio closer to 3 if you compare 1080p with 5x zoom (which is also a 1:1 crop).

Tip: turn off global draw to get clean screenshots in LiveView.

Got the numbers for 5xzoom mode on canon 6d
will do 720 mode soon, couldn't find a good spot with HDR, very cloudy over here
(got not so nice RAW-DIAG graphs, dots in graphs where not nice linear, random dots in highlights)

         Full Well Capacity Dyn.Range             Full Well Capacity Dyn.Range         Full Well Capacity Dyn.Range
ISO                Photo mode                                      Video Mode(1080p)              Video Mode(5xzoom)
100           79546e           11,48EV                   274301e             11,84EV            97890e           11,78EV
200           42220e           11,49EV                   142616e             11,82EV            48335e           11,72EV
400           20643e           11,28EV                     75858e             11,75EV            25171e           11,59EV
800           10482e           11,00EV                     39219e             11,62EV            12958e           11,29EV
1600           5215e           10,55EV                     19868e             11,38EV              6508e           10,85EV
3200           2568e             9,87EV                     10092e             10,95EV              3354e           10,25EV
6400           1271e             9,11EV                       4931e             10,47EV              1663e             9,65EV
12800           556e             8,04EV                       2408e               9,44EV                831e             8,51EV
25600           371e             7,10EV                         X                      X                        X                     X

Full well capacity of 1080p divided by 5x zoom results in the following numbers (looks like 3 pixels are binned)
ISO - 1080p/5xzoom
100 - 2,8
200 - 3,0
400 - 3,0
800 - 3,0
1600 - 3,1
3200 - 3,0
6400 - 3,0
12800 - 2,9

Will try to find a good HDR spot for 720 mode

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #711 on: June 16, 2014, 01:52:23 PM »
 :)
Updated this folderlink with the 5xzoom RAW-DIAG images.

https://drive.google.com/folderview?id=0B1BxGc3dfMDaUjlnaENVZ2drYUU&usp=sharing


Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #712 on: June 16, 2014, 01:57:58 PM »
I noticed in the data above that the dynamic range in 5x zoom video mode is still 0.5 stop better then photo mode (almost equal to 1080p video mode).
There should be no pixelbinning in the 5x zoom mode, how come the dynamic range is still better compared to photo mode (Full well capacity is also higher) ?
Is this difference caused by mechanical shutter VS electronic shutter ?

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #713 on: June 16, 2014, 03:44:52 PM »
5x zoom is the same in all modes (at least on my cameras). So, adding 720p and 5x to the existing graphs will do the trick.

Hi Alex,

Tried various setups, but I can't get a decent blue line plotted with RAW_DIAG in 720p video mode.
The blue dots are scattered all over the place in the graph, does that mean that the images aren't alike ?
I use the dummy bracket function, but I use available light from outdoors on a cloudy windy day, maybe that doesn't work too well... :-\

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3535
  • Blunt and to the point
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #714 on: June 16, 2014, 05:20:44 PM »
Ideally the scene should be extremely static.  A cloudy windy day, probably doesn't satisfy those requirements.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3535
  • Blunt and to the point
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #715 on: June 24, 2014, 06:13:28 PM »
I don't have a printer, I might be able to access (a decent) one over the weekend, and printout a target to capture. 

Haven't been able to find anything around the house that seems suitable.   ::)

astronomer

  • New to the forum
  • *
  • Posts: 3
Questions
« Reply #716 on: July 01, 2014, 11:24:34 PM »
Hi all,

This is astronomer from NikonHacker. I had been investigating the Sony sensor for months. Could someone explain to me what's the difference between white offset and black level offset in this thread? I'd expect the black level and gain are the only 2 values to fix a straight line. Some tests done by others suggested Canon did offset to correct dark current and bring it back to 2048. I thought this is done digitally as the saturation point for dark frame is not 16383. But it seems contradict some of the posts here where you guys suggest an additional feedback loop during optical black pixel read out.

Sony sensor has all the analog chain integrated so it's much simpler. A register to set black level and 4 gain registers for each color channels. The sensor output spans from 0 to 16382. All the rest are done in digital domain, such as color channel scaling, black level clip (dark current correction), large aperture light loss scaling, etc.

Best,
astronomer

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3535
  • Blunt and to the point
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #717 on: July 02, 2014, 03:00:38 AM »
The black level is set to some value above 0, to allow the stdev to be easily captured.  This is controlled by a voltage feedback loop at the ADC, ADTG[8880].

The saturation point is controlled by a number of registers.  On a 5D3, I'll describe the ones I understand.
Analog domain.
ADTG[8,9,a,b] + ADTG[888x] - These control the (individual) column gains.  There are two banks of 4, ADTG2 + ADTG4.
ADTG[fe] - This is like some master gain control.

The native (Canon default) saturation level is 15283.  Increasing analog gains does not increase this value, only decreases dynamic range.  We can decrease these analog gains to recover highlight detail, without affecting the saturation level.

And the input to this ADTG is CMOS[0].

In the digital domain.
Saturate offset - I think a1ex mentioned this may be analog.  edit see here: http://www.magiclantern.fm/forum/index.php?topic=10111.msg103971#msg103971
Black/White offset
Digital gain - Canon uses this one to offset the light loss at wide apertures.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11902
  • 5D Mark Free
Re: Questions
« Reply #718 on: July 02, 2014, 07:45:30 AM »
This is astronomer from NikonHacker.

Hi, I've been following your thread for a while. For the record, the link is https://nikonhacker.com/viewtopic.php?t=1840

Quote
what's the difference between white offset and black level offset in this thread?

If you are asking about the registers that can be tweaked, you can find them documented in the iso-regs module:
https://bitbucket.org/hudson/magic-lantern/src/iso-research/modules/iso_regs/iso_regs.c#cl-583

(we simply changed them, written down the observed effects, and then guessed what they might do)

If you are asking about how to interpret black level and white level, it's as simple as:
Code: [Select]
normalized = (raw - black_level) / (white_level - black_level)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11902
  • 5D Mark Free
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #719 on: July 02, 2014, 11:56:51 AM »
ADTG 82F3 (the one that sets top optical bar size)

For 5D2, the equivalent register is 0x1179.

(my theory is that increasing top bar size could help with correcting vertical FPN, but need to sit down and figure out the details)

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #720 on: July 02, 2014, 02:54:21 PM »
5x zoom is the same in all modes (at least on my cameras). So, adding 720p and 5x to the existing graphs will do the trick.

Hi Alex,

Do you still have interest in the graphs for 720p mode on 6D ?
Can give it another try if it's useful

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11902
  • 5D Mark Free
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #721 on: July 02, 2014, 03:00:15 PM »
Sure.

Levas

  • Hero Member
  • *****
  • Posts: 1351
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #722 on: July 02, 2014, 07:02:52 PM »
Sure.

Nice bright sunny day over here, so here are the numbers, now also added 720P video mode:
all the graphs can be found on my google drive link:
https://drive.google.com/folderview?id=0B1BxGc3dfMDaUjlnaENVZ2drYUU&usp=sharing

CANON 6D
       Full Well Capacity Dyn.Range        Full Well Capacity Dyn.Range         Full Well Capacity Dyn.Range       Full Well Capacity Dyn.Range
ISO                Photo mode                             Video Mode(1080p)              Video Mode(5xzoom)                         Video Mode(720p)
100           79546e           11,48EV         274301e             11,84EV            97890e           11,78EV                  242833e        11,87EV
200           42220e           11,49EV         142616e             11,82EV            48335e           11,72EV                  110182e        11,85EV
400           20643e           11,28EV           75858e             11,75EV            25171e           11,59EV                    66885e        11,81EV
800           10482e           11,00EV           39219e             11,62EV            12958e           11,29EV                    36324e        11,67EV
1600           5215e           10,55EV           19868e             11,38EV              6508e           10,85EV                    18721e        11,40EV
3200           2568e             9,87EV           10092e             10,95EV              3354e           10,25EV                      9748e        10,96EV
6400           1271e             9,11EV             4931e             10,47EV              1663e             9,65EV                      4874e        10,48EV
12800           556e             8,04EV             2408e               9,44EV               831e             8,51EV                       2380e         9,35EV
25600           371e             7,10EV               X                      X                        X                     X                             X               X

The numbers of the 720p mode are almost identical as the ones in 1080P, so no extra binning, just extra row skipping I guess ?



astronomer

  • New to the forum
  • *
  • Posts: 3
Re: Questions
« Reply #723 on: July 03, 2014, 12:40:17 AM »
If you are asking about the registers that can be tweaked, you can find them documented in the iso-regs module:
https://bitbucket.org/hudson/magic-lantern/src/iso-research/modules/iso_regs/iso_regs.c#cl-583

(we simply changed them, written down the observed effects, and then guessed what they might do)


OK, correct me if my understanding is wrong.
1. CMOS gain is the analog gain inside the sensor itself. So amplified signal in high iso will avoid noise contamination when the signal wire run across the PCB until it hits PGC/ADC chip?
2. All other ADTG gain are to fine tune the voltage range input to ADC?
3. Digital Gain is used when a larger aperture is selected?
4. From that image, it appear the saturation point is analog adjust but black level is offset in post processing?

This really contradicts what I understand in a Sony Exmor sensor.

In Sony sensor, the OFFSET 0x1F register sets the input number to bias voltage. It calibrated the ADC bias voltage so that the dummy pixels would be read out as your OFFSET value. During the first 50 rows, sensor will continue refine this bias level to within 1 ADU using dummy readout. Regardless of OFFSET and gain setting, the saturation point always reach 16382. It's like adjusting the intercept of a linear function.

Dark current will be registered on optical black pixels and all the active pixels as well. So it will show an elevated bias. This is where it differs from Canon. Somehow it clamped the dark current to bias level.

The stock Nikon firmware adjust the dark current to 0 using those optical black pixels in post processing. Thus saturation level will be pulled down. I'm curios to know if it's possible for Canon to disable dark normalization as well?

This is interesting since some Nikon DSLRs also uses external ADCs. D700/D3 uses AD9974.

Greg

  • Hero Member
  • *****
  • Posts: 569
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #724 on: July 03, 2014, 08:57:40 PM »
Testing ADTG module outdoors  :D

500D, the same exposure