Author Topic: 3K/UHD 5D2 Raw development and Other Digic IV Cams  (Read 164735 times)

benoit

  • New to the forum
  • *
  • Posts: 26
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #325 on: November 03, 2018, 11:08:45 AM »
I'm waiting for yours presets with hope.
I don't know the right number you can reach with yours registers but do you think you can include standard preset 24p with 16/9 ratio and vertical resolution like 1080, 1160, 1320, 1450, 1586 ?

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #326 on: November 04, 2018, 04:40:03 AM »
......  do you think you can include standard preset 24p with 16/9 ratio and vertical resolution like 1080, 1160, 1320, 1450, 1586 ?
All presets will be dependent on Card write speed and whether or not lossless compression can be implemented .
So currently write is around 77-79MB's with the odd burst at 85MB/s , the preset will reflect that .

I guess the answer is no , I will not have standard presets . But I will have one's that are close .
The main reason is that the sensor is in a non-conformed size to Video ( that why FHD is only 1880x1054 , unlike 5d3 1920x1080)
and being raw , it can be resized as much as 150% before any image break down .
There will be some at 24p , like 1080 & 1330 -- I plan on 2:1 but not sure if I will go 16/9
It takes a long time to get this sizes to work @ 24p and the more the height is increased the more difficult it becomes
But nothing is written in stone ! things can change at any time as new discoveries can happen .

After we have this 100% working then I plan on moving to Mjpeg Compression , which I hope to be able
to have Standardize Frame resolutions up to 5.6k in a .AVI format.
But don't hold your breath  :D that could take a year or more , or maybe less who knows for sure .

benoit

  • New to the forum
  • *
  • Posts: 26
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #327 on: November 04, 2018, 10:27:31 AM »
ok, I didn't know it takes a long time to get this sizes to works.
Could you write a brief summary (a few lines) on how to find these values for 5D2 ?
I read yours threads with a1ex about the registers, but i need a summary.
Perhaps I could understand and make my own values to share with others users and increase the preset database.


reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #328 on: November 05, 2018, 05:48:44 AM »
Everything is all there in the posts , I just reproduced a1ex experiments
read this first then this next , finish off with reproducing a1ex experiments and here too
Now you know what I know , Next you need to setup a environment to compile magic lantern . Depending on your OS there different ways to setup a environment
Compiling Magic Lantern on Windows 10 (using its Linux subsystem) , Compiling Magic Lantern with Cygwin/MinGW-64 , Compiling Magic Lantern on a Macintosh etc. ...
I use Ubuntu in a VM (Virtual Machine) on windows 7Pro . Next Clone waza57 source code (crop_rec_4k_5D2) link is here ,
now you need to add "raw_slup" redirect buffer to the 5d2 4k source from waza57 to get the extended image .
This committed 3e3fac1 is the one I used , now compile . That it .

