3K/UHD 5D2 Raw development and Other Digic IV Cams

Started by reddeercity, April 06, 2017, 12:22:27 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Igor_Braun

@reddeercity, I just bought a "new" 5d2. It works a lot better than the previous one which is died, unfortunately... so I'm exiting to test and get into some new stuff, hehe :)

reddeercity

Quote from: zcream on November 28, 2019, 09:04:29 AM
...... However as you are squashing horizontal it is less noticeable.
Sorry incorrect , I'm increasing vertical so the horizontal is unchanged , it all has to do with the horizontal pinning mode .
the only reason I'm at 1376 instead of 1568 is the sensor can't do 1568 @ 24fps with the vertical at 1776.
so there 4 different pinning mode know at the moment
1:1 (x5 Zoom)
3x3 = default FHD mode
3x1 (full res horizontal 1x1 with vertical line skipping) (same as the default 3x3 vertical)
1x3 (horizontal columns every third same as 3x3 horizontal with 1:1 vertical)
The field of view in 1x3 = 4128 from 4755 , so as I said before it's = to 3200 in full frame .
And the math supports this  ;D

reddeercity

50D Fine tuning the 1x3 reg's , I'm starting with 5x Zoom this time instead of 3x3 because I can't clean edges without the ladder stairs step thing
Success ! the ladder stairs issue is gone , I have now clean edges  :D


4128x1776_AR-2.35_1x3_M04-2318_frame_93.png

I also got the HD liveview working with a clean image that can used with HDMI EVF , 1080i give a the odd pink frame but forcing HDMI to VGA (780x480)
there not pink frames or corruption in the raw frames , I tested it with my Zacuto Z-Finder EVF Pro even has a anamorphic setting will "un-squeeze"
mode (forgot to try it) next time .

From the image_dump

HD-024.png

I set the anamorphic mode in the display menu and it save it in the image _dump , cool

LV-024.png

These the screen shot from LCD with anamorphic set to 2:1


Here screen shot of Reg's  I used from adtg_gui , if anyone  is brave enough give it a try ,
remember if you break your cam you get to keep the pieces  :P


There's 2 reg's that I used that are not on the screen shot
adtg12[1000] 0x5 -> 0x6
adtg1[100c] 0x2 -> 0x0

I also reduced the rolling shutter in reg c0f06008
here a short 5 second mp4 @ 4128x1776 24fps 50D_4128x1776_24fps_M04-2318.mp4 in 5x Zoom

Also here footage from my atomos ninja , I resize it to 720p from 1080i
00241.mp4

reddeercity

With the 50D discovery of the 3x3 Liveview reg's , I got my 5D2 working with the HDMI out in 3x1 4k  8)
c0f08184
c0f08188
c0f0d014

Will it not totally clean but a start , I need to find the HDMI reg's for size & reduce the vertical
It only work with HDMI -> forced to VGA (780x480) not 1080i , still that's good enough to monitor used my HDMI Zacuto Z-Finder EVF Pro to test .

Here a short 1 min. video I shot with my iPhone showing HDMI & 4k 3x1 raw video recording at the same time
5D2_Liveview_3x1_4k_IMG_2871.MOV

Below are screen shots from my iPhone
 
   

In theory  this should work with 3x3 & 5x Zoom with all D4 & D5 Cams  :D .

Edit: Here the Image_dump for HD(HDMI) & Lv
5D2_hdmi480p_dump_HD-013.png  and   5D2_ml_preview_LV-014.png
 

Igor_Braun


reddeercity

Quote from: Igor_Braun on December 06, 2019, 02:18:28 PM
So waiting to test that on 5d2...
You don't have to wait for me , give it a try with 3.5k centered presets 3008x1080 or 2784x1160
I tested it on 3008x1080 centered (latest upload Nov.14/2019) and yes indeed it dose work

I shot a quick 1 min. video with my old iPhone 
5D2_HDMI_1080i_crop_rec_3k_IMG_2882.MOV

