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

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #800 on: August 10, 2014, 10:58:34 PM »
Yes, this list is too long.

josepvm

  • Member
  • ***
  • Posts: 212
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #801 on: August 10, 2014, 11:18:55 PM »
Yes, this list is too long.

Done, and it works now. Thanks, Greg !  ;)

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3584
  • Blunt and to the point
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #802 on: August 10, 2014, 11:33:52 PM »
@Levas

I'm pretty sure a1ex' graph is only based on the ADTG [888x] bank of registers, which fits in with my quick test.  Based on my past experience, 0x34x seems about right for these registers @ ISO 100, but I haven't confirmed the results.  I've been looking for other registers that stand out as useful, but so far no luck.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1487
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #803 on: August 11, 2014, 08:54:02 PM »
The preamp registers on 6d
ADTG2 8   ADTG2 9    ADTG2 a   ADTG2 b
Normal value about 0x4b (75 decimal)
If you set them to 0x190 (400decimal) you get 2 stops extra (noisier ofcourse, but nonetheless 2 stops extra)

Now for video, where the ISO limit is 25600, you can set these 4 preamps to 190, and you have ISO 102400 video mode  8)
And a lot of vertical lines across the frame(CMOS pattern), so blackframe extraction in post must be done to get usable results.
Will try it if it get's dark tonight  :D

EDIT:
If you use the other amplifier, ADTG[fe] (standardvalue=0, maxvalue=f)
And set it on max value f, gives another extra stop.
So ISO 204800 videomode  :D

Tried it out, video looks like crap, noise is all over the place  ;D

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #804 on: August 11, 2014, 10:25:48 PM »
500D
1080p ADTG2[100c] = 0x2
720p   ADTG2[100c] = 0x4

vertical skipping lines (video mode)

0x2         0x4       0x5
RG+         RG+      RG+
GB           GB         GB
RG           RG         RG
GB+         GB         GB
RG           RG         RG
GB           GB+      GB
RG+         RG        RG+

So 0x1 and 0x5 bad colors (confirmed preview live view)

0x0 give an image of 1920x1080 (distorted) -> scaled post process 1920x360 without moire (less noise).
To work 0x0, need tune CMOS[5]

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1487
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #805 on: August 11, 2014, 10:41:00 PM »
@Greg, what do you mean with "To work 0x0, need tune CMOS[5]"
What values are normal in CMOS[5] on 500d ?
And where do you set them too, to get a value of 0x0 to work in video mode ?

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #806 on: August 11, 2014, 10:55:11 PM »
See in crop mode when change the height of the focus box (change the sensor area).
CMOS[5] value will be different/new.

ADTG2 [100c] = 0x0 // no skipping vertical lines, so we need to set which part of the sensor has to work
-----------------------------------------------------------------------------------------------------------------------------------


In this way we can get crop H264 video on all cameras :

ADTG2 [100c] = 0x0 // no skipping vertical lines
CMOS [4] = value of the crop mode (center) // horizontal lines?
CMOS [5] = value of the crop mode (center)

The image is not good, horizontal pixels (3) still averaged or something :


Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1487
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #807 on: August 11, 2014, 11:43:46 PM »
For the 6d
ADTG2[800c] = vertical lineskipping, 0(crop), 2 (1080p) and 4(720p)
CMOS[6]
CMOS[7]

Overriding ADTG[800c] = 0
CMOS[6] = d0
CMOS[7] = 208

Gives me correct live view preview for crop mode on 6d, so it gives 3x zoom (only white border in the bottom visible... :-\)

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #808 on: August 11, 2014, 11:56:40 PM »
Gives me correct live view preview for crop mode on 6d, so it gives 3x zoom (only white border in the bottom visible... :-\)
On the 500D also, maybe it is caused by raw size
1080p = 1590x1060
crop = about 2000x838?
So lack height.


ADTG2[1000] horizontal (column) pixels averaging

1080p ADTG2[1000] = 0x6
crop ADTG2[1000] = 0x5

