Author Topic: Canon 6D  (Read 533385 times)

jai554

  • New to the forum
  • *
  • Posts: 27
  • 6d - 60d user
Re: Canon 6D
« Reply #1075 on: April 19, 2019, 08:32:07 PM »
@Baladev
Danne made some nice modifications to the sd_uhs module.
Not sure which version you're using, but this new version of Danne activates at startup, it doesn't do write and read tests, only sets the necessary registers at startup.
You can check it works by looking at the Debug tab in ML menu, in memory patches, 3 patches linked to SD UHS are visible.
So if you know your SD card gets faster write speeds with the sd_uhs module, you can try this version, activate module in modules tab, and it's instantly loaded at each startup of the camera.

Link to modified sd_uhs module by Danne:
https://drive.google.com/file/d/1SJHrA75UXobTzBcsEY3lqbHxhNdoksPb/view?usp=sharing

For other users, be sure to test your card with the standard sd_uhs module before trying this one above, I have cards which become slower when using this module.
The Sandisk extreme pro (95MB/s, UHS speed class 3, video speed class V30) cards seems to be working very well with this sd_uhs module, my older sandisks extreme card becomes slower with this module  :P

ive tested this
been getting consistant 60 to 70mb/s write on my Sandisk Extreme Pro MicroSD card

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6968
Re: Canon 6D
« Reply #1076 on: April 19, 2019, 09:29:33 PM »
Sounds pretty high. And this is with liveview on?

baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1077 on: April 20, 2019, 09:12:24 AM »
@Levas

Tested the latest crop_rec. Vertically it's well centered now, but horizontally it's too much to the right, more than before.





Also tried the new sd_uhs module from Danne. Loads faster. Speeds are the same as before. Maximum ~65Mbs

jai554

  • New to the forum
  • *
  • Posts: 27
  • 6d - 60d user
Re: Canon 6D
« Reply #1078 on: April 20, 2019, 09:48:48 AM »
Sounds pretty high. And this is with liveview on?

In liveview, with globaldraw on i get ~62mb/s and global draw off ~64mb/s

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1079 on: April 20, 2019, 11:53:16 AM »
ive tested this
been getting consistant 60 to 70mb/s write on my Sandisk Extreme Pro MicroSD card

Works rather convenient doesn't it, always had to activate SD_hack in debug menu, took some time and fiddling.
This new update from Danne is a big improvement.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1080 on: April 20, 2019, 12:10:43 PM »
@Levas

Tested the latest crop_rec. Vertically it's well centered now, but horizontally it's too much to the right, more than before.





Also tried the new sd_uhs module from Danne. Loads faster. Speeds are the same as before. Maximum ~65Mbs

Ok, I think I'm getting crazy  :o
How could this happen, aah I know, I've centered the preset for full 1640 pixels wide view...you are using 1120 pixels wide view.
And looking at the picture you send, the raw video menu apparently crops off at the left side of the frame if you choose to record lower then available resolution.

