Video Fundamentals: Signal Processing For Digital TV
Video Fundamentals: Signal Processing For Digital TV
Video Fundamentals: Signal Processing For Digital TV
Tonights Presentation
Digital Television architecture and functionality NTSC Background (with a touch of PAL and SECAM) Major video processing building blocks Application examples
2
2004 National Semiconductor Corporation
TV/Monitor
Digital monitor with video function 15 XGA LCD Monitor/TV HD-Ready TV / EDTV / SDTV / 100 Hz TV digital displays often include monitor as additional function Integrated HDTV (USA); iDTV [Integrated Digital TV] (Europe); BS Digital (Japan) Internet connectivity, built-in hard-drive (PVR), interactivity etc
MPEG TV
Smart (IP) TV
3
2004 National Semiconductor Corporation
Digital Television
Smart TV
iPTV
MPEG TV
HDTV
TV/Monitor
SDTV/EDTV/HDTV-READY
+ 3D Decoder
+ 3D Deinterlacer + Dual Scalers + Intelligent Color mgmt + FRC Display Processor 2D Deinterlacer Scaling Color Mgmt OSD
4
2004 National Semiconductor Corporation
Monitor/TV
The tuner extracts one TV channel at a time from many, then downconverts and demodulates the signal to baseband The video (or color) decoder separates the colors from the composite (CVBS) signal The deinterlacer and scaler converts the format of the picture to match that of the display type (optional for CRT TVs) The display electronics converts the signal format to match that of the display type: e.g. analog for CRT, LVDS for LCD panel
5
2004 National Semiconductor Corporation
System I/F
CVBS
VBI/CC Teletext
Y/C
YUV
3D Decoder
OSD
3D Decoder S E L E C T O R
3D Deinterlacer & NR
Display I/F
Scaler
Blending & Color Mgt. Output Format
RGB/YUV TTL LVDS Analog
ADC/Sync
RGB (VGA)
DVI-HDCP
3D Deinterlacer & NR
Scaler
6
2004 National Semiconductor Corporation
System Interfaces
RF NTSC RF ATSC Baseband analog NTSC
Composite (CVBS) S-Video (Y/C) Component (YUV)
Analog HD component (YPbPr) Analog PC graphics (VGA) Digital PC graphics (DVI-HDCP) Digital HD
DVI-HDCP [High Definition Content Protection] from PC space used by STBs and current generation of HD-Ready TV HDMI - New CE version of DVI adds audio, video formats, control functions
7
2004 National Semiconductor Corporation
Developed by the HDMI Working Group 1.0 specification released Dec. 2002
8
2004 National Semiconductor Corporation
11
2004 National Semiconductor Corporation
NTSC Fundamentals
Approved in US by FCC in 1953 as color system compatible with existing 525 line, 60 fields/sec, 2:1 interlace monochrome system Color added to existing luminance structure by interleaving luma and chroma in frequency domain Basic properties
525 lines/frame 2:1 interlace 2 fields/frame with 262.5 lines/field Field rate 59.94 Hz Line frequency (fh) = 15.734 KHz Chroma subcarrier frequency (fsc) = 3.58MHz = 227.5 fh = 119437.5 fv
chosen so that consecutive lines and frames have opposite (180o) phase
Luma: Y = 0.299R + 0.587 G + 0.114 B, where R, G, B are gamma-corrected R, G, B Chroma: I (In-phase) and Q (Quadrature) used instead of color difference signals U, V Composite = Y + Q sin(wt) + I cos(wt) + sync + blanking + color burst, where w = 2 pi fsc
12
2004 National Semiconductor Corporation
Video Signal
Audio Signal
4.5 MHz
In the NTSC monochrome system the luminance signal is AM/VSB (Amplitude Modulation/Vestigial Sideband) modulated onto the video carrier The sound signal is FM modulated onto the Audio Sub-Carrier located 4.5 MHz from the video carrier
13
2004 National Semiconductor Corporation
Detail
14
2004 National Semiconductor Corporation
Color in Video
In PC space, R+G+B signals generate color images
Nearest value to the original 4.500 MHz was 4.5045 MHz, too large a difference for backward compatibility
Reducing field rate from 60 to 59.94 Hz, allowed integer value of 4.49999 MHz possible for audio subcarrier
The Result
Chroma Components Luma Components
Low-Level Mixing
The chroma components can be mostly separated from the luma with a comb filter Note the mixing of lower-level luma and chroma components, resulting in residual cross-luma and cross-color artifacts
18
2004 National Semiconductor Corporation
Gamma correction applied to adjust for CRT non-linearity of Component color signals (R', G' and B') are converted to luma and chroma-difference signals with a matrix circuit: Cb and Cr are lowpass filtered, then quadrature modulated (QAM) onto the chroma sub-carrier Signal Amplitude represents the color saturation of video Phase represents the hue Chroma levels chosen such that peak level of composite signal does not exceed 100 IRE with 75% color bars
R G B Gamma Correction R' G' Matrix B' Cr Y Cb LP Filter Composite
Sub-carrier Generator
19
2004 National Semiconductor Corporation
The NTSC Color Video signal (EIA 75% color bar signal)
=R+B+G =R+G =B+G =G =R+B =R =B =0
21
2004 National Semiconductor Corporation
White level
Phase=61 Phase=103
80
60
Phase=347
40
Color burst Phase=0 Phase=167
20 IRE 0 Magenta
Phase=283
White
Cyan
9 cycles
- 40
Backporch
Blanking Interval Visible Line Interval
Red
Blue
-20
Yellow
PAL Fundamentals
European standard with many flavors - broadcasting begun in 1967 in Germany and UK. Similar in concept to NTSC, except that line and field timings are different, and the phase of the V (chroma) component is reversed every line to allow color phase errors to be averaged out Basic properties (except for PAL-M which has NTSC like rates)
625 lines/frame 2:1 interlace 2 fields/frame with 312.5 lines/field Field rate 50 Hz Line frequency (fh) = 15.625 KHz Chroma subcarrier frequency (fsc) = 4.43MHz = (1135/4 + 1/625) fh
Luma: Y = 0.299R + 0.587 G + 0.114 B, where R, G, B are gamma-corrected R, G, B Chroma: Usual color difference signals U, V Composite = Y + U sin(wt) +/- V cos(wt) + sync + blanking + color burst, where w = 2 pi fsc
U = 0.492 (B-Y), V = 0.877 (R-Y)
consecutive lines and frames have 90o phase shift, so 2 lines or 2 frames required for opposite phase
23
SECAM Fundamentals
Developed in France - broadcasting begun in 1967 Basic timing is identical to PAL but chroma is handled differently from NTSC/PAL Basic properties
Only one chroma component per line FM modulation is used to transmit chroma
625 lines/frame 2:1 interlace 2 fields/frame with 312.5 lines/field Field rate 50 Hz Line frequency (fh) = 15.625 KHz Luma: Y = 0.299R + 0.587 G + 0.114 B, where R, G, B are gamma-corrected R, G, B Chroma: Scaled color difference signals U, V
Db = 1.505 (B-Y), Dr = -1.902 (R-Y) only one chroma component per line, alternating between Dr, Db separate subcarriers for Dr, Db
24
2004 National Semiconductor Corporation
Luminance (Y) and Chrominance (R-Y, B-Y), sync, blanking, and color reference information all combined into one composite signal
25
2004 National Semiconductor Corporation
Luma/Chroma Separation
Many approaches trading off complexity, cost and performance
Basic approaches (historical)
Low pass luma / high pass chroma Notch luma / bandpass chroma 2D passive line comb filter 2D adaptive line comb filter 3D (spatio-temporal) comb filter
Decoding artifacts
Good decoding requires some black magic (art) because luma and chroma spectrums overlap in real motion video
26
2004 National Semiconductor Corporation
S-Video Signals
S-Video was developed in conjunction with the S-VHS VCR standard, where the luma and chroma signals are kept separate after initial Y/C separation Keeping the signals separate, i.e. never adding the luma and chroma back together, eliminates the NTSC artifacts Since video sources are generally composite (NTSC), the full benefit is not realized Keeping the signals separate after playback with the VCR does help, especially because of the timing jitter
27
2004 National Semiconductor Corporation
Low cost TVs use a bandpass filter, resulting in incomplete separation and bad cross luma and chroma artifacts Non-adaptive comb filters introduce problems at edges
The luma signal (Y) may be derived by subtracting the chroma from the composite signal
Only works well if the chroma was separated well Low cost TVs use a bandstop filter to eliminate the
chroma, resulting in poor luma bandwidth
29
2004 National Semiconductor Corporation
NTSC Color Video signal after Y/C Separation (EIA 75% color bar signal)
700mV
White level
0.961V
0.507V
0.339V
-300mV Sync level
Luma
Chroma
30
2004 National Semiconductor Corporation
The NTSC Color Video signal after chroma demodulation (EIA 75% color bar signal)
Cb
Cr
31
2004 National Semiconductor Corporation
Chroma Demodulation
The Cb and Cr color difference signals are recovered by coherent demodulation of the QAM chroma signal
An absolute phase reference is provided to facilitate the process A color burst - 9 cycles of unmodulated color sub-carrier is added between the horizontal sync pulses and the start of the active video (the backporch)
32
2004 National Semiconductor Corporation
33
2004 National Semiconductor Corporation
34
2004 National Semiconductor Corporation
RF/Transmission:
Terrestrial:
Cable:
35
2004 National Semiconductor Corporation
HDTV/DTV Overview
ATSC Formats
Vertical Horizontal Aspect Ratio Picture Rate 1080 1920 16:9 60I, 30P, 24P HDTV 720 1280 16:9 60P, 30P, 24P 480 704 16:9 & 4:3 60P, 60I, 30P, 24P SDTV 480 640 4:3 60P, 60I, 30P, 24P
18 formats: 6 HD, 12 SD 720 vertical lines and above considered High Definition Choice of supported formats left voluntary due to disagreement between broadcasters and computer industry Computer industry led by Microsoft wanted exclusion of interlace and initially use of only those formats which leave bandwidth for data services - HD0 subset Different picture rates depending on motion content of application 24 frames/sec for film 30 frames/sec for news and live coverage 60 fields/sec, 60 frames/sec for sports and other fast action content 1920 x 1080 @ 60 frames/sec not included because it requires ~100:1 compression to fit in 19.3 Mb/s terrestrial channel, which cannot be done at high quality with MPEG2
36
2004 National Semiconductor Corporation
HDTV/DTV Overview
Picture Layer
996 Mb/s
1920 x 1080 @60I
Compression Layer
Data Headers
Chroma and Luma DCT Coefficients Variable Length Codes Packet Headers
Motion Vectors
Transport Layer
Video packet
Audio packet
Video packet
MPEG-2 packets
Transmission Layer
19.3 Mb/s
6 MHz
8-VSB
37
Source:Sarnoff Corporation
2004 National Semiconductor Corporation
HDTV/DTV Overview
Aspect Ratios
Two options: 16:9 and 4:3 4:3 standard aspect ratio for US TV and computer monitors HD formats are 16:9
better match with cinema aspect ratio better match for aspect ratio of human visual system better for some text/graphics tasks
allows side-by-side viewing of 2 pages
800
800
600
600
450
Basic equation:
Yi = X + Zi where Zi = measurement at time I, X = original data Wi = noise at time i = Gaussian white noise with zero mean
Compute Average over same pixel location in each frame Noise averages to zero over a period of time Since averaging pixels that are in motion produces tails, we need reduce or stop averaging when there is motion
41
2004 National Semiconductor Corporation
AWGN - Example
Original
Original
43
2004 National Semiconductor Corporation
Block Noise
Tiling effect caused by having different DC coefficients for neighboring 8x8 blocks of pixels
Mosquito Noise
44
2004 National Semiconductor Corporation
PC Monitor and all digital displays are Progressive - scanning all lines in consecutive order
45
2004 National Semiconductor Corporation
Vertical-Temporal Progression
1 2 3 4 5 6 7 8 Lines = missing line
t-1
Current field
t+1
Time
47
Deinterlacing artifacts
Feathering/ghosting Jaggies/stepping Twitter Loss of vertical detail Motion judder Motion blur Specialized artifacts
48
2004 National Semiconductor Corporation
Methods of Deinterlacing
Spatial interpolation (Bob) Temporal interpolation (Weave) Spatio-temporal interpolation Median filtering Motion-adaptive interpolation Motion-compensated interpolation Inverse 3-2 and 2-2 pulldown (for film) Other (statistical estimation, modelbased etc)
49
2004 National Semiconductor Corporation
Film-to-video (Telecin) process is used to convert film to the desired interlaced video format
24 frames/sec 50 fields/sec PAL by running film at 25 fps and doing 2:2 pulldown 24 frames/sec 60 fields/sec NTSC by doing 3:2 pulldown
Most common form of such content is film 24 frames/sec or 30 frames/sec Other forms include computer graphics/animation
50
2004 National Semiconductor Corporation
1/24
second
1/6
second
Movie frame 3
1/24
1/24
second
Movie frame 1
Odd field
Odd field
Even field
Odd field
Odd field
Odd field
Conversion of 24 frames/sec into 60 fields/sec: 4 movie frames mapped to 5 video frames In this process, one movie frame is mapped into 3 video fields, the next into 2, etc... Referred to as 3:2 Pulldown Similar process used to convert 25 frames/sec to 50 fields/sec and 30 frames/sec to 60 fields/sec (2:2 pulldown)
51
2004 National Semiconductor Corporation
52
2004 National Semiconductor Corporation
Video
Odd field No motion Even field Odd + Even
Motion
Odd and even lines are in different places when there is motion
54
2004 National Semiconductor Corporation
55
2004 National Semiconductor Corporation
56
2004 National Semiconductor Corporation
Typical
57
2004 National Semiconductor Corporation
Optimal Deinterlacing
Content-adaptive
Film vs. Video detect film and use inverse 3-2 (NTSC) or inverse 2-2 (PAL) pulldown Bad edit detection/compensation need to detect and compensate for incorrect cadence caused by editing Detect amount of motion and use appropriate mix of spatial and temporal processing
Motion-adaptive
Edge-adaptive
Highest resolution for still areas with no motion artifacts in moving areas
58
2004 National Semiconductor Corporation
Odd 1+ Even 1
Odd 1+ Even 1
Odd 1+ Even 1
Odd 2+ Even 2
Odd 2+ Even 2
Odd 3+ Even 3
Odd 3+ Even 3
Odd 3+ Even 3
Odd 4+ Even 4
Odd and even fields generated from the same original movie frame can be combined with no motion artifacts 3:2 Pulldown sequence detection is necessary Done by analysis of motion content
59
2004 National Semiconductor Corporation
Odd field
Even field
Odd field
Even field
Odd field
Even field
Odd 1+ Even 1
Odd 1+ Even 1
Odd 1+ Even 1
Odd 3+ Even 3
Odd 3+ Even 3
Odd 4+ Even 4
Motion-Adaptive Deinterlacing
1 2 3 4 5 6 7 8 Lines = missing line (m)(S) + (1-m)(T)
Motion-Adaptive Deinterlacing
Estimate motion at each pixel Use Motion value to cross-fade spatial and temporal interpolation at each pixel
Low motion means use more of temporal interpolation High motion means use more of spatial interpolation
62
2004 National Semiconductor Corporation
Edge-Adaptive Deinterlacing
Moving edges are interpolated cleanly by adjusting the direction of interpolation at each pixel to best match the predominant local edge One Field One Field
Angled Line Angled Line
63
2004 National Semiconductor Corporation
Scaling
Linear Scaling
Resolution conversion PIP/PAP/POP Aspect ratio conversion
Nonlinear scaling
Variable scaling Warping
Keystone correction
Resampling based on a mapping function
64
2004 National Semiconductor Corporation
Upscaling
Input signal Intermediate signal
F(nT/2)
F(nT)
nT
12 3 456 7 8
Output signal
nT
F(nT/2) nT
1 2 3 456 7 8
nT
65
Downscaling
Input signal
F(nT)
Output signal
F(2nT)
2
66
2004 National Semiconductor Corporation
Practical Scaling
Textbook scaling implies you need a very large filter when dealing with expanded signal In practice you only need a small number of filter coefficients (taps) at any particular interpolation point because of all the zero values The interpolation points are called phases
e.g., scaling by 4/3 requires 4 interpolation locations (phases) that repeat 0, 0.25, 0.5, 0.75 Pre-compute and store one set of filter coefficients for each phase Use DDA to step across the input space using step size = (input size / output size)
For each location, use filter coefficients corresponding to the current phase and compute the interpolated value
67
2004 National Semiconductor Corporation
Xi = Xi-1 + Step Fractional portion of Xi represents the filter phase for current location
Upscaling Comments
Theoretically simpler than downscaling
often mistakenly referred to as aliasing.
Fixed length filter can be used since there is no concern about aliasing
Upscaled 2X horizontally using linear interpolation - visible Moir Upscaled 2X horizontally using a 16-tap reconstruction filter - negligible Moir
69
Downscaling Comments
More difficult than upscaling
Each new scaling factor needs cutoff frequency of reconstruction filter to be altered. Inverse relationship between time (space) and frequency requires filter length to grow proportionately to shrink factor. Aliasing and lost information can be very visible when a fixed low-order filter is used
Main
PIP
Main
PIP
Main
PIP
PIP Mode
PAP Mode
POP Mode
Main
TeleText
Live
PAT Mode
Mosaic Mode
71
2004 National Semiconductor Corporation
Keep in mind the fundamental differences between graphics and video Watch out for marketing gimmicks Total # of effective filter taps is NOT #taps x #phases, it is just #taps Correct definition of #Taps is how many input samples are used to compute an output sample
Graphics is non-Nyquist
72
2004 National Semiconductor Corporation
HDTV/DTV Overview
Aspect ratio conversion is required for going between 4:3 and Widescreen Several options (shown below)
Video Transmission Format
16 9
16 x 9 Display Modes
Full Zoom Squeeze Variable Expand Full
4 x 3 Display Modes
Zoom Squeeze Variable Shrink
(a)
4 3 (e) (f) (g) (i)
(b)
(c)
(d)
(j)
(h)
73
2004 National Semiconductor Corporation
Aspect ratio slowly changes in the tail zones to accommodate rest of the input picture.
77
2004 National Semiconductor Corporation
Edge Enhancement
Adaptive peaking
Extract high-pass filtered version of signal Apply gain Add back to original Compute derivative of signal Use shaped version of derivative to sharpen the transient without introducing undershoot or overshoot
Transient improvement
78
2004 National Semiconductor Corporation
Color Management
91
2004 National Semiconductor Corporation
Brightness
Contrast
Original
92
2004 National Semiconductor Corporation
Yellow Magenta
Green
Blue
93
Cyan
Greener grass
94
2004 National Semiconductor Corporation
Bluer Sky
95
2004 National Semiconductor Corporation
Original
Contrast enhanced
96
2004 National Semiconductor Corporation
Application Examples
Basic LCD-TV/Monitor Fully Featured LCD-TV/Monitor Fully Featured MPEG-TV
97
Pixelworks Examples
Inputs: Standard TV
HDTV (480p/720p/1080i)
TV-In
Tuner FI12X6
SDRAM
Key Features:
Motion Adaptive I/P Film Mode (3:2 & 2:2) Noise Reduction CC/V-Chip/Teletext Multi-Language UI IR Remote
AV-IN (composite) S-VID (s-video)
PW1230
Flash PromJet
YUV
Basic LCD-TV/Monitor
TTL
HD-Y/HD-Pb/HD-Pr (HD)
MUX (330) VGA-In ADC AD9883 keypad IR
98
Pixelworks Examples
Inputs: Standard TV
HDTV (480p/720p/1080i)
Key Features:
Motion Adaptive I/P Film Mode (3:2 & 2:2) Noise Reduction Multi-regional scaling PIP/split screen/POP CC/V-Chip/Teletext Multi-Language UI IR Remote
PW1230
Flash PromJet
90C383 TV-In AV-In (composite) S-VID (s-video) YUV keypad IR Tuner FI12X6 PW181 Video Decoder SAA7118 Sil164
LVDS
TMDS
TTL
V-chip / CC / Teletext SAA5264 HD-Y/HD-Pb/HD-Pr (HD) VGA-In DVI Rx SiI161 ADC AD9888
DVI-In
99
2004 National Semiconductor Corporation
Pixelworks Examples
Muxes
Dual-channel Scaler
100
Acknowledgements
Speaker gratefully acknowledges material and information provided by
Dr. Nikhil Balram, Chief Technical Officer Dr. Gwyn Edwards, Technical Marketing Engineer National Semiconductor Displays Group
101
2004 National Semiconductor Corporation
References
Image/Video/Television
Fundamentals of Video N. Balram, Short Course S-4, SID International Symposium, 2000. Video Demystified: A Handbook for the Digital Engineer, K. Jack, HighText Publications, 1993. The Art of Digital Video, J. Watkinson, Focal Press, 1994. Digital Television, C. P. Sandbank (editor), John Wiley & Sons, 1990. Video Processing for Pixellized Displays, Y. Faroudja, N. Balram, Proceedings of SID International Symposium, May, 1999. Principles of Digital Image Synthesis, Vols 1 & 2, A. Glassner, Morgan Kaufmann Publishers, 1995. Digital Image Warping, G. Wolberg, IEEE Computer Society Press, 1994 Fundamentals of Digital Image Processing, A. Jain, Prentice Hall, 1989 Sampling-Rate Conversion of Video Signals, Luthra, Rajan, SMPTE J. Nov. 1991.
102
2004 National Semiconductor Corporation
References
Temporal Rate Conversion
IC for Motion Compensated 100 Hz TV with a Smooth Motion Movie-Mode, G. de Haan, IEEE Transactions on Consumer Electronics, vol. 42, no. 2, May 1996
HDTV Status and Prospects, B. Lechner, SID 1997 Seminar M-10. detailed history of development of HDTV
HDTV/DTV
www.atsc.org
www.teralogic-inc.com www.fcc.gov/mmb/vsd
Multi-valued Modulation Transfer Function, Proceedings of SID International Symposium, May, 1996. Vertical Resolution of Monochrome CRT Displays, Proceedings of SID International Symposium, May, 1996.
103
2004 National Semiconductor Corporation
References
Human Visual Systems
Linear Systems HDMI
Visual Perception, Cornsweet, 1970 Signals and Systems, Oppenheim, Willsky, Young, Prentice Hall.
MPEG2
www.hdmi.com
An Introduction to MPEG-2 B. Haskell, A. Puri, A. Netravali, Chapman & Hall, 1997
Video2000 Benchmark
www.madonion.com
104
2004 National Semiconductor Corporation
Thank You!
105