Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: dpjpandone on August 17, 2015, 04:03:24 AM

Title: In over my head with state-object
Post by: dpjpandone on August 17, 2015, 04:03:24 AM
Magic zoom flickers so bad in crop mode (EOS-M), that it's impossible to use.

One-Percent got it to sync well enough that it's useful, but never pushed those changes to main. I believe I have found them here:

#ifdef SSS_STATE
static int stateobj_sss_spy(struct state_object * self, int x, int input, int z, int t)
{
    int old_state = self->current_state;
int ans = StateTransition(self, x, input, z, t);

    #if defined(CONFIG_5D3) || defined(CONFIG_6D)
    if (old_state == 6 && input == 6) // before sssCompletePrepareLcdJpeg
    {
        raw_buffer_intercept_from_stateobj();
        module_exec_cbr(CBR_HOOK_BEFORE_JPG_PREVIEW);
    }
    #endif
       
    #if defined(CONFIG_5D3) || defined(CONFIG_6D)
    if (old_state == 6 && input == 6) // after sssCompletePrepareLcdJpeg
    {
        module_exec_cbr(CBR_HOOK_AFTER_JPG_PREVIEW);
    }
    #endif

    #if defined(CONFIG_EOSM) || defined(CONFIG_650D) || defined(CONFIG_700D) || defined(CONIFG_100D) //TODO: Check 700D and 100D
    //~ int new_state = self->current_state; // 10 - 11 - 2
    if (old_state == 10 && input == 11) // delayCompleteRawtoSraw
        raw_buffer_intercept_from_stateobj();
    #endif

*/
//~ Not Enough memory to undo?
/*
#ifdef CONFIG_EOSM
    int new_state = self->current_state;
    if (old_state == 10 && input == 11) // delayCompleteRawtoSraw
{ raw_buffer_intercept_from_stateobj();
module_exec_cbr(CBR_HOOK_BEFORE_JPG_PREVIEW);
    }

    if (old_state == 10 && input == 10) // input 8 CompleteRawtoSraw input 10: CompleteRawtoLCDjpeg input 6: may work too
    {
        module_exec_cbr(CBR_HOOK_AFTER_JPG_PREVIEW);
    }
#endif     
    return ans;
}
#endif


Also this from v_sync_lite:

#if defined(CONFIG_EOSM) || defined(CONFIG_600D)
    RegisterVDInterruptHigherPriCBR(lv_vsync_signal, 0);
#endif


I'm afraid I'm in over my head on this one. Can someone please help me with this? Which pieces are relevant to fixing magic zoom?
Title: Re: In over my head with state-object
Post by: nikfreak on August 17, 2015, 08:54:52 PM
Ever tried to use INPUT_ENABLE_IMAGE_PHYSICAL_SCREEN_PARAMETER? This did the trick on 70D.

See: https://bitbucket.org/nikfreak/magic-lantern/src/5f7602ca68eda2a7e8865f9c4e54d4bfeaa065aa/src/state-object.c?at=70D-merge#state-object.c-146

Title: Re: In over my head with state-object
Post by: dpjpandone on August 18, 2015, 02:01:59 AM
You sir, are my hero! It worked!