Hi, I have met a strange problem when I tried to decode a H.264 bitstream using i.MX51 VPU. My OS is WinCE 6.0, BSP is V1004 and VPU lib is V3.9. I traced the decode operation and found that vpu_DecGetInitialInfo function cause decoder and OS to hang.
1. Open a decoder instance using vpu_DecOpen()
2. To provide the proper amount of bitstream, get the bitstream buffer address using vpu_DecGetBitstreamBuffer()
3. After transferring the decoder input stream, inform the amount of bits transferred into the bitstream buffer using vpu_DecUpdateBitstreamBuffer()
4. Before starting a picture decoder operation, get the crucial parameters for decoder operations such as picture size, frame rate, required frame buffer size using vpu_DecGetInitialInfo()
5. Using the returned frame buffer requirement, allocate the proper size of the frame buffers and convey this data to the i.MX51 VPU using vpu_DecRegisterFrameBuffer()
6. Start a picture decoder operation picture-by-picture using vpu_DecStartOneFrame()
7. Wait for the completion of the picture decoder operation interrupt event
8. Check the results of the decoder operation using vpu_DecGetOutputInfo()
9. After displaying nth frame buffer, clear the buffer display flag using vpu_DecClrDispFlag()
10. If there is more bitstream to decode, go to Step 6, otherwise e go to the next step
11. Terminate the sequence operation by closing the instance using vpu_DecClose()
Since the bitstream is so critical that stream error or lack of available stream may exist which cause decoder to hang.
Can somebody tell me how to avoid decoder hanging after calling vpu_DecGetInitialInfo function?