Now look good:

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1487
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #809 on: August 12, 2014, 10:38:25 AM »
Does anyone know where the horizontal pixelbinning is done ?
I'm curious if it's a baked in setting in the CMOS chips (then it's probably controlled via CMOS[6] or CMOS[7] on the 6d.)
Or could it be a setting which tells to average 3 pixels of the same color  ?

These registers are changed if you change the view from 10x zoom to standard view (1080p25)
                     1080p25       10x zoom(no pixelbinning, probably stretching pixels for live view)
ADTG2-805f       2b0         13c          Edit:         These values seems to vary within days, so not hard values.
ADTG2-8061      2b0         13c          Edit:         These values seems to vary within days, so not hard values.
CMOS[6]           400           d0
CMOS[7]            0             208
ADTG2-802c       0              110
ADTG2-8047      550         110
ADTG2-82f3           c         319
ADTG2-8820      303         301
ADTG2-8826      e04           6
ADTG2-8827        42           4
ADTG2-8828    3010         301
ADTG2-8860          f           e
ADTG2-8866          7           f

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1487
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #810 on: August 12, 2014, 12:40:47 PM »
Canon 6d          Video mode   Video mode    Photomode               Photomode
                        1080p25    10xzoom      Live view off              Live view on
ADTG2-802c       0              110                   110                           0
ADTG2-8047      550*           110                   110                          550*           
ADTG2-8860      f                   e                      d                             f
ADTG2-82f3       c                 319                  211                           8 

Looks like ADTG2-802c and ADTG2-8047 do sort of control if every pixel horizontal is shown or that it does 3x pixelbinning

ADTG2-8860 has a unique settings for 1080p/10x zoom and live view-off, has anyone figured out what f, e and d setting does ?
Edit: Also ADTG2-82f3 has unique values for all modes

EDIT: *Could 550 mean, take 5 pixels wide for the first color, for example red(rgrgr) and 5 pixels wide for green (grgrg) and bin them together, this would give 3x pixelbinning... When my battery is recharged I'll try a value of 330 (Could mean pixelbinning of 2 pixels horizontal, gives a readout of 2736 pixels horizontal instead of 1824(binning of 3pixels)

Nope, doesn't work,gives funky live view colors and bottom half of the frame is placed at the top, nothing usuable

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #811 on: August 12, 2014, 02:25:01 PM »
I add 0x60 to CMOS[5]
Now there is no white border in the bottom :



Now we need to understand DIGIC scaling.


Raw (crop mode) vs H264 (1080p - ADTG/CMOS crop mode):


H264 is upscaled.

Now I can record crop raw 1590x1060, height increase  :o
Default crop mode is 2000x838

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #812 on: August 12, 2014, 06:08:33 PM »
Crop video with a good preview/live view? Possible!  ;D
Is not perfect, but near. We need tune DIGIC scaling regs.



mlv_rec frame - http://s28.postimg.org/w1rkxq871/testcropp.jpg

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6262
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #813 on: August 12, 2014, 06:31:12 PM »
Ale zajebiscie :)!
Did you actually found out how to get a centered 3x zoom mode with a good preview?

MA Visuals

  • Freshman
  • **
  • Posts: 83
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #814 on: August 12, 2014, 06:33:07 PM »
Amazing find!

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #815 on: August 12, 2014, 08:55:13 PM »
The camera work in 1080p. Sensor work in crop mode.
So the preview is almost good, you can compare with my previous post.

This solved the problem of pink preview on old cameras.

Raw buffer is 1080p mode, so we have a different resolution, only 5D3 will give you 1920x1280.
I think it can be changed, but it requires a lot of research (when you change the size of the raw, preview Canon freeze).

MA Visuals

  • Freshman
  • **
  • Posts: 83
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #816 on: August 12, 2014, 09:35:00 PM »
I'm not sure if I understood correctly.  Are you saying that 5d3 crop mode will display realtime liveview at 1920x1280 but not 1920x1080? Is that right?

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1487
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #817 on: August 12, 2014, 10:16:36 PM »
@Greg, can you share the data of the values and registers you changed ?

