I need to connect 960H camera to A20's TV-IN interface.

960H is PAL-like standart with extenden row width (960 vs 720 in PAL).

If I open /dev/video1 to streaming PAL-signal I see horizontaly  flattened 
frames.

To open /dev/video1 to streaming 960H-signaI made some patches in tvd 
driver:

===================================================================
--- drv_tvd.c   (revision 18970)
+++ drv_tvd.c   (revision 19002)
@@ -773,7 +773,7 @@
        else if(dev->height==576)
             dev->system = 1;//pal

-        if(dev->width==720)
+        if(dev->width >= 720) //#tvv test for 960h
             dev->format = 0; //non mb
         else if(dev->width==704)
             dev->format = 1;//mb
Index: drv_tvd.h
===================================================================
--- drv_tvd.h   (revision 18970)
+++ drv_tvd.h   (revision 19002)
@@ -89,6 +89,14 @@
                .height         = 480,
        },
        {
+               .name           = "planar YUV420",
+               .fourcc         = V4L2_PIX_FMT_NV12,
+               .output_fmt     = TVD_PL_YUV420,
+               .depth          = 12,
+               .width          = 960,
+               .height         = 576,
+       },
+       {
                .name           = "planar YUV420",
                .fourcc         = V4L2_PIX_FMT_NV12,
                .output_fmt     = TVD_PL_YUV420,
Index: bsp_tvd.c
===================================================================
--- bsp_tvd.c   (revision 18970)
+++ bsp_tvd.c   (revision 19002)
@@ -131,7 +131,8 @@
        __u32 reg_val;
        reg_val = REG_RD32(addr_base + 0x134+0x100*id);
        reg_val &= ~(0xfff<<0);
-       reg_val |= ((w>720)?720:w)<<0;
+//     reg_val |= ((w>720)?720:w)<<0;
+       reg_val |= ((w>0xfff)?0xfff:w)<<0;
         REG_WR32(addr_base+0x0134+0x100*id, reg_val);
 }

After that TVD sends me 960x576 pxl frames. But  left part of frame  - is 
flattened frame, right 1/4 is garbage.

There are any ideas to solve this problem?

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to