benoit

  • New to the forum
  • *
  • Posts: 26
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #329 on: November 05, 2018, 10:24:37 AM »
Thanks for the links.

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #330 on: November 11, 2018, 08:10:58 AM »
Looking in to the HDMI resolution limitations , if everyone doesn't know on the 5D2 the HDMI output @ 1650x1080 60i 4.2.2 uncompressed (1500MB/s)
It anyone wondering why the 5d2 has this res. when standard HDMI is normally 1920x1080 or 1280x720
From what I can figure out there was no need for 16x9 format (After all 5D2 was the first to introduce Video to DSLR's) as a second thought .
So the main object was Photo's and a 3x2 format was needed for photos in  Liveview  so hence 1650x1080 .

So I connected my HDMI Evf & loaded ADTG_GUI.mo  and saved a log file
So I may have found some reg's that control this .
Code: [Select]
c0f11314: 4d70653 .... LiveViewMgr pc=ffa07c28 addr=ffca88e0 LV resolution (raw.j.height | lv.width) before upsampling?If you convert this to decimal you get 4d7=1239 & 653=1619  so 1619x1267 , look very close
Code: [Select]
c0f0713c:     4f5 ......  LiveViewMgr pc=ff8e1830 addr=8328 HEAD3 timer (ticks?)
c0f07150:     681 ..... LiveViewMgr pc=ff8e1844 addr=8370 HEAD4 timer (ticks?)
convert this to decimal  4f5=1269 & 681=1665 so 1665x1269
I could be totally wrong but that so close , now there's more then likely more reg's evolved here , it could be the hd buffer is the limitation.

There a few reason why I what to hopfully fix this issue ,
First: to get real full 1920x1080 so it would be usable without resizing .
Second: the HDMI spec 1.3a allowed up to 2560×1440 at 60 Hz & 1920 × 1080 at 120 Hz
Since there's 4k monitor's & recorder out there and getting cheaper everyday, well I thinks it time to look in to this to see it it's possible .

Edit: Ok I forgot to mention the hdmi 1.3a supports 8bit(24 bit/px) , 10bit(30 bit/px), 12bit(36 bit/px), 16bit(48 bit/px) up to 2560x1440 60i
Color Space: RGB, Y′CBCR 4:4:4 & Y′CBCR 4:2:2
and apparently hdmi 1.3a supports UHD 8bit(24 bit/px) 3840x2160 30p 4.2.2 & 60p @4.2.0 and also 5k 8bit(24 bit/px) 5120 × 2880 30p 4.2.2
Maybe there's hope yet for real-time hdmi UHD up to 5k preview   :))

Igor_Braun

  • Freshman
  • **
  • Posts: 91
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #331 on: November 11, 2018, 07:47:30 PM »
Wow... it looks so interesting

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #332 on: November 12, 2018, 07:22:00 AM »
I should mention that the 5D2 HDMI signal is 8bit 4.2.2 Full range (0-255) , Check it on my AJA Kona LHi video capture card .
So by this theoretically  "UHD 8bit(24 bit/px) 3840x2160 30p 4.2.2" would be in the realm of possibility .
Here's hoping   :D

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #333 on: November 15, 2018, 06:00:44 AM »
Having some fun we presets ,
5632x1844 @ 4fps , got up 6.5fps then froze liveview , unresponsive so I just rebooted .
Sorry , overexposed it too much @ 800 ISO  ::)  as frame rate came down , exposure became normal


5632x1844_M14-2138_00050.png
Code: [Select]
Default Crop Size               : 5632 1845
Active Area                     : 52 160 1897 5792
5632x1845_dump_RAW-026.DNG



Modified Reg's


5632x1844_4fps_M14-2138_h264.mov
Had problem playing it in QT player , work fine in  MPV player -- cross platform  ;)

I sure wish I could get 24fps at this resolution , it would be prefect  :D

Igor_Braun

  • Freshman
  • **
  • Posts: 91
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #334 on: November 15, 2018, 05:25:08 PM »
Cool -) Thanks for keeping going

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #335 on: November 17, 2018, 07:50:18 AM »
Keeping with the same height (1842) as above , but @ 4096 and see how far I can push it
So 4096x1842 I could reach 10.5fps with a little image corruption (needed to adjust 5x frame blanking to clean up)

Shown below is  4096x1842@4fps


notice for 4096 c0f06084->30036 , where 5632 @ c0f06084->10037 -- (for anyone that's following this and what's to reproduce)
Raw resolution c0f06088-> 0x76ao88a

Changed A & B timers from image posted
Code: [Select]
10.501 fps
C0f06008 ->0x2770462
c0f06014 ->0x7f2

4104x1843_dump_RAW-028.DNG
Code: [Select]
Default Crop Size               : 4104 1843
Active Area                     : 52 160 1895 4264



4096x1842_ppm_dcraw-M16-2255_000076.png
exported ppm file from Cdng with dcraw -- with a quick color correction in irfanview and saved as a PNG
4096x1842_mlvfs_M16-2255_000076.dng

A short 36Mb h264 clip @ 7 FPS 4096x1842_7fps-M16-2255.mov

