iMX6 VDI 60fps de-interlace improvement example

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

iMX6 VDI 60fps de-interlace improvement example

iMX6 VDI 60fps de-interlace improvement example

It is based on L3.0.35_GA4.1.0 BSP.

 

In default Linux BSP, there are 3 kinds of de-interlace mode, motion =0,1,2 mode, motion mode 0 and 1 will use three fields for de-interlace, and motion mode 2 wil use one field for de-interlace, so the whole fps is 30.

In this mode, for motion mode 0 and 1, field 1,2,3 was used for first VDI output frame of display; and field 3,4,5 was used for second VDI output frame of display; field 5,6,7 was used for third VDI output frame of display. One field data (such as 2,4,6) was used only once, so there is data lost.

 

After applied these patches, the VDI de-interlace output will be 60fps: for motion mode 0 and 1, field 0,1,2 was used for first VDI output frame of display; and field 1,2,3 was used for

second VDI output frame of display; field 2,3,4 was used for third VDI output frame of display. So all field data will be used twice, there is no video data lost, the VDI quality was improved.

 

Kernel patches:

0001-Add-MEM-to-VDI-to-MEM-support-for-IPU.patch

0002-Add-IPU-IC-memcpy-support.patch

0003-IPU-VDI-support-switch-odd-and-even-field-in-motion-.patch

0004-IPU-VDI-correct-vdi-top-field-setting.patch

 

mxc_v4l2_tvin_imx6_vdi_60fps.zip: this is the test application sample code.

 

Test commands, parameter "-vd" means double fps VDI:

./mxc_v4l2_tvin.out -ol 0 -ot 0 -ow 720 -oh 480 -m 0 -vd

 

Attachments
Comments

Hi Qiang,

We are trying to get the VDI working on the imx6. So is this patch an addition to the capture driver patch De-interlace Capture Device ? We tried the original patch but we ran into a couple issues with it. Just wondering will this patch here address them. For example, we saw staircasing effect on straight lines after de-interlacing using the patched driver. Also the IPU seemed to be busy all the time and failed to take other IPU tasks from apps.

Thanks,

Charles

No, it is not related to De-interlace Capture Device, just based on default 3.0.35-GA4.1.0 BSP.

No, the VDI performance is not enough for 4x60 fps.

Is it possible for this version of tvin to display two cameras simultaneously in different locations on the display. I use the commands shown below but it shows both camera streams in the same location (-ot 300 -ol 400) on the display. Using a dual core imx6 with 800x600 lcd.

/unit_tests/IMX6Q/mxc_v4l2_tvin.out -ow 400 -oh 300 -ot 0 -ol 0 -m 2  -x 0 &

/unit_tests/IMX6Q/mxc_v4l2_tvin.out -ow 400 -oh 300 -ot 300 -ol 400 -m 2  -x 1 &

Hello QiangLi

@Qiang Li

I don't understand what you said:

...so the whole fps is 30

.....

After applied these patches, the VDI de-interlace output will be 60fps

According to your description, before applying these patches,the fps of video passed the VDI shoud be (Original_FPS - 1),not half of the original fps, that is, only one frame will be lost .And after applied these patches,the new fps will be greater than the original fps(e.g 60fps).

Because before applying these patches,for motion mode 0 and 1, field 1,2,3 was used for first VDI output frame; and field 3,4,5 was used for second VDI output frame; field 5,6,7 was used for third VDI output frame; field 7,8,9 was used for forth VDI output frame.That is, 4 input frames(8 fields in total) will produce 3 output frames, and 5 input frames(10 fields in total) will produce 4 output frames.

And after applied these patches,for motion mode 0 and 1, field 0,1,2 was used for first VDI output frame; and field 1,2,3 was used for second VDI output frame; field 2,3,4 was used for third VDI output frame;field 3,4,5 was used for forth VDI output frame.According to this logic,3 input frames(6 fields in total) will produce 4 output frames.

Is my understanding right?

Best Regards,

ZongbiaoLiao

This test application used the overlay frame buffer as the target buffer directly, so it can support one camera only. You can reference to this application "iMX6DQ MAX9286 MIPI CSI2 720P camera surround view solution for Linux BSP ", it used G2D ro render camera to framebuffer, it can be used for multiple camera rendering.

Hi Zongbiao, you are wrong. The FPS is the speed, for orinigal BSP, for NTSC input, the capture interrupt will happen 30 times each second, for each interrupt it will capture one frame (2 field), then it will render to display once, so this is 30 fps capture and 30 fps render with de-interlace.

After applied the patch, the capture is still 30 fps, no changes, but the render will be 60 fps with de-interlace.

Hi,QiangLi

Thank you for your reply!

So if the capture is 60fps,after applied the patches, the render will be 120fps with de-interlace,right?

If the input is 60 fps, that is progressive signal, no de-interlace was needed.

If I am using the more current BSP release like 3.14.52-1.1.0, do I still need this patch or is it already integrated in the latest driver?

I told a look and the patch is still needed for 3.14.52.

m_c

Does it support 1920x1080? According to i.MX6 document, size larger than 968x1024, it need processed in stripes (split mode). If not support 1920x1080, where can find sample code for split mode?

this patch is not good.it can't video.

hi  I need IPU patch on linux 3.14.28

It's easy to porting from L3.14.52, please do it  by yourself. Thanks!

No ratings
Version history
Last update:
‎08-16-2015 06:57 PM
Updated by: