Magic Lantern Forum

General Discussion => General Chat => Topic started by: Luther on October 28, 2019, 01:12:27 PM

Title: Motion blur difference between EOS M and 5DMKIII
Post by: Luther on October 28, 2019, 01:12:27 PM
Did anyone else noticed that? These last weeks some ML users posted their work, some made with EOS M, others with 5D MKIII. One difference (between many) that I perceived was the motion blur. MKIII has a nice motion blur (very cinematic), while EOS M has noticiable artifacts in high motion areas (tearing (https://en.wikipedia.org/wiki/Screen_tearing), to be specific). At first I thought this had something to do with my display refresh rate, but this happens only on EOS M videos.

So I wonder why this happen and if it could be fixed. @g3gg0 already explained sometimes that shutter speed is not precise in canon cameras and that we can't achieve perfect 180 degree like in a cinema camera. But the Timer A and B adjustment of FPS and fine shutter adjustment could solve this tearing? The sensor is exposed line-by-line and not all pixels at once?

Going even further, could this Tessive (https://tessive.com/time-filter-technical-explanation) idea be replicated by exposing pixels in a 'sine' curve instead of square curve? Or this voltage control is too low-level for ML to have access to?
Title: Re: Motion blur difference between EOS M and 5DMKIII
Post by: 2blackbar on October 28, 2019, 01:40:14 PM
Its fps override with23.976  exact fps enabled, it will get you better motion blur and filmlike motion, i use even 41/42 shutter speed to get nicer motion , 45 also works well on my canon M and 5DII.Try it out.39 starts to look like video.Dont ask me why 41/42 has perfect 180 value maybe tiny bit too much blur so you can even film handheld without so much micro jitters like you usually get with 1/50 shutter on DSLR's.
Its not scientific but my own observations so its better if You would try it out and maybe you will like it, maybe not.
EOS M withouyt fps override has a lot of tearing on shutter 50.
Title: Re: Motion blur difference between EOS M and 5DMKIII
Post by: a1ex on October 29, 2019, 07:26:53 AM
Quote from: Luther on October 28, 2019, 01:12:27 PM
@g3gg0 already explained sometimes that shutter speed is not precise in canon cameras and that we can't achieve perfect 180 degree like in a cinema camera.

Its precision is somewhere around 1/50000 (5D3) and 1/60000 (EOS M); exact value is Main Clock / FPS timer A. This is the step size with which you can adjust the exposure time, so I highly doubt you can perceive such difference, so it must be something else.

Side note: minimum exposure time is 2 units on DIGIC 5 and 1 unit on DIGIC 4, and maximum is very close to 1/fps.

QuoteBut the Timer A and B adjustment of FPS and fine shutter adjustment could solve this tearing? The sensor is exposed line-by-line and not all pixels at once?

Timing is done in hardware, by the (undocumented) ADTG chip; there's no way for the main CPU to affect it in a meaningful way, other than some minor jitter when starting the exposure for each frame. After the exposure is started by the CPU, the sensor is, indeed, exposed line-by-line, and the time difference between the lines is exactly 1 step (as computed above, and displayed in the FPS override menu).

The LiveView (Evf) task uses a very high priority, and it's driven by a precisely-timed interrupt, so even if your CPU gets stuck doing intensive stuff in some regular DryOS task, you aren't going to impact the image acquisition moment (where the CPU has some stuff to do) by more than a few ms. You can't alter the intra-frame timings, even if you change the settings (such as FPS timers) in the middle of a frame; they only take effect at the next frame. Yes, I've tried that a few times. Canon themselves configure the next frame in advance - as seen e.g. in this graph (https://www.magiclantern.fm/forum/index.php?topic=19300.msg208151#msg208151) at 720p60, but can be reproduced at any other frame rate by reducing the HEAD4 timer.

Tearing can be caused by incorrect EDMAC settings, or by starting to process an image buffer while it's being written by some other "task" (for example, if the image capture and image compressing transfers "meet" somewhere in the middle of a frame). If it actually happens, show me a way to reproduce the issue. Also see if it happens with any build from the download page.

As I'm quite bad at pixel peeping, whenever you report image quality issues, please post a link to some still frames (from the videos you have watched, or whatever) to highlight the defects. The issue has to be visible by clicking on that link and looking at the paused video. Sorry, I'm not going to watch entire videos attempting to guess what you might have seen. If it's not obvious on one single frame, upload set of 3-4 frames, and highlight or describe where one should look at.

Quote
Going even further, could this Tessive (https://tessive.com/time-filter-technical-explanation) idea be replicated by exposing pixels in a 'sine' curve instead of square curve? Or this voltage control is too low-level for ML to have access to?

The Tessive idea can not be replicated in software, but I've been toying with the idea of modifying one of the software-controlled variable ND filters for this purpose. If the LCD shutter used by that filter is fast enough, it might even work for approximating a global shutter.

The Aputure DEC Vari-ND appears to have the hardware component I'm looking for (a fast LCD shutter), but I could not find one for the EF or EF-M mount. If you already know where to get a fast high-contrast LCD shutter, ideally already in some kind of lens adapter, please let me know.
Title: Motion blur difference between EOS M and 5DMKIII
Post by: DeafEyeJedi on October 29, 2019, 09:47:09 PM
Yet another great follow-up by @a1ex and thank you for taking the time to thoroughly explain your behalf on this remarkable thread started by @Luther! :)
Title: Re: Motion blur difference between EOS M and 5DMKIII
Post by: Luther on October 30, 2019, 01:35:30 AM
Thanks for clarifying @a1ex.

Quote from: a1ex on October 29, 2019, 07:26:53 AM
After the exposure is started by the CPU, the sensor is, indeed, exposed line-by-line, and the time difference between the lines is exactly 1 step (as computed above, and displayed in the FPS override menu).
Correct me if I'm wrong, but expensive cinema cameras (Arri/Red) expose all diodes at once, right? Would it be possible to do the same on known and documented hardware (thinking of Apertus here)?
Quote
You can't alter the intra-frame timings, even if you change the settings (such as FPS timers) in the middle of a frame; they only take effect at the next frame. Yes, I've tried that a few times. Canon themselves configure the next frame in advance - as seen e.g. in this graph (https://www.magiclantern.fm/forum/index.php?topic=19300.msg208151#msg208151) at 720p60, but can be reproduced at any other frame rate by reducing the HEAD4 timer.
Maybe this is done by another microcontroller running a hard real-time kernel?
Quote
The Tessive idea can not be replicated in software, but I've been toying with the idea of modifying one of the software-controlled variable ND filters for this purpose. If the LCD shutter used by that filter is fast enough, it might even work for approximating a global shutter.
Great idea. If the filter works as a double circular polarizer, the speed will only be limited by the motor. Don't know if 24fps is feasible for such tiny motor.
Quote
The Aputure DEC Vari-ND appears to have the hardware component I'm looking for (a fast LCD shutter), but I could not find one for the EF or EF-M mount. If you already know where to get a fast high-contrast LCD shutter, ideally already in some kind of lens adapter, please let me know.
Yeah, they seem to only make E-mount and MFT-mount.
Quote
Tearing can be caused by incorrect EDMAC settings, or by starting to process an image buffer while it's being written by some other "task" (for example, if the image capture and image compressing transfers "meet" somewhere in the middle of a frame). If it actually happens, show me a way to reproduce the issue. Also see if it happens with any build from the download page.
Strangely enough, I couldn't get frames with tearing. But I can definetly see them while playing. Specific examples: scene at 48s of this video (https://www.magiclantern.fm/forum/index.php?topic=24574.0) from @ngemu (recorded with EOS-M) and this other (https://www.magiclantern.fm/forum/index.php?topic=24481.0) from @wib (scene at 1m55s) - Recorded with 5D3 (contradicting what I said before about this only happening in EOS-M). The first is using 23,976fps and the later is 24.000fps. Both downloaded in highest DASH resolution using youtube-dl. MPV player reports my display as 59.978Hz.
Videos where this 'tearing' doesn't happen are this one (https://www.magiclantern.fm/forum/index.php?topic=24568.0) from @paulheran and most (but not all) of the recordeds with 5D3.

Again, I can't get specific frames. My assumption is that:
1 - Display refresh rate issue (doesn't explain why this doesn't happen on most 5D3 videos)
2 - Shutter speed (don't know the settings each video used)
3 - Some change @Danne did on "EDMAC settings" (I have no technical knowledge in this area, so I can't infer on it)
4 - Placebo or some weird psychovisual artifact (might be, in this case I'm biased - don't think this is the case though)
Title: Re: Motion blur difference between EOS M and 5DMKIII
Post by: a1ex on October 30, 2019, 07:14:54 AM
Quote from: Luther on October 30, 2019, 01:35:30 AM
Correct me if I'm wrong, but expensive cinema cameras (Arri/Red) expose all diodes at once, right? Would it be possible to do the same on known and documented hardware (thinking of Apertus here)?

It's called global shutter. The sensor used by Apertus already has this property, and - besides high frame rate capabilities - that's basically the most important selling point of that sensor. This capability is not free though - it does come with image quality issues, and working around them turned out to be far from trivial.

There might be better sensors with global shutter, available for proprietary developments, but for Apertus, the following applies:
Quote from: https://wiki.apertus.org/index.php/Image_SensorsNote: A central requirement for apertusĀ° considering an image sensor is that the full datasheet for the sensor can be shared with the community without signing an NDA with the sensor's manufacturer.

Back to our stuff:

QuoteMaybe this is done by another microcontroller running a hard real-time kernel?

2 x AD80246 (https://photo-parts.com.ua/parts/?part=ad80246) on 5D3. Good luck reverse engineering the chip, or finding its documentation ;)

Best guess: some kind of ASIC with hardwired custom logic. Here's the datasheet for a similar device: AD9923A (http://datasheet.elcodis.com/pdf2/121/90/1219059/ad9923a-bbcz.pdf).

Quote
Great idea. If the filter works as a double circular polarizer, the speed will only be limited by the motor. Don't know if 24fps is feasible for such tiny motor.

There's no motor involved, at least not one in the "classical" sense. Your LCD display from your camera doesn't have a motor either - just FYI ;)

Here (https://www.youtube.com/watch?v=F33iUqdPGoQ)'s a hobby-level LCD shutter in action. For a global shutter, you want one with very good contrast (10-15 stops?) and reasonably fast response time (probably about 5ms or faster for 24p).

The shutter from the video offers about 4 stops according to its datasheet (https://media.digikey.com/pdf/Data%20Sheets/Adafruit%20PDFs/3330_Web.pdf), and at least 2.5 stops according to that video. Its switching speed is unknown, best estimation: "we'd guess it switches faster than 50ms" (https://forums.adafruit.com/viewtopic.php?f=19&t=112580).

The Aputure ND filter appears to offer 8 stops (ND8-ND2048). They say it's 9 stops, for some reason. No idea about its switching speed, but I guess if their shutter glass were fast enough, they would have already tried to implement this.
Quote from: https://aputureshop.eu/aputure-dec-vari-ndmft.htmlThe DEC Vari-ND has a built-in liquid crystal variable ND filter, which can achieve ND8-ND2048. That's 9 stops of light.




Quote
Again, I can't get specific frames. My assumption is that:
1 - Display refresh rate issue (doesn't explain why this doesn't happen on most 5D3 videos)
2 - Shutter speed (don't know the settings each video used)
3 - Some change @Danne did on "EDMAC settings" (I have no technical knowledge in this area, so I can't infer on it)
4 - Placebo or some weird psychovisual artifact (might be, in this case I'm biased - don't think this is the case though)

We can safely exclude #2 and #3. One would only affect motion blur, with no effect on tearing, the other - if present - would have caused frames with tearing, visible when pausing the video.
Title: Re: Motion blur difference between EOS M and 5DMKIII
Post by: Levas on October 30, 2019, 09:40:47 AM
Quote from: Luther on October 30, 2019, 01:35:30 AM
and this other (https://www.magiclantern.fm/forum/index.php?topic=24481.0) from @wib (scene at 1m55s) - Recorded with 5D3 (contradicting what I said before about this only happening in EOS-M).

This one at 1m55 looks like it has used some stabilisation in post. Looks a little bit warp effect to me, like the stuff you see with digital image stabilisation on phones.

It could be that what you call tearing is caused by:
-Image stabilisation in post
-Optical image stabilisation in the lens used (motion blur can look unnatural when there is much movement, jittery)
-Rolling shutter and movement from camera. There are differences in rolling shutter with different video modes, especially crop mode has more rolling shutter.
Title: Motion blur difference between EOS M and 5DMKIII
Post by: DeafEyeJedi on October 30, 2019, 11:55:26 PM
If I can recall correctly that certain tearing of some sort could be related to by utilizing HDMI output from cameras thus taking away the last of the CPU that's required for the buffering to be done properly?

I think this phenomenal occurred on the 7D which may be slightly off-topic from this particular thread?

Meanwhile; I'll see if I can back track to an old footage that shows this. If not, I could try to reproduce and then upload certain DNG's for verification/testing purpose.

Would this troubleshoot protocol be suffice?
Title: Re: Motion blur difference between EOS M and 5DMKIII
Post by: Luther on October 31, 2019, 04:53:23 AM
Quote from: a1ex on October 30, 2019, 07:14:54 AM
This capability is not free though - it does come with image quality issues, and working around them turned out to be far from trivial.
That's surprising. I thought it was even simpler, because you don't need to sync the line exposure times...
Quote
There's no motor involved, at least not one in the "classical" sense. Your LCD display from your camera doesn't have a motor either - just FYI ;)
Yes, I assumed it worked based on double polarization, which requires filter rotation. This is a different mechanism, it seems to work by one polarizer and one liquid crystal. Wikipedia explains (https://en.wikipedia.org/wiki/Light_valve) well: " By changing the voltage applied to this crystal filter, it will work as a switching polarising filter, giving different gray scales of the light coming out."
Quote
The shutter from the video offers about 4 stops according to its datasheet (https://media.digikey.com/pdf/Data%20Sheets/Adafruit%20PDFs/3330_Web.pdf), and at least 2.5 stops according to that video. Its switching speed is unknown, best estimation: "we'd guess it switches faster than 50ms" (https://forums.adafruit.com/viewtopic.php?f=19&t=112580).
Stacking them and then synchronizing could work... they don't seem to thick. The speed might be limited to the circuit you're using. Might be a nice project to use and learn TinyFPGA, to try to find the actual speed limit.
Quote
We can safely exclude #2 and #3. One would only affect motion blur, with no effect on tearing
True. I meant FPS issues.
Quote
the other - if present - would have caused frames with tearing, visible when pausing the video.
Yes, and I can't find those. I think "tearing" might not be the correct term. Some articles point to the term "judder". I've tried MPC-HC player instead of MPV (which I normally use) and it still happens. MPV has some options to reduce 'judder' (--tscale), so I'll play with these and see what happens.


Quote from: Levas on October 30, 2019, 09:40:47 AM
This one at 1m55 looks like it has used some stabilisation in post. Looks a little bit warp effect to me, like the stuff you see with digital image stabilisation on phones.
Yes, but doesn't explain the "judder/tearing".
Quote from: Levas on October 30, 2019, 09:40:47 AM
-Rolling shutter and movement from camera. There are differences in rolling shutter with different video modes, especially crop mode has more rolling shutter.
Might be, but @a1ex says this is not the case.


Quote from: DeafEyeJedi on October 30, 2019, 11:55:26 PM
Meanwhile; I'll see if I can back track to an old footage that shows this. If not, I could try to reproduce and then upload certain DNG's for verification/testing purpose.
Would be nice to get actual frames with tearing, but I don't know if that's the case. Might be only some issue with my display refrash rate or my player... Thanks for trying to help @DeafEyeJedi

Anyway, this is probably not related to ML then (even though this only seem to happen on EOS M videos).
I can consider this thread closed.
Title: Re: Motion blur difference between EOS M and 5DMKIII
Post by: 2blackbar on October 31, 2019, 01:23:53 PM
I have 60hz monitor and its tearing when playing back hd video, i overclocked it to 68 and tearing almost disappeared, many 1080p monitors are in 60hz only whiuch is stange, 75hz should be minimum IMO.You can overclock some monitors refresh rate to much more, mine was only capable of 68 at max with 1080p.