Igor_Braun

  • Freshman
  • **
  • Posts: 91
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #336 on: November 17, 2018, 10:29:33 AM »
Wow, i saw the h264 video.
Maybe reducing vertical resolution till 1742 (4096x1742 (2.35:1 aspect ratio) will help to increase a couple of frames per second?

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #337 on: November 18, 2018, 08:20:37 AM »
I don't thing it will help , I thinking the sensor readout may be too slow for that resolution .

Trying 3072x1200 see if I can get 24fps
Code: [Select]
CMOS[1] 0x6ea->0xc0a
c0f0713c 0x476->0x576
c0f07150 0x49c->0x59c
c0f06008 0x2770277->0x2770346  ** A-Timer **
c0f06014 0x4ff->5cd  ** B-Timer **
c0f06088 0x46a04ba->0x4e7068a  **raw resolution **


This gives me only 19.419 fps with some frame blanking corruption (not totally clean) , seem that I can't get any more .
5d2 maybe limited to only 1080 vertically , as all my efforts seem to point to this .
I keep dropping the horizontal to get as much height as possible ,
so I guess next back to 2880 and see if I can increase the height to 1200 at 24fps

banertop

  • Freshman
  • **
  • Posts: 65
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #338 on: November 18, 2018, 07:25:36 PM »
reddeercis,

is it possible, in your build, to shoot 2880x1080, and shoot normal, almost 1080p in full sensor 1:1, too (in the same time, i mean using same build)?

i want to try your build, but find some test on YT, where guy sad that full sensor mode does not work when using experimental build that crops the center of frame....

maybe i did not understand it correctly..

tnx 

banertop

  • Freshman
  • **
  • Posts: 65
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #339 on: November 18, 2018, 11:04:48 PM »
i just try it!

2880p is so great>))

Thank you very much for such a progress!!

I dont have preview while recording. Preview is frozen and black and white, once i press record button.

Is that normal?


reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #340 on: November 19, 2018, 04:17:24 AM »
reddeercis,

is it possible, in your build, to shoot 2880x1080, and shoot normal, almost 1080p in full sensor 1:1, too
Yes , the crop rec is only active in 5x zoom mode . So you can shoot 10bit raw in 1:1 FHD also .


i just try it! 2880p is so great>))
    ........
I dont have preview while recording. Preview is frozen and black and white, once i press record button.
Is that normal?
Yes , That's one of the limitation at the moment , until liveview preview is more understood more , that's the way it is .

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #341 on: November 19, 2018, 08:01:29 AM »
Trying a more modest size to see where the limits are .

2144x1200 @ 23.976 fps





2144x1200-M18-2327_000000.png

A short h264 2144x1200_24fps_M18-2327.mov 75Mb 25 seconds

It does record continuously @ 73.5MB/s  :D , the preview is Not broken so you can see what's being recorded
It took a while to get it work , the sensor is not centered I had to move the image to the lower half of the sensor
to clean up the image , use CMOS[1] 0xe6a -> 0xc14 , 0xc0a centers the image but has bad corruption (frame blanking issue).

I guess to sum it up ,  1080 maybe the maximum vertical resolution with extended horizontal e.g. "2880 or 3168" that can achieved .
Every effect above 1080 is meet with failure @ 3k and greater .

It Maybe that the Sensor readout is just to slow to get higher resolution @ 23.976 fps anything less is a waste of time ,
ok maybe full res 5632x3750 @4 fps .

banertop

  • Freshman
  • **
  • Posts: 65
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #342 on: November 19, 2018, 10:24:00 AM »
Usable 2880x1080p, with live view, so we can see what we record, is just fine. Maybe we do not need more resolution..... :P
This is still such a big progress for 5d2
2880 horizontal is really a sweet spot!

thx for responding

benoit

  • New to the forum
  • *
  • Posts: 26
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #343 on: November 19, 2018, 04:12:48 PM »
Great reddeercity !
Perhaps with a continuous bit rate, the same vertical 1200 pixels, the same liveview not frozen, we can find horizontal resolution for 1.85, 2 and 2.35 aspect ratio ? like 2220, 2400 and 2820. I'm afraid the last one won't be continuous. Who knows ?

poromaa

  • Member
  • ***
  • Posts: 140
  • Engineer by day James Cameron in my dreams
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #344 on: November 19, 2018, 09:40:51 PM »
Impressive!

Igor_Braun

  • Freshman
  • **
  • Posts: 91
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #345 on: November 20, 2018, 02:38:57 AM »
Absolutely agree with Banertop, hehe..
Usable 2880x1080p, with live view, so we can see what we record, is just fine. Maybe we do not need more resolution..... :P
It's a big progress. Crop Factor is like 1.9 but it's ok for this case with 5d mk 2, i think.
Anyway, thanks for keeping going Reddercity! And of couse we are waiting for any news. When you rich 2880x1080 24fps, I try to inspire you with little videos, shot with the new build, hehe

