A guide to dumping image buffers / VRAM dumps in all modes

Started by dpjpandone, June 21, 2014, 03:14:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dpjpandone

Image buffer support has been added to QEMU.

If you are experiencing problems with external monitors, this is important to you!  here is how you can help:

We must dump the image buffers in various display modes on as many cameras as possible.

To dump the image buffer:

1.press trash can to enter magic lantern menu
2.from the "DEBUG" menu, select "Dump image buffers" you will now see a countdown "will dump VRAM in 5 seconds"
3.quickly enter the display mode you wish to dump (for example, if you are trying to dump 5xzoom mode, you must quickly press 5x zoom before the 5 second counter runs out)
4.wait for "Dumping VRAMS.............DONE!)"

Now the dump is stored on your memory card.
You must repeat this process for about 75 possible display states

A logical order for this task:

1.dump live view in 1080p video mode (standby)
2.dump live view in 1080p video mode (recording)
3.dump live view with  5x zoom enabled (standby)
4.dump live view with 10x zoom enabled (standby)
5.dump live view in 1080p 3X crop (600D) (Standby)
6.dump live view in 1080p 3X crop (600D) (Recording)
7.dump live view in 720p video mode (standby)
8.dump live view in 720p video mode (recording)
9.dump live view in 480p video mode (standby)
10.dump live view in 480p video mode (recording)
11.dump live view in 480p crop ( 550D) (Standby)
12.dump live view in 480p crop ( 550D) (Recording)
13.switch back to 1080p (via Canon Q menu) press dump and quickly press play (to review a video)
14.enable raw video recording (via ML menu) press dump and quickly press play (to review a mlv video)
15.disable raw video, switch to photo mode (from mode dial or dedicated switch)
16.dump live view in photo mode
17.press dump then quickly press play (to review a photo)
18.For this last one, Image review must be enabled and set to at least 5 sec. (canon menu) after you press "dump VRAM" you must quickly take a picture, and the dump must be captured during image review (automatically review a photo after taken)

***************************************************************************
19. Plug in HDMI monitor and repeat steps 1-18 (1080i output)
20. Now select "Force HDMI-VGA in ML menu" and repeat steps 1-18 (480p output)
21. Disconnect HDMI monitor, Connect SD monitor (canon RCA cable) and repeat steps 1-18
22. From Canon menu, set your Video Region to the opposite of what it is currently set (if it says NTSC, switch to PAL and vice versa) and repeat 1-18.

Don't forget to set your video mode back to your country's settings when you are done.

Not all cameras support all the listed modes, for example,  5D2 has only two (1080p and 480p), 600D has more.... Try to dump every mode that your camera supports. The goal is to collect a dump of every possible display mode on every supported camera.

After you have collected all these dumps, compress the highest level folder into a zip archive to preserve the file/folder structure and upload it here.

If we can collect dumps for most of the cameras it will be possible to emulate these various display modes for automated testing on the nightly build server. This will allow a developer to fix current issues with external displays, and ensure that future features work with external monitors.

Thanks for your help with this task!

a1ex

Related discussions on Bitbucket:

https://bitbucket.org/hudson/magic-lantern/commits/32f3a5bd81936f986de904b12a542522cb37102f
https://bitbucket.org/hudson/magic-lantern/issue/1582/crop-bars-for-external-smallhd-oled-7-7#comment-10827408

