This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMX VFCC Dynamic Resolution Change

Hello

we want to change "runtime" the resolution of the OMX VFCC component in "IlClient" Omx examples. We have a sensor attached to the dm8168 and when i change the resolution on the sensor, i want to change the resolution of the component.

I see from the forums that on the VENC component it's ieasy to do by changing the dynamic parameters without changing component state. If I have to change the resolution on VFCC component seems that I have to stop, reconfigure and restar the component. What are the correct steps to follow? I tried

Running->Idle->-Port Disable->Loaded->Set/get Parameters->EnablePorts->Idle->Running

	OMXCOM_sendCommand(omxComp, OMX_CommandStateSet, OMX_StateIdle, omxComp->done_sem);

	// DISABLE ENABLE INPORT
	OMXCOM_sendCommand(omxComp, OMX_CommandPortDisable, 0, omxComp->port_sem);
	OMXCOM_sendCommand(omxComp, OMX_CommandPortDisable, omxComp->startOutportIndex, omxComp->port_sem);

	// Metto in load
	OMXCOM_sendCommand(omxComp, OMX_CommandStateSet, OMX_StateLoaded, omxComp->done_sem);

	// Reconfigure
	ret |= ENC_configure_hw_channel(omxComp);

	// ENCODER ENABLE INPORT
	OMXCOM_sendCommand(omxComp, OMX_CommandPortEnable, 0, omxComp->port_sem);
	OMXCOM_sendCommand(omxComp, OMX_CommandPortEnable, omxComp->startOutportIndex, omxComp->port_sem);

	OMXCOM_sendCommand(omxComp, OMX_CommandStateSet, OMX_StateIdle,omxComp->done_sem);

	// Execute Encode Component
	OMXCOM_sendCommand(omxComp, OMX_CommandStateSet, OMX_StateExecuting, omxComp->done_sem);

The last command (EXECUTING) fails (the callback says "Incorrect state transition"). What I have to do?


  • Hello,

    You could check these threads:

    e2e.ti.com/.../312342
    e2e.ti.com/.../1060214

    You could check the OMX user guide about the tear-down.
    You could try Executing to Idle and then Loaded.

    BR
    Margarita
  • Hello
    thanks for the help. I already read before the 2st thread, but in this case you change the resolution "dynamically" using the dynamic parameters, there is no need to change omx component state. The 1st thread dosn't show any solution. I already tried what you suggested:

    Running->Idle->-Port Disable->Loaded->Set/get Parameters->EnablePorts->Idle->Running

    In this case, the last step fails. But i'm not sure that this is the right way, maybe also others steps fails even if the callbacks are ok.
  • Hello,

    The second thread is for VENC component.

    What is the error which you are observing?

    Are "cleaning up" all the buffers?

    BR
    Margarita

  • Hello

    we have a more complicated configuration of the ILClient. We alloc buffers externally with Memory_Alloc (that calls syslink). In this way we have the buffers available on M3 side (for capturing and encoding) and on DSP side (for processing). So during the tear-down sequence we don't need to free the buffers.

    However i found a sequence that seems to work, but the buffers after the reconfigure seems to be corrupted.

    TEAR DOWN

    int OMXCOM_teardown_channel(IL_CLIENT_COMP_PRIVATE *omxComp) {
    	int ret = 0;
    
    	ret |=OMXCOM_sendCommand(omxComp, OMX_CommandStateSet, OMX_StateIdle, omxComp->done_sem);
    
    	ret |=OMXCOM_sendCommand(omxComp, OMX_CommandPortDisable, omxComp->startOutportIndex, omxComp->port_sem);
    
    	ret |=OMXCOM_sendCommand(omxComp, OMX_CommandStateSet, OMX_StateLoaded, omxComp->done_sem);
    
    	ret |= OMXCOM_close_channel(omxComp);
    
    	return ret;
    }

    RUNNING UP

    	// Open channel
    	ret |= OMXCOM_open_channel(omxComp);
    
    	// Configure Capture Component
    	ret |= OMXCOM_configure_hw_channel(omxComp, OMXCOM_setupParams);
    
    	// Buffer Capture Component
    	ret |= OMXCOM_configure_buffers(omxComp);
    
    	// Execute Capture Component
    	ret |= OMXCOM_sendCommand(omxComp, OMX_CommandStateSet, OMX_StateExecuting, omxComp->done_sem);
    

    So this seems the only way to change resolution, there is no way to do this without killing and restarting the capture component. Thanks for the help.

  • Hello,

    What about if you put a delay between iterations(switchings). To make sure the buffers are cleaned up.
    You could try with 100ms for example.

    BR
    Margarita