So in trying to get a centered 1120 x 1890 preset, I've limited the max resolution in this mode to 1120 x 1890 (in 6804 register).
(somehow this change doesn't always kick in the first time the camera is on, sometimes an extra 'menu' button press helps to get registers set.)
I think the centering is rather spot on, but you can tweak it a little within the crop_rec menu -> advanced -> delta_head3.
You can try changing the value of delta_head3 in steps of 10 or 20 and see how it looks. You can input negative and positive values.
If you go too far on either side, you end up in 1:1 pixel readout mode and loose ML preview :P    (-200 to +200 is a reasonable range for delta_head3 in this case)

New build:
https://drive.google.com/file/d/1h0Cn4bM7Ou2HoEMGz59FBIoqjSVQMiwH/view?usp=sharing


 

jai554

  • New to the forum
  • *
  • Posts: 27
  • 6d - 60d user
Re: Canon 6D
« Reply #1081 on: April 20, 2019, 12:56:59 PM »
Works rather convenient doesn't it, always had to activate SD_hack in debug menu, took some time and fiddling.
This new update from Danne is a big improvement.

yeah... saves a lot of time
need to test it thoroughly though since I've read that some got their card corrupted when using this module

baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1082 on: April 20, 2019, 03:15:09 PM »
Quote
aah I know, I've centered the preset for full 1640 pixels wide view...you are using 1120 pixels wide view
Yep, at this stage I mostly use 16:9 aspect, which results in 1120 pixel width. I'm sorry to be a pain in the neck, I assumed that 1:3 setting on this camera works similar to 1:3 preset on the EOS M, which keeps the position of the crop in the same spot if you reduce resolutions (it removes equal number of pixels on each side).

Quote
So in trying to get a centered 1120 x 1890 preset, I've limited the max resolution in this mode to 1120 x 1890 (in 6804 register).
(somehow this change doesn't always kick in the first time the camera is on, sometimes an extra 'menu' button press helps to get registers set.)
I think the centering is rather spot on, but you can tweak it a little within the crop_rec menu -> advanced -> delta_head3.
You can try changing the value of delta_head3 in steps of 10 or 20 and see how it looks. You can input negative and positive values.
If you go too far on either side, you end up in 1:1 pixel readout mode and loose ML preview :P    (-200 to +200 is a reasonable range for delta_head3 in this case)

Thanks a lot. I though about trying to change some registers myself but wasn't sure which and didn't want to screw something up.
So you are saying delta_head3 changes horizontal position of the captured region? Strange, it says 'May help pushing the resolution a little..'
On the other hand CMOS[2] says ' Horizontal position/binning' - maybe i should change that one?
Thank you for your help!

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1083 on: April 20, 2019, 03:32:43 PM »
No, you definately need delta_head3, I altered some functions in that menu.
Didn’t bother to rename it nicely  :P
See it as alpha/beta builds ;)

baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1084 on: April 22, 2019, 07:46:33 AM »
@Levas

The last crop_rec produces a strange glitch - every other frame is broken in half vertically with the bottom half shifted or delayed. It's ok though, I will try to follow your advice and play with delta_head3 and try to center the frame horizontally with your previous build, which worked well. Even if I find a value for delta_head3 which will center the frame the camera will forget it after a power cycle. Is it possible to write a lua script to set the register? This is what I'm thinking of doing.

Thank you!

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1085 on: April 24, 2019, 12:59:25 PM »
I only checked ML preview, which is fine, but the recording is done from another raw stream (must remember that more often :P), so didn't test it good enough.
Will take a look at it, probably easy to fix.

baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1086 on: April 25, 2019, 11:05:43 AM »
Levas, Which register is responsible for moving the captured area vertically? Is it delta_head4?

Tried centering your 1640x2052 25p preset in 1216x2052 16:9 ratio. Tried changing delta_head3 to some positive value, it moved the captured area the wrong way, setting it to any negative value broke preview.

Changing delta_head4 didn't work - changing it to any value broke preview.

Thank you!

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1087 on: April 25, 2019, 04:56:15 PM »
The vertical allignment is a bit more complicated, it works in zones, you can't adjust it pixel for pixel. So you have to skip many numbers before you come in a working zone/area of the sensor.

But I made a new build, did some testing and it seems that I can't go lower in resolution then 1256 wide, below that you get the corrupted frames like you explained.
So adjusted the presets to max resolution of 1256 x 1890 and you can ofcourse adjust recording resolution in raw menu to 1120 x 1890.
I think it's pretty centered for 1120 resolution now. You can adjust it a little, with delta_head3, let me know if you find a better value for delta_head3 so I can make it permanent in a future build:

For now, 1256x1890 1x3 modes:
https://drive.google.com/file/d/1lcYLd7y31MzEp9Hu6mD7CVh0odzb55BC/view?usp=sharing




baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1088 on: April 25, 2019, 06:57:28 PM »
Thank you for the heads up and for the new crop_rec, will test it tomorrow.

Today I focused on your 1640x2025 25p preset- tried to center it in the frame. Horizontal position I can live with but vertical is very low, close to the bottom. Tried changing delta_head4  (assume it's responsible for vertical positioning?). Tried all values from -100 to 100, no luck - broken preview.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1089 on: April 27, 2019, 07:06:53 PM »
For all 6d owners who want to mess around with registers on the 6d, without any need to know how to program or compile.
Check out ADTG_GUI module on the module downloads page, long time available and made by A1ex.
It's a Wonderfull tool that detects register settings and changes(so we can see what register values Canon is using) and even override the registers with new values(settings).
It's all temporally , when the camera is switched off  or function is sett off, everything is back to normal again.
I have seen much weird shit happen to liveview while messing aroundd with registers, and maybe sometimes a camera lock up.
But pulling out the battery(by a lock up) or switching camera off and on again set everything back to normal.

Quick tutorial:

Be sure you're using the "experimental crop_rec_4k build." (https://builds.magiclantern.fm/jenkins/job/crop_rec_4k/80/artifact/platform/6D.116/magiclantern-crop_rec_4k.2018Jul22.6D116.zip  from the experimental download page. I think the adtg_module doesn't work with standard nightly build.
https://builds.magiclantern.fm/experiments.html

Download the adtg_gui module on the module downloads page, at the bottom of the page, ISO research tools section:
https://builds.magiclantern.fm/modules.html

Put the "adtg_gui.mo" module file in the modules folder on your SD card (/ML/Modules/)

Start up the camera and enable adtg_gui module in the modules tab:
This module uses some techniques which conflicts with Crop_rec module and SD_UHS module, so to be sure to avoid weird behaviour or conflicts, disable crop_rec module and SD_UHS module.


After that restart camera and you will see a new option under the debug tab, go ahead enable it:

Press "Q" button to go inside ADTG Registers menu and you will see an option for which registers it must show, probably best to restrict it to show only known registers, or at least not all, because that are many, many registers  :P


Now if you aren't already in video mode, go ahead, switch to video mode and dive into ADTG registers menu again with the "Q" button.
You will now see many registers and if you use scroll wheel to scroll down, you'll also find the CMOS registers:


On 6d, CMOS 3 register is know to control ISO setting, in the picture above you see the value for this register is 0x33.
33 is the value Canon uses for ISO 800.
Now go ahead, press "set" button to be able to change the value, for example to "0" or "11".
Use "set" button to enter new value, D-pad for selecting which number to change and top scrollwheel for selecting new value.
If you are in liveview or video mode, you can see the effect immediately.
You are changing iso value, without using the iso button  :P

If you highlight the override value and press "q" button, it stops overriding the register and changes it back to default value again.
If you now use the "iso" button to change iso value on your 6d, and go back into ADTG Registers menu again, you can see the value of CMOS 3 is changing.

Canon uses the following values for CMOS 3 on 6d:
Code: [Select]
ISO 100 = 0x0
ISO 200 = 0x11
ISO 400 = 0x22
ISO 800 = 0x33
ISO 1600 = 0x44
ISO 3200 = 0x55
ISO 6400 = 0x77
ISO 12800 = 0x77
ISO 25600 = 0x77

See a pattern here, try overriding it to some weird combination, 0x17...and check liveview, see the bright and dark lines, you have now set dual iso mode (iso 200/6400)  ;D

But what is going on after iso 3200...why is it skipping value 0x66 between iso 3200 and 6400 ?
Let's find out and override the register to 0x66...it works there is liveview...looks like an iso setting between iso 400 and 800.
Probably a real iso 640 setting for the sensor. Not sure why it is there, for Canon testing, or is it a magic iso and is there no noise  :P

And what's happening above ISO 6400...12800 and 25600 are using the same setting as 6400, 0x77.
So there is something fishy here...
Go to video mode, set iso (with canon iso button) to iso 6400.
Go back to adtg_gui menu and choose option, show "modified from now on" option.


Exit menu and change iso to 12800 with iso button and check adtg_gui menu again.
If you did it right you'll see four registers showing up:
Code: [Select]
ADTG2[8882]
ADTG2[8884]
ADTG2[8886]
ADTG2[8888]
Behind it, you'll see the current values and the before values.

These are the analog preamp registers.
CMOS 3 is amplification within/on sensor level and ADTG2[8882-8888] registers are believed to be analogue amplifiers between sensor capture and before digital conversion.
Normally these registers are around value 0x400, with iso 12800 they become around 0x900 and with iso 25600 around 0x1200.
0x400 hexadecimal -> decimal conversion = 1024
0x900 hexadecimal -> decimal conversion = 2304
0x1200 hexadecimal -> decimal conversion = 4608

So decimal value doubles, is one stop extra iso.
By trial and error max value for overriding seems to be 1FFF, higher value gives darker image, so it's starts at zero again.
0x1FFF is about twice as high in decimal value (8191) as is 0x1200, so overriding these four registers to 0x1FFF
Gives you iso 51200 on your 6d  :D, although a very noisy one  :P

The above gives a idea how to explore registers and play with them and see what happens.

@baladev
CMOS 6 and 7 do horizontal and vertical position.
If you go into 5x zoom mode and move the focus box around, you can see values of CMOS 6 and 7 changing.

baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1090 on: April 29, 2019, 05:40:00 PM »
Thank you Levas for the information

Are you saying that if I find CMOS 6 and 7 values, you would be able to bake them into 1:3 presets and get centered framing?
If so, I have one question - without crop_rec, how do I set resolution I want to center?

[edit]

Ok, I got the numbers for cmos7 moving the captured area up by 1,2 and 3 steps..
Now, what do I do with these numbers? Tried entering them in delta_head4, it didn't work.

baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1091 on: May 02, 2019, 05:45:03 PM »
Quote
You can adjust it a little, with delta_head3, let me know if you find a better value for delta_head3 so I can make it permanent in a future build

For the 1256x1890 1x3 preset I found out that delta_head3 of 30 puts the captured region right in the center at 1120 x 1890 (16:9), so you can bake it in.

Can you please add your other 1:3 presets - 1216 x 2052 and 1264 x 2144 to the same crop_rec at 25fps, so we could have one ultimate anamorphic build (at the moment I need to switch between them). I still don't know how to center the captured area vertically. I found the values for cmos7 but don't know what to do with them. So, if you could center these two presets (2052 and 2144) vertically, I will find values for delta_head3 to center horizontally.

Thanks!

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1092 on: May 02, 2019, 08:18:54 PM »
Will make an ultimate build and see if I can center the other presets too.
So the latest preset 1256x1890 can use 30 more on the horizontal centering.
Could take some days (before I find some time), but it will come  :D

baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1093 on: May 03, 2019, 03:53:35 AM »
Quote
So the latest preset 1256x1890 can use 30 more on the horizontal centering.
Yes. The way it is now, it's a bit too much to the left. delta_head3 set to 30 puts it right in the center.

Quote
Could take some days (before I find some time), but it will come
If it's easier for you, you could make a crop_rec with cmos7 register available for modification, then I could do all the work myself (finding the values for horizontal/vertical centering) and give them to you.

Thanks!

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6968
Re: Canon 6D
« Reply #1094 on: May 03, 2019, 09:44:28 AM »
In crop_rec.c I also use optical black area sizes to centre presets. It´s a comnbination of cmos 5, cmos 7 and refining skip offsets. Maybe useful thinking for 6D too:
In following function:
Code: [Select]
/* optical black area sizes */
/* not sure how to adjust them from registers, so... hardcode them here */
static inline void FAST calc_skip_offsets(int * p_skip_left, int * p_skip_right, int * p_skip_top, int * p_skip_bottom)
{

For eosm:
Code: [Select]
case CROP_PRESET_anamorphic_EOSM:
  case CROP_PRESET_anamorphic_700D:
  case CROP_PRESET_anamorphic_650D:
/* see autodetect_black_level exception in raw.c */
        skip_bottom = 24;
    if (ratios == 0x1)
    {
        skip_bottom = 20;
        skip_right = 156;
        skip_left = 160;
    }
    if (ratios == 0x2)
    {
        skip_bottom = 0;
        skip_right = 324;
        skip_left = 292;
    }
        break;

Usually this stuff affects black level auto detection in raw.c but that´s another story how to fix...

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1095 on: May 03, 2019, 01:15:15 PM »
@Danne
I think that horizontal centering can be done pixel perfect with CMOS register.
Pixelperfect vertical centering is not possible with CMOS I think, because it works in certain sensor area steps.

So to centre presets, you're using other values for optical black areas, not a bad idea, this makes pixel perfect possible for vertical  ???
About the black level value detection, I thought these were changed to hardcoded values long time ago, when having problems with wrong black levels.
Are you sure black levels are still detected/detemined from black area and not from hardcoded values ?

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6968
Re: Canon 6D
« Reply #1096 on: May 03, 2019, 01:20:35 PM »
Auto detected, oh yes believe me. Don't have the code part in front of me but it looks for I think left border or else it checks bottom or top of image. Search auto blacklevel or similar in raw.c.

baladev

  • Freshman
  • **
  • Posts: 81
  • 5Dm3 - 6D - 7D - EOS M
Re: Canon 6D
« Reply #1097 on: May 03, 2019, 05:48:34 PM »
For what it's worth..

I've mentioned before that I've noticed that centering is done differently on the M and the 6D.
Here is an example of 1736x976 FF vs 1120x1890anam vs 1088x1836anam on the M (resolutions changed in the same preset):




On the 6D it looks like this at the moment:
1824x1026FF vs 1216x2052an vs 1264x2144an:




The M centers automatically by cropping evenly on each side, though vertical centering isn't perfect.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Canon 6D
« Reply #1098 on: May 04, 2019, 08:54:18 PM »
I've been working with Levas and Danne on getting the 6D into the same "bleeding edge" branch that is working with the EOSM/100D/700D/650D. It is pretty much ready to merge but it hasn't been tested yet. I posted a test build here:

https://bitbucket.org/daniel_fort/magic-lantern-danne-fork/downloads/

This might make it easier to re-center, adjust black level, etc. because those issues were already solve for some of the other cameras that are working on Danne's branch.

[EDIT] When I said "merge" I meant into the bleeding edge branch, not the main repository. A1ex said he'd like to make the crop_rec module fully generic on all models. The experiments we're doing will hopefully serve to help reach that goal.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1671
  • 6d - Nightly build user
Re: Canon 6D
« Reply #1099 on: May 05, 2019, 12:36:10 AM »
Finally had time to test, but unfortunately the crop_rec presets don't work right in this build  ???
Good thing is, it's probably something small.

I can load crop_rec module and set the presets that are in there. After that, the image partly changes, but it's not good.
And recordable resolutions in raw menu and fps don't change, standard values.

So I think, the CMOS register changes are definately loaded/activated and working (the image does change, but it's not good, stretched/weird green cast etc.)
But the registers like 6804 and A and B timers are definitely not loaded/activated, because selectable resolution doesn't change and FPS doesn't change, 5x zoom stays 29fps.

So these portions of the presets are not loaded/activated in this build:
Code: [Select]
     
           case 0xC0F06804: return 0x52f02c0; // 2688x1296_25fps x5 Mode;

           case 0xC0F06824: return 0x2d7;
           case 0xC0F06828: return 0x2d7;
           case 0xC0F0682C: return 0x2d7;
           case 0xC0F06830: return 0x2d7;
       
           case 0xC0F06010: return 0x2d9;
           case 0xC0F06008: return 0x2d902d9;
           case 0xC0F0600C: return 0x2d902d9;

           case 0xC0F06014: return 0x57a; /*  for 25 fps  */

           case 0xC0F0713c: return 0x530;
           case 0xC0F07150: return 0x51f;