This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Deinterlace on AM3505

Other Parts Discussed in Thread: TVP5150AM1, AM3505, TVP5146, AM3517

Hi ,

In our design we have used TVP5150AM1 for Analog video capture and  AM3505 as the host processor .

We have configured for ITU 656 video capture .

We have built the application for video capture and display using your sample applications in PSP 3.0.1.6.

In the displayed  picture , we are observing a distorted picture when there is rapid motion in video . ie when a text is scrolling from right to left or when a sports video is being watched .

I feel it is because the deinterlacing algorithm used in saUserptrDisplay is not sufficient to handle these kind of motion videos .

Please suggest an  algorithm or way out to get a proper video on the display using NEON instructions .

regards

Sairam.S

  • Hi Sairam,

    First of all, PSP 3.0.1.6 is pretty old now (almost like 2 years back), as I remember, the code has been tested with another analog video decoder TVP5146 available on EVM, without any issues.

    Second, deinterlacing doesn't happen in application, it is managed in driver using VPFE hardware (and interrupts), and I don't recall any issues, especially with AM3505/AM3517 interfacing.

    You have to debug this yourself, I can provide you some pointers and help you wherever required,

    - Is your FPS still intact? Can you conform whether you are getting correct FPS?

    - Can you profile your Interrupts? i mean, interval between each interrupts? Probably check whether your interrupt sequence is correct or not?

    - I believe your hw is correct, and I also don't suspect since signals won't get locked unless. But still worth to check, your pixel clock and hs/vs signals for its accuracy.

    FYI, refer to the file drivers/media/video/davinci/vpfe_capture.c file and funtion "vpfe_isr" for understanding dinterlacing handling.

    Thanks,

    Vaibhav

  • Hi Vaibhav , 

    Thank you for reply . 

    We are using PSP 3.0.1.6 as we started the project with that and modified the kernel source as per our board requirements.

    We are displaying the video captured on  LCD Monitors . 

    As i understand , the VPFE module / isr captures even or odd field of each frame  and stores in memory . The saUserPtr application reads the data through ioctl calls of this device video0 and displays them in the same field order using video1/2 device .

    we are able to receive 25 fields and able to display the same . 

    As we are trying to display the interlaced video on progressive display's like LCD monitors ,we would like to understand how do we achieve 50FPS for smooth picture display on LCD monitors ?

    Our hardware is intact as motionless video is getting displayed properly on LCD , but motion enabled videos like NEWS scrolling / Sports videos are showing jerk in the pciture displayed.

    Please let us know is our understanding correct and give us a solution to achieve smooth picture in case of motion videos  . 

    Thanks in advance 

    regards

    Sairam.S

  • Certainly your understanding is wrong,

    As i understand , the VPFE module / isr captures even or odd field of each frame  and stores in memory . The saUserPtr application reads the data through ioctl calls of this device video0 and displays them in the same field order using video1/2 device .

    [Vaibhav] VPFE module captures both the fields and stores it in memory (single memory), what this means is, when DQBUF comes out, you have full frame available (both odd/even). Please refer to the function "vpfe_isr" to understand how this is being done in driver. Also please read the description about VPFE register "CCDC_SDOFST".

    Display driver doesn't know and doesn't understand whether this is one field or frame.

    we are able to receive 25 fields and able to display the same . 

    [Vaibhav] Great, this means frames are not dropping. What is the standard your using for LCD monitor? Is it PAL or NTSC? This may drive/control your FPS.

    As we are trying to display the interlaced video on progressive display's like LCD monitors ,we would like to understand how do we achieve 50FPS for smooth picture display on LCD monitors ?

    [Vaibhav] How LCD have your interfaced LCD monitor? Is it using CVBS or S-Video connector? OR DVI/HDMI?

    Thanks,

    Vaibhav

  • Hi Vaibhav ,

    Thank you for the reply .

    Our board has VGA output through Analog devices DAC .  We are not using CVBS or HDMI for output  .

    We have configured the Display controller  with 1024x768 resolution and 60Hz refresh rate .

    We are connecting a television output to TVP5150AM1 which is decoding and AM35X is able to show the picture on VGA screen  .

    For example when we are watching a news channel on Monitor , we observe that text scrolling at the bottom of channel is not very smooth . Text loses clarity.

    For rapid motion videos like cricket match, we observe some shadow lines on cricket ball moving and on person running around .

    regards

    Sairam.S

  • Sairam,

    My Question was, how is your DAC interfaced to AM3505?

    Let me explain,

    AM3505 has support for 2 video outputs, 24 bit RGB output (called LCD out) and TV out (in built DAC), now since you have external DAC being used here on your board, I believe it must be connected to 24 bit output.

    I think it is clear now to me.

    Can we isolate the problem here, Can you dump the camera output to the file and try to see the quality in any yuv player? This will clearly tell us, where is the issue and where we need to debug further.

    Thanks,

    Vaibhav

  • Hi vaibhav,

    Thank you for your support .

    Your are right . We are using 24bit RGB output connected to a a VGA DAC.

    I have taken the dump of the video . Attached are the yuv file when captured with a standard stream. 1738.Desktop.rar

    The evenfield file is a standard video stream generated from a pattern generator. The movement of the bock below is supposed to be smooth. Bit in the captured output it is jumpy. This is the same problem we observe when news channel text scrolling is observed and cricket matches are being watched on VGA monitor. 

    The evenfield1 file is a tv channel stream .

    Please let me know now what can be done to achieve a smooth picture .

    Thank you once again .Will wait for your feedback .

    regards,

    Sairam.S