12-bit (and 10-bit) RAW video development discussion

Started by d, May 22, 2013, 10:58:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

reddeercity

Quote from: dfort on January 03, 2017, 03:49:48 AM
@reddeercity - Thanks for the video. So it was shot in 10bit on a 5D2 in crop mode?
Thanks
Yes with full mlv ,  was a test originally to see if it could record corruption free for extended time.

Quote from: dfort on January 03, 2017, 03:49:48 AM
If you think it works good now think how good it will be once that camera is working with CONFIG_EDMAC_RAW_SLURP.
Yes I know I've been looking in to that , there's a lot to learn to understand about CONFIG_EDMAC_RAW_SLURP on older cams

Quote from: SpcCb on January 03, 2017, 04:27:44 AM
Thanks reddeercity, nice presentation ;)
So it's working only in crop mode on the 5D2? Or you are using this mode because of aliasing in scaled mode?
Ok, I saw in the other thread you said there'r some problems in full mode.
Thanks
Yes 5d2 Full frame still has frames corruption problems
I wanted to see if things are still stable and reliable with bit reduction or just hit and miss .

D_Odell

Quote from: dfort on January 03, 2017, 03:49:48 AM
Test builds are up.

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

@reddeercity - Thanks for the video. So it was shot in 10bit on a 5D2 in crop mode? If you think it works good now think how good it will be once that camera is working with CONFIG_EDMAC_RAW_SLURP.
Nice job dfort! Is there a change log I can read? Will try it out tonight. Best, David
5D3 [size=6pt](OLPF removed)[/size] :: 1.1.3 :: Canon FD L Serie

honza123

Asiyuk: Sometimes I have the same problem with dark-green colors on video /10 bit raw build 18dec/ EOS 600D

dfort: Thanks for new build ! I will try
EOS 5D Mk.II

Danne

Can you post a sample? Could be black levels are off. How often is it happening?

dfort

@Danne - Asiyuk uploaded a sample on Reply #942

Quotehere is dng: https://we.tl/1Dp6BTOiB8

Though maybe you would prefer an MLV file?

Danne

Black and white levels are off. After correction.


For 600D enter terminal:
cd folder/with/dng/files
exiftool "-BlackLevel=2032" "-whitelevel=14992" *.dng
hit enter
For 5D markIII
exiftool "-BlackLevel=2046" "-whitelevel=16383" *.dng

Seems exiftool won,t work with the 5D mark III file. YOu can use exiv2 maybe or try mlv_dump or another converter and then add correct white/black levels.

dariSSight

@dfort Thanks for all your doing for The Goal of lower bit rate. I do have a question to ask and maybe its been asked before but why does the 5D Mark II stay at MLV 1856 and MLV Lite 1880?
Canon 5D Mark II

DeafEyeJedi

Alright guys I know I'm a tad late for this party once again and I apologize. Really hate slowing you guys down. But you guys are all doing great pushing this project forward!  :)

Ran @dfort's latest (2017Jan02) for 5D3.113 and notice after recordings of 10/12-bit files while in mlv_play.mo I get this some kind of '...stack overflow' errors which produced several crash logs occasionally (even spitted out COREDUMP.DAT whatever that is) within period of 2-5 minutes or so. Here they are stored into my dropbox just in case they give us hints or not.

I ran a bunch of test files in both mv1080 and mv720 with MLV + Audio and all seems well. Even in 5x crop mode at 2.5k/3.2k for shorter takes if you will.

https://vimeo.com/197948723

Now upon trying to upgrade firmware (in order for me to uninstall ML and do a clean upgrade to 5D3.123) which seems to not work with your build. I get stuck with a black screen along with a steady orange light next to the LED blinker (not blinking tho) and battery pull out fixes this. But then thought maybe I had to download a nightly from unified would help for me to do this to no avail.  :-\

Not sure if it was worth sharing this but I felt it was. Anyone else experiencing this?

