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.

memory allocation using algalloc

Hi experts,

 

I am following the video_copy example of codec engine.  In codec engine, application creates algorithm object and allocates memory by getting information in memtab[ ],  by algalloc( ).

In h264 we allocate memory depending on the width and height, and some other parameters which we decode in SPS/PPS. So we dont have any prior knowledge of memory requirements. because we dont have any prior knowledge of memory requirements so at the time of "algorithm object" creation we could not tell the application about any memory requirements. I think we need to dynamically allocate memory. My question is .

1.  for this dynamic memory allocation, how can i pass my memory request to application after object creation.

any help or document link is appreciated.

 

regards

faisal

 

 

  • faisal,

    I suspect that in this case memTab may pass a buffer size larger than needed (e.g. buffer size big enough to store uncompressed frame of given resolution); on the h.264 algorithm side, the algorithm can dynamically allocate internal buffers of its own it may need to do its work (application does not need to know about these).  Anyway, this is just my guess... studying the demos that come with DVSDK should help shed some light.