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.

How to use area decode of JPEG codec?

Hi All,

I want to decode a jpeg file using area decode. When I did it using area decode mode on JPEG codec, (jpeg original size : 3360x2280, area setting : SubRegionUpperLeftX : 16 SubRegionUpperLeftY : 16 SubRegionDownRightX : 3200 SubRegionDownRightY : 1280), I got an fatal error on my linux kernel. (Unhandle memory error......). Please give me some help. All help is much appreciated. Thanks very much.

 

Another issue:

How to scale up/down a jpeg that the width is more than 1344 pixels using IPIPE? How to use frame division mode?

Best Regards,

Jeff

  • Jeff,

    I blieve the failure may be due to the size of the JPEG; you see CMEM defines a set of contiguous memory buffers used pass data to codec engine for decoding.  I do not beleive there is a buffer large enough defined in CMEM to accomodate the image size you are trying to decode.

    There is sample source code on how to use resizer to scale images; please see the following directory under DVSDK source tree

    dvsdk_1_30_00_40/PSP_01_20_00_014/examples/dm355

     

  • Juan,

    What constrains has it using area decode mode? Such as output buffer size or input buffer size? I assume that I will decode a jpeg file with the resolution 3360x2480 and I want to get a resolution 1680x1050. I allocated a large enough buffer for input & output. But I still got a fatal error. Your help is much appreciated. Thanks.

     

    Best Regards,

    Jeff

  • Jeff,

    From a DM355 hardware point of view

    1) Max CCD capture resolution supported is 32000 x 32000 pixels; this is in theory of course, since there is no CCD sensor out there that can support this size.

    2) Max horizontal resolution supported by IPIPE (e.g. in case you need to do resizing...) is 1344 pixels.

    From a software point of view, we support up to 720p video input resolution as detailed in the LSP 1.20 data manual included with the DVSDK software.  If you need anything more than this, then you will likely need to change the kernel drivers (can be complex), as well as CMEM (rather simple).  But before you modify source code, remember the IPIPE hardware limits horizontal resolutions to 1344 pixels (lower the both the ones you mention above), hence if you plan on using resizer or any of the IPIPE hardware blocks, you will need to recosider braking up the image in software.

  • Juan,

    Now i have a serious issue with playing hd video clip with audio on DM355 demo board (720P video & 16Kbps mp3 audio). I found the hd video will stop during play after 1 hour. Music was still running and video was freezed.

    I used the same thread management as demo on DVM.(video decoder thread, video display thread, audio play thread).

    Could you please give me some help? Our product is in the most important step. So hope you can help me. Your help is much appreciate.

     

    Best Regards,

    Jeff

  • We have not see this problem reported before.

    The first thing that comes to mind is that there may be a memory leak in the application.  Can you check how much memory is available at different points in the one hour cycle to see if available memory is slowly decreasing (would indicate memory leak).