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.

jpeg decoder fails



Hi,

I am using dvsdk 4.02.00.06 and DM368.  I am using Jpeg decoder to decode the mjpeg data from external USB camera. Jpeg decoder fails after some time. It throws FATAL_ERROR (0x8800) and stops decoding. I referred to some posts and increased the size of input buffer by 1024. Even after that it fails with FATAL_ERROR.

I also tried XDM_RESET whenever the decoder fails. Even with XDM_RESET decoder starts failing frequently after some time.

My question is why in case of corrupted data the decoder is failing with FATAL_ERROR and stopping? Does the hardware throws this error or is this a software thing?

Is there any way to work around this so that decoder does not give FATAL_ERROR??

I have verified the camera output with luvcview and VLC player.

Appreciate any help.

Thanks,

Avneet

  • Hi,

    The error code "0x8800" refers to corrupted data error and FATAL error. Decoder throws FATAL error when it can't continue to decode the stream, it can be wither from hardware or software. Couple of questions to understand the possible issue:

    1. What is the resolution of the JPEG image?

    2. What is the input buffer size you are using in your application?

    Regards, RSV

  • Hi,

    Thanks for the reply.

    I understand that "0x8800" error is because of corrupted data. 

    Decoder failure in case of corrupted data is fine but ideally, it should continue with decoding the next good frame in the input buffer. So why is it throwing the FATAL_ERROR ?

    Resolution is VGA (640x480)

    input buffer size : 921600   (+ 1024  as per some posts)

    output buffer size : 614400

    Thanks,

    Avneet

  • Hi,

    JPEG decoder operates in frame mode i.e. it will not search for next frame start code after encountering a FATAL error in current frame decoding process. It will just return with proper error code, the application can still continue to give next good frame for decoding.

    I don't see any issues with buffer sizes, there could be some issue with buffer management if the issue is frequently occurring. 

    Regards, RSV

  • Hi,

    I am using 4 input buffers in round robin and 4 output buffers.

    I am also doing memset to zero before copying the input data to buffers. So i don't see any problem with buffer management also.

    The failure is more frequent after some time.

    Thanks,

    Avneet

  • hi Avneet,

    i am also facing the same probem ,did the above issue got resolved 

     

    thanks 

    mayur