bt656 interlaced over csi, video quality

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

bt656 interlaced over csi, video quality

1,068 次查看
arslan
Contributor III

Hi all,

I am having some video quality problems when objects are moving. Here is a short description of the whole case:

What I am doing:

An application (Qt) shows an info screen (using Framebuffer /dev/fb1, the foreground buffer). In the application, I have an area filled with a color (my color key).

A kernel driver gets a video (a PAL-Camera where the PAL signal is converted to bt656 interlaced with a TVP5150AM1 converter chip) over CSI0 and displays it on Framebuffer (/dev/fb0)

All running on IMX6Q

What works:

Everything, I see the application and the video on the place, where I want to have them and all with right colors.

What doesnt work:

When objects move, the objects seem to have stair effects, more precise, it seems as if every second line of the objects are missing. When objects stop moving or they move very slow, everything is fine.

I used V4L2 interface earliar, but I had the same problems. Now I have a small kernel driver, which does everything without the V4L2 infrastructure, the driver is pretty much taken from the files ipu_prp_vf_sdc.c and ipu_prp_vf_sdc_bg.c

Here is how I initialize everything (pseudo code)

ipu_init_channel(ipu,CSI_MEM0,&params) //where params.interlaced=1

ipu_init_channel(ipu,MEM_PRP_VF_MEM,&params2) //where params2.in/out_fmt is IPU_PIX_FMT_UYVY

alloc_needed_buffers()

ipu_init_channel_buffer(ipu, CSI_MEM0,

    IPU_OUTPUT_BUFFER,

    IPU_PIX_FMT_UYVY,

    width, height, width*2,

    IPU_ROTATE_NONE,

    buf1, buf2, 0,0,0);

ipu_init_channel_buffer(ipu, MEM_PRP_VF_MEM,

    IPU_INPUT_BUFFER,

    IPU_PIX_FMT_UYVY,

    width, height, width*2,

    IPU_ROTATE_NONE,

    buf1, buf2,0,0,0);

ipu_init_channel_buffer(ipu,MEM_PRP_VF_MEM,

    IPU_OUTPUT_BUFFER,

    IPU_PIX_FMT_UYVY,

    width, height,

    framebuffer_xresolution * 2,

    IPU_ROTATE_NONE,

    framebuffer_base_addr + offset,

    0,0,0,0)

ipu_irq_request(ipu,IPU_IRQ_BG_SF_END, sfend_callback,....)

ipu_irq_request(ipu, IPU_IRQ_PRP_VF_OUT_EOF, eof_callback...)

ipu_link_channels(ipu, CSI_MEM0, MEM_PRP_VF_MEM);

ipu_enable_channel(ipu, MEM_PRP_VF_MEM);

ipu_enable_channel(ipu, CSI_MEM0);

buffer_num=0;

ipu_select_buffer(ipu, CSI_MEM0, IPU_OUTPUT_BUFFER, 0);

ipu_select_buffer(ipu, CSI_MEM0, IPU_OUTPUT_BUFFER, 1);

ipu_select_buffer(ipu.MEM_PRP_VF_MEM, IPU_OUTPUT_BUFFER, 0);

sfend_callback:

if(buffer_ready)

{

    ipu_select_buffer(ipu, MEM_PRP_VF_MEM, IPU_OUTPUT_BUFFER,0);

    buffer_ready=0;

}

eof_callback:

buffer_num= (buffer_num)?0:1;

ipu_select_buffer(ipu, CSI_MEM0, IPU_OUTPUT_BUFFER,buffer_num)

As I mentioned, everything works fine, when objects don't move.

Any ideas, or anyone who had better results?

thanks

标记 (4)
1 回复

473 次查看
donggyulee
Contributor I

Hi hasan arslan,

Did you solve this problem?

i have same problem.

if you solved it, please let me know.

thank you.

0 项奖励