Switching CSI into Progressive bt.656 Mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Switching CSI into Progressive bt.656 Mode

ソリューションへジャンプ
8,271件の閲覧回数
StevieRG
Contributor II

We have a composite video decoder chip (TW9912) that can produce either Interlaced or Progressive bt.656 video, fed into CSI0.

In our application we do this:

   fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;

   ioctl(Fd_v4l_camera, VIDIOC_S_FMT, &fmt)

... and this works great when the video chip is in Interlaced mode; there's a reasonable but interlaced picture.

Now if we change the video chip to Progressive mode and also do this:

   fmt.fmt.pix.field = V4L2_FIELD_NONE; // according to V4L2, this means Progressive

   ioctl(Fd_v4l_camera, VIDIOC_S_FMT, &fmt)

... this gives no picture at all, though we can see data entering the CSI port from the video chip. This is the only change we made to our app. The drivers give no error, and if we read back the fmt using VIDIOC_G_FMT we see the correct value for fmt.fmt.pix.field (it is value 1).

Could someone please advise what we must do to configure the iMX to interface with a Progressive bt.656 signal.

Many thanks

ラベル(2)
0 件の賞賛
1 解決策
3,297件の閲覧回数
zhhpudk
Contributor I

You can try this:

change

csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;

for

csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;(mxc_v4l2_capture.c  mxc_v4l2_s_param)

元の投稿で解決策を見る

0 件の賞賛
14 返答(返信)
3,297件の閲覧回数
zhanxiaozhang
Contributor III

Hi,now I also work on tw9912 ,can you send me your driver file to me ,thanks !

0 件の賞賛
3,297件の閲覧回数
强王
Contributor IV

HI Zhang:

          can you give me tw9912.c driver ?

0 件の賞賛
3,297件の閲覧回数
强王
Contributor IV

我已经调好了,需要的朋友可以留言给我

0 件の賞賛
3,297件の閲覧回数
zky141225
Contributor II

你好  ,我现在图像已经调试出来了,使用ADV7280M-mipi接口+imx6q     图像通过cpu的编解码会出现锯齿的现象,晃动会有残影!   望能指教~  感激不尽

0 件の賞賛
3,297件の閲覧回数
paulhottell
Contributor I

Hello,

I have also been working with the tw9912 decoder chip. I am curious if I can get the driver source code as well.

Kind Regards,

Paul Hottell

0 件の賞賛
3,297件の閲覧回数
ff
Contributor II

hi Paul Hottell

you can write your own tw9912.c according adv7180.c in  \kernel\linux-2.6.35\drivers\media\video\mxc\capture

it is not as difficult as you think。

you can communite to your chip supporter to get the register table

0 件の賞賛
3,298件の閲覧回数
zhhpudk
Contributor I

You can try this:

change

csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;

for

csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;(mxc_v4l2_capture.c  mxc_v4l2_s_param)

0 件の賞賛
3,297件の閲覧回数
StevieRG
Contributor II

Thanks for the good advice to mod mxc_v4l2_capture.

We now have an excellent progressive picture from an interlaced composite source - this gets around the deinterlacer of the iMX only being on the 'back end'. The only thing is we find we are getting 50 full *frames* reported per second from a PAL source, we expect 25.

Our camera thread is like most others where it just blocks to dequeue a camera buffer, and we see 50 of these per second. As a temp workaround we discard alternate buffer events to bring it back to 25, but I guess there is a nicer way.

When we were originally using interlaced input, we had 25 FPS, the only change made was the simple change that was recommended for getting progressive mode, and now it's 50.

Maybe someone knows of something else we need to change to get progressive back down to 25 FPS? Many thanks.

0 件の賞賛
3,297件の閲覧回数
herveschmitt
Contributor II

Hi Steve,

Could you tell us on which kind of i.MX processor and which SW version you succeeded in using 576p video decoded by the TW9912 ?

We are facing the same kind of problem on i.MX6Dual with Linux 3.0.35_4.0.0 decoded by an ADV7280 chip (which seems a competitor of the TW9912 as it can also convert PAL or NTSC interlaced flow to progressive at 50 fps for PAL or 60 fps for NTSC on BT656).

If anybody else succeeded in reading PAL progressive video on BT656 on i.MX6, we would be interested as we didn't succeed (yet) and we wonder if anybody already did it on i.MX6.

Regards,

Hervé.

0 件の賞賛
3,297件の閲覧回数
zhanxiaozhang
Contributor III

reading PAL progressive video on BT656 on i.MX6,but the video sometimes rolling every 10s,so we change to imx6 do deinterlace

0 件の賞賛
3,297件の閲覧回数
herveschmitt
Contributor II

Hi Zhanxiaozhang,

So you have first used an external chip (TW9912) to deinterlace on i.MX6, and - as you were not satisfied by the resulting quality (rolling every 10s) - you changed the deinterlacing principle by making it done by the i.MX6 internal VDIC. If this is what really happened, I'm quite worried because we've done the same tests the other side:

Could you just answer the following questions to help us (and other people reading this post):

  • Which version of i.MX6 did you use (Solo, Dual, Quad - we use the Dual version) ?
  • Which version of Linux (we use 3.0.35_4.0.0) ?
  • Do you confirm the only change you made was modifying IPU_CSI_CLK_MODE_CCIR656_INTERLACED to IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE in mxc_v4l2_capture.c ? If other changes were required, could you please describe them ?
  • Could you please describe more precisely what's wrong in the video you read using this progressive BT656 ? Is it OK during 10s followed by 10s of "rolling" repeated infinitely ?

Thanks a lot for your help.

Regards,

Hervé.

0 件の賞賛
3,297件の閲覧回数
zhanxiaozhang
Contributor III
  • Which version of i.MX6 did you use (Solo, Dual, Quad - we use the Dual version) ? -----------solo
  • Which version of Linux (we use 3.0.35_4.0.0) ? -----3.0.35 ——4.0.0
  • Do you confirm the only change you made was modifying IPU_CSI_CLK_MODE_CCIR656_INTERLACED to IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE in mxc_v4l2_capture.c ? If other changes were required, could you please describe them ?-----------------set to IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE ,there is two picture(up and down)
  • Could you please describe more precisely what's wrong in the video you read using this progressive BT656 ? Is it OK during 10s followed by 10s of "rolling" repeated infinitely ?

       ------------it rolling infitely (per 10s)

0 件の賞賛
3,297件の閲覧回数
ff
Contributor II

hi Steve Green

recently  i am working on tw9912,but my Manufacture did not  give me any inux driver,so  it is very difficult for me to write the code without a reference,can u share your code ?

thanks

0 件の賞賛
3,297件の閲覧回数
zhanxiaozhang
Contributor III

did u get source driver code?if do ,can you share it with me?

0 件の賞賛