Off I go to try and do 5D3.123 update (will probably have to use EOS Utility tho I shouldn't have to and suspect this has to do with the autoexec.bin?) and will report my findings then.
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Walter Schulz

You. Don't. Need. EOS. Utility. With. 1.2.3. And. 1.1.3.
You don't need to "clean up cam" before going to 1.2.3. or 1.1.3 either.
Just format a card to remove card's boot option (either use ML's "remove ML" format option or card reader). Copy Canon firmware file and upgrade/downgrade.

honza123

To Asiyuk "dark-green" picture.
The worst videos are already deleted. But something like that:
"dng picture"
http://www.uschovna.cz/zasilka/LILKZ228LKN9X8ZA-SX9/

Original raw video file:
http://www.uschovna.cz/zasilka/LIIWK6FJT47XUGD8-IJG/

BUILD:
magiclantern-raw_video_10bit_12bit.2016Dec18.600D102
EOS 5D Mk.II

Danne


honza123

Danne: After command:
exiftool "-BlackLevel=2032" "-whitelevel=14992" *.dng

Picture looks much better, but not completely pure  ;-)

http://www.uschovna.cz/zasilka/LIRRW9FAWK638482-F4X/
EOS 5D Mk.II

Danne

Yes, some corruption going on as well. Well, to be expected with bleeding edge firmware builds.

DeafEyeJedi

Quote from: Walter Schulz on January 03, 2017, 09:40:55 PM
You. Don't. Need. EOS. Utility. With. 1.2.3. And. 1.1.3.
You don't need to "clean up cam" before going to 1.2.3. or 1.1.3 either.
Just format a card to remove card's boot option (either use ML's "remove ML" format option or card reader). Copy Canon firmware file and upgrade/downgrade.

Got it, Walter. I was hoping not to do this because I had a whole bunch of random files that turned out to be awesome (from moments when I forget to set the 5D3 to record onto CF instead of SD) from the past few years even had files from 2015. So yeah you were right I had to format (prefer Disk Utility to keep the ExFat just because...) and was able to update straight up to 123 from in cam even with the bootflag enabled, ha!

Off I go to work and maybe I'll be able to shoot some dark scenes with ISO 6400 in 10-bit slo-mo and do some DF avg automation scripting from @Danne's latest and greatest cr2hdr.app (even previews 10/12-bit flawlessly in MLRawViewer 1.4.3) while running in MLVFS mode. Holy shit dude!  :P
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dfort

Before:


After:


Good to know it is salvageable but how did that happen on 3 of 100 videos?

Quote from: DeafEyeJedi on January 03, 2017, 09:28:18 PM
Ran @dfort's latest (2017Jan02) for 5D3.113 and notice after recordings of 10/12-bit files while in mlv_play.mo I get this some kind of '...stack overflow' errors which produced several crash logs occasionally (even spitted out COREDUMP.DAT whatever that is) within period of 2-5 minutes or so.

Looks like you're loading way too many modules. Try loading just the one's you're testing first. I don't know how to read those logs but my guess is that it looks like you're low on memory.

Free Memory  : 144K + 3569K

The COREDUMP.DAT shows even less memory available.

Free Memory  : 135K + 3562K

a1ex

FYI, the workarounds for the green cast (aka wrong black level) bug are very well known to those used to read sticky topics ;)

http://www.magiclantern.fm/forum/index.php?topic=11664.0
http://www.magiclantern.fm/forum/index.php?topic=11942.0

Now, why does it happen at low bit depths?

My best guess is that our raw backend sometimes decides to compute the black level at the same time with the bit depth switch. There are some sanity checks to avoid computing the black level from an invalid image, but they are not 100% effective. Disabling them should increase the probability of encountering this bug.

The only other tasks (besides raw recording) that could trigger a refresh on the raw parameters under normal usage are the raw overlays, so you now know what to disable until this issue is fixed.

The fix would be in the raw backend: bit depth changes should be done in raw.c and guarded by raw_sem, and lower bit depths should be handled differently. Some possibilities (not yet sure what to choose):

