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.

DM36x H264DEC: Behaviour with unreliable streams

Hi All,

What is expected of the latest version of the H.264 decoder on the DM368 when provided with a unreliable stream? That is a few frames missing here and there? The decoder is fed complete frames, not slices.

Is the decoder required to be reset (XDM_RESET) in cases where frames have been dropped?

  • Hi

    The thread has been assigned to the codec team.

    We will get back to you shortly

    thanks
    cesar
  • Hi Martin,

    Martin1980 said:
    What is expected of the latest version of the H.264 decoder on the DM368

    Its 02.00.00.13 for H264 Decoder on Dm36x.

    Martin1980 said:
    Is the decoder required to be reset (XDM_RESET) in cases where frames have been dropped?

    Only in case of FATAL error you need to do a XDM_RESET.  For more info on this Please refer Appendix C section in UserGuide.

  • Hi Prashanth,

    Not quite what I was asking, I have the latest version - but I wanted to know how the decoder is expected to behave - what it is expected to do when fed with an unreliable stream?

    When frames go missing, I see a lot of 0x004f errors, which according to the manual is: "If the current picture refers to an already decoded error frame." This is normally followed by 0x0853, which according to the manual 0x0053 doesn't exist as an error code - but in other DM manuals, the 8148 or 385 I think, lists it as "corrupted data" - the same meaning as the 0x800 part. I also see a lot of 0x400 errors - insufficient data too ...

    Is this expected? Or is something else going wrong? Should the decoder be able to recover from a broken stream?

    Thanks,

    Martin

  • Hi Martin,

    Yes, What you have observe is correct and expected behaviour from the decoder.

    Martin1980 said:
    When frames go missing, I see a lot of 0x004f errors, which according to the manual is: "If the current picture refers to an already decoded error frame."

    When a frame is skipped and if its the reference frame for next frames all of these frames will be missing the ref frames and thus the error 0x4f is set by the decoder. This will be observed till the next I-Frame(Which will be the new reference frame).

    Ex: If Frame#1 is a skip frame and its a reference frame for Frame#2, Frame#3, Frame#4, Frame#5, .... Next I-Frame.

    Martin1980 said:
    which according to the manual 0x0053 doesn't exist as an error code

    You can refer the interface file ih264vdec.h with your decoder package for this. It means "Frame loss occurs, previous frame might be lost." 

    If decoder found frame loss error (one or more complete frame was missing) while parsing the header, decoder will return from that point with bytesConsumed set as 0. Decoder will also release the output buffer given in that process call (will set freeBufID[0] = inputID ).outputID[0] will be set to 0 (nothing to display).

    When error in Header occurs, It is recommended that application pass available bit stream, so that decoder will try to get next valid header.

    Usually XDM_RESET is done when FATAL error is occurred. Or if new stream is fed to the decoder in case of nonfatal error.

  • Hi Prashanth,

    Perfect, thanks - the user guide had confused me - looking at the error codes in .h file makes perfect sense now.

    Best Regards,

    Martin