Clarification on VPU Usage on i.MX53 Platform in Linux

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

Clarification on VPU Usage on i.MX53 Platform in Linux

跳至解决方案
2,458 次查看
GuillermoHernan
Contributor III

There is a customer is integrating H.264 decoder for streaming mode. The VPU is able to initialize and start decoding the frames. However after few frames the decoding stops and calls for vpu decoding keep returning the indexFrameDisplay as -3 and indexFrameDecoded as -1.

 

“indexFrameDecoded = -1” means there’s no frame buffer for next picture decoding.

Then, the customer needs to call DecClrDispFlag each time a frame buffer is displayed and check whether you call DecRegisterFrameBuffer with enough frame buffers.

标记 (2)
0 项奖励
回复
1 解答
1,924 次查看
GuillermoHernan
Contributor III

Last question:

have you tested with the Unit Tests and verify they are correct?

we need to trace this, Please log indexFrameDecoded, indexFrameDisplay, decodingSuccess after vpu_DecGetOutputInfo

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,924 次查看
Tarek
Senior Contributor I

I'm facing the same problem for i.MX6 running Linux and streaming live video. I'm always clearing the Frame after display and registering twice the amount of buffers the decoder asked for.

Is there any suggestions to solve this problem?

Thanks

0 项奖励
回复
1,924 次查看
GuillermoHernan
Contributor III

Can you provide your example use case?

0 项奖励
回复
1,924 次查看
Tarek
Senior Contributor I

I'm running BSP12.08 on Nitrogen i.MX6 Board and using Poky distribution Yocto build system.

I'm using FFMPEG for demuxing the steam packets

av_read_frame(fctx,&packet)

if I have a valid packet I will use it as input to the decoder:

if (packet.data != NULL)

InData.nSize=packet.size;

InData.pVirAddr=packet.data;

ret=VPU_DecDecodeBuf(ctx->vpu_dec, &InData,&bufRetCode);

If the decoder returns a frame for display VPU_DEC_OUTPUT_DIS I will get the output Frame and pass it to the IPU task

ret=VPU_DecGetOutputFrame(ctx->vpu_dec,&frameInfo);

disp_buf->pbufY  = frameInfo.pDisplayFrameBuf->pbufY;

ipu_t.input.paddr = disp_buf->pbufY;

ipu_ret = ioctl(fd_ipu, IPU_QUEUE_TASK, &ipu_t);

Then clear the buffer

ret=VPU_DecOutFrameDisplayed(disp_buf->vpu_dec,disp_buf->DisplayFrameBuf);

and loop again.

This is a briefer description of my decoder loop. When I run the program the stream is played perfectly for about 3 minuets then starts to introduce a significant delay then it stops.

The decoder is returning:

VPU_DEC_INPUT_USED,

VPU_DEC_OUTPUT_NODIS,

VPU_DEC_NO_ENOUGH_BUF

And it's happing all the time constancy which is blocking my progress.

Thanks

0 项奖励
回复
1,925 次查看
GuillermoHernan
Contributor III

Last question:

have you tested with the Unit Tests and verify they are correct?

we need to trace this, Please log indexFrameDecoded, indexFrameDisplay, decodingSuccess after vpu_DecGetOutputInfo

0 项奖励
回复