Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

VIP handling of Interlaced video

I am struggling with the processing of interlaced NTSC video using the VIP 9.0 cores, and hope someone here can give me some advice.

My project needs to take two NTSC interlaced inputs from ADV7180 decoders, do some processing, and then send the output to a single ADV7171 encoder. I am using an alpha mixer on the output stage of my chain of VIP components, and while I can send a test pattern such as color bars (generated with the VIP test pattern component) through the alpha mixer, none of my interlaced source video comes through.

The test pattern is setup to generate interlaced 4:4:4 output, and I am sending the NTSC data to the mixer in that format too. I am starting to suspect issues with interlaced video in general with the mixer. Maybe someone can shed some light on it for me.

I have another project that works fine doign the same thing, with the difference being that I deinterlace the NTSC input video, and output to a progressive display. That works. In this case I need to output interlaced video though, and as there is no VIP "Interlacer" component, it seems that I have to keep the data in interlaced form throughout my VIP flow.

The current VIP chain looks something like this:

For both NTSC inputs:

CVI (8-bit)->CPR (16-bit)->Clipper (to 243 lines)->CRS (to 4:4:4)->Frame Buffer

Each of the two frame buffers, along with a test pattern generator, connect to an Alpha Blending Mixer component. The test pattern generator is set to produce color bars, interlaced, in 4:4:4 format.

The chain from the Alpha Blending Mixer to the output looks like this:

Mixer->CRS (back to 4:2:2)->Frame Buffer->CPR (8-bit)->CVO

The only thing I can get to come through is the background layer - the color bars.

Any advice is appreciated!

Jim

15 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Ok, good catch. There is no documentation on it, but I found a patch installer buried in the folder. Installing it over my Quartus II now. Will let you know if that helps matters....

    Jim
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi all!

    Did anyone get the new Interlacer from Altera? Does it work?

    Jake, what is the downside of just dropping every other line to interlace?

    Thank you!

    Thiago
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It's not necessarily a downside, it just depends on what type of interlacing you want to perform. Dropping every other line is more true to the way classic systems interlaced the video. Remember interlacing was created because video capture and display devices were not fast enough to perform at 60 progressive frames per second.

    The other alternative is to actually de-weave the data which requires a frame buffer. In this case you read out every other line, then go back and read the unread lines from the same frame. Interlacing using this method has some benefits. Primarily, if it is de-interlaced at the receiver using a weave algorithm, you get the original image back exactly. Also, it means that your progressive frame rate (ahead of the interlacer) does not have to be 2X the output frame rate. This can put less pressure on components ahead of the interlacer.

    Jake
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    interlacing was created a lot earlier than video capture devices. ;)

    i think it was created to compromise between flicker and bandwidth.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I was referring to cameras. A camera is a video capture device.

    Early equipment could not transmit 60 frames per second. However, they could have chosen to transmit 30 frames per second rather than 60 fields per second and still used the same amount of bandwidth. With interlaced video, each line still only updates 30 times per second but your brain gets new video data 60 times per second. This results in a better perception of motion by the viewer. You gain better resolution in the time domain but sacrifice resolution in the image quality.

    For instance, supposing you are watching NASCAR and the cars are running at 180mph (290kph) which translates to 264 feet per second (80 meters per second). So if you were watching progressive video at 30fps, you would see the car move 8.8 feet (2.7 meters) between each frame. With interlaced video at 60 fields per second, you see the car move 4.4 feet (1.35 meters) between fields. The motion appears smoother and less jerky. The tradeoff however is the quality of the image degrades because you're only getting half the picture each time. However, your brain tends to notice motion problems more than quality problems.

    Jake