Save movie crop upon start up

Started by youshouldtry11, October 03, 2018, 10:19:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Danne

Just to be sure. Main repository=unified?
Tested on crop_rec_4k_mlv_snd branch on my 100D and can´t get it stuck into crop mode so that´s a good thing. Not my eosm here until tomorrow so could test both cams tomorrow. crop_rec_4k_mlv_snd or unified branch?

Test procedure:
Enable Movie crop mode, turning off camera removing card. Restarting camera to check if Movie crop mode is still on.

a1ex

Quote from: a1ex on October 28, 2018, 07:21:56 PM
To be tested:
- comment out movie_crop_hack_disable() from tasks.c, in the main repository (any recent branch - unified, crop_rec_4k, io_trace_full... doesn't matter)
- check on 650D, EOSM and 100D to make sure the setting is persistent, can be turned off from Canon menu and doesn't interfere with e.g. photo mode or other stuff.

Danne

Quote- comment out movie_crop_hack_disable() from tasks.c, in the main repository (any recent branch - unified, crop_rec_4k, io_trace_full... doesn't matter)
Confirmed working good on eos 100D when commenting out movie_crop_hack_disable(). Restarting camera gets me back into Movie crop mode. Taking out the card restarting camera doesn´t get the camera into stuck Movie crop mode even when set in ml menu so that is good. Putting back the card and starting camera after this and we are back to MOvie crop mode unset which is good.
Will try eosm tomorrow.

a1ex

Quote from: Danne on October 28, 2018, 09:33:52 PM
Confirmed working good on eos 100D when commenting out movie_crop_hack_disable(). Restarting camera gets me back into Movie crop mode. Taking out the card restarting camera doesn´t get the camera into stuck Movie crop mode even when set in ml menu so that is good. Putting back the card and starting camera after this and we are back to MOvie crop mode unset which is good.

Wait a minute, this is not the same as 700D. The 700D keeps the movie crop mode enabled, but it's not stuck - you can disable it easily from Canon menu if you start without a ML card.

dfort

Quote from: a1ex on October 28, 2018, 08:30:31 PM
...I've found the "stuck" crop mode to be a minor issue, as it can be turned off easily from Canon menu...

Not sure how you're turning off Movie crop mode from the Canon menu but I found out that switching from 1920x1080/24 to 1280x720/60 and back will "unstick" Movie crop mode.

Quote from: a1ex on October 28, 2018, 07:21:56 PM
To be tested:
- comment out movie_crop_hack_disable() from tasks.c, in the main repository (any recent branch - unified, crop_rec_4k, io_trace_full... doesn't matter)
- check on 650D, EOSM and 100D to make sure the setting is persistent, can be turned off from Canon menu and doesn't interfere with e.g. photo mode or other stuff.

Commenting out movie_crop_hack_disable() from tasks.c in the unified branch (line 376) will make the EOSM behave the same as the 700D which is a persistent Movie crop mode that doesn't interfere with photo mode.

So it looks like movie_crop_hack_disable() works on the EOSM but not on the 700D, right? Still need to hear back from 100D and 650D users.

a1ex

Just switching to any other frame rate and back from the touch screen does the trick on 700D, e.g. from 1080p25 switch to 1080p24 and back.

If 100D is not persistent (unsure how to interpret Danne's report), we'll have to use the config file trick.

Danne

100D is persistent.
Tests:
1 - Enable Movie crop mode
- Shut off camera, start camera, mcm still on
- Going into photo mode and back to movie mode and mcm is still on. Photo mode is not affected by mcm so regular still photo mode apply
- restarting camera with mcm enabled keeps mcm enabled
- Disabling mcm is possible by toggle between fps modes in canon menu
- Disabling mcm is also possible by simply pulling out battery or starting camera without an sd card inserted

The "stuck" thingy hasn´t been reproduced. Not sure how to do it. Maybe never was an issue, these tests were done in a galaxy far away and long ago  :P

dfort

Quote from: a1ex on October 29, 2018, 05:26:59 AM
...e.g. from 1080p25 switch to 1080p24 and back.

Just for the record, I'm using NTSC. Switching to 1080p30 and back to 1080p24 didn't work for me. Movie crop mode stayed persistent until I went to 720p/60.

a1ex

Could not confirm, just tried.

Besides, simply tapping on the same frame rate (e.g. 1080p24) on the touch screen will disable the crop mode on 700D.

dfort

I should do a video on this but my Rebel T5i won't get out of Movie crop mode outside of ML by tapping the same 1080p24 on the touch screen or switching to 1080p30 for that matter.

The whole point of Danne's PR is to unset Movie crop mode on shutdown and read the settings file on startup to restore it to the previous state. This seems like the "right" way to do it instead of having Movie crop mode be persistent when starting the camera without loading ML.

Danne

It is not persistent when loading camera without ml on it . It persists when ml is loaded.
Are you saying the 700D always stays in movie crop mode while ml not loaded?

a1ex

Yes.

- comment out movie_crop_hack_disable()
- enable movie crop mode from ML menu
- turn off the camera (from either power switch or SD card door)
- reboot without card
- crop mode stays enabled (it's saved by Canon firmware)
- changing resolution from Canon menu resets crop mode here, but not on dfort's 700D (?!)
- crop mode cannot be changed outside movie mode (this includes shutdown from power switch, which is done via photo mode)

Giving it one last chance, as I have to return the 700D today.

Logs:

- crop-switch-power-off.log
- crop-switch-open-card-door.log

The magic happens at:

12.206.146     PropMgr:ff11ebd0:00:00: *** mpu_send(1e 1c 01 4e 00 00 00 0c 00 00 00 00 00 00 00 19 00 00 00 0c 00 00 00 02 00 00 00 02 00) ; PROP_VIDEO_MODE

15.015.338  **INT-36h*:ff31af1c:00:00: *** mpu_recv(06 05 06 22 00 00)                               ; ??? [guess: power switch]
15.015.637  **INT-36h*:ff31af1c:00:00: *** mpu_recv(06 05 01 4b 01 00)                               ; PROP_LIVE_VIEW_VIEWTYPE_SELECT [is this the right place to disable crop mode?]
15.015.702    MainCtrl:ff0cc61c:89:03: bindReceiveSwitch (34, 0)
15.021.164     PropMgr:ff0f2e28:81:01: @@@PROP_FIXED_MOVIE 0
15.021.369     PropMgr:ff23ee90:81:03: FixedMovie New 0 Last 1
15.021.388     PropMgr:ff23ef20:81:03: ExitMovMode
15.046.937         Gmt:ff183a88:9a:03: PROP_LIVE_VIEW_VIEWTYPE_SELECT:1
15.077.067  **INT-36h*:ff31af1c:00:00: *** mpu_recv(08 06 04 0c 00 00 01)                            ; PROP_SHOOTING_TYPE
...
17.282.725  **INT-36h*:ff31af1c:00:00: *** mpu_recv(06 05 06 11 00 00)                               ; GMT_GUICMD_START_AS_CHECK
17.282.896    MainCtrl:ff14523c:9c:16: REQ : MultiShotTerminate !!!
17.285.606  GuiMainTas:00090e70:32:03: config_save_file: saving to ML/SETTINGS/magic.cfg
19.817.945     PropMgr:000aed00:00:00: **** movie crop hack dis


and, in the second log (notice the camera stays in movie mode):

10.347.198     PropMgr:ff11ebd0:00:00: *** mpu_send(1e 1c 01 4e 00 00 00 0c 00 00 00 00 00 00 00 19 00 00 00 0c 00 00 00 02 00 00 00 02 00) ; PROP_VIDEO_MODE
...
12.964.154  **INT-36h*:ff31af1c:00:00: *** mpu_recv(06 05 06 12 01 00)                               ; GMT_GUICMD_OPEN_SLOT_COVER
12.964.376  **INT-36h*:ff31af1c:00:00: *** mpu_recv(08 06 04 0c 00 00 01)                            ; PROP_SHOOTING_TYPE
12.964.496    MainCtrl:ff14523c:9c:16: REQ : MultiShotTerminate !!!
13.095.675         Gmt:ff183a88:9a:03: PROP_LIVE_VIEW_VIEWTYPE_SELECT:2
13.134.583  GuiMainTas:00090e70:32:03: config_save_file: saving to ML/SETTINGS/magic.cfg
13.249.463     PropMgr:000aed00:00:00: **** movie crop hack dis


in other words, the two shutdown methods (from power switch and from card door) are very different.

Now, disabling the movie crop mode from PROP_LIVE_VIEW_VIEWTYPE_SELECT (first property triggered before switching to photo mode)... still doesn't work on 700D. The crop mode setting is still enabled after rebooting without card.


PROP_HANDLER(PROP_LIVE_VIEW_VIEWTYPE)
{
    if (buf[0] != 2)
    {
        //info_led_blink(5, 50, 50);  [ to be able to tell when it runs; throws ERR70 ]
        //DryosDebugMsg(0, 0, "**** movie crop hack dis"); [ visible in io_trace_full or dm-spy-experiments ]
        movie_crop_hack_disable();
    }
}


The procedure does run before the mirror goes down, but apparently that's still too late.

crop-switch-power-off-dis-PROP_LIVE_VIEW_VIEWTYPE.log


8.789.033  **INT-36h*:ff31af1c:00:00: *** mpu_recv(06 05 06 22 00 00)                               ; ???
8.789.257  **INT-36h*:ff31af1c:00:00: *** mpu_recv(06 05 01 4b 01 00)                               ; PROP_LIVE_VIEW_VIEWTYPE_SELECT
8.798.111     PropMgr:ff23ee90:81:03: FixedMovie New 0 Last 1
8.798.131     PropMgr:ff23ef20:81:03: ExitMovMode
8.798.180     PropMgr:ff23e800:81:03: !! Convert Start !! 3(5) -> 3(0)
8.799.551     PropMgr:ff23e968:81:03: !! Convert End !!
8.802.361     PropMgr:ff1c6f78:83:01: changeCBR PropID(0x80000034)Parameter(1)Size(4)  ; PROP_LIVE_VIEW_VIEWTYPE_SELECT
8.802.425     PropMgr:000bbcd0:00:00: **** movie crop hack dis                             [ too late? ]
8.806.570     PropMgr:ff1c6f78:83:01: changeCBR PropID(0x80000034)Parameter(1)Size(4)
8.806.642     PropMgr:000bbcd0:00:00: **** movie crop hack dis                             [ triggered again ]
8.833.798     PropMgr:ff11ebd0:00:00: *** mpu_send(1e 1c 01 4e 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 0f 00 00 00 00 00 00 00 02 00) ; PROP_VIDEO_MODE
8.835.150     PropMgr:ff11ebd0:00:00: *** mpu_send(1e 1c 01 4e 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 0f 00 00 00 00 00 00 00 02 00) ; PROP_VIDEO_MODE
8.835.331  **INT-36h*:ff31af1c:00:00: *** mpu_recv(1e 1c 01 4e 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 0f 00 00 00 00 00 00 00 02 00) ; PROP_VIDEO_MODE
8.847.884  **INT-36h*:ff31af1c:00:00: *** mpu_recv(1e 1c 01 4e 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 0f 00 00 00 00 00 00 00 02 00) ; PROP_VIDEO_MODE
8.930.835     PropMgr:ff1c6f78:83:01: changeCBR PropID(0x80000034)Parameter(1)Size(4)
8.930.904     PropMgr:000bbcd0:00:00: **** movie crop hack dis                             [ triggered once more]
8.930.985     PropMgr:ff31be1c:01:03: mode 0 size 0x0 , framerate 0x1e , type 0xf zoom 0x0
8.931.316  **INT-36h*:ff31af1c:00:00: *** mpu_recv(50 4e 02 0e 03 03 05 00 03 00 00 60 00 00 03 0d 48 00 00 00 00 83 00 00 06 04 00 00 06 04 00 00 06 04 00 01 01 00 00 00 70 28 00 00 00 00 00 00 1e 00 00 61 00 00 80 48 58 48 00 03 02 01 00 00 00 00 02 01 00 00 00 01 00 00 00 01 00 00 01) ; Mode group
8.932.040     PropMgr:ff228e60:8f:02: PROP_MOVIE_PARAM 0 0 30 15

8.956.203     PropMgr:ff0f2e90:81:03: dwNewAeModeDial = 3                                [ switching to photo mode ]
8.956.256     PropMgr:ff23efb0:81:03: ChangeAEMode -> 3 @AE_MODE_DIAL
...


I don't get it. The "disabled" crop setting is sent over to the MPU, the MPU *confirms* it, yet the setting is not saved in its nonvolatile memory. When powering on without card, crop mode is still enabled.

The first event, bindReceiveSwitch (34, 0), is not forwarded to GuiMainTask, so it's not possible to handle it from there...

We can use a logging hook in either io_trace_full or dm-spy-experiments branch, dm-spy-extra.c:


    { 0xFF0CC5D8, "BindReceiveSwitch", 2, BindReceiveSwitch_log },

static void BindReceiveSwitch_log(uint32_t* regs, uint32_t* stack, uint32_t pc)
{
    if (regs[0] == 34 && regs[1] == 0)
    {
        DryosDebugMsg(0, 0, "**** movie crop hack dis from BindReceiveSwitch");
        movie_crop_hack_disable();
    }
}


crop-switch-power-off-dis-BindReceiveSwitch.log


7.790.891    MainCtrl:000c74e4:00:00: **** movie crop hack dis from BindReceiveSwitch
7.790.974    MainCtrl:ff0cc61c:89:03: bindReceiveSwitch (34, 0)
7.795.445     PropMgr:ff23ef20:81:03: ExitMovMode
7.804.086     PropMgr:ff11ebd0:00:00: *** mpu_send(1e 1c 01 4e 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 0f 00 00 00 00 00 00 00 02 00) ; PROP_VIDEO_MODE
7.805.345  **INT-36h*:ff31af1c:00:00: *** mpu_recv(1e 1c 01 4e 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 0f 00 00 00 00 00 00 00 02 00) ; PROP_VIDEO_MODE


TLDR: that doesn't work either.

Giving up.

dfort

What bugs me is that I didn't catch the problem with pull request #776 on the 700D until after it was merged. Seems to work fine on the EOSM and I believe Danne verified it is working on the 100D. We still need someone to test it on the 650D.

a1ex

I don't expect any surprises on the EOS M - its power button is not shared with the photo/video mode switch.

I expect the 650D and 100D to behave in the same way as 700D, judging from the shape of their power button.

Maybe you have turned off the 700D by opening the card door (I do that most of the time); in this case, the crop mode setting can be disabled by ML, so PR #776 worked.

What's not working is when turning off the camera from the main power switch; in this case, no matter what I've tried, the crop mode could not be disabled by ML.

Danne

Quote from: a1ex on October 31, 2018, 07:05:26 AM
I expect the 650D and 100D to behave in the same way as 700D, judging from the shape of their power button.

I asked dfort to check following on his 700D:

First test:
1 - Movie crop mode set to on
2 - shut off camera remove sd card
3 - turn camera on
Still in movie crop mode?

Answer: YES(dfort)

Second test:
1 - Movie crop mode set to on
2 - shut off camera, remove battery and put it back
3 - turn camera on
Still in movie crop mode?

Answer: YES(dfort)

The answer in NO on both tests on the 100D.

dfort

Quote from: a1ex on October 31, 2018, 07:05:26 AM
Maybe you have turned off the 700D by opening the card door (I do that most of the time); in this case, the crop mode setting can be disabled by ML, so PR #776 worked.

Yes--verified that PR #776 works properly when shutting down the 700D by opening the battery door. Though I usually use the power button to shutdown  :D

Quote from: a1ex on October 31, 2018, 07:05:26 AM
What's not working is when turning off the camera from the main power switch; in this case, no matter what I've tried, the crop mode could not be disabled by ML.

Exactly what I'm seeing here on the 700D.

Quote from: a1ex on October 31, 2018, 07:05:26 AM
I don't expect any surprises on the EOS M - its power button is not shared with the photo/video mode switch.

The 700D can also be turned on by closing the battery door so maybe that can bypass going into photo mode when booting the camera? Though that doesn't work with PR #776 either.

Quote from: Danne on October 31, 2018, 08:50:49 AM
The answer in NO on both tests on the 100D.

So on the 100D Movie crop mode is never persistent no matter what you try? That doesn't make sense.

I did the tests with and without movie_crop_hack_disable() in tasks.c (PR #776). Have you done the open battery door test on the 100D with a build that includes PR #776? Vanilla unified branch includes it.

BTW--PR #776 works properly on the EOSM when shutting down with either the power button or opening the battery door. So far the only camera that follows the logic in the code is the EOSM.

Danne

Sorry, can't follow what is what anymore. If anyone wants more tests please upload a specific build and a specific test suggestion.

dfort

Quote from: Danne on October 31, 2018, 08:50:49 AM
First test:
1 - Movie crop mode set to on
2 - shut off camera remove sd card
3 - turn camera on
Still in movie crop mode?

Second test:
1 - Movie crop mode set to on
2 - shut off camera, remove battery and put it back
3 - turn camera on
Still in movie crop mode?

That second test should be just to open the battery door to shut off the camera.

We can't use a vanilla unified build for the 100D so use a vanilla crop_rec_4k build--it also incorporates PR #776. Test results? Now comment out movie_crop_hack_disable() in tasks.c

src/tasks.c
static void ml_shutdown()
{
    check_pre_shutdown_flag();
#ifdef FEATURE_CROP_MODE_HACK
    // movie_crop_hack_disable();
#endif


Test results?

Danne

Already did that test, already posted my results. Check a few posts back.

You should test both pulling the battery and only open the battery door. One of the should set mcm to off the other one should restart with mcm on.

a1ex

Try this: https://builds.magiclantern.fm/jenkins/view/Experiments/job/crop_mode_test/3/ (for 100D, 700D and 650D)

Test 1:
- start camera in movie mode, enable crop mode
- restart camera by opening card door and closing it back; is crop mode still enabled?

Test 2:
- start camera in movie mode, enable crop mode
- restart camera from power switch; is crop mode still enabled?

Test 3:
- start camera in movie mode, make sure crop mode is enabled
- enter photo mode from the power switch (outside LiveView)
- select "Don't click me" (this will call movie_crop_hack_disable)
- restart camera from power switch; is crop mode still enabled?

Test 4:
- start camera in movie mode, make sure crop mode is enabled
- stay in movie mode
- select "Don't click me" (this will call movie_crop_hack_disable)
- restart camera from power switch; is crop mode still enabled?

Test 5:
- start camera in movie mode, enable crop mode
- turn off camera by opening the card door
- remove the card and reboot; crop mode still enabled?
- can you disable crop mode from Canon menu? any special tricks needed?

Danne

Thanks for the follow up. Of course I forgot my camera at work so any tests from my side on the 100D will have to wait until monday. Anyone else with a 100D feel free to test this meanwhile.

dfort

700D test results.

Test 1: Yes, crop mode still enabled after restart by closing battery door.
Test 2: Yes, crop mode still enabled after restart using power switch.
Test 3: Yes, crop mode still enabled after running "Don't click me" in photo mode (outside LiveView) and restarting using power switch.
Test 4: No, crop mode was disabled after running "Don't click me" in movie mode and restarting using power switch.
Test 5: Yes, crop mode still enabled after opening battery door and restarting without card. Movie crop mode can be disabled from Canon menu by switching movie mode from 1920/24 to 1280/60 or 640/30 but not from 1920/24 to 1920/30.

Walter Schulz

650D.104, using build by a1ex
https://www.magiclantern.fm/forum/index.php?topic=22874.msg207798#msg207798

Test 1: No, crop mode off after restart.
Test 2: No, crop mode off after restart.
Test 3: No, crop mode off after restart.
Test 4: No, crop mode off after restart.
Test 5: No, crop mode off after restart.

dfort

Well those 650D test results just threw every theory out the window.

Walter Schulz

Or I did it wrong.
I'm going to make a short video showing test procedures and hoping there might be another 650D owner willing to run the test.
Don't forget there was another issue where my cam seems to work strange.

EDIT: No vid but retried setup several times (with a1ex's build). Same result. Crop mode off, each and every time. Took care to remove battery after each test.
EDITEDIT: I cross-checked with dfort's build and a1ex's build for 100D. With dfort's 650D build I get very different results.
@a1ex: Haven't checked source for your 650D build. Any explanation why your build and dfort's differ?

Vid would not clear up anything -> Cancelled.