Note it's the center crop 1920x1080(HDMI) of the 3008x1080 Liveview , I like to figure out how to resize hdmi to get the full width
from 3008x1080 -> HDMI 1920x1080 , the aspect ratio is 2.78 so 1920x690 .
Need to find more reg to do with the HDMI out put , or is this controlled by the dryOS of canon ?
I do know that the HD image_dump is used by canon for the HDMI , so it a matter of finding them I think  ::)

Edit: some screen captures , first 1 is in stand by mode , next is recording raw video (3008x1080)
   

Igor_Braun

Yes, i've already tested it with HDMI monitor, and got non-full width preview  :)

But what i'm really waiting for is 3x1 4k anamorphic full-width preview... The last time I tried to HDMI preview with 4k it just didn't work.
If i can try to do it myself without programming (maybe changing and figuring out some values even if i could spend a tonn of hours doing this) please tell me how and where. And maybe i could help you with it   ;)

masc

Quote from: Igor_Braun on December 07, 2019, 01:46:16 PM
But what i'm really waiting for is 3x1 4k anamorphic full-width preview...
I more still wait for 1x3 mode for 5D2, because this would be the real killer mode. There is no advantage with 3x1: you still have moiree, because we still skip lines. With 1x3 you don't have such moiree.
5D3.113 | EOSM.202

reddeercity

Quote from: masc on December 07, 2019, 07:59:28 PM
I more still wait for 1x3 mode for 5D2, because this would be the real killer mode.
If it was simple to implemented , I would have done it a long time ago .
short answer , adtg reg hooks don't work which is needed for 1x3 , and I said as much mouths ago .

a1ex maybe the only one that knows how solve this problem , so don't hold you're breath
It I can solve it great , then I can get 1x3 up & running , but there's a very high possibility
that 50D will get 1x3 before the 5D2 as the adtg hooks seems to work ok .

Quote from: masc on December 07, 2019, 07:59:28 PM
There is no advantage with 3x1: you still have moiré, because we still skip lines. With 1x3 you don't have such moiré.
What are you talking about ? There major advantages , e.g. 4k resolution and using every column not skipping every third .
yes there a very small amount of moiré but far far less the 3x3 and there no substitute for resolution period .
The thing that I can't stand is when people upscale HD or 2k footage to 4k , it looks so very bad I never seen a good one to date !
and a FYI , there's absolutely no moiré artifact in 1x3 at least on the 5d2 , I've pixel peep the test image maybe on other 1x3 cams there is e.g. eosm or 100d .


reddeercity

Quote from: Igor_Braun on December 07, 2019, 01:46:16 PM
But what i'm really waiting for is 3x1 4k anamorphic full-width preview...
Ok , got it working now but it still the center crop 1920 of 4096 , the image is clean now
there still some distortion at the bottom half of the screen , it dose not affect the 4k raw video stream .

A couple of photo from my iPhone , first one is in standby mode & the next is recording raw video

 

Here are the 5D2 Preview Reg's for 4k 3x1 realtime with HDMI 1080i force to  -> VGA(480P)
this is the only way it works , it dose not work with 1080i HDMI ,

C0f0d030 0x10 ->0x20 this is the one that clean the distorted image to what you see here in this post found it by luck !
just started to adjust different preview reg's until the image change for the better or worse  ;)

I also shot a short 45 second video with my iPhone to show this working 
5D2_3x1_4096x592_24fps_HDMI_Realtime_preview_IMG_2891.MOV

Next I'll code this in to the 4k 3x1 crop_rec preset in the next few days .  :D
So now we will have realtime preview while recording raw video , no more frozen liveview preview
so you can actually focus & follow subject while recording raw video .

masc

Quote from: reddeercity on December 09, 2019, 06:21:40 AM
What are you talking about ? There major advantages , e.g. 4k resolution and using every column not skipping every third .
Quote from: masc on December 07, 2019, 07:59:28 PM
...you still have moiree, because we still skip lines.
As long as we skip, there will be moiree. Also in 3x1 4K. Also this mode will not look better than upscaling 2K. (3x1 4K is also upscaled)

1x3 does not skip. It has column binning. And this is the difference. We than use (not save) every pixel from the sensor for the final image.

