i.MX6 L3.0.35_4.1.0 IPU VDIC deinterlacing

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

i.MX6 L3.0.35_4.1.0 IPU VDIC deinterlacing

Jump to solution
2,190 Views
宗標廖
Contributor V

Hello Qiang Li

I am now using the mxc_v4l2_tvin.out to test video in on i.MX6QSabreauto with L3.0.35_4.1.0,

I have some question about it, could you help me?

My questions are below.

Q1:

when run the mxc_v4l2_tvin.out with -m parameter, I think the data flow in IPU is

MEM -> VDIC -> IC -> MEM, and when without -m parameter, I think the data flow is

MEM -> IC -> MEM.Could tell me is it right or not?

Q2:

when I run mxc_v4l2_tvin.out -ow 1024 -oh 768 -m <x> &(x is 0 or 1 or 2), and then rum memtool - 32  0x02668004 4

and memtool - 32  0x02a68004 4, I always got value 00000000 for both addr 0x02668004 and 0x02a68004.

but according to the IMX6DQRM page 2939 and page 2958,  0x02668004 and 0x02a68004 are address

for VDI Control Register(IPU1 and IPU2).I donnot understand why I always got 0, could you help me.

Q3:

I think the De-Interlacing algorithm for IPU VDIC is not contained in the BSP code(Because I have not found it),

So could you tell me the processing flow for -m 0, -m 1 and -m 2.What are the differences among them.

Q4:

the app mxc_v4l2_tvin.out has an optional -tb,after tracing the BSP code,I found if using -tb,the bit30 for

VDI Control Register (IPUx_VDI_C)(IMX6DQRM page 3530) will be set to 0,or it will be set to 1.And according

to the RM, 0 for bit30 represents to top field is field 0 and  1 for bit30 represents to top field is field 1,So could you

tell me what do the field0 and field1 here mean.

I am so sorry to trouble you with so many questions.

Best Regards,

ZongbiaoLiao

1 Solution
729 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

For Q1, yes, the de-interlace will only active when parameter "-m" was used.

For Q2, the VDIC module will only be turned on when it is processing the current frame, the VDIC enabled time is just several ms to process one frame, and after that, it will be turned off for power saving. So there is very little chance that when you run the memtool command the VDIC is also working. When VDIC was turned off, all its registers will return 0.

You can modify function ipu_uninit_channel() in file ipu_common.c, mask the followed code for VDIC off, then you can read the VDIC registers with memtool.

if (ipu->vdi_use_count == 0) {

  ipu_conf &= ~IPU_CONF_ISP_EN;

//  ipu_conf &= ~IPU_CONF_VDI_EN;

  ipu_conf &= ~IPU_CONF_IC_INPUT;

}

For Q3, please reference to iMX6 reference mannual: 37.4.11.2.2 Motion Calculator Block (di_mcalc)

The "-m" parameter is VDI_MOT_SEL.

For Q4, for "-m 0" and "-m 1" mode, there will be three field data input to VDIC, so they can be "2 odd fields + 1 even field" or "1 odd field + 2 even fields", the "-tb" parameter was used to tell VDIC this information.

top field is field 0 means there are two odd fields; top field is field 1 means there are two even fields.

View solution in original post

4 Replies
729 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

By the way, please move your discusstion to imxcommunity space and open to every one, thanks!

0 Kudos
730 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

For Q1, yes, the de-interlace will only active when parameter "-m" was used.

For Q2, the VDIC module will only be turned on when it is processing the current frame, the VDIC enabled time is just several ms to process one frame, and after that, it will be turned off for power saving. So there is very little chance that when you run the memtool command the VDIC is also working. When VDIC was turned off, all its registers will return 0.

You can modify function ipu_uninit_channel() in file ipu_common.c, mask the followed code for VDIC off, then you can read the VDIC registers with memtool.

if (ipu->vdi_use_count == 0) {

  ipu_conf &= ~IPU_CONF_ISP_EN;

//  ipu_conf &= ~IPU_CONF_VDI_EN;

  ipu_conf &= ~IPU_CONF_IC_INPUT;

}

For Q3, please reference to iMX6 reference mannual: 37.4.11.2.2 Motion Calculator Block (di_mcalc)

The "-m" parameter is VDI_MOT_SEL.

For Q4, for "-m 0" and "-m 1" mode, there will be three field data input to VDIC, so they can be "2 odd fields + 1 even field" or "1 odd field + 2 even fields", the "-tb" parameter was used to tell VDIC this information.

top field is field 0 means there are two odd fields; top field is field 1 means there are two even fields.

729 Views
宗標廖
Contributor V

Hello Qiang Li

Thank you for your answer!

But I still donnot know the details of processing flow for -m 1, -m 2 and -m 3.

Could you tell me!

Best Regards,

ZongbiaoLiao

0 Kudos
729 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

For -m 0 and -m 1, the VDIC will use three fields data to process, from mxc_v4l2_tvin point of view, it had sent 2 frame (4 fields) to v4l2_output driver, v4l2_ouput driver will buffer one frame, and one field data will be dropped. For -m 2, the VDIC will only use one field data to process, one field data will be dropped..