picStreamBufferAddr field of EncParam ignored on iMX6

cancel
Showing results for 
Search instead for 
Did you mean: 

picStreamBufferAddr field of EncParam ignored on iMX6

202 Views
davidboltyanski
Contributor I

Hi

We trying to use buffers queue for vpu encoder. We allocate several frame buffers and try to it to encoder in following way

enc_param.picStreamBufferAddr = output_mem_desc.phy_addr;

enc_param.picStreamBufferSize = output_mem_desc.size;

ret = vpu_EncStartOneFrame(handle, &enc_param);

.

.

.

ret = vpu_EncGetOutputInfo(handle, &outinfo);

But the buffer is not updated.

From following statement in docs

    picStreamBufferAddr is a start address of a picture stream buffer under line-buffer mode and dynamic buffer allocation

I understand that while opening encoder instance i should set ringBufferEnable and dynamicAllocEnable as follows:

encop.ringBufferEnable = 0;
encop.dynamicAllocEnable = 1;

But from the same doc file it appears

     dynamicAllocEnable is not used in i.MX 6Dual/6Quad.

Deos it mean that there is no way to use several output buffers in encoder on  i.MX 6Dual/6Quad, ?

Maybe there is some other set of flags we should set ?

Thanks.

Tags (3)
0 Kudos
1 Reply

20 Views
joanxie
NXP TechSupport
NXP TechSupport

refer to your information, you can use the ring-buffer mode,

When using a ring-buffer scheme with a limited size of encoder stream buffer, stream reading during encoder operation is recommended. Using two dedicated functions, vpu_EncGetBitStreamBuffer() and vpu_EncUpdateBitStreamBuffer(), the application can easily handle the read pointer while accessing the encoder bitstream buffer.

0 Kudos