Application Note: MicroBlaze and Multimedia Development Board

R De-Interlacing Author: Gregg Hawkes XAPP285 (1.0) December 17, 2001

Summary One of the more frequent video conversions needed between various consumer video input devices, , and output devices is interlaced to non-interlaced conversion. This process is sometimes called de-interlacing, scan-line doubling, or progressive scanning. This application note and reference design provides technical details surrounding video de-interlace and how it is implemented in the MicroBlaze™ and Multimedia development board.

Introduction Analog video is sampled, converted to digital data, and de-interlaced by the MicroBlaze and Multimedia development board for further processing. The format for the input from the video decoder (Analog Devices ADV7185) on the development board is described by the standard ITU-R BT.656 and explained in application notes: XAPP248 "Digital Video Test Pattern Generator" and XAPP286 "Video Line Decode". The component video from the Analog Devices decoder in Y'CrCb interlaced format is presented to the FPGA for further processing. An entire picture, or frame, requires two passes of the electron beam across the face of a display. Each of these events is termed one field. Interlaced video draws the odd lines in a frame, the odd field followed by the even field. Historically, this concept allowed the overall bandwidth to be reduced by a factor of two over displays requiring all of the lines to be drawn every frame. Although it results in cheaper displays, PC boards, and digital logic designs, the downside of this method is noticeable and other artifacts. For vertical field and frame detail, as well as horizontal line detail, refer to XAPP248 and XAPP286. For an official copy of the ITU-R BT.656 standard, go to the International Telecommunication Union web site and for a small fee obtain a PDF or DOC describing the specification: http://www.itu.int/itudoc/itu-r/rec/bt/656-4.html There are several methods of accomplishing de-interlace, each with a performance or cost trade off. Four common methods examined here are: field scan-line duplication, field scan-line interpolation, and multiple field processing or field merging, and frame scan-line interpolation. The description of the de-interlacing process that follows is centered on the national standards committee (NTSC), but can be extended to the phase alternating line (PAL) format as well. Design files for frame scan line interpolation (Method 4) are included with implementation results. For NTSC, the MicroBlaze and Multimedia development board builds non-interlaced images assuming the first line of video in the non-interlaced or progressive image comes from the interlaced image line 21 (field 1 or the odd field). The next progressive line comes from the interlaced line 284 (field 2 or the even field), and so on. Figure 1 shows interlaced active video fields combined to form non-interlaced active video images in the development board.

© 2001 Xilinx, Inc. All rights reserved. All Xilinx trademarks, registered trademarks, patents, and disclaimers are as listed at http://www.xilinx.com/legal.htm. All other trademarks and registered trademarks are the property of their respective owners. All specifications are subject to change without notice.

XAPP285 (1.0) December 17, 2001 www.xilinx.com 1 1-800-255-7778 R Video Scan Line De-Interlacing

NTSC line 283, Field 2 NTSC line 21, Field 1 Progressive Line 1 NTSC line 284, Field 2 Progressive Line 2 NTSC line 22, Field 1 Progressive Line 3 NTSC line 285, Field 2 Progressive Line 4 NTSC line 23, Field 1 Progressive Line 5 NTSC line 286, Field 2 Progressive Line 6 NTSC line 24, Field 1 Progressive Line 7

NTSC line 522, Field 2 Progressive Line 478 NTSC line 260, Field 1 Progressive Line 479 NTSC line 523, Field 2 Progressive Line 480 NTSC line 261, Field 1 Progressive Line 481 NTSC line 524, Field 2 Progressive Line 482 NTSC line 262, Field 1 Progressive Line 483 NTSC line 525, Field 2 Progressive Line 484 NTSC line 263, Field 1

485 total active linesSMPTE 170M FIELD 1 and 2 484 total active lines 242 1/2 lines x285_01_120501 Figure 1: Non-Interlaced Image from Interlaced Fields

Method 1 Simple Field Scan-Line Duplication or 2X Vertical Zoom The first method is simple field scan-line duplication (sometimes referred to as 2X vertical zoom). The basic algorithm takes a field in the interlaced picture and forms a non-interlaced picture requiring double the lines. To do this, each scan is simply output twice to the output frame buffer. The destination addresses for the two are exactly 1 line different. With this method, vertical resolution is not doubled, even though the number of scan lines is. This method will exhibit artifacts, such as single pixel width lines will flicker or jitter at the field rate. Figure 2 and Figure 3 show how the frames are composed from the separate fields.

NTSC line 21, Field 1 Progressive Line 1 Progressive Line 2 NTSC line 22, Field 1 Progressive Line 3 Progressive Line 4 NTSC line 23, Field 1 Progressive Line 5 Progressive Line 6 NTSC line 24, Field 1 Progressive Line 7

Progressive Line 478 NTSC line 260, Field 1 Progressive Line 479 Progressive Line 480 NTSC line 261, Field 1 Progressive Line 481 Progressive Line 482 NTSC line 262, Field 1 Progressive Line 483 Progressive Line 484 NTSC line 263, Field 1 484 total active lines SMPTE 170M FIELD 1 242 1/2 lines x285_02_120501 Figure 2: Progressive Image from Duplicating Lines from Field 1

2 www.xilinx.com XAPP285 (1.0) December 17, 2001 1-800-255-7778 Video-Demystified.com video-demystified.com Menu

Tue, Apr 11, 2006 New Fourth Edition! Read about the New Fourth Use this comprehensive, Edition of Video Associations one-volume source to Demystified help you master video Licensing Authorities system design! This practical reference Registration Authorities covers the essentials of analog and digital video: Standards Organizations

Introduction to Video Color Spaces IP Companies Analog Video Formats and IC Companies Interfaces Digital Video Formats and Interfaces Glossary Video Processing NTSC/PAL/SECAM Overview, VBI data NTSC/PAL Books Encoding and Decoding News H.261 and H.263 DV Newsgroups MPEG-1 MPEG-2 On-Line Periodicals MPEG-4 and H.264 ATSC OpenCable Digital Video Demystified Book Television DVB Digital Television ISDB Digital Copyright © 2006. Television IPTV

960 pages, over 400 illustrations. More

http://www.video-demystified.com/ (1 of 2)4/11/2006 3:50:34 PM Video-Demystified.com

Information. Menu "If you're involved with designing or testing video systems or VLSI Tue, Apr 11, 2006 devices, this is a book that demands your attention. Even if you Associations are only thinking about the possibility of having Licensing Authorities to tackle a video- electronics project, keep Registration Authorities this book in mind." Standards Organizations --Test & Measurement World

IP Companies

IC Companies

Glossary

Books

News

Newsgroups

On-Line Periodicals

Video Demystified Book

Copyright © 2006.

http://www.video-demystified.com/ (2 of 2)4/11/2006 3:50:34 PM