Hi, We make a playback program using mcfw api on DM816x RDK(TI TVP5158 multi-channel video decoder)
And now we make test code from a part of mcfw demo code [VDEC + VDIS]
Our test code flow is Follow
- Initialize Mcfw
- Set Vsys to systemUseCase = VSYS_USECASE_MULTICHN_VDEC_VDIS
- Set Vdec to maxWid = 1920, maxheight=1080, displayDelay=0, numBufPerCh=0, codec=H264
- Set Vdis and swMosaic properly
- Work Process
- Get one frame (always first frame is iFrame) and request Buffer(vdec_requestBitStreamBuffer())
- Memcpy from frame Buffer to pEmptyBuf->bufVirtAddr(requested buffer from decoder)
- Send buffer to decoder(vdec_putBitstreamBuffer())
- Sleep(XX ms)
- Repeat a~d
When we test above code at first without sleep function, we get error message follow..
[m3video] 2629060:DECLINK::links_m3video/iva_dec/decLink_h264.c:[376]::INTERNAL ERROR:-1
[m3video] ALGPROCESS FAILED:STATUS
[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x2000a00
*Error number is not only 0x2000a00 but also 0x1021, 0x1209.
And we add sleep(27 millisecond) function after c (above process entry), error message disappear.. But if we input to sleep function parameter that is 26ms and less, error msg appear again.
So we think that it happened putting frame data or requesting buffer was too fast to handle for decoder.
And we didn’t think frame data was corrupted. Because it work well when add sleep after put BitstreamBuffer process.
Question
- So we really want to know that what is the cause of error message?
- Is it that we call api (request buffer, put buffer) or copy memory to bufVirtAddr middle of internal processing decoding?
- If it is right, how we know whether it’s ok call vdec api or not?
Last Question
l Vdec_requestBitStreamBuffer() , vdec_putBitstreamBuffer() work lick nonblocking function as I know. They always return 0. So return value is useless. How check this function is success?
Thanks
I’ll hope reply