Escape from decoder hang of VPU API (or prescan usage)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Escape from decoder hang of VPU API (or prescan usage)

1,131 Views
torus1000
Contributor V

Hi all,

Now I'm getting stack at VPU decoder hang then I read VPU API manual;
  i.MX_6_VPU_Application_Programming_Interface_Linux_Reference_Manual.pdf

I have following 2 questions. Can anybody help me?

     >Page85 : 4.4.3 Other Issues
     >To avoid the VPU hanging if there is not enough stream data, enable prescan
     >in networking mode to first scan the stream buffer.
     >This flag can be disabled if the bitstream buffer is large in real video
     >playback and the application can guarantee the bitstream buffer is enough.

(Q1)  Could you figure out which step should I add prescanResult flag checker?
     4.4.2.1 Decode Stream to Display on LCD on p83
     3.3.1.1 Decoder Operation Flow on p41, Figure 4. Decoder Operation Flow on p43

     >Page 81 4.3.4 Escape from Decoder Hang
     >In the middle of picture decoding, decoder hanging is signaled to
     >the application through the decoder buffer empty interrupt if this interrupt is enabled

(Q2) Regard to decoder buffer empty interrupt, when and how did it enable during decoding?
     (see 3.3.1.1 Decoder Operation Flow on p41, Figure 4. Decoder Operation Flow on p43)

Thanks.

Labels (3)
0 Kudos
Reply
4 Replies

865 Views
joanxie
NXP TechSupport
NXP TechSupport

refer to the manual, prescanEnable and prescanMode don't use for mx6

If the application cannot ensure to feed enough data for the stream, the application can use the forced escape option using

vpu_DecSetEscSeqInit().

0 Kudos
Reply

865 Views
torus1000
Contributor V

Dear Guanqiong,

Thank you for reply.

Yes, you are right. I heard prescan replaced to rollback for i.MX6.

But actually I used i.MX53. Is there any sample code to use prescan?

Thanks.

0 Kudos
Reply

865 Views
joanxie
NXP TechSupport
NXP TechSupport

if you use mx53, pls refer to the mx53 vpu api file, I attached it, but let me remind,

For the VC-1 decoder, pre-scan mode is not supported. Do not use prescan mode for MPEG4 decoding or

in file-play mode.

865 Views
torus1000
Contributor V

I was surprising prescanresult was no longer usable. Let me ask 2 more questions.

(Q1) Is there any status flag which represent 'not enough data' to decode next frame?

We want to detect suspending interrupt caused by unexpected errors.

(Q2) We implemented original detect code as following. Do you think our code is effective?

Our code concepts:
- If timeout occured after certain period passed from previous decode finished,
assumed data shortage then force filled next video data to the buffer.

- In case of above filling continuously happend more than 30 times without IRQ,
escape from the decode process.

0 Kudos
Reply