hi all . i test the usecase vdec_vdis, found that
emptyBufList.numBufs is always 1 after the VdecVdis_bitsRdGetEmptyBitBufs()
so how can i change the value of the emptyBufList.numBufs
tks
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.
hi all . i test the usecase vdec_vdis, found that
emptyBufList.numBufs is always 1 after the VdecVdis_bitsRdGetEmptyBitBufs()
so how can i change the value of the emptyBufList.numBufs
tks
The mechanism of decoder input buffer management is modified in dvr_rdk 4.0 release. For each ch, only one buffer will be returned on every request. Refer ipc bits out app notes present in release package.
hi Sivagamy ,thank you for your answer.i have readed the app note.i want to know whether sometime i can not get empty buffer from the ring buffer? in the vdec_vdis usecase we get 1 empty buffer per channel,then fill the buffer with encode data,then use the function Vdec_putBitstreamBuffer() to free the buffer to the ring buffer pool immediately. so i feel that we can get empty buffer always,but i don't know whether it is like that .
You wont get empty bitstream buffer in 2 scenarios
1. If there is not enough memory left out in ring buffer (all buffers are requested and sent to decoder), but decoder is yet to consume
2. If ring buffer has memory, but the list element structure (determined by numBufs) is exhausted.
So, you should provide enough ring buffer size (according to stream resolutions, stream characteristics) & enough list elements.
tks.
whether the size of the ring buffer is the steam resolutions,for example 1080p stream ,the size will be 1920*1080?
Size of the ring buffer should be decided based on your GOP structure (which tells min inputs to be queued to decoder to get output frames), resolution, max size occupied by a FRAME (key frame). So, this cannot be just 1920*1080 for 1080P stream. Sometimes, it can hold just 2~3 input frames which might not be enough. So, make this total ring buffer big enough to occupy enough frames to have decoder working seamlessly. Refer the demo code.
hi Sivagamy. i don't understand that you say Sometimes, it can hold just 2~3 input frames.that we once send just one frame to decode.so we do not need hold just 2~3 input frames
Decoder might not return input buffer immediately on every decode. Decoder will hold input frames to decode b frames. So, just having only 1 input buffer might not work.