Igor_Braun

  • Freshman
  • **
  • Posts: 91
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #346 on: November 20, 2018, 02:45:45 AM »
Also we can try to fix Metabones SpeedBuster on 5dMK2 to "reduce" the crop factor.

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #347 on: November 20, 2018, 05:51:13 AM »
I might I have a fix for the frozen Liveview in crop rec 3k preset .
https://www.magiclantern.fm/forum/index.php?topic=19336.msg206539#msg206539
I haven't tried it yet , in theory it should work

Great reddeercity !
Perhaps with a continuous bit rate, the same vertical 1200 pixels, the same liveview not frozen, we can find horizontal resolution for 1.85, 2 and 2.35 aspect ratio ? like 2220, 2400 and 2820. I'm afraid the last one won't be continuous. Who knows ?
Thanks ,
That's my next step to increase horizontal resolution , I might get 2400 or maybe even 2560 with 1200 vertical @ 23.976 fps
Don't count out 2880x1080 @ 24fps to be continuous  , I being working with others on Lossless Compression ( Canon's compression for Raw Images in CR2)
Read this ProcessTwoInTwoOutLosslessPath and here too , from other cameras that support this, there about 40-50% data compression
https://rawcalculator.netlify.com/calculator_desktop
2880x1200 @23.976 fps with 14bit compressed raw =>69.1MB/s -- continuous
2880x1200 @23.976 fps with 14bit uncompressed raw =>98.8/s
2880x1080 @23.976 fps with 10bit uncompressed raw =>88.9MB/s

I'm also looking in to CF Card Overclocking , seems that the bus interface can be pushed not sure how much,
hoping to get at least 120 MB/s write speed .

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12314
  • Emergencies only
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #348 on: November 20, 2018, 09:35:43 AM »
Here's a simple task for you guys: find out how far you can push FPS timer A.

Steps:
- download raw_diag.mo and adtg_gui.mo and load them on top of the build from first post
- enable RAW Diagnostics (Debug menu)
- enable OB zones, disable other types of analysis
- in LiveView, press shutter halfway for 1-2 seconds to run the analysis
- enable ADTG Registers, enable Advanced -> ENGIO Registers, override FPS timer A (C0F06008) and decrease its value
- notice only odd raw values (i.e. same parity as with Canon firmware) are going to give clean image on this camera
- find the lowest value of timer A that still gives clean image (pay attention to the right border in the raw_diag screenshot)
- upload the raw_diag screenshot with the optimal value (clean image) and with the first bad value (that is, optimal value minus 2)

Run this in 1080p24/25/30 (during standby) and also in x5 zoom mode.

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2094
Re: 3K/UHD 5D2 Raw development and Other Digic IV Cams
« Reply #349 on: November 20, 2018, 09:45:13 AM »
It's was only a matter of time before things start to came together , once I started to understand the imaging pipeline (will at least in my mind I started to understand :P)

Ok now to the detail:
2400x1200 @ 23.976 fps
With a Clean Preview No Frozen Preview !! (will mostly , still have a little frame blanking issue -- I'll it fix later)



@a1ex it works , no more frozen Liveview when recording raw video  -- Thank you 8)
It took a while to find c0f08518 , it was deep towards the end of all the reg's
Wasn't should if I needed to add c0f08184 , but I did
Code: [Select]
c0f08518 0x4670907 ---------->0x4e20a07
c0f08188 0x907 -------------->0xa07
c0f08184 0x467 -------------->0x4e2
Code: [Select]
0xa07=>2567 -- horizontal
0x4e2=>1250 -- vertical





iPhone video showing unfrozen Liveview when recording raw video -- 2.4kx1.2k-Un-Frozen-preview-IMG_2671.MOV

Code: [Select]
Raw Resolution 1253*2568 (2568x1253)
c0f06088 0x46a04ba ---> 0x4e8053a
Code: [Select]
Default Crop Size               : 2408 1201
Active Area                     : 52 160 1253 2568

Here is a screen shot from the frame over ride menu showing timing info


Proof , but still need to fix black levels -- h264 5 seconds clip 2400x1200-24fps-bad-black-levels-M20-0131.mov

2400x1200-bad black levels M20-0131_00001.png