Slow-motion deinterlacing HD video with VDIC

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

Slow-motion deinterlacing HD video with VDIC

3,252 Views
carstenbehling
Contributor I

Hi,

I try to get the following GStreamer pipeline working:

gst-launch-1.0 filesrc location=/vertrezmotion.ts ! tsdemux ! mpegvideoparse ! imxvpudec  ! imxipuvideotransform deinterlace-mode=1 ! imxg2dvideosink

It ends up with the following error:

...

Setting pipeline to PAUSED ...

[INFO]  Product Info: i.MX6Q/D/S

Pipeline is PREROLLING ...

[INFO]  bitstreamMode 1, chromaInterleave 0, mapType 0, tiled2LinearEnable 0

imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x40000000

imx-ipuv3 2800000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x40000000

imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x40000000

imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10

...

'deinterlace-mode=2' is working.

The test video resolution is 1920x1080. Origin of the test video:

http://www.w6rz.net/vertrezmotion.zip

Freescale kernel: 3.10.53,

Plugins: http://www.w6rz.net/vertrezmotion.zip Tag: 9ab6c7cc3c634d464a9f8933dd6657a796b6aafc

I already know that the IPU has to run in split mode for the left and right 960 pixel stripe due to the buffer limitation. The user interface driver (drivers/mxc/ipu_device.c) seems to split

the stripes in two completions.

A discussion of the split mode was already started here:

Regarding input resolution of i.MX6 IPU-VDIC

It seems that the current implementation in linux-3.10.53 doesn't support the deinterlacing of 1920x1080 frames.

a) So how can we fix it?

b) Is there a way to deinterlace the two stripes in parallel on the IPU, or maybe each of them on one of the two IPU's?

c) Or could we only deinterlace one stripe at a time?

Best regards

-Carsten

0 Kudos
Reply
8 Replies

1,927 Views
carstenbehling
Contributor I

I have another scenario that reproduces the bug:

- Linux 3.0.35

- gst-plugins-imx-3.0.7

- Capturing 1080i30 from GS2971

GStreamer pipeline:

# gst-launch mfw_v4lsrc device=/dev/video1 fps-n=60 ! gstperf ! mfw_isink disp

-deinterlace=1

I can pass the deinterlace modode through 'disp-deinterlace' because I patched mfw_isink.

The system hangs thereafter.

Sometimes 'IPU_INT_STAT_10 = 0x40000000"  (AXIR_ERR)' appears on the console and sometimes 'IPU_INT_STAT_10 = 0x00000002"  (SMFC1_FRM_LOST)'

appears on the console.

Could anyone from Freescale please give me some hints?

0 Kudos
Reply

1,927 Views
carstenbehling
Contributor I

This thread also terminated with no exact answer:

Regarding input resolution of i.MX6 IPU-VDIC

0 Kudos
Reply

1,927 Views
carstenbehling
Contributor I

Update:

Obviously, 1080i de-interlacing should have been working for a long time on i.MX53:

1080i de-interlance support for iMX53, based on L2.6.35_11.09.01 BSP -blog archive

0 Kudos
Reply

1,927 Views
carstenbehling
Contributor I

A closer look on the modifications on imx-lib-11.09.01/ipu/mxc_ipu_hl_lib.c from the above mentioned thread shows:

...

/*

         if (ipu_priv_handle->output.task_mode & VDI_IC_MODE) {

             dbg(DBG_ERR, "Not support split mode with deinterlacing!\n");

             ret = -1;

             goto done;

         }

*/  //qiang_debug removed

         if ((ipu_priv_handle->output.task_mode & VDI_IC_MODE) && (ipu_priv_handle->motion_sel != HIGH_MOTION)) {

             dbg(DBG_ERR, "Only high motion was supported by split mode with deinterlacing!\n");

             ret = -1;

             goto done;

         }  //qiang_debug added

...

Only, HIGH_MOTION mode doesn't really help ...

We also need MED_MOTION:

...

typedef enum {

          MED_MOTION = 0,

          LOW_MOTION = 1,

          HIGH_MOTION = 2,

} ipu_motion_sel;

...

i.MX6DQRM:  37.4.11.2.2 Motion Calculator Block (di_mcalc)

• When VDI_MOT_SEL==2'b01, m_calc is 0 (no motion - use weave)

i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 1, 04/2013

Freescale Semiconductor, Inc.

2841Functional Description

• When VDI_MOT_SEL==2'b10, We assume high motion and use min(15,delta_t).

• When VDI_MOT_SEL==2'b00, We assume low motion and use sat([0,15],delta_t-8)

0 Kudos
Reply

1,927 Views
carstenbehling
Contributor I

We already found out that MED_MOTION processing is slower than HIGH_MOTION and it seems that MED_MOTION processing in split-mode 1080i30 is too slow.

Can anyone from Freescale confirm or refute that?

0 Kudos
Reply

1,927 Views
carstenbehling
Contributor I

Update:

This works with warnings:

gst-launch-1.0 filesrc location=/vertrezmotion.ts ! tsdemux ! mpegvideoparse ! imxvpudec  ! videocrop left=0 right=0 top=0 bottom=700 ! imxipuvideotransform deinterlace-mode=1 ! imxg2dvideosink

Warnings:

...

imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x40000000

...

0 Kudos
Reply

1,927 Views
carstenbehling
Contributor I

Update: This works not:

gst-launch-1.0 filesrc location=/vertrezmotion.ts ! tsdemux ! mpegvideoparse ! imxvpudec  ! videocrop left=476 right=476 top=0 bottom=56 ! imxipuvideotransform deinterlace-mode=1 ! imxg2dvideosin

This would be a frame of 968x1024.

0 Kudos
Reply

1,927 Views
carstenbehling
Contributor I

Update:

IPU_INT_STAT_10 = 0x40000000 means 'AXI_ERR' according ti the i.MX6DQ RM 'Table 37-36. Error Interrupts Summary'

0 Kudos
Reply