Imx6q Ipu camera NV12 format selection leads to corruption

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

Imx6q Ipu camera NV12 format selection leads to corruption

2,659 Views
Ananth
Contributor III

Hi All,

We are working with android, In that for encoding purpose NV12 format image is needed from the camera driver. We are facing problems in getting NV12 image from kernel, when image dimension is 1080p and above resolutions from the kernel 3.14.38. But we are able to get perfect image in YUV422 formats in all image dimensions and perfect images in NV12 below 1080p resolutions from driver.

Attached video for corruption reference.

Is there any Ipu color conversion part of code problem with kernel 3.14.38 in NV12 on 1080p and above dimension ?

Camera configuration : 8MP ov8825 mipi camera

Pipeline used in camera driver : CSI -> MEM

Additional information:

With 3.10.53 version of kernel, in that we are able to get perfect NV12, YUYV images from the camera at all dimensions.

With 3.14.38 version of kernel, we are facing problems with NV12 format of image selection from Ipu at 1080p and above resolutions, We are getting corrupted frames from camera driver. With YUV422 we are getting good images from camera driver.

Thanks and regards,

Ananth.

Labels (2)
0 Kudos
5 Replies

2,122 Views
EdWhite
NXP Employee
NXP Employee

Hi Ananth,

Can you answer a few questions:

- What processor and SW version are you using?

- Are you running this test on the Freescale reference design?  (i.e. SABRE) or some other hardware?

- what is the SW you are using for the conversion?  Is this the camera Hal?  V2 or V3?

- Do resolutions below 1080P work perfectly?

Thank you,

0 Kudos

2,122 Views
Ananth
Contributor III

Hi Edwhite,

Reg : What processor and SW version are you using

    Imx6 dual core processor and Lollipop version of Android ( Linux version 3.14.38).

Reg : Are you running this test on the Freescale reference design?  (i.e. SABRE) or some other hardware?

    No, With custom design board (iMX6 Development board | i.MX6 Development Kit | Ankaa )

Reg : what is the SW you are using for the conversion?  Is this the camera Hal?  V2 or V3?

   Camera Ipu unit is used for conversion, From camera UYVY will be received and In the Camera Driver UYVY will be converted to NV12 (Set via S_FMT ioctl). The end NV12 buffers will be received to end application. We are using V2 version of Camera Hal. We are not performing Image conversion process in software of Camera HAL.

Reg : Do resolutions below 1080P work perfectly ?

   Yes, We tested below resolutions. We are able to get image correctly.

Thanks and regards,

Ananth.

0 Kudos

2,122 Views
Ananth
Contributor III

Hi Edwhite,

We are able to re-create the corruption problem using the unit_test application available in external/linux-test/test/mxc_v4l2_test/mxc_v4l2_tvin.c. We have slightly modified the application to stream it at NV12 at the display at 1080p resolution.

Please find the original application and diff information in the following dropbox link

Dropbox - Sample_application

Command-line parameters used to run the application

./mxc-v4l2-tvin -ow 1920 -oh 1080 -ot 0 -ol 0 -cm 7 -ocw 1920 -och 1080 -f NV12

Thanks and regards,

Ananth.

0 Kudos

2,122 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Can you share the driver and modification you performed to the kernel.

/Alejandro

0 Kudos

2,122 Views
Ananth
Contributor III

Hi All,

Adding to the previous said information:

From Camera sensor ov8825, we are able to get perfect non-corrupted images at all the dimension at YUV422. When we use color converter block in ipu to convert YUV422 to NV12. We are facing corruption of images problem in 1080p and above dimensions on  kernel 3.14.38.

With same Camera sensor settings with 3.10.53 kernel, we are able to do color conversion from YUV422 to NV12 at all dimension from the ipu block.

Is there any patch needed in the kernel 3.14.38 kernel to overcome the corruption problem ?

Thanks and regards,

Ananth.

0 Kudos