Author Topic: 12-bit (and 10-bit) RAW video development discussion  (Read 838276 times)


togg

  • Senior
  • ****
  • Posts: 439
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1676 on: June 25, 2018, 12:44:48 AM »
Where can I find a recap post on 12 bit? I tried to look for it but didn't find it. I'm curious to know how much space is saved and if the image quality is really the same and only noise is taken out.

zcream

  • Freshman
  • **
  • Posts: 52
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1677 on: July 24, 2018, 04:12:44 PM »
Where can I find a recap post on 12 bit? I tried to look for it but didn't find it. I'm curious to know how much space is saved and if the image quality is really the same and only noise is taken out.
I hope someone digs up the 50d and tries 12-bit raw on it also. I cannot atm

Sent from my Lenovo TB-8703F using Tapatalk


olegp2005

  • New to the forum
  • *
  • Posts: 2
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1678 on: August 07, 2018, 02:34:28 PM »
Full-frame live view is not possible technically on 5DM2 (3X)?

vincent pierre

  • New to the forum
  • *
  • Posts: 5
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1679 on: August 30, 2018, 03:58:21 PM »
Hi,

Oh my god ! Thank you.

Eos 700d - firmware 1.1.5 - Experimental ML firmware 1.1.5 10-12 bit raw.
I can shoot 1728x736@23.976 [2.35:1 ratio] in raw 10bits ( and kill pink dots with MLVPRODUCER )

I will test this week end in real life shotting conditions. But... Enormous Thanks !

Amazing Work ! Long life to Magic lantern. And thank you for all this working hours, ML is a genius job.
Thank to the ML community.

Best regards from France
Vince
EOS 700D 115 | 50mm STM | 10-18mm STM | Tascam 60d ||| mlv-app | da-vinci-resolve

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2303
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1680 on: September 11, 2018, 04:08:48 AM »
Full-frame live view is not possible technically on 5DM2 (3X)?
This should change your mind I bet
Code: [Select]
For full width LiveView:
CMOS[2] = 0x00E
C0F06008: 0x27705DB (only the lowest half appears to matter on this camera)
C0F06084: 0x30037 (copied lowest half from photo mode)
C0F06088: 0x46A0B87 (copied lowest half from photo mode)
=> 5632x1074 in mlv_rec, 12.5 FPS.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1681 on: September 17, 2018, 07:23:52 PM »
A tiny present for 5D2 users: 10/12-bit recording working without synchronization issues, from what I could tell. Experimental build available.

I've only tested a short clip at 1080p30, 1880x1056 10-bit, mlv_lite + mlv_play + raw_twk, with and without the linked commit.

Happy anniversary!

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2303
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1682 on: September 17, 2018, 10:18:42 PM »
That's great @a1ex -- thanks , I'll give it a complete test drive today with hdmi devices
Petty cool for a 10 year old camera that stated a whole revolution in Video/film production .

waza57

  • Contributor
  • New to the forum
  • *****
  • Posts: 41
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1683 on: September 18, 2018, 01:00:46 AM »
wonderful!

I just tested and, for me, I see 2 big improvements:

1. The preview is much better.
2. 10 and 12 bits works in zoom x1 mode. (until now only worked for me in x5)

I will try to understand how it work and see what it gives in my experimental  crop_rec_4k_5D2 branch.

dfort

  • Guest
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1684 on: September 18, 2018, 03:22:36 AM »
I'm pretty sure these are the stubs for the 7D:

Code: [Select]
/** LiveView RAW patches **/
NSTUB(0xFF280084, StartImagePass_x1_SetEDmac)               /* right before the SetEDmac call from StartPass_x10 CrawAddr / Kind */
NSTUB(0xFF27F43C, StartImagePass_x5_SetEDmac)               /* FIXME: why it fails when the hook is placed on the BL instruction?! */

Now to figure out why it doesn't build on this branch:

Code: [Select]
/Library/Developer/CommandLineTools/usr/bin/make -C ../../platform/7D_MASTER.203
make[1]: *** No rule to make target `../../src/patch.h', needed by `gdb.o'.  Stop.
make[1]: *** Waiting for unfinished jobs....
[ VERSION  ]   ../../platform/7D_MASTER.203/version.bin
[ CC       ]   master_boot.o
make: *** [all] Error 2

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2303
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1685 on: September 18, 2018, 04:16:14 AM »
Had a quick look at the code and looks like we are using the liveview hack from 3x crop_mode , nice find
Works ok , some little issue -- h264 proxy is enabled , did causes a "raw error"
For kick I tried it and got a this
Code: [Select]
ML ASSERT:
raw_info.bits_per_pixel == bpp
at ../../src/raw.c:2178 (raw_lv_request_bpp), task raw_rec_task
lv:1 mode:3
raw_rec_task stack: 193098 [193178-192178]
0xUNKNOWN  @ ff8773e0:193170
0x00090404 @ 950e7c:1930f0
0x0004EA38 @ 90484:1930c8
0x0004E378 @ 4ea94:193098
Magic Lantern version : raw_video_10bit_12bit.2018Sep17.5D2212
Mercurial changeset   : 3e3fac1e9c8e (raw_video_10bit_12bit_LVState) tip
Built on 2018-09-17 17:07:46 UTC by jenkins@nightly.
Free Memory  : 124K + 3949K
more then likely this should be disable until fixed , if this is even possible to work on 5d2 .

in 10bit didn't like 30p with "frame over ride" enable , had a very hard time being continues .
without "frame over ride" no real problems at 30p .
HDMI devices are problematic , had my Zacuto Evf with pass thru to the Ninja hard drive recorder 
with pink frame glitchs (looks like too much overhead from the overlayes) in standby not so bad when recording raw video .
If I kill overlays when recording raw a.k.a. clean output the pink glitchs are almost all gone from HDMI preview .
If I force HDMI to "VGA" the pink frame glitchs are gone but can't use the HDMI recorder (can't record SD/VGA)
the Evf work great at "VGA" mode , just like before magic lantern on just canon code .
Nice think about Zacuto Evf , it was design for the 5D Mark ii low res hdmi preview so it as a preset to scale it to full screen .
So we may loose full 1080i HDMI preview ,
@a1ex could we add the "kill overlays" when recording mlv's like the full mlv_rec ? this make the HDMI preview more stable
from my tests .
24p mode is more stable all around with "frame over ride" enabled .
Tried different preview modes , Auto work fine  , Framing with low res preview freezes when record raw but can be over ridden
with the half shutter for live preview -- I thought the low res preview was live , I think in full mlv it is but not a deal breaker .

Hopefully we can enable sound like the 5d3 with mlv_lite .

benoit

  • New to the forum
  • *
  • Posts: 30
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1686 on: September 18, 2018, 09:51:43 AM »
A tiny present for 5D2 users: 10/12-bit recording working without synchronization issues!

@a1ex What a present ! Thanks a lot, I see that your work on dual pixel on 5DIV don't make you forget the old and goody 5DII ! 5D2 users allways need you. Hope your next contribution on 5D2 branch will not be in ten years ! ;)

Thanks reddeercity, waza57, dfort to believe in this old D4 cam ! Keep up the good work.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1687 on: September 18, 2018, 09:58:55 AM »
Ha, I actually hoped to get arbitrary resolutions (up to full-res LiveView), 720p50/60, CF overclocking, and if all works well, start looking into MJPEG. Unfortunately I've ended up spending an entire week of intensive work just for making the Lua tests pass on 5D2 and 500D, without breaking newer models...

Had to take a break from that, so I've looked into 5D4 & co.

Then kept bumping into issues with crop_rec (unexpected, as the proof of concept worked smoothly), ran out of time and committed only what worked reasonably well, i.e. 10/12-bit recording.

benoit

  • New to the forum
  • *
  • Posts: 30
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1688 on: September 18, 2018, 04:11:41 PM »
Thanks for your very detailed answer.
For ML developpers, I understand that roadmap is great and for me too ! but as a 5D2 user, the bigger problem it's exact framing.
I know the ML forum rules and I'm asking nothing to developpers. I want just to dialogue with technical people about hdmi output and liveview freezing.
Could we find more easily the liveview bug if we were independant of hdmi ouput engine by switching it off ? (I don't know how or even if it's possible, i'm not ml developper)
I don't have any background on Edmac, interupts, sync frame etc... but I allways split stuff to make it easier. Since users don't use hdmi output and liveview at the same time, it will be a nice feature to switch off the one we don't want. Just a thought.
I'm just thinking out loud, for developpers is certainly non sense or bullshit but who knows with this ML team ...

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1689 on: September 18, 2018, 04:37:40 PM »
Sorry, I don't get the question. HDMI functionality is disabled as soon as you unplug the cable.

What LiveView bug are you talking about? Slow preview when you need accurate framing? That one is not affected by HDMI*), and it's a lot more complex than getting the raw image data and saving it to card (long answer).

*) Well, one could compare the configuration of Canon's image processing modules with or without HDMI to figure out how to change the output size of the live preview. But the current slowdown certainly does not come from ML supporting - to some limited extent - external monitors.

kwstas

  • New to the forum
  • *
  • Posts: 10
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1690 on: September 18, 2018, 04:59:25 PM »
Thnx a1ex for your present! Just wanted to mention while LV is faster in previewing, in recording freezes (5x).

Also I was wondering instead of zooming to 5x,if it is possible to have a plain white crop frame enabled for 5x recording but continue to see whole frame as 1x.... something like a Leica rangefinder crop frame..

benoit

  • New to the forum
  • *
  • Posts: 30
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1691 on: September 18, 2018, 05:14:24 PM »
@ae1x thanks for the clarification and the long answer ... (a bit hard to understand for me)

Hope one day, it will be a short answer like "liveview never freezes or slowdown !"

TBar15

  • New to the forum
  • *
  • Posts: 2
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1692 on: September 20, 2018, 07:56:49 AM »
I downloaded the experimental build for the 5D2 linked by @a1ex, but I am having a bit of trouble implementing the 10 or 12 bit modes for the RAW recording. When activating the mlv_rec.mo or mlv_lite.mo, I only see that 14 bit footage is referenced, so I am curious about how to switch to 10 bit or 12 bit. I also am missing the raw_twk.mo module referenced in @a1ex's post in addition to crop_rec.mo; have others reported the same thing? I have been trying RAW recording on my 5D2's for a couple years now, and this looked like a promising result for me to try to adopt. Any help would be appreciated, and I am glad to post any screen information or log files from my specific case if requested.

benoit

  • New to the forum
  • *
  • Posts: 30
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1693 on: September 20, 2018, 02:08:15 PM »
 You will find 10 and 12 bit selection under ML menu : MOVIE/RAW Video/Bit Depth.
Hope it helps.

ch_d

  • Freshman
  • **
  • Posts: 99
  • 5D MII
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1694 on: September 21, 2018, 11:04:18 AM »
Hello guys.
Thank you very much for this excellent work on the 10bit 5DM2 version... Work really well.
Is it possible to implement sound into this build?

Thank you very much.
 8)
5D MII

aprofiti

  • Contributor
  • Member
  • *****
  • Posts: 194
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1695 on: September 21, 2018, 01:04:53 PM »
Tried to pattern match stubs for 50D:
Code: [Select]
/** LiveView RAW patches **/
NSTUB(0xFF1DB254, StartImagePass_x1_SetEDmac)               /* right before the SetEDmac call from StartImagePass_x1/x5 CrawAddr / KindOfCraw */
NSTUB(0xFF1DBCE9, StartImagePass_x5_SetEDmac)               /* FIXME: why it fails when the hook is placed on the BL instruction?! */

Movie records in 10bit but can't be reviewed on camera (black frames) nor with mlRawViewer (artefacts).
I'm not sure about the stubs, looks a bit different in code

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7653
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1696 on: September 21, 2018, 01:13:36 PM »
Developing with dcraw?
Code: [Select]
dcraw -T input.dng

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1697 on: September 21, 2018, 01:26:10 PM »
Stubs are OK, except there's no Thumb bit this time.

You (still) need raw_twk to review 10/12-bit files in camera.

On 5D2, when compiling without CONFIG_EDMAC_RAW_PATCH, I get some sync issues (half of the frame is sometimes from previous frame). Compiling with CONFIG_EDMAC_RAW_PATCH (i.e. default configuration on the raw_video_10bit_12bit_LVState branch) solves this issue, but does not address any other quirks, such as in-camera playback or preview/overlays while recording at lower bit depths.

aprofiti

  • Contributor
  • Member
  • *****
  • Posts: 194
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1698 on: September 21, 2018, 03:11:34 PM »
On 5D2, when compiling without CONFIG_EDMAC_RAW_PATCH, I get some sync issues (half of the frame is sometimes from previous frame). Compiling with CONFIG_EDMAC_RAW_PATCH (i.e. default configuration on the raw_video_10bit_12bit_LVState branch) solves this issue, but does not address any other quirks, such as in-camera playback or preview/overlays while recording at lower bit depths.

I get half of the frame issue with CONFIG_EDMAC_RAW_PATCH !
Tried to undefined it and will  run the same way on camera, isn't this strange?

Also Preview of Raw video is set to auto, which will looks like Framing when not recording and Frozen when rec start, but I can set to Realtime without apparently any issues... Why?

Developing with dcraw?
Code: [Select]
dcraw -T input.dng

Compiled raw_tweak and can playback in camera
Not sure how to use dcraw with mlv, do I need to convert to dng with mlv_dump first?

Tried with MLVFS but CF refuses to cooperate...
So I downloaded MLV App 1.0 and it playback .mlv files like mlv_play

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: 12-bit (and 10-bit) RAW video development discussion
« Reply #1699 on: September 21, 2018, 03:21:12 PM »
My bad, the correct stubs should start with 0xFF9 instead of 0xFF1. That means, you should patch some address that Canon code is going to execute, not a mirrored copy.

Make sure the hook is actually executing (add some printf, for example).

Preview: the heuristic is probably not aware of 10/12-bit limitations, will check. Real-time preview has incorrect framing in x5.