Author Topic: Canon 6D  (Read 457587 times)

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1482
  • 6d - Nightly build user
Re: Canon 6D
« Reply #775 on: February 19, 2018, 12:54:55 AM »

Uploaded a couple of more test builds. One adjusting CMOS[7] to 0x2A5 and another build that doesn't make any adjustment to CMOS[7].

The one without the CMOS[7] adjustment, looks just like your previous builds, ghost image in live view and recording.
Now the one with the CMOS[7] adjustments seems to work  :D
I've got multiple MLV's with 3x3 binning and 50fps  :D
BUT weirdly enough, the first time I tried this build, I got an error message on recording, multiple times.
But now I can't recreate this error.

Here are some logs:
Code: [Select]
ML ASSERT:
slots[slot_index].size < max_frame_size
at mlv_lite.c:3388 (raw_video_rec_task), task raw_rec_task
lv:0 mode:3

raw_rec_task stack: 1e0308 [1e03c8-1df3c8]
0x0044C914 @ b935fc:1e0338
0x0044C478 @ 44c970:1e0308

Magic Lantern version : Nightly.2018Feb18.6D116
Mercurial changeset   : cba0cec2d4ba+ (crop_rec_4k_6D.116)
Built on 2018-02-18 16:33:53 UTC by DFORT
Free Memory  : 342K + 2246K
Code: [Select]
ML ASSERT:
0
at mlv_lite.c:2497 (compress_task), task compress_task
lv:1 mode:3

compress_task stack: 1e4340 [1e43d0-1e33d0]
0x0044C914 @ b8e53c:1e4370
0x0044C478 @ 44c970:1e4340

Magic Lantern version : Nightly.2018Feb18.6D116
Mercurial changeset   : cba0cec2d4ba+ (crop_rec_4k_6D.116)
Built on 2018-02-18 16:33:53 UTC by DFORT
Free Memory  : 341K + 2246K


Will do some more testing to and see what it does.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Canon 6D
« Reply #776 on: February 19, 2018, 02:53:08 AM »
Now the one with the CMOS[7] adjustments seems to work  :D
I've got multiple MLV's with 3x3 binning and 50fps  :D
BUT weirdly enough, the first time I tried this build, I got an error message on recording, multiple times.
But now I can't recreate this error.

I'm not getting any errors in QEMU and this is doing exactly what you did in order to get it working so let's make this one the hero.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12317
  • Emergencies only
Re: Canon 6D
« Reply #777 on: February 20, 2018, 08:21:09 PM »
@dfort: just FYI (this one should be easy to translate into a crop_rec preset). That's actually how this module got its name ;)

blubbblubb

  • New to the forum
  • *
  • Posts: 10
Re: Canon 6D
« Reply #778 on: February 20, 2018, 11:02:37 PM »
I recently switched to the Canon 6D (coming from a 600D) and the only thing i miss is the ability to monitor the Audio Levels with a pair of headphones. I tried to copy the steps mentioned in this post:
*EDIT* - I forgot the registers I had to port over from Tragic Lantern in audio.h.  All better now.

I got tired of not having headphone monitoring on my 6D, so I hacked it in over the course a few evenings.  ...

but I was not able to simply copy those changes (probably because the code of Magic Lantern has changed a lot since then). Im guessing some functions were removed or renamed

I stopped trying at this error message:
Code: [Select]
../../src/audio.h:160:9: error: implicit declaration of function '_audio_ic_write_bulk';
I might look into it again in the next few days and try to get it to work, however my main question is: Where there any problems with those changes? Or was there another reason that this never made it into the official version?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12317
  • Emergencies only
Re: Canon 6D
« Reply #779 on: February 21, 2018, 01:34:35 AM »
You should probably just provide a declaration; then, to get changes into mainline, the general procedure is to provide a pull request, and other 6D owners to confirm it's working (since I'm unable to test otherwise, except for some limited stuff in QEMU, such as how the menus look like, or whether it turns off the display or not).

blubbblubb

  • New to the forum
  • *
  • Posts: 10