Quote from: reddeercity on December 09, 2019, 06:21:40 AM
If it was simple to implemented , I would have done it a long time ago .
...
and a FYI , there's absolutely no moiré artifact in 1x3 at least on the 5d2...
Nobody told it was simple.
But this mode would be by far the most intersting update for 5D2. I thought you found the regs around a year ago already (didn't you write that? Dez2018) and it is "just some" implementation work to be done?
5D3.113 | EOSM.202

Igor_Braun

Masc, i can mistake, but just think that the horizontal resolution is more important even if there's moire

Igor_Braun

Reddercity, i will be waiting for the preset, hope it will work for me as for you, because i have diy HDMI monitor

masc

Quote from: Igor_Braun on December 09, 2019, 11:02:39 PM
Masc, i can mistake, but just think that the horizontal resolution is more important even if there's moire
With that you'll skip each 3rd line. This data is NOT in the image. Columns are binned when reading each 3rd: data is in the image! So 1x3 is better. You easily see it in all examples in this and other threads.
5D3.113 | EOSM.202

reddeercity

1x3 is very low on my list of priority (at the bottom) on the 5D2 so don't ask , it will happen when happen not moment sooner.
and by the way there's data lost both ways , the only time there's not is in 1:1 pixel mode ! So don't be so hung up on 1x3 .

Will here we go  :) HDMI  480p realtime preview in 4k 3x1 , I made a few extra tweaks to the 4K preset
I made it true 4k (4096x592) @ 24.007fps so this is close as I can get to a 24fps film camera   :D

crop_rec-4k_hdmi480p-preview_10.33PM-5D2-eXperimental.2019Dec09.5D2212.zip

Usage: first switch the HDMI from 1080i (the default) to "force VGA"(480p) in the display advanced menu .
always start in 3x3 without the HDMI connected , then plugin the cable , swicth to  non crop_rec  x5zoom mode (should be 2144x1078)
then enabled crop_rec select 4k preset , and cycle the zoom button until you get to 3x1 4k .

It doesn't work with the 2784x1160 yet , but 48p 3x3 works but you have to start over from the beginning then just enable the 48p preset instead of the 4k one .
but make sure you unplug the HDMI cable first to flush the HDMI buffer .

It look like I found most of the HDMI (HD image) Reg's from this , they all have the letter "D" in there name .
I play around a bit and I can get the HDMI image to move down on the screen (trying to center it on the monitor screen but the rest of the image get distorted
need to find more  reg , plus think I have identified the reg that limits HDMI to 1650 horizontal  on the 5D2  , ( which being goal of mind right from the beginning)

As always if you break your camera you get to keep all the pieces    ;D

masc

Quote from: reddeercity on December 10, 2019, 07:53:25 AM
1x3 is very low on my list of priority (at the bottom) on the 5D2 so don't ask , it will happen when happen not moment sooner.
...
I made it true 4k (4096x592)...
Sure, the best always comes last.
True 4K...  :D
5D3.113 | EOSM.202

Igor_Braun

It worked for me!
Cool.
This is the picture where i kept 3 things together:
1 - Full Frame image with regular h264 mode
2 - 4k anamorphic mode from the same camera position inside the white border
3 - The area I saw via HDMI monitor in the blue border


https://ibb.co/7kTCKwq

It worked this way (phone video): https://drive.google.com/file/d/1FcdwtZUzQdPfIoX1151yZzOBU0jHkWas/view?usp=sharing

reddeercity

seem the vertical is down , a little bit from center I'll see if I can move that up a bit .
Also You should have a clean standby mode , looks weird from the video .
I post a short video later tonight hopefully, on how I set it up .
On HDMI I get the center on 4k anamorph not to the left as you posted
but I'll check in to that,  not sure if there's anything I can do about it .

Edit: Ok you're right the HDMI is to the left of center on 4k Anamorphic
Strange 5xZoom 2784x1160 is centered in the hdmi , I have to do some more investigation to see if I can center it horizontally

Igor_Braun

Okay :)
This semi-white blinking preview appeared when I updated the camera to your latest build. With the regular nightly build the standby mode is clear.

Igor_Braun

