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.

Mpeg2 Decoder on Neatra board ,DM816x, seems to skip frames and does not exits from the IL_Client apps cleanly for ezsdk_5_03_01_15.

7853.720x576_vlc.txt1780.720x576_vlc.txt 

Hi,

I have ran the mpeg2 dec for ezk_5_03_01_15 .

I observe there is a frame skip and also in between of decoding some of the frames prints "OMX error ID = 0x8000100b" , corrupted bitstream.

The input bitstream is attached as .txt file.

Please find the teraterm log below, the original bitstream contains 18 frames :

root@dm816x-evm:~# ./decode_a8host_debug.xv5T -i 720x576_vlc.m2v  -w 720 -h 576
-o out.yuv -c mpeg2
input file: 720x576_vlc.m2v
width: 720
height: 576
output_file: out.yuv
codec: mpeg2
Decoder example
===============================
UIAClient is ready to send a UIA configuration command
UIAClient received UIA_CONFIGURE_ACK
UIAClient is done sending requests
Iteration 0 - Start
 allocating field buffer
 calling getHandle
Output port buffer size: 663552
 state IDLE
  state execute
  etb / ftb done
 Component generated error; OMX error ID = 0x8000100b
 frame 1  decoded
 frame 1  displayed
 frame 2  displayed
 frame 3  displayed
 frame 4  displayed
 frame 2  decoded
 frame 3  decoded
 frame 4  decoded
 frame 5  decoded
 frame 5  displayed
 frame 6  displayed
 frame 7  displayed
 frame 8  displayed
 frame 6  decoded
 frame 7  decoded
 frame 8  decoded
 frame 9  decoded
 frame 9  displayed
Component generated error; OMX error ID = 0x8000100b
Component generated error; OMX error ID = 0x8000100b
 frame 10  displayed
 frame 11  displayed
 frame 12  displayed
 frame 10  decoded
 frame 11  decoded
 frame 12  decoded
 frame 13  decoded
 frame 13  displayed
 frame 14  displayed
 frame 15  displayed
 frame 16  displayed

No more to read
 frame 14  decoded
Tearing down the decode example
Error OMX_ErrorUndefined:    WaitForState has timed out
Decoder Test End

 

Regards

Pujari

  • Hi,

    There is a bug in the parser code in the IL-Clients due to which it incorrectly parses the frames. The frame skips and errors are due to this. This will be fixed in the next SDK release. However, you can make the following changes in the file \decode\srcdecode_utils.c: function Decode_GetNextMpeg2FrameSize and see if it works for you-

    1. Line 678:  change from

          for (i = start_i; i < end_i; i ++)

    to

          for (i = start_i; i < end_i-3; i ++)

    2. Line 711: change from

            memset (&buff[i], ctx->idx, 0);

    to

            memset (&buff[i], 0, ctx->idx);

    3. Line 723: change from

            start_i = end_i;

    to

            start_i = end_i-3;

    Regards,

    Anirban

  • Hi Anirban,

    I changed accordingly as mentioned by you.

    But still I do see the same issue (corrupted bit stream for some frames and frames skip and no clean exit).

    root@dm816x-evm:~# ./decode_a8host_debug.xv5T -i 720x576_vlc.m2v  -w 720 -h 576
    -o out.yuv -c mpeg2
    input file: 720x576_vlc.m2v
    width: 720
    height: 576
    output_file: out.yuv
    codec: mpeg2
    Decoder example
    ===============================
    UIAClient is ready to send a UIA configuration command
    UIAClient received UIA_CONFIGURE_ACK
    UIAClient is done sending requests
    Iteration 0 - Start
     allocating field buffer
     calling getHandle
    Output port buffer size: 663552
     state IDLE
      state execute
      etb / ftb done
     Component generated error; OMX error ID = 0x8000100b
     frame 1  decoded
     frame 1  displayed
     frame 2  displayed
     frame 3  displayed
     frame 4  displayed
     frame 2  decoded
     frame 3  decoded
     frame 4  decoded
     frame 5  decoded
     frame 5  displayed
     frame 6  displayed
     frame 7  displayed
     frame 8  displayed
     frame 6  decoded
     frame 7  decoded
     frame 8  decoded
     frame 9  decoded
     frame 9  displayed
    Component generated error; OMX error ID = 0x8000100b
    Component generated error; OMX error ID = 0x8000100b
     frame 10  displayed
     frame 11  displayed
     frame 12  displayed
     frame 10  decoded
     frame 11  decoded
     frame 12  decoded
     frame 13  decoded
     frame 13  displayed
     frame 14  displayed
     frame 15  displayed
     frame 16  displayed

    No more to read
     frame 14  decoded
    Tearing down the decode example
    Error OMX_ErrorUndefined:    WaitForState has timed out
    Decoder Test End

     

    Thanks

    Pujari