Re: Canon 6D
« Reply #780 on: February 21, 2018, 04:14:49 AM »
The function was declared inside another function (which to me looked a bit weird to begin with), moving it seemed to help.

Now there is an undefined reference to sounddev_active_in which by the looks of it is a canon function with a missing stub for the 6D.

I'm guessing i'll have to refresh my C and Assembler knowledge a bit and have a deeper look into it.

As for getting it into mainline, the way it was done in the previously mentioned post seems kinda hacky and there are some limitations/problems mentioned so i guess it would be necessary to adress those first.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Canon 6D
« Reply #781 on: February 21, 2018, 04:27:33 AM »
@dfort: just FYI (this one should be easy to translate into a crop_rec preset). That's actually how this module got its name ;)

Wow, that post from @Levas is from 3 1/2 years ago. It took that long to make it easy? Looks like 3xzoom/1:1 crop could also apply to the other "is_basic" cameras. Well,  they already have the CROP_MODE_HACK but it would still be a good exercise.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

MR MIAN

  • New to the forum
  • *
  • Posts: 6
Re: Canon 6D
« Reply #782 on: February 21, 2018, 10:31:30 AM »
so...how can you get the audio?mlv_dump only give me dngs by
Code: [Select]
mlv_dump file.MLV --dng --no-stripes --no-fixcpI have loaded mlv_snd.mo and keep it on. :'(

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12317
  • Emergencies only
Re: Canon 6D
« Reply #783 on: February 21, 2018, 12:31:27 PM »
Wow, that post from @Levas is from 3 1/2 years ago. It took that long to make it easy?

FYI, the original crop_rec module was announced 2 years ago, and it referenced Levas' post from the very beginning. The module was a lot simpler back then, since it only had one preset (you already know).

Best guess: the feature wasn't tempting enough for other folks to look at the source code.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1482
  • 6d - Nightly build user
Re: Canon 6D
« Reply #784 on: February 23, 2018, 11:24:47 AM »
Did some more testing with lossless recording, as known resolution 1824x1026 gives frames with bottom half corrupted.

When we do normal black level fix (1920-1792-1536-1024), we get a normal upper half.
Now I did some more testing, and with an alternative black level fix (1728-1408-2304-2048) I can get a normal bottom half of the same frame  :o

Here are the 3 frames, all the same, on my google drive:
-one vanilla, as it comes out of mlv_dump
-one with the 'normal' black level fix for 6d
-and one with an alternative black level fix:
https://drive.google.com/drive/folders/17ywgTKYYMLLvL3QZzkCtFvCHed4CZ4aC?usp=sharing

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Canon 6D
« Reply #785 on: February 23, 2018, 02:54:37 PM »
so...how can you get the audio?mlv_dump only give me dngs...

Upload a short MLV with audio so we can examine it.

...frames with bottom half corrupted...we get a normal upper half...I can get a normal bottom half of the same frame

The DNG samples you posted in Reply #783 were not shot with the crop_rec module, right? (Obvious because of the frame size.)

Maybe I got the DEFAULT_RAW_BUFFER_SIZE wrong?

src/raw.c
Code: [Select]
#ifdef CONFIG_6D
#define DEFAULT_RAW_BUFFER MEM(0x76d6c + 0x2C)
#define DEFAULT_RAW_BUFFER_SIZE (0x4ee00000 - 0x4d600100)
#endif

We made an adjustment in the crop_rec module to adjust  CMOS[7] (see pull request "PACK12(37,10)" is being applied to the 6D):

modules/crop_rec/crop_rec.c
Code: [Select]
cmos_new[7] = (is_6D) ? PACK12(37,10) : PACK12(6,29);
Is that working with all reduced bit depth and lossless settings?
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1482
  • 6d - Nightly build user
Re: Canon 6D
« Reply #786 on: February 23, 2018, 03:29:02 PM »
@Dfort, the dng samples are shot with mlv_lite, lossless 14 bit in normal 1080p mode.

If default buffer size is wrong, how can we fix it, can we check these values, or can we do some trial and error ?


