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 modify codec test application discard buffermanager API?

Hi,all:

I want to discard buffermanager APIs when I call codec.Because I felt it made application more complex.

I just want to allocat frame buffer by myself.

How could I do ? Would you give some advice? thx!

For example,Now I write some apps base on mpeg2 decoder_ TestAppDecoder  in C66x_mpeg2vdec_02_02_01_08_ELF.

I allocate outputBufDesc  by myself  like below every frame decoding.But result was not right.YUV_OUT was my defined memory space on ddr.

#if 0
outputBufDesc.bufs[0] = (XDAS_Int8 *)(YUV_OUT+offset_out);
outputBufDesc.bufSizes[0] = status->bufInfo.minOutBufSize[0];
printf("outsize=%d\n",outputBufDesc.bufSizes[0]);
for(ii=0; ii< (status->bufInfo.minNumOutBufs-1); ii++ )
{
outputBufDesc.bufs[ii+1] = outputBufDesc.bufs[ii] + status->bufInfo.minOutBufSize[ii];
outputBufDesc.bufSizes[ii+1] = status->bufInfo.minOutBufSize[ii+1];
}
#endif

How could I do to discard buffermanager?

  • Hi Steve, Buffer manager mantains status of all the buffers (free and locked by the codec) in order to ensure the application don't overwrite any buffer. Application needs to manage the display and reference buffers, it also needs to keep a pool of free buffers which gives free buffers to the decoder upon request. Another point of cosideration is when decode order is different from display order, in this case some delay is necesary for proper display.

     Codecs Testapplication and Buffer manager APIs already take care of all these details under the hook and they are ready for being used. I would encorage to use them.

    Thank you,

    Paula