The video modes you need to cover are listed below:

    char* video_mode =
        PLAY_MODE && is_pure_play_photo_mode()          ? "PLAY-PH"  :      /* Playback, reviewing a picture */
        PLAY_MODE && is_pure_play_movie_mode()          ? "PLAY-MV"  :      /* Playback, reviewing a video */
        PLAY_MODE                                       ? "PLAY-UNK" :
        lv && lv_dispsize==5                            ? "ZOOM-X5"  :      /* Zoom x5 (it's the same in all modes) */
        lv && lv_dispsize==10                           ? "ZOOM-X10" :      /* Zoom x10 (it's the same in all modes) */
        lv && lv_dispsize==1 && !is_native_movie_mode() ? "PH-LV"    :      /* Photo LiveView */
        !is_native_movie_mode() && QR_MODE              ? "PH-QR"    :      /* Photo QuickReview (right after taking a picture) */
        !is_native_movie_mode()                         ? "PH-UNK"   :
        video_mode_resolution == 0 && !video_mode_crop && !RECORDING_H264 ? "MV-1080"  :    /* Movie 1080p, standby */
        video_mode_resolution == 1 && !video_mode_crop && !RECORDING_H264 ? "MV-720"   :    /* Movie 720p, standby */
        video_mode_resolution == 2 && !video_mode_crop && !RECORDING_H264 ? "MV-480"   :    /* Movie 480p, standby */
        video_mode_resolution == 0 &&  video_mode_crop && !RECORDING_H264 ? "MVC-1080" :    /* Movie 1080p crop (3x zoom as with 600D), standby */
        video_mode_resolution == 2 &&  video_mode_crop && !RECORDING_H264 ? "MVC-480"  :    /* Movie 480p crop (as with 550D), standby */
        video_mode_resolution == 0 && !video_mode_crop &&  RECORDING_H264 ? "REC-1080" :    /* Movie 1080p, recording */
        video_mode_resolution == 1 && !video_mode_crop &&  RECORDING_H264 ? "REC-720"  :    /* Movie 720p, recording */
        video_mode_resolution == 2 && !video_mode_crop &&  RECORDING_H264 ? "REC-480"  :    /* Movie 480p, recording */
        video_mode_resolution == 0 &&  video_mode_crop &&  RECORDING_H264 ? "RECC1080" :    /* Movie 1080p crop, recording */
        video_mode_resolution == 2 &&  video_mode_crop &&  RECORDING_H264 ? "RECC-480" :    /* Movie 480p crop, recording */
        "MV-UNK";
   
    char* display_mode =
        !EXT_MONITOR_CONNECTED                          ? "LCD"      :          /* Built-in LCD */
        ext_monitor_hdmi && hdmi_code == 5              ? "HDMI1080" :          /* HDMI 1080p (high resolution) */
        ext_monitor_hdmi && hdmi_code == 2              ? "HDMI480 " :          /* HDMI 480p aka HDMI-VGA (use Force HDMI-VGA from ML menu, Display->Advanced; most cameras drop to this mode while recording); */
        _ext_monitor_rca && pal                         ? "SD-PAL"   :          /* SD monitor (RCA cable), PAL selected in Canon menu */
        _ext_monitor_rca && !pal                        ? "SD-NTSC"  : "UNK";   /* SD monitor (RCA cable), NTSC selected in Canon menu */

    int path_len = snprintf(pattern, sizeof(pattern), "VRAM/%s/%s/%s/", CAMERA_MODEL, video_mode, display_mode);


Therefore, for one camera, you have up to 16 video modes x 5 display types, total 80 modes. For a 5D2 or 50D, which has only 1080p or 640p, you have only 50 video modes.

Ignore the "UNK" modes, these are just for fallback, to make sure the conditions are evaluated correctly.

stevefal

video_mode_crop (H.264) does not apply to 5D3, correct?  If so I count 12x5 or 60 modes for 5D3.
Steve Falcon

a1ex

Right, it doesn't.

Also, would be nice if you could use a tripod. If you don't, aligning the 3 image buffers is going to be hard, since the code does not try to do any kind of temporal sync. If the images are not aligned, the only hint will be the bounding boxes, which may or may not match.

I've just updated the code and the builds to save a log file with the raw variable values; 5D3 123 seems to have some new display modes, besides the ones I already know.

stevefal

What's required for the SD cases? I never use composite video out. I assume a cable needs to be plugged in, but does it need to actually go somewhere? Or just a 75 ohm load?

[edit] Apparently plugging in the silly SD cable disables the internal LCD, so I guess a composite monitor is required unless the cable is plugged in after triggering the dump. I'll do that for the PAL case at least, since I don't have a PAL monitor.
Steve Falcon

Markus


a1ex

For SD, I think it's enough to plug the cable right before clicking the screenshot.

I don't know how to identify mirroring modes yet, but the logs saved alongside with the dumps may show some clues (can't try it right now myself). Just mention which picture was taken with which mirroring setting.

stevefal

Here's a set from 5D3_113. I used three different HDMI monitors, including two with 1280x720 native displays. But all three are coming up as 1080p, so I don't know how to generate the 480p HDMI case. It goes pretty fast once you get the hang of it:

http://popspring.com/mldrop/VRAM_stevefal_5D3_113.zip

[edit] Ah, I missed the instruction about 480p. Will try.
Steve Falcon

stevefal

