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.

Issues about demo_decode_display in DVRRDK4.0

 just migrate to DVRRDK4.0. I read the demo_vdec_vdis_bits_rd.c and find something abnormal in function VdecVdis_bitsRdSendFxn.

for (i = 0; i < gVdecVdis_config.numChannels; i++)
{
     VdecVdis_bitsRdGetEmptyBitBufs(&emptyBufList, i);
     if (emptyBufList.numBufs)
    {
         VdecVdis_bitsRdReadData(&emptyBufList);
         VdecVdis_bitsRdSendFullBitBufs(&emptyBufList);
    }

}

In DVRRDK3.5, the function VdecVdis_bitsRdGetEmptyBitBufs() gets all the buffers in emptyBufList at one time and calls VdecVdis_bitsRdReadData() and VdecVdis_bitsRdSendFullBitBufs() just one time. In DVRRDK4.0, the function VdecVdis_bitsRdGetEmptyBitBufs() could just get one emptyBuf a time, but I think we should call VdecVdis_bitsRdReadData() and VdecVdis_bitsRdSendFullBitBufs() just one time after we get all the buffers in emptyBufList. So, I change the codes as below:

for (i = 0; i < gVdecVdis_config.numChannels; i++)
{
     VdecVdis_bitsRdGetEmptyBitBufs(&emptyBufList, i);

}

 if (emptyBufList.numBufs)
 {
       VdecVdis_bitsRdReadData(&emptyBufList);
       VdecVdis_bitsRdSendFullBitBufs(&emptyBufList);

}

But when I run the decode_display demo, I get the following message time and time again.

[host] RingBuf(377, RingBufferWriterAcquire) - Writer: Acquire already done

I don't understand why. Could someone tell me the reason?

Thanks in advance!

  • In RDK 4.0 the ipcBitsOut buffer is using a RingIo implementation which efficiently uses the bitstream buffer space thereby enabling buffering larger number of frames.

    The changes to use RingIo also requires the ipcBitsOutlink buffers to be allocated per channel and only 1 buffer can be allocated by application at one time.

    So the change you have done is not correct. Use the same code as in demo_vdec_vdis_bits_rd.c

  • There is an app note explaining the changes.

    Getting empty bitbufs, filling data and send full buffer should be sequential for every channel. Each empty buffer request will return only 1 buffer per channel which should be sent back with valid data before requesting for next empty buffer for that particular channel.

    This error related to Ringbuffer will come if more than a empty buffer request was done for a channel (without sending back the previously requested one).

    In your code, all these 3 function calls should be within for loop.

  • Hi Badri,

    Thanks a lot for your explaination! As you said using ring buffers could buffer more frames, but it needs more cycles. So I want to know if this will lead to low efficiency.

    In addition, could you please have a look at the post about time delay in mcfw data process in http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/287996.aspx

    Thanks very much!

  • Hi Sivagamy,

    Thanks for your reply! Do you get the app note in /DVRRDK_04.00.00.03/dvr_rdk/docs/AppNotes folder?

  • Check this -  /DVRRDK_04.00.00.03/dvr_rdk/docs/UserGuides/DM81xx_DVR_RDK_IPC_Bits_Out_Host.pdf

    We have not observed any significant degradataion in performance due to ring buffer implementation and is a concern for the use cases we have tried.