We made an adjustment in the crop_rec module to adjust  CMOS[7] (see pull request "PACK12(37,10)" is being applied to the 6D):

modules/crop_rec/crop_rec.c
Code: [Select]
cmos_new[7] = (is_6D) ? PACK12(37,10) : PACK12(6,29);
Is that working with all reduced bit depth and lossless settings?


The last crop_rec build you made, the one with the CMOS 7 adjustment, works for all formats, 14-10 bit and lossless all options.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Canon 6D
« Reply #787 on: February 23, 2018, 05:58:29 PM »
If default buffer size is wrong, how can we fix it, can we check these values, or can we do some trial and error ?

It isn't defined on the 100D so it must be using this:

src/raw.c
Code: [Select]
#define DEFAULT_RAW_BUFFER_SIZE (9*1024*1024)
Simply comment out the DEFAULT_RAW_BUFFER_SIZE for the 6D and see what happens.

0x4ee00000  - 0x4d600100 = 0x17FFF00 - uses this currently for 6D
9*1024*1024  =   9437184 = 0x0900000 - uses this if  DEFAULT_RAW_BUFFER_SIZE is commented out


[EDIT] That's pretty much half the size. How does this work?
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12317
  • Emergencies only
Re: Canon 6D
« Reply #788 on: February 23, 2018, 07:49:59 PM »
If default buffer size is wrong, how can we fix it, can we check these values, or can we do some trial and error ?

Here (just needs enabling a compile-time option).

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1482
  • 6d - Nightly build user
Re: Canon 6D
« Reply #789 on: February 23, 2018, 09:17:06 PM »
@Alex

I think I've done it right  ???

And got this in Photo mode, looks like the buffer goes from
4B328000 to 4CFFFFFC




Also did a screenshot of the Free Memory dialog:



a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12317
  • Emergencies only
Re: Canon 6D
« Reply #790 on: February 23, 2018, 09:26:47 PM »
Looks OK. Same numbers when starting in other modes? (1080p, 720p etc)

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1482
  • 6d - Nightly build user
Re: Canon 6D
« Reply #791 on: February 23, 2018, 09:39:19 PM »
Yes same for other modes.
Had to restart the camera a few times to see it that quickly, must say the console text is rapidly moving up and out of sight, is there a way to scroll trough console text afterwards ?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12317
  • Emergencies only
Re: Canon 6D
« Reply #792 on: February 23, 2018, 09:47:24 PM »
Not exactly; there is an option to save the log to a file (CONSOLE_DEBUG in console.c), but that's pretty much it. However, it's not a bad idea to have a larger - scrollable - buffer.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Canon 6D
« Reply #793 on: February 23, 2018, 11:55:47 PM »
Let's see if that "Raw buffer guess" @Levas found works. PR updated and test build posted.

