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
Solved! Go to Solution.
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
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