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.

DM6467 Create h264dec fail issue.

Hi,

I use the demo decode code to implement multi-file decode DVR system.

I create 5 h264 decoder and now I run out of memory of DDRALGHEAP to decode 6th CIF file.

====================  Below is my partion of code: ====================

        params.maxWidth = VideoStd_CIF_WIDTH; // 352
        params.maxHeight = VideoStd_SIF_NTSC_HEIGHT; //240
        
      /* Create the video decoder */
        hVd2 = Vdec2_create(hEngine, algs[envp->videoDecoder], &params, &dynParams);
    if (hVd2 == NULL) {
        ERR("\r\n video thread: Failed to create video decoder: %s\n",  algs[envp->videoDecoder]);
        cleanup(THREAD_FAILURE);
    }

bufSize=Engine_getUsedMem(hEngine); // get Engine used memory size

===============================================================

Then I got 13231504 byets from above "bufSize".

Does this mean when each h264dc codec engine was created, it will consume 13231504 byets ???

Why a 264 CIF file need so much buffer ??

And When I deocde h264 D1 file (720x480), and set params.maxWidth =720,  params.maxHeight=480,

The "bufSize" is still the same !!!! Why ??

 

If any suggesstin would be very appreciated!!

Thanks,

Tai

 


  • Does anyone has the same question with me ?

  • Tai,

    Unfortunately, I am not too familiar with the codec requirements, but can certainly understand your concern.  I have alerted our codec team to see if they can perhaps offer an explanation/clarification.

  • Juan,

    The H264 decoder always assumes that the incoming sequence is level 4. As per the H264 standard, the memory required for the reference frames is a function of level and not the resolution of the deocded picture. So the total memory required for D1 @Level 4 and 720p @ level 4 is the same. But if the incoming sequence is level 3, even then the decoder requests the memory based on level 4.  The decoder could have checked for the level of the sequence internally, and then ask for the exact size, but this has not been implemented.

    Hope this clarifies the issue. If not, please send me an e-mail..gald to help!

    Regards,

    Kapil