Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - reddeercity

Pages: [1] 2 3 ... 79
@heder see this
Code: [Select]
CF Interface block
 +0x2000 [8]   PIO DATA (used to transfer data in polled mode)
 +0x2001 [8]   Read: Error data, Write: Features
 +0x2002 [8]   Sector count
 +0x2003 [8]   Sector number
 +0x2004 [8]   Cylinder low byte
 +0x2005 [8]   Cylinder high byte
 +0x2006 [8]   Drive/Head
 +0x2007 [8]   Read: Status, Write: CF command
 +0x200E [8]   Read: Alt Status, Write: Device control

Extern DMA Controller Interface (DMA PIO mode - not polled mode) (digic3<->cf controller ?)
 +0x800C [32]  Data register to feed with data (usually 0x2000)
 +0x8010 [32]  unknown, set to 0x100. maybe sector size?
 +0x8014 [32]  unknown, set to PIO_W:0x1E, PIO_R:0x16, DMA:0x00,
 +0x8024 [32]  PIO: CF Command register to use, OR'ed with 0xA000
 +0x8028 [32]  PIO: set to ?
 +0x8030 [32]  PIO: set to ?
 +0x8034 [32]  PIO: set to ? or ? depending on command reg
 +0x8038 [32]  PIO: set to ? or ? depending on command reg
 +0x8040 [32]  Enable interrupt when flag changed? 0, 1, 0x2000000
 +0x8044 [32]  Interrupt reason, write with negated value upon interrupt
 +0x8048 [32]  set to 1, maybe transfer count?

Tranfer mode control registers ? (cf controller <-> cf card ?)
 +0x8100 [32]  0x0 (init) or 0x2 (software OR's with 0xFFFFFFF9 then AND with 0x2)
 +0x8104 [32]  0x4

PIO access timing registers (cf controller <-> cf card ?)
 +0x8108 [32]  access timing PIO mode - fastest mode = 0xC0 ~ 20mb/s
 +0x810C [32]  access timing PIO mode - fastest mode = 0xC0 ~ 20mb/s
 +0x8110 [32]  access timing PIO mode - fastest mode = 0xC0 ~ 20mb/s
 +0x8114 [32]  access timing PIO mode - fastest mode = 0xC0 ~ 20mb/s

When setting timing registers 0x8108-0x8114 incorrectly, the FIO_Write function will recover from any
errors and return a error to the caller via return value. The FIO_Read will not, and a call will FIO_read
will stall the camera.
UDMA Mode Settings ? (CF identify drive command says UDMA is not supported)
 +0x8200 [32] 0x0     (?)
 +0x8204 [32] 0x0     (?)
 +0x8208 [32] 0x3FFFF (?)
 +0x820C [32] 0x3FFFF (?)
 +0x8210 [32] 0x3FFFF (register is changable)
 +0x8214 [32] 0x3FFFF (register is changable)

SDCON Interface used by CF

Some useful info , even for 5d2/50d

Camera-specific discussion / Re: Canon 50D
« on: May 27, 2020, 06:24:25 AM »
You need to enable it with the set button , there's a drop down menu in "Optimize for" etc. ....

Also enable Expo. Override , to get proper shutter angle .

Why are features supported the excat same ? 40D (digic 3) only runs in slow PIO mode, while digic 4 run lighting fast UDMA mode.
The digic 4 code says UDMA , and the digic 3 code only says PIO mode.
 it not then this basically means that OC'ing can only be done with CFDMA I/O (0xC0620000 for digic 4)
Seem 40D uses  (40D = 0xC0700000) instead of 0xC0620000
from here wiki/Register_Map#CFDMA
When i did my investigation i used "digic poke" not sure if it's works on 40D , i could clock down the CF on the 5D2
to 20MB/s and rise it in steps (35,50 etc. ...) but i could not go to udma7  just 6 which is 80MB/s .
I followed this
this may help also

I guess a1ex did have his 5d2 cf card bus over clocked ,
I guess  /magic-lantern/branch/hdparm can help do this , i have the source but haven't had the time to compile on 5d2/50d yet.
not sure if this helps you  :)

