AnsweredAssumed Answered

imx8mqevk linux OpenMax H.264 decoder component transition state issue

Question asked by Doug Slattery on Apr 1, 2019

Hi NXP Community,

I'm trying to create a video decoder using the Hantro library and am starting with this:

imx-vpu-hantro-1.10.0/openmax_il/source/decoder/test/video_decoder.c

 

I'm getting problems transitioning the component state from Loaded -> Idle -> Executing.

In the setup_component(...) function, near line 1289,

// should have transitioned to idle state now

OMX_STATETYPE state = OMX_StateLoaded;

while (state != OMX_StateIdle && state != OMX_StateInvalid) {

    err = comp->GetState(comp, &state);

    if (err != OMX_ErrorNone)

        goto FAIL;

}

if (state == OMX_StateInvalid)

    goto FAIL;

err = comp->SendCommand(comp, OMX_CommandStateSet, OMX_StateExecuting, NULL);

if (err != OMX_ErrorNone)

    goto FAIL;

 

The execution gets stuck in an endless loop in the section while (state != OMX_StateIdle ...).

I've modified the loop to sleep 750uSec between iterations and fall out after 100 iterations, and I get an (expected) error message:

OMX  ! decoder_send_command Transition is already pending (dec->statetrans != dec->state) decoder.c:818

I've also tried combinations of enabling/disabling the component input and output ports with no success.

 

Are there specific conditions inside the component that need to be set before it can transition to Idle? 

Any other suggestions?

 

Edit: Does anyone have a sample of the test_script.txt file that the test program is using?

 

Thanks for any feedback you can offer.

- Doug

 

"Nothing is impossible if ImPossible"

edit: bump

Outcomes