CMOS/ADTG/Digic register investigation on ISO

Started by a1ex, January 10, 2014, 12:11:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Levas

Quote from: Greg 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.

Have you tried setting ADTG2-100c on 0 in 1080p mode ?  (override it and switch between photo and videomode to "reset" video live view to do 0 line skipping.
On 6d I have to use CMOS[7] to center the image on the live view screen (white borders above and below it), on your 500d it probably is CMOS[4] or CMOS[5].

I can get my 6d to do zero vertical lineskipping in 1080p mode, only it does 1/3 of the sensor height, probably has to do with the edmac buffer size, like you say, increase the edmac to increase the frame height. So I get a stretched image with real vertical pixels and horizontal pixelbinning of 3 pixels.

For those of you with a 6d
Go to 1080p25 video mode
Override registers ADTG2-800c to value "0"
Override registers CMOS[7] to value "14"

Press magnifying button to go to 5x zoom and 10x zoom and back to normal view (this somehow resets live view to the new override settings)
Or
Switch to photo mode and switch back to video mode (this resets live view to the new override settings)

Now you have full sensor width view with 1/3 vertical sensor height(with no lineskipping)




Greg

To refresh the parameters use (being in 5x not need to change to another mode) :

static void run_test()
{
   msleep(200);
   set_lv_zoom(5);
}

Yes, I tried it ADTG2-100c 0 in 1080p mode.
Quote from: Greg on August 11, 2014, 10:25:48 PM
0x0 give an image of 1920x1080 (distorted) -> scaled post process 1920x360 without moire (less noise).

This is just an example for the 500D to give it to 1590x1060 -> scaled post process 1590x353.

Levas

If the image buffer size can be made bigger, this may be the way to go for 4k, as a 1:1 center crop...   Edit: And we need some memory card and SD write speed upgrade to get 360Mb/s write speed  ;D

Or 1920(full sensor width) x 2160(2/3 sensor height) distorted -> Scaled post proces, 1920 x 720 moire free.

Couldn't find any mode which bins vertical, the 5d3 probably has such a mode in one of the CMOS[] registers...
Wouldn't surprise me if the 6d has such a mode too...same generation CMOS...

Does someone know if the 5d3 has the ADTG-x00c register to set the vertical lineskipping ?
It is using lineskipping in 50p and 60p modes... can someone confirm this register stays at zero in 1080p mode ?

Greg

Quote from: Levas on August 13, 2014, 09:12:06 PM
If the image buffer size can be made bigger, this may be the way to go for 4k, as a 1:1 center crop...   
Yes, but it will be less FPS on the 5D3 should be 15-20FPS (4096x1714).

FPS timer A is width
FPS timer B is height
You can take a photo normal mode, lock timer A and B and go to live view. FPS will be continuous photo mode (500D 3.554)
I wonder if there is somewhere a clock sensor (50D sensor is faster than the 500D).

Maybe we can do ultra fast camera 320x240 crop mode, but it will not be easy. It will take a very long time. And on the way may be other limitations.

Quote from: Levas on August 13, 2014, 09:12:06 PM
Couldn't find any mode which bins vertical, the 5d3 probably has such a mode in one of the CMOS[] registers...
Wouldn't surprise me if the 6d has such a mode too...same generation CMOS...
Yes, this is interesting. I only have a 500D so I can not help.

Levas

Quote from: Greg on August 13, 2014, 09:35:57 PM
FPS timer A is width
FPS timer B is height

Can these FPS registers be found in the "adtg_gui.mo" tool ?
How are these registers named on you're 500d ?

Greg

ADTG Registers -> Show -> FPS timres only
(requires DIGIC registers)

0xC0F0,   0x6008, 0, "FPS register A"
0xC0F0,   0x6014, 0, "FPS register B"

Levas

Oh boy :D, can't wait to try some settings with those registers when the battery is recharged.

Do you know what values the 6008 and 6014 stand for ? Can't make any resolution out of it ?
And do you know if there's some place (bitbucket maybe  :-\)  where this information is documented ?


Greg

Photo mode :


Movie mode (with values photo mode):



This does not affect the image. But the sensor work in full resolution (this is confirmed by previous research the full width video).
(focus box should be on the left, I do not know whether the top or bottom)

Levas

Got it, same registers on the 6d.
Locking photo mode values gives 4.7 FPS in video mode  :D

But how did you record the full image width ?
I can't get any higher resolutions in MLV_record then in standard video mode, still max of 1792pixels wide ?

Greg

It is complicated because the buffer is still the same.
We get the full width by reducing the height.

This requires a modification in raw.c and few registers.

When lock all registers ADTG/CMOS 1080p. Go to 720p, buffer edmac is 720p. So this is not it.


Maybe it will help?
static void run_test()
{
    msleep(2000);

    debug_intercept();
    call("lv_save_raw", 1);
    msleep(1000);
    call("lv_save_raw", 0);
    debug_intercept();
}

Levas

Can someone tell me the values of digic registers:

C0F0[6008]
C0F0[6014]

On the 5d3 in video mode ?

Levas

Quote from: Greg on August 13, 2014, 09:35:57 PM
FPS timer A is width
FPS timer B is height

How are those values used, I can't make any sense out of the number which is used in timer A
6d
                  Photomode           Video(1080)
Timer A       5970597               2210221
Timer B          e8d                          63f

Value for timer B e8d = 3725 in decimals, could make sense for height...
Value for timer B 63f = 1599 in decimals, could make sense for height...

But I can't make anything out of the numbers in timer A  :-\

Greg

Timer You can change in the FPS menu.

I received a the log, there are a lot of registers. We need someone experienced.
So we need wait for A1ex

And now we can go on vacation  ;D

ayshih

Quote from: Levas on August 14, 2014, 12:32:59 AM
How are those values used, I can't make any sense out of the number which is used in timer A
6d
                  Photomode           Video(1080)
Timer A       5970597               2210221
Timer B          e8d                          63f
...
But I can't make anything out of the numbers in timer A  :-\
Timer A, which are 0x597 and 0x221 in your two examples because it is doubled, is the number of clock ticks to wait before each successive row is read out.  Thus, it should not be set shorter than the time it takes to read out a single row of the image (i.e., the width), but it can be set longer depending on the needs of a rolling shutter or an exact frame rate.
Canon EOS 50D | 17–40mm f/4L & 70–300mm f/4.5–5.6 DO IS | Lexar 1066x

Levas

Ah, that explains why the real low values didn't gave any live view at all...
Is it double because of 2 column, rows that are read out or something ?
Anyone tried combining them, for example:

Timer A value on 5970221 ?

ayshih

Yeah, I imagine Timer A is doubled for the same reason that the CMOS gain is doubled: each row in a row pair will use one of the halves.  However, I can't think of a clear benefit from mismatching the two halves of Timer A, unlike with CMOS gain and dual ISO.
Canon EOS 50D | 17–40mm f/4L & 70–300mm f/4.5–5.6 DO IS | Lexar 1066x

Levas

@A1ex and @Nikfreak,

Would be nice if we can get the 3xzoom/1:1 crop preview in live view eventually in the nightly builds.
A1ex, any suggestions how to implement it, since it differs per camera model, would you put it as an option in the raw and mlv recording modules or is it better to place the code somewhere else ?
Maybe we could put an option in the raw/mlv recording menu, which put the camera in crop mode. For example with an option "Crop mode" on or off.


To get 1:1 crop / 3x zoom preview in live view on 6d, these registers need to be changed to the following values:
CMOS[6]                   d0       (=Changing the "d" moves horizontal position on the sensor)
CMOS[7]               206       (Vertical centering the image on the screen)
ADTG2-800c             0         (vertical lines to skip)
ADTG2-8000             5       (Don't know what it does, if it is 6(as in 1080p25mode) you get some vertical interlaced looking footage... so must be 5)

nikfreak

Levas thx for all that awesome findings. We will need to wait until a1ex is back. Actually I think I am not capable of implementing what you requested. Don't want to reinvent the wheel so it's better to hope that a1ex will do that job...
[size=8pt]70D.112 & 100D.101[/size]

Levas

And thanks to Greg  :), he did the crop findings on his 500d, I translated it to the registers on the 6d.

A1ex probably has a clear view on how he would like to add options like these to the existing code.



Greg

I can read the values​​, but do not know how to overwrite.



crop_rec  ;D

Levas

Aha, a Crop_rec module!

Only programming language I know is Quickbasic ;D and some HTML... :P
But the answer in how to overwrite registers probably can be found in the source code of the adtg_gui module
https://bitbucket.org/hudson/magic-lantern/src/3288e152d8ae0dcb2cdaf1f9afc1a17611eea2ff/modules/adtg_gui/adtg_gui.c?at=unified

Greg

adtg_gui is not the solution, it requires 15FPS live view and GDB.
We need a module that will let 30FPS ;)

Not easy  :o

ayshih

adtg_gui is slow because it intercepts everything.  it's more appropriate to look at iso_regs for guidance, although you'll need the camera-specific addresses found in adtg_gui.
Canon EOS 50D | 17–40mm f/4L & 70–300mm f/4.5–5.6 DO IS | Lexar 1066x

Levas

I don't mean using the adtg_gui module to modify or rebuild.
I expect there to be some command/syntax which shows how to replace values in the registers... :o  <- my face looking at the source code  ;D

Greg

I modified ADTG_GUI (remove some REG_ENTRY). Now can I get more FPS.

500D in crop mode can get 24FPS (default is 22FPS).
The 1080p (crop trick) can get 21FPS when try more, the camera will freeze.

So maybe somewhere is to limit FPS for each mode.

Currently, it does not make sense for a 500D.