@Masc Man, I think true 4k is when you have true 4k pixels in a line (?), here we have 4096.
and the rolling shutter if understand right must be less in this mode because there are only 592 vertical lines.

masc

Quote from: Igor_Braun on December 14, 2019, 10:04:48 PM
@Masc Man, I think true 4k is when you have true 4k pixels in a line (?), here we have 4096.
and the rolling shutter if understand right must be less in this mode because there are only 592 vertical lines.
Yes... you're right. The definition tells 4000x1 is also 4K, while I would understand resolutions like 4096×2160 as "true 4K" (5D2 will never record true 4K RAW at ~24fps). When counting pixels 4096*592 (3x1) would be the same like 1365*1776 (1x3). But one produces much more moiree than the other (sry... I told now more than once). That's why this should be the last research in this 3x1 readout type, which has been mostly discontinued for other cams since some time, for getting the way better 1x3. Anyway... nice to see some progress on the old 5D2.
5D3.113 | EOSM.202

2blackbar

Igor there was a lot of tests and examples/comparisons between 3x1 and 1x3 , masc is right , tall anamorphic 3x1 has better final resolution than wide anamorphic 1x3  because of skipping which produces nasty moire and aliasing vs binning which interpolates nicely.
Its beating dead horse, sadly its how these cameras are made, alex wrote that the solution would be writing binning patterns which are probably hardcoded.
Quote1x3 Read all lines/Bin every 3 columns. No skipping at all only Binning pixels in columns, no aliasing/no moire and better details than 3x3.

3x1 Read one line skip two every 3 lines/Read all columns. Better details than 3x3 but with same alisaing and moire since we are skipping lines in this mode.
Read this: ( should be sticky somewhere IMO cause this topic is important part of ML history)
https://www.magiclantern.fm/forum/index.php?topic=16516.0

reddeercity

Quote from: 2blackbar on December 15, 2019, 12:04:45 AM
Its beating dead horse .......
There no 1x3 on 5D2 just 3x1,  so you're wasting you're  time trying to compare 1x3 to 3x1 here .
And it may never be , to found out why just read this thread , I've posted many times on this
kind of sick about hearing about it , If you what to solve the problem figure out why adtg hooks stop working
in the adtg_gui.c adtg_gui.c#lines-5923
crop_rec/crop_rec.c#lines-2307

reddeercity

Got a better Liveview for 5D2 4k 3x1 HDMI now , almost the full height in the screen of the EVF/monitor but I still can't get the image to
move to the center for center crop so just the left side at the moment , and it seems the lines are like dual ISO but in cluster of 3
still need more research to hdmi reg's . This does not effect the raw video stream in anyway just Liveview.
Reg that increased the vertical c0f11304 0x10 ->0x15



This is the normal liveview of 4k 3x1 without the modified reg's



Batteries are dead on the 5d2 & hdmi evf so I'll continue tomorrow .

masc

Quote from: reddeercity on December 15, 2019, 05:46:41 AM
There no 1x3 on 5D2 just 3x1,  so you're wasting you're  time trying to compare 1x3 to 3x1 here .
Really?

Quote from: reddeercity on December 21, 2018, 06:09:21 AM
Experimenting with line skipping & pixel binding (1:1 FHD) with 1x3 to reduce moire and aliasing

Un-stretch 1856x416

1856x416_1x3.png

Here the stretch version 1856x1248

M20-1741_000000.png
M20-1741_000000.dng

setting


Short 2Mb h264 clip - M20-1741.mp4

I don't really see this to be too useful , as it's too narrow (416 h) , if the vertical was 2400 etc.. then maybe , but record time would only be 1-2 seconds
if your lucky , so unless something changes , I won't be continuing with this 1x3 .
Aha. This could have been a nice starting point. Nearly the same height and +1.5K ( = 5.5K ) to your current 3x1 mode. Would there be the code for this revision and base idea, I am sure there would have been a lot of help making it real for the community. Processing this old DNG file with current RAW processors is just awesome.

Quote from: reddeercity on December 15, 2019, 05:46:41 AM
kind of sick about hearing about it
+1
5D3.113 | EOSM.202