I'm using an hackintosh with an i7-extreme
8-HDDs 48TB RAID6 thunderb.2, that is only “relatively” fast, but surely not fast as even a single SSD.
Me the same as you "hackintosh" i7-3770K overclocked to 4.8GHz with a ATTO PICe Raid ExpressSAS card  (2TBx4=8TB) in a raid 5 6TB total with a spare drive
I tried raid 6 was too slowww , (around 350MB/s) changed it to Raid 5 (3 disk + 1 spare) and got around 800-1200MB's on a empty drive .
I keep the raid no more then 50% full after that is slows down too much to 600MB/s but above that I can maintain (30-40%full) 800MB/s
So if you can It would be really better to change to raid 5 from raid 6

I also use (Cross platform mac/pc) FreeNAS (home built) with 6drive Raid5 4TB confirmation in ZFS over 1Gb network connection (100-130Mb/s)
and I edit with FCPX , I leave the whole project on the NAS box proxies and all and don't notice any slow down .
Even use the NAS box raid 5 to mount MLV's with MLVFS and import to After Effect(CS6) or BM Resolve without issue

My 2 cent worth  :D

Magic Lantern 81 ISO is 100 ISO in the menu , if you don't have magic lantern installed , you don't get 81 ISO .

50D update: I got a Full Res preset figured out in 5xZoom .
4768x2678 @ 6.5fps I did have it push to 8fps but it was too unstable .
Also I had the full height (4768x3166) @2.5fps (I think it should be able to get around 4-5fps but it was getting hot & lockup) 

Here a 16bit PNG from MLV Producer 50D-6.5fps-M25-2350_00001.png
I had  problems using MLV App , It had bad pink hi-lights that couldn't be fixed.

I also export 2 h264 clips , 1 at the native frame rate (6.5fps) and the 2nd at 24fps ( would gave me 2.0 second from 8 seconds)
I didn't have the right shutter speed so it's a little jerky.

Camera-specific discussion / Re: Canon 50D
« on: May 26, 2020, 07:07:27 AM »
go to "Frame Override" Tab and set to "Exact FPS" then dial in the desired frame rate e.g. 23.976 from 30.00 etc. ...
the default Liveview frame rate on the 50D is 30.00fps.

General Help Q&A / Re: New to Videography and ML (canon 600d)
« on: May 24, 2020, 06:38:54 AM »
600d seems not that bad , at least there's 10-12bit raw video
And with that , it opens the door to be able to use crop_rec  plus lossless compression (once ported that is) .
It's a D4 cam like 5d2 & 50d .

Sorry , misunderstanding  ::)

? I yet said 5D2 has 11.92 ,no 11.16
what @ilia3101 posted is not correct .
image below from this post from a1ex

General Chat / Re: Raspberry Pi High Quality Camera
« on: May 21, 2020, 01:45:06 AM »
@Anaconda_  , .h264 is a basic avc/mp4/mov without the wrapper of mp4/mov .
It's consider raw AVC , because of no wrapper . I've use this format many times in windows.
That profile you posted is the same profile canon 5d3/d5 cams  .mov/avc use .

No it's more , 11.92EV from a1ex  :D
[January 17] 5D2 reaches 11.92 EV of dynamic range at ISO 81.
Of course this is on Magic Lantern ISO tweak , Not Canon firmware ISO

Update 50D , I have 48fps  preset working now just needs a few more tweaks in the preview regs .


Here a short 4 second 10bit .mlv sample from my Google drive 50D_48fps_M17-1958.MLV 275MB
Exported a 4 second  h264 (mp4) from mlv app 1568x700_48fps_M17-1958.mp4

Still working on the bug for 4k 3x1 , I may have a new crop_rec for 50d in a few days with 48p & center crop .

General Help Q&A / Re: Is MLV using the full width of the sensor?
« on: May 18, 2020, 07:12:06 AM »
So to summarize: the 5D2, CANNOT do lossless compression because of the DIGIC 4 processor
No,  that's not right -- D4/5d2/50d can do lossless compression ,  there a bug in saving of the lossless dng/mlv that I'm still working on.
So it's about 90% implemented this where I left off here , just haven't got back there yet wanted to have the 50d working in crop_rec before I continue on.

General Help Q&A / Re: Is MLV using the full width of the sensor?
« on: May 17, 2020, 02:52:52 AM »
I did a quick test build with no image offset , in other words I recorded the whole sensor black border & all .

