VPU vpu_EncStartOneFrame error

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

VPU vpu_EncStartOneFrame error

Jump to solution
712 Views
adc1
Contributor IV

Hi,

I'm a newbie with VPU enconding and I'm trying to encode a YUV422 buffer to MJPEG. I've read freescale documentation (VPU Application Programming Interface Linux Reference Manual) and I found some hints from https://github.com/boundarydevices/imx-utils/blob/master/imx_mjpeg_encoder.cpp. Now, I'm trying it with a ov5640 mipi camera but my application fails calling vpu_EncStartOneFrame with a "Floating point exception" error. I don't know how to debug it, the fbuffer used in structure EncParam seems to be ok.

Could someone give me some help? What could spawn this error?

thank you for the attention,

best regards

Andrea

Labels (1)
Tags (2)
0 Kudos
1 Solution
529 Views
adc1
Contributor IV

I reply by myself,

delving vpu source code, I found out that on structure EncMjpgParam mjpg_hufTable and mjpg_qMatTable shouldn't be used on mx6 platform but in their place huffVal, huffBits, qMatTab and cInfoTab must be initialized. The "Floating point exception" error were caused by a division by zero with uninitialized qMatTab matrix elements in function JpgEncLoadQMatTab (vpu_util.c).

regards

Andrea

View solution in original post

0 Kudos
1 Reply
530 Views
adc1
Contributor IV

I reply by myself,

delving vpu source code, I found out that on structure EncMjpgParam mjpg_hufTable and mjpg_qMatTable shouldn't be used on mx6 platform but in their place huffVal, huffBits, qMatTab and cInfoTab must be initialized. The "Floating point exception" error were caused by a division by zero with uninitialized qMatTab matrix elements in function JpgEncLoadQMatTab (vpu_util.c).

regards

Andrea

0 Kudos