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.
Solved! Go to Solution.
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
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
Can you provide your example use case?
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
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