AnsweredAssumed Answered

Artifacts when encoding rotated JPEG in vpu

Question asked by Emil Myhrman on Aug 24, 2015

Hello,

 

I'm using the Android KitKat imx6 BSP with provided libcamera HAL with the addition to rotate the encoded JPEG image.

This is done in "YuvToJpegEncoder.cpp" by setting, "sEncOpenParamSimp.nRotAngle=rotation" for vpu_wrapper.

 

This works fine for all image sizes except 2592x1944, where I get artifacts on the image border, as can been in image below.

vpu_artifact.jpeg

 

This problem only occurs when the image is rotated 180 or 270 degrees, 0 and 90 looks fine.

 

Have anyone else seen this problem or have any idea on what could be wrong?

 

Update: This can be reproduced with mxc-vpu-test using a YUV image 2592x1944.

mxc-vpu-test -E "-i /data/local/camera_tst.data -f 7 -r $rotate -w 2592 -h 1944 -o /data/local/image.jpeg"

Outcomes