I tried forcing 480p and had some issues:

- I noticed that playing picture/video looked very different on my SmallHD in photo versus movie modes. So I captured both (photo first).
- I captured movie standby and record for all three movie formats, but only folders were created, no dump files.

http://popspring.com/mldrop/VRAM_stevefal_5D3_113_480p.zip
Steve Falcon

dpjpandone

Steve, I updated the steps, they should be more clear now.

it doesn't matter which hdmi monitor you use, just as long as you do one pass with 1080hdmi, one with 480hdmi, and one with SD monitor (rca cables)

LRF

Another set of VRAM dumps, this time without mirroring. I think I might have skipped few modes, because didn't have the list with me and was doing other things at the same time. So if you want me to repeat something, just let me know.
Added zoom modes on external monitor, as a1eks wanted (1.4x, 5x, 10x, Panavision).

https://www.dropbox.com/s/ee4vq9ybaq7isdq/VRAM3.zip

Akos


ALex,


Here the dumps from my Mark3, with 113 firmware, ML from today, 22 Dumps with monitor , 22 without, following from lists from Joahanan:


wetransfer link :
http://we.tl/MBFWrIYTF8

Akos


a1ex

Thanks, so now I have the 5D3 pretty well covered, in pretty much all modes.

A screenshot from the emulator, from last night:


(it's not doing anything useful yet, but it shows the emulation goes far enough to load these dumps, display them, and check the alignment of ML overlays)

Here's one from today (loaded a HDMI dump from 5D3 1.1.3):


Does it match what you see on the monitor?

Other cameras too, please! Even if you don't have an external monitor, you can still do the built-in LCD dumps. If you have the A/V cable, you can do the SD monitor tests just with that (no need to actually use a monitor, just plug the cable).

LRF

This is how it looks in my case:
No mirroring.

Screen layout 16:10 HDMI, t/b with external monitor set to Underscan
https://www.dropbox.com/s/bo6nz6ub5lafb8d/HDMI_under.jpg


16:10 HDMI, t/b with external monitor set to Overscan
https://www.dropbox.com/s/62k8z7b3hercwg3/HDMI_over.jpg

Akos

Thanks Alex,



here is 5 short iphone clips i made ,you would be able to see different variations here clearly:


https://www.icloud.com/photostream/#A4Gg6pDrGZTwaq

Here's one from today (loaded a HDMI dump from 5D3 1.1.3):
Does it match what you see on the monitor?


Other cameras too, please! Even if you don't have an external monitor, you can still do the built-in LCD dumps. If you have the A/V cable, you can do the SD monitor tests just with that (no need to actually use a monitor, just plug the cable).

dpjpandone

Alex, here are my dumps for the 7D:

http://www.filedropper.com/vram

these are LCD, HDMI 1080, and HDMI 480. I am borrowing an SD monitor that does NTSC and PAL on Wednesday. I noticed that the dumps don't necessarily get sorted to the right folders (all hdmi folders are empty) but I think they're all there. Please let me know if these worked.

a1ex

Looks like I need to try this one myself; vyskocil also reported this bug on 7D. Might be a bug on the file I/O backend or some other quirk, not sure yet.

edit: FIO_CreateFile fails when called with path names longer than 33 characters (why?)

dpjpandone

Quote from: a1ex on June 24, 2014, 07:55:28 AM
FIO_CreateFile fails when called with path names longer than 33 characters (why?)

   because it's not a 5D3... I'll do 600D and 550D next, which one would you like first?

a1ex

600D, because I know for sure it has problems with external monitors.

dpjpandone

600d crashed every time I tried to capture a dump while recording video, regardless of video mode. These are reproducible, battery must be removed.

a1ex

No problems here on 60D while recording. Any crash logs, or a video showing how exactly it crashes?

Does it help if you use a very low bitrate?

dpjpandone

I am uploading the VRAM zip as we speak, none of the record dumps were captured..... so it didn't record the video or the dump. Since you mentioned bitrate, I'm going to try with a faster card first. Is it ok if I upload a seperate VRAM.zip with only the record modes and maybe one plain MV live view for each type of display? Or should I go through the whole procedure again? 

a1ex

You can upload just the new modes, it's easy to merge them.

dpjpandone

OK, here is 600D LCD, HDMI 1080, and HDMI 480, Ill upload the record modes later today:

http://www.filedropper.com/vram_1