Digital Color Coding Using the YUV model to reduce pixel depth The Big Picture YUV in between for RGB at end transmission, editing, storage points 242424-24 ---bitbitbitbit YYYCbCbCb CrCrCr SDI or HDHD----SDISDI link “true color” RRRGGGBBB 4:2:2

HDHDHD-HD ---DVDDVD or BluBlu----RayRay 4:2:0 4:2:0 Signal Processing 4:2:0 (decode)

H.264/AVC (NAL)

RRRGGGBBB 121212-12 ---bitbitbitbit Signal “lossy” Processing standard color (edit / encode)

2 Digital TV Camera

RGB input YUV output

filters sensors encoder mirror signal RRR combiner Lightly lens Compressed YYYCbCbCb CrCrCr light GGG rays 4:2:2 (D1 format) semimirrors mirror BBB signals ( Cb, Cr) 270 Mbps SDI link ––– luminance signal (Y) goes to tape luminance (88 GB/hour) matrix or broadcast

3 YUV • Used worldwide by color TV broadcasts – Lots of variations: YCbCr, YPbPr, YDbDr, YIQ • Breaks RGB representation into 4 parts – 1 luminance (grayscale) component (Y) – 3 chrominance (color) components ( Cr , Cg , Cb ) • Sum to a constant, so only need Cr, Cb (calculate Cg) • Calculate YCbCr from RGB and RGB from YCbCr

RGB to YCbCr YCbCr to RGB Y = 0.299 RRR + 0.587 GGG + 0.114 BBB R = Y + 1.402 Cr Cb = 0.564( BBB – Y) B = Y + 1.772 Cb Cr = 0.713( RRR – Y) G = Y – 0.344 Cb – 0.714 Cr YUV Advantages • Color signals compatible with black & white – Just use Y (256 shade grayscale, ignore Cb, Cr) • Allows pixel depth compression – For HVS, luminance (Y) more important than chrominance (Cr, Cb ) – Don’t need full Cb, Cr information for good color fidelity as long as keep Y value for each pixel YUV Compression Strategy • Each pixel keeps its Y value, but some borrow Cr , Cb from a neighboring pixel – Number of pixels that borrow determine amount of compression (no borrowing = YUV24 or 4:4:4) • YUV16: 1 of 2 pixels borrow = lossy high quality 4:4:2 – 24 + (1 x 8) = 32 / 2 = 16bpp – Used for source, editing • YUV12: 3 of 4 pixels borrow = lossy standard 4:2:0 – 24 + (3 x 8) = 48 / 4 = 12bpp – Distribution format used in broadcasts, by DVDs, etc. • YUV10: 7 of 8 pixels borrow = noticeable color loss – 24 + (7 x 8) = 80 / 8 = 10bpp • YUV9: 15 of 16 pixels borrow = “packed color” – 24 + (15 x 8) = 144 / 16 = 9bpp • YUV8: black & white (luminance only) 6 YUV Compression Schemes 4:2:2 Adjacent pixels are usually similar in color. Lossy high quality In YUV compression, every pixel keeps its Convert YUV24 own luminance value, but some borrow YYY CbCr YYY chrominance from an adjacent pixel. 888 8 88 8 888 to YUV16 4:4:4 TrueColor Half of pixels No compression YYY CbCr YYY borrow 888 8 88 8 888 chrominance RRR GGG BBB RRR GGG BBB YYYCbCr YYYCbCr 888 888 888 888 888 888 888 8 8 888 8 8 4:2:0 Lossy standard RRR GGG BBB RRR GGG BBB YYYCbCr YYYCbCr 888 888 888 888 888 888 888 8 8 888 8 8 Convert YUV24 YYY CbCr YYY 888 8 88 8 888 to YUV12 Convert RGB24 to YUV24 3 of 4 pixels Uses same number of bits (no loss of YYY YYY borrow information) but YUV24 scheme divides 888 888 chrominance color information by its importance to Human Visual System (HVS). YUV Compression Levels Additional compression Eliminate 4 bits Eliminate 12 bits gains minor even with loss of all color YUV12 achieves most of the YUV8 – B & W possible reduction (short of black 256 level grayscale & white) with good quality color YUV9 packed color

YUV10 reduced color Add 4 bits YUV16 costs 33% YUV12 4:4:0 more bits for little noticeable difference YUV16 4:4:2

True Color 4:4:4 0 1 2 34 5 6 7 89 10 1112 13 14 15 16 17 1819 20 21 22 23 24 “Lossy” YUV compression: eliminate half the bits but keep good color quality