ADTG2 [100c] = standard value = 2, override value = 0       (lineskipping register)
CMOS [4] = standard value = ?, Override value = ?             (value of the crop mode (center) // horizontal lines?)
CMOS [5] = Standard value = ? Override value = ?             (value of the crop mode (center))
ADTG2[1000] = Standard value = 6, Override value = 5       (horizontal (column) pixels averaging)

Can you share the values for the CMOS[4] and CMOS[5] ?

You said you'd also change some digic registers for scaling, can you share those registers and values ?


Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #818 on: August 12, 2014, 10:50:49 PM »
@MA Visuals,
500D in 1080p mode has 1590x1060, crop trick 1590x1060 (same buffer). The camera still thinks that it is in 1080p, but the sensor give the crop area.
So this way only 5D3 can 1920x1280. I mean raw sizes.

@Greg, can you share the data of the values and registers you changed ?

I discharged all batteries 500D, I'll try tomorrow.

You said you'd also change some digic registers for scaling, can you share those registers and values ?
I'm still looking for those registers. This is only needed for more accurate preview or H264 video crop.


Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #819 on: August 13, 2014, 03:16:45 PM »
500D

                          1080p        crop-mode(5x)      1080p-trick-crop
ADTG2[105f]N    0x0             0x38f                       0x38f //shutter blanking for 5x/10x zoom
ADTG2[1061]     0x67f          0x0                          0x0    //shutter blanking for 1080/720p mode?
CMOS[4]            0xc0d          0xc85                      0xc85
CMOS[5]            0x400         0x609                      0x689
ADTG2[100c]     0x2              0x4                          0x0  //vertical skipping lines, not needed?
ADTG2[1000]     0x6             0x5                          0x5 //vertical skipping, horizontal binning?

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1487
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #820 on: August 13, 2014, 05:27:22 PM »
Thanks Greg,

I can get 3xzoom/crop mode on 6d by overriding the following registers:
                      1080p     10xzoom     3xzoom(1:1 crop)

ADTG2-805f      2b0        13c             No change needed
ADTG2-8061     2b0        13c             No change needed

CMOS[6]          400         d0             d0       (=Changing the "d" moves horizontal position on the sensor)
CMOS[7]             0         208          206       (Lowering the 8 to 6 moves the white bar outside 16:9 view)
ADTG2-800c         2           0              0         (vertical lines to skip)
ADTG2-8000        6           5             5       (Don't know what it does, if it is 6 you get some vertical interlaced looking footage...)


With these settings I get 3xzoom/crop mode, correct preview in live view on the 6d
Raw recording works, gives correct framing.
I can even record canon "native" h.264 with it, and it works too!


nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1149
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #821 on: August 13, 2014, 07:55:12 PM »
wow hats off for taking so much time and efforts to help.
70D.112 & 100D.101

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6262
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #822 on: August 13, 2014, 08:06:00 PM »
With these settings I get 3xzoom/crop mode, correct preview in live view on the 6d
Raw recording works, gives correct framing.
I can even record canon "native" h.264 with it, and it works too!

Curious. Do you get a centered 3x zoom mode or is it on the left or right side?


Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 591
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #823 on: August 13, 2014, 08:09:28 PM »
Still wonder how to increase edmac buffer or something to increase the size of the crop raw.
A few pages previously, I found how to get the full width of the sensor - http://www.magiclantern.fm/forum/index.php?topic=10111.msg123909#msg123909

I would get a crop raw 1500x1500px (so it will be less FPS). Here need to find something else than ADTG/CMOS. I do not know what.

Sensor say "I'm hot! Give me a break!"   :o

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1487
  • 6d - Nightly build user
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #824 on: August 13, 2014, 08:17:51 PM »
Curious. Do you get a centered 3x zoom mode or is it on the left or right side?

I can move it horizontal in 16 steps (0 to f hexadecimal) with the first "digit" value in CMOS[6]

CMOS[6]         d0         (=Changing the "d" moves horizontal position on the sensor)