* disable all raw processing (e.g. overlays) at lower bit depths
   + minimal amount of coding
   - no overlays while recording at lower bit depths (including grayscale previews and so on)
* perform all raw processing on 16-bit buffers, as in raw_twk:
   + fast (all raw processing will be faster)
   - may requires custom memory management for raw buffers, as Canon code reserves memory for a 14-bit buffer
   - will overflow outside LiveView, as we cannot allocate a continuous block larger than a 14-bit full res picture
   - on the fly conversion to 16-bit could work, but gives additional complexity
* convert lower bit depths to 14-bit, with raw_twk code:
   + would reuse current 14-bit code
   - no speed gains from raw_twk
* create the low bit depth image from the main 14-bit raw buffer, instead of edmac_copy_rectangle
   + would reuse current 14-bit code
   + a similar code structure would also work for lossless compression
   - no speed gains from raw_twk
* variations of the above

Quote from: dfort on January 03, 2017, 11:38:11 PM
I don't know how to read those logs but my guess is that it looks like you're low on memory.
Free Memory  : 144K + 3569K
Free Memory  : 135K + 3562K

From mem.c, look for "malloc" and "AllocateMemory" at preferred_free_space. The above is not a low memory condition; quite the opposite. Some background info here.

Quote from: dfort on January 03, 2017, 11:38:11 PM
Looks like you're loading way too many modules. Try loading just the one's you're testing first.

This advice is perfectly valid; not just for memory reasons, but also for other kinds of code interactions. For example, a module might start its own tasks, and those are a scarce resource on certain cameras. Also, raw_rec and mlv_rec are known to conflict with each other on functions exported to other modules.

I'm thinking to place a warning on the Modules tab, to be displayed if you load too many modules. They are not meant to be loaded all at once.

benoit

Hi !

@reddeercity

Thanks for your video, I saw it but I still have a question : is your liveview was freezing during recording ?

I've installed your version (with the link you've gave us) and copied all the settings I could see in your video,

I didn't manage with my 5D2  to have a liveview unfreezing in crop mode + MLV2.0 ( with a hdmi connected or without ).

Do you have a "magic" settings or perhaps I've missed something ?

David

NoCp_Albert

Hallo Danne

Hopefully I can help a bit with my test for your last magiclantern-raw_video_10bit_12bit.2017Jan02.5D3123 upload.

First I made the same test as DeafEyeJedi in his Video on 5D3113 firmware. I used the same settings and the results are similar what you see on this Video. But, when I replay with MLV Player, I got clear Video clips.

My Standard on 5d3 -123 works with Canon Setting PAL and 1920 x 25 fps. Now, with your new Builds raw_video_10bit_12bit.2017Jan02.5D3123 and raw_video_10bit_12bit.2017Jan02.5D3113 the Camera switch during 3xCrop Mode in to NFTS (Canon Menu still 1920x25fps) and shows me the Frame rates goes to 29,776 fps, but this is NTFS not PAL.
By 29,766 fps and 2400x1320 - 16-9 recording Time is 8 - 12 Seconds. If I use FPS override, I can select 25 from 30 fps and it recording works continually without problem.

If I select the maximum 3520x1320 - 25fps the record stops with Frame skipping after 5 seconds and I must take the Battery out to start the Camera again. There is only the message about "Frame skipping"

Hope this Info is helpful for you. Generally I use MLV with Sound bei 1920x25 and use some times 3x Crop mode for Nature (Bird) documentaries with Lenses from 12 to 600mm. Your last magiclantern-crop_rec.2016Dec28.5D3123.zip works beautiful, only missing the 10bit mode for more frames.

Big thank you to all ML Developers
EOS 5D3 -113,-123, EOS 7D2, EOS 400, Lens EF16-35 f4 L, EF35 f2 IS, EF85 f1.8, EF 24-105 f4 L, EF 100-400 L II, EF 600 f4 L, Samyang 14mm f2.8, Canon Tc 1,4III, Kenko Tc 1,4 DGC

ricbi1

Did some tests on 5d3 and like others have reported 10bit works great in non-crop mode. I also pushed FPS to 60 at full HD and stopped recording at 1min + at 2:35 aspect ratio.
Really impressive!
Looking forward to doing more tests.
Recording to KomputerBay x1000 64gb

Levas

Just for information, I've got a few video files shot in 12 bit with wrong black level too, on the 6d.
I've shot about 25 mlv files during the day and got three files with green dark frames, never switched raw video settings, only turned camera on and off and adjusted diafragma and iso.
And did some switching between video and photo mode.

So it happens on multiple platforms.
Good to know where this weird green frames are coming from and how it is fixable ;)

Surin Dmitriy

Quote from: ricbi1 on January 04, 2017, 09:14:27 PM
Did some tests on 5d3 and like others have reported 10bit works great in non-crop mode. I also pushed FPS to 60 at full HD and stopped recording at 1min + at 2:35 aspect ratio.
Really impressive!
Looking forward to doing more tests.
Recording to KomputerBay x1000 64gb

FullHD 60 fps? Its impossible)
5D3

ricbi1

Meaning 1920x squeeze factor from Magic Lantern... but 1920 HD

a1ex

Did some small updates, mostly refactors to reduce the need to hardcode model-specific values. Details here.

Would be nice to get feedback (whether things are still working fine) on all models that use EDMAC_RAW_SLURP. Behavior on older models is unlikely to be changed.

I had another attempt at fixing 5D2, unfortunately without success. Maybe next time. The changes that worked were committed to allocate-raw-lv-buffer (currently useful for 1100D).

reddeercity

Quote from: benoit on January 04, 2017, 09:55:06 AM
Hi !@reddeercity 
Thanks for your video, I saw it but I still have a question : is your liveview was freezing during recording ?
Your welcome , No freezing liveview work as normal . Lv set to auto preview ,

Quote from: benoit on January 04, 2017, 09:55:06 AMDo you have a "magic" settings or perhaps I've missed something ?
My 5d2 ml cam setting

I did have 30p ntsc in canon menu and frame over ride to 23.976p



benoit

Whaaa  :D
Thanks a lot Reddeercity !
Yours settings files rules !
Now I have greyscale liveview on 5D2 , great !
On my settings I changed PAL to NTSC without results on unfreezing.
But with yours settings, I changed NTSC to PAL and liveview freezes ... so NTSC with your settings is the graal.
So I think, NTSC is not the only one parameter to tweak.

I post my old settings to find the differences with yours because I don't understand the meaning of each parameter on these config files.

magic.cfg :

# Magic Lantern Nightly.2016Dec01.5D2212 (b3dfbe7194f3 (x-perimental) tip)
# Built on 2016-12-01 22:52:58 UTC by rosiefort@RosieFoComputer
# Configuration saved on 2017/01/05 09:04:53
beta.warn = 5
menu.first = -7
time.indicator = 1
movie.log = 1
bv.av = 35
bv.tv = 99
bv.iso = 117
bv.auto = 1
rec.notify = 4
screen_layout.ext = 0
shutter.lock.value = 99
shutter.lock = 1
enable-liveview = 2
movie.restart = 1
fps.preset = 1
fps.override.idx = 32
fps.override = 1
zoom.disable.x10 = 1
hdrv.iso.b = 112
hdrv.iso.a = 88
battery.drain.rate.rev = 149
hist.meter = 0
audio.mgain = 0
audio.dgain.r = 18
audio.dgain.l = 18
audio.monitoring = 0
audio.input-choice = 0
crop.playback = 1
spotmeter.draw = 0
clear.preview = 4
waveform.draw = 0
zebra.draw = 0
global.draw = 0
disp.mode.x = 4


# Config file for module mlv_rec (MLV_REC.MO)

mlv.video.enabled = 1
mlv.bpp = 0
mlv.write_speed = 6153
mlv.display_rec_info = 2
mlv.warm_up = 2
mlv.buffer_fill_method = 0
mlv.show_graph = 1

Thanks again.
David