[EDIT - Wait a minute. This doesn't make sense: 4B328000 - 4CFFFFFC = -1CD7FFC

What is listed here for the EOSM is 46798080 - 47F24060 but what is in raw.c and seems to be working properly is 0x47F00000 - 0x46798080. Is this an operation or a range or did I transpose the numbers or  ???
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

MR MIAN

  • New to the forum
  • *
  • Posts: 6
Re: Canon 6D
« Reply #794 on: February 24, 2018, 06:16:49 AM »
Upload a short MLV with audio so we can examine it.
https://pan.baidu.com/s/1qZhil9U
mlv_dump said it hasn't content audio.
I'm not sure if you kan open this link ,if you can't,maybe i can Email it to you.
thanks a lot.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1482
  • 6d - Nightly build user
Re: Canon 6D
« Reply #795 on: February 24, 2018, 10:48:11 AM »
[EDIT - Wait a minute. This doesn't make sense: 4B328000 - 4CFFFFFC = -1CD7FFC

@Dfort
I think it's a range, I put the biggest number in front.
Made a build with it by using this in raw.c for the 6d.
Code: [Select]
#define DEFAULT_RAW_BUFFER_SIZE (0x4CFFFFFC - 0x4B328000)
1291845628 -  1261600768 = 30244860 = around 29/30Mb

The build works, but it doesn't fix lossless quirks on the black level and half corrupted frames on some resolutions unfortunately.

Edit, the buffer however is bigger than the standard 9Mb buffer and also a little bigger than the 25Mb buffer you'll get with your(DFort) Crop_rec_4K_6d test builds.
So still a gain here  8)

Edit 2, I see in your source now that you start the buffer at 4DF0000 and end with 4B328000, is there a reason for changing the start address ? It's now even 45Mb in size  :D

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1482
  • 6d - Nightly build user
Re: Canon 6D
« Reply #796 on: February 24, 2018, 11:02:37 AM »
@Mr Mian,

My Chinese language skills are not very well, tried to download the MLV, but I didn't succeed.

But to record MLV's with audio, you must download the 4 februari build from Dfort.
https://bitbucket.org/daniel_fort/magic-lantern/downloads/crop_rec_4k_mlv_lite_snd.2018Feb04.6D116.zip
And be sure to enable the MLV_lite and MLV_snd modules:


After that, restart camera and then within the raw video menu (highlight it and click Q button on camera) you will see all the way at the bottom of the menu a 'sound recording' option, select it and activate it.
Now you should be able to have MLV's with audio recording


dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Canon 6D
« Reply #797 on: February 24, 2018, 02:20:51 PM »
@MR MIAN - Your MLV file has no audio. Follow the instructions posted by @Levas in order to turn on audio in mlv_lite.

I see you are using one of my experimental builds. I've been making changes based on the feedback I'm getting from users because I don't have access to a 6D. Your MLV file shows that you have activated several modules at one time including adv_int, autoexpo, bench, crop_rec, deflick, dot_tune, ettr, mlv_lite, mlv_rec, mlv_snd, raw_twk and silent, that is way too many. In addition, you shouldn't load mlv_lite and mlv_rec at the same time because they will conflict.

It looks like you used crop_rec with a reduced bit depth lossless compression setting, right? When I extract the dng files they look like this over here:



Not at all like the examples you previously posted.

5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1482
  • 6d - Nightly build user
Re: Canon 6D
« Reply #798 on: February 24, 2018, 02:47:36 PM »
Good to see that the problem with black levels shifting, when using lossless recording, is not restricted to my canon 6d.
So it's not just my copy of the 6d, but probably all 6d's out there  ;D

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Canon 6D
« Reply #799 on: February 24, 2018, 03:05:00 PM »
Edit 2, I see in your source now that you start the buffer at 4DF0000 and end with 4B328000, is there a reason for changing the start address ? It's now even 45Mb in size  :D

I was doing this during a break at work yesterday then got busy and forgot to post why I did what I did. Now that I look at it again, maybe I did the wrong thing.

If you look at what is working on the other cameras, for example the 5D3_113:

Code: [Select]
#define DEFAULT_RAW_BUFFER_SIZE (0x4CDF0000 - 0x4B152000)
and compare it to this:

5D3 1.1.3: 0x4B152000 - 0x4CDFFFFC (repeatable; tested photo mode, 1080p25, 720p50, x5, with and without HDMI monitor)

Note that indeed the larger number has to come first or we'll end up with a negative value. However, notice that on all of the cameras that are working in crop_rec_4k (with the exception of the 100D) the larger number is also rounded down slightly. I went the wrong direction and rounded up. What I should have done, starting with the test you just did:

6D: 0x4B328000 - 0x4CFFFFFC

and done this:

Code: [Select]
#define DEFAULT_RAW_BUFFER_SIZE (0x4CFF0000 - 0x4B328000)
In addition, the branch I'm using on the pull request was falling behind the crop_rec_4k branch so I merged in the latest changes. This might help with the testing but the pull request is getting messy so once we get things ironed out I should redo the pull request.

I'll post a new build in the usual location and also make a new crop_rec_4k_mlv_lite build because that one is also falling behind. I'm deleting the old builds because we know those have problems and my downloads page needs a clean up.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102