picStreamBufferAddr field of EncParam ignored on iMX6

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

picStreamBufferAddr field of EncParam ignored on iMX6

583 次查看
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.

标记 (3)
0 项奖励
1 回复

401 次查看
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 项奖励