First 3x3 (FHD) 2040x1267 , this is the raw_image dump
(I didn't adjust the black level , sorry it 128 should be 112 for 10bit )

Here the
If you do a crop in IrfanView you get 1880x1250 ,
which the offset is correct in raw.c  160 pixels left & 18 pixel from the top
Though this would help people understand better how the sensor is configured  ;D

General Help Q&A / Re: Is MLV using the full width of the sensor?
« on: May 13, 2020, 01:05:50 AM »
@Levas , I have a 5D2 and yes a cr2 is 5616 but the FRSP is 5632 , and there must be some padding in canon firmware .
Also I check the Image dump from my 5D2 & 3x3 raw image is indeed 1880 not 1872 or 1877 as I said ,
there's 3 pixel from somewhere , maybe some padding ?
In the zip file there is 3 files the 3x3 ml raw dump , DNG ,  the converted dng ->.ppm file from exiftool & the converted .ppm -> .png
Code: [Select]
File Name                       : RAW-001.DNG
Camera Model Name               : Canon EOS 5D Mark II
Software                        : Magic Lantern
Subfile Type                    : Full-resolution Image
Image Width                     : 2040
Image Height                    : 1268
Strip Offsets                   : 33792
Samples Per Pixel               : 1
Rows Per Strip                  : 1268
Strip Byte Counts               : 4526760
X Resolution                    : 180
Y Resolution                    : 180
Default Crop Origin             : 0 0
Default Crop Size               : 1880 1250
Active Area                     : 18 160 1268 2040
Image Size                      : 2040x1268
So if you pixel peep there no missing pixels that I can see .

In the Old Raw_Rec module (pre-2016) We had 1880 wide , before the speed penalty was found in D5 cam .

Found a CR2 and
Code: [Select]
Record Mode                     : CR2
Canon Image Type                : Canon EOS 5D Mark II
Canon Image Width               : 5616
Canon Image Height              : 3744
Raw Jpg Size                    : Large
Cropped Image Width             : 5616
Cropped Image Height            : 3744
Sensor Width                    : 5792
Sensor Height                   : 3804
Sensor Left Border              : 168
Sensor Top Border               : 56
Sensor Right Border             : 5783
Sensor Bottom Border            : 3799
Color Data Version              : 6 (50D/5DmkII)
Exif Image Width                : 5616
Exif Image Height               : 3744
Image Size                      : 5616x3744
Important info about Sensor
Cropped Image Width             : 5616
Cropped Image Height            : 3744
Sensor Width                         : 5792
Sensor Height                        : 3804
Sensor Left Border                 : 168
Sensor Top Border                 : 56
Sensor Right Border               : 5783
Sensor Bottom Border            : 3799

Magic Lantern uses less of a off set 160 compared to canon's 168 and the vertical canon does 58 where ML uses 18 offset
Also I did a OB Zone test here and it's 1880 so
mainly a coding issue . With Crop_Rec it's really a non issue now , with 1x3 , 3x1 etc. ....  :)

what @heder said ! it can be very hard at times to understand but start by just reading everything .
I'm by not means a programmer but I focus on the things I wanted to do e.g. "Crop_Rec" on 5D2
It took me from April ,2017 to Dec , 2018 to get a working crop_rec  (with help from main dev.a1ex) & now I got the 50D working in crop_rec .
from that I now understand more and can develop more advance features etc. ...
I can't write C code from scratch but I followed code sample , that are all over the forum and in the source code .
Then made the code modifications as needed for the camera I was working on , it's always a work in progress  ;)
Start small and work you way up , before long you will be writing code .....


General Help Q&A / Re: Why I can´t increase resolution
« on: May 12, 2020, 09:07:51 AM »
see explanation here
The reason the 5D2 records 1856 instead of 1880 is because in the code of  mlv_rec.c  there a restriction .
In the old code base there was a speed penalty on d5/5D3 cameras when coping from the EDMAC
( where the image buffer is then get copied to the store device) when the resolutions was not in a factor of 32pixel .
The d4/5D2 did not have this same speed penalty (maybe because of the difference between the d4 "FAT32" & d5 exFAT)

5D2: 1880/32=58.75 -- not a factor of 32
5D2: 1856/32=58
5D3: 1920/32=60

But in mlv_lite (not mlv_rec) , a1ex add extra code to make a exception for the 5D2 to record 1880 , but it does not work the best & there's no sound available .
I've been looking at maybe add this code to mlv_rec in the future , if time permits .

General Help Q&A / Re: Is MLV using the full width of the sensor?
« on: May 12, 2020, 08:37:41 AM »
Each camera has it own native resolution according to the sensor size and may be up-scaled to 1080p or not in h264 (.mov) canon firmware.
Magic Lantern does not upscale to any set size (e.g. 1080p) but just records the native raw resolution .
In non crop mode , or what we call it here on the forum 3x3 or FHD (Full HD)
e.g. 5D2:  the sensor size is 5616x3744 by canon info , do the math and you get 5616/3=1872 , but this is not right .
Canon also crop's the full sensor a little bit , the real size of the sensor is 5632x3750 wide! magic lantern unlocks the extra pixels .
So with the real size 5632/3=1877 ML report this as 1880x1250

So yes MLV record the full width of the sensor in 3x3(FHD) but that doesn't mean it records 1080p in raw !
The only camera that records a true 1920x1080(1280) is the 5D3 because canon made the sensor divisible by 3 to make 1920x1080p (so no up-scaling true 1920 etc. )
‎the 5D3 sensor size is 5760 × 3840 , 5760/3=1920 .

I hope I didn't confuse you .

OK guy's,  take this to 50D thread please , it totally Off Topic this has nothing to Crop_Rec .
I have No plans on developing the 50D beyond crop_rec  & lossless compression.
There no Audio on the 50D and never will be there no speaker .
Just use a  Clapperboard

Camera-specific discussion / Re: Canon 50D
« on: May 08, 2020, 05:44:01 AM »
I have now a working crop_rec module for the 50D , it's pretty basic right now
It's has 1 working preset (3744x1080 @ 23.976fps) in 5xzoom mode
more information can be found here with the download link to the build .


OK , 50D has a working Crop_Rec Module (just 2 preset for now , still debugging)
It's a little glitchy right now but works , there's 2 preset 3x1 4k (4096x720 but does not work fully)
and "3.5k Centered" preset 3744x1080 @ 23.976fps , this works will now .
So don't use 3x1 4k preset for now (until I can fix the cmos bug) , it's needs to be there so 1:1 preset can work
not sure why it needs a 2nd preset but with out it the "3.5k Centered" preset does not work right .
If may lockup getting out of the 5xZoom (3.5k Centered preset ) to FHD if so just pull the battery out .
Just load crop_rec module like on the other cameras that support crop-rec .

##Note## I have to say this !
This is very Bleeding edge stuff , so Test away with Caution  ,
and of course if it bricks your camera you get to keep all the pieces  :P

@Frayfray this off topic here ,
Moderator can please move this to general chat

Raw Video / Re: VAF-5D2 Optical Anti-Aliasing Filter Test on 5D2
« on: May 05, 2020, 06:46:19 AM »
Here is the test requested by Reddeercity for the 4k(4096) 3x1 Anamorphic mode.
Thanks , Yes it looks like the VAF does help a lot , very surprising but it looks like at a cost of sharpness a little bit .
What lens did you use ?

Successfully got the Crop_Rec Module to load on my 50D :D

I had to comment out a few line to do with the sensor timing

Code: [Select]
else if(is_camera("50D", "1.0.9"))
       // f = FIO_CreateFileOrAppend("ML/LOGS/console.log"); //waza57 log in file
      //  fps_main_clock = 28800000;
                                       /* 24p,  25p,  30p,  50p,  60p,   x5 */
       // memcpy(default_timerA, (int[]) { 0x000, 0x000, 696, 0x000, 0x000, 636 }, 30);     
       // memcpy(default_timerB, (int[]) { 0x000, 0x000, 1380, 0x000, 0x000, 1510}, 30);   
       // memcpy(default_fps_1k, (int[]) { 23976, 25000, 29985, 50000, 59940, 29988, 23976, 25000, 29985, 50000, 59940 }, 30);
Code: [Select]

 /* default FPS timers are the same on all these models */
    else if (!is_5D2)
         memcpy(default_fps_1k, (int[]) { 23976, 25000, 29970, 50000, 59940, 29970, 23976, 25000, 29970, 50000, 59940 }, 24); 
   // else if (!is_50D)
     //    memcpy(default_fps_1k, (int[]) { 23976, 25000, 29985, 50000, 59940, 29988, 23976, 25000, 29985, 50000, 59940 }, 30); 

I'm not sure why I had to do this but with it ,  it will not load on 50d .
I don't have full frame rate yet , just 1.5fps right now and that could be part of the timer issue I described  in the code I posted here.
more bug chasing , at least I'm almost there with this .
Don't hold you breath on a fully working Crop_Rec Module just yet , but you never know thou  ;D

Pages: [1] 2 3 ... 79