Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Media Dr. Jim Rowan ITEC 2110 Video Part 2.

Similar presentations


Presentation on theme: "Digital Media Dr. Jim Rowan ITEC 2110 Video Part 2."— Presentation transcript:

1 Digital Media Dr. Jim Rowan ITEC 2110 Video Part 2

2 Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand A. Woldeyohannes, Tesfamichael Barton, Paul H. Bois, Lauren C. Bonds, Allison E. Duncan, Jarred T. Lawson, Joseph I. Mulongo, Julio B. Pennison, Heather L. Reilly, Daniel J.

3 Roll call Jones, Crystal L. Marsh, Kerreen A. Thompson, Daniel G. Tran, Christopher V.

4 Digital Video Standards Even though digital video COULD be much less complicated... it isn’t because... Backward compatibility requirement –new equipment must create signals that can be handled by older equipment Originally... TV signals (analog) needed to be converted to digital format

5 Digital Video Standards... Digital from NTSC and PAL are ANALOG standards –Each has a screen size and frame (or refresh) rate –Each define a number of lines on the screen (that can be easily used for one the Y dimension) –But what about the other dimension, the X?... –Each line is a continuous (analog) signal which has to be converted to digital... How do you do that? –SAMPLE the analog data! –But directly sampling for each pixel results in a data stream of 20 Mbytes/ second... HUGE!

6 Coping with Video Size Aside from screen size and frame rate... Consider human vision limitations –Use algebra to compute part of the signal –Chrominance sub-sampling Compression - two versions –spatial –temporal

7 Coping with Video Size Aside from screen size and frame rate... Consider human vision limitations –Use algebra to compute part of the signal –Chrominance sub-sampling Compression - two versions –spatial –temporal

8 Sampling analog Video To reduce the data stream you can consider human vision again Human eyes are less sensitive to color changes than luminance Decision: Take fewer samples for color than luminance Without sub-sampling... –for each pixel on the screen 4 things will have to be encoded luminance, red, blue, green

9 Sub-sampling & understanding human vision Designers realized that Green contributes the most to intensity, Red is next and Blue hardly contributes anything to luminance Based on this, it was decided to use a formula for luminance Y = 0.2125R+0.7154G+0.0721B With this we only have 3 data elements to transmit 25% data reduction -Y (luminance) -Cb (blue chrominance) -Cr (red chrominance)

10 Calculating the 4th color component Known as the Y’CbCr model for CRTs Y = 0.2125R+0.7154G+0.0721B Solve for Cg (green): Y - 0.0721B - 0.2125R = 0.7154G 0.7154G = Y - 0.0721B - 0.2125R G = (Y - 0.0721B - 0.2125R) / 0.7145 There is a use for algebra!

11 Coping with Video Size Aside from screen size and frame rate... Consider human vision limitations –Use algebra to compute part of the signal –Chrominance sub-sampling Compression - two versions –spatial –temporal

12 Chrominance sub-sampling Humans can’t distinguish changes in color as well as they can distinguish luminance changes Of every 4 frames –store the luminance –only store a proportion of the color info

13 Chrominance sub-sampling IRGB 4:4:4 IRB I I 4:2:2 CCIR 601 video sampling IRB I II 4:1:1 NTSC DV IR I II 4:2:0 PAL DV notice the inconsistency? I:R:B IB I II

14 NTSC & PAL weirdness (sidebar) NTSC & PAL –Define different screen sizes –Define different frame rates –Both have the same aspect ratio of 4:3 –BUT... they each are digitized (through sampling) to the same screen size The result? –The pixels are not square –PAL is taller than it is wide –NTSC is wider than it is tall

15 DV and MPEG (sidebar) DV and its different forms (DVCAM & DVPRO) –use the same compression algorithm (5:1) –use the same data stream (25Mbits) –use 4:2:2 sampling where DV uses 4:1:1 MPEG-1 originally meant for Video CD –never got very popular –developed into a family of standards MPEG-4 rose from the ashes –used for iTunes video

16 Computational Irony Digital has been touted as a way to create exact copies while analog (VCR) cannot... Analog VCR suffers from generational loss BUT only if you use video compression that is... LOSSLESS AND... you guessed it, a lossless video compression technique is not used because the lossless ones don’t compress enough

17 Lossless compression compressed original compression routine Original decompress routine Original Exact duplicate

18 Lossy compression compressed original compression routine Original decompress routine Changed Original Changed Original 2

19 Aside from screen size and frame rate... Consider human vision limitations –Use algebra to compute part of the signal –Chrominance sub-sampling Compression - two versions –spatial –temporal Coping with Video Size

20 Spatial compression Individual images can be compressed using the techniques discussed in the bitmapped section Doesn’t result in very much compression for video Doesn’t take into consideration the other frames that come before or after it

21 Aside from screen size and frame rate... Consider human vision limitations –Use algebra to compute part of the signal –Chrominance sub-sampling Compression - two versions –spatial –temporal Coping with Video Size

22 Temporal Compression 1 Use the Difference in two frames –naive approach can result in good compression –works well for a small amount of movement –A Tarantino film? not so much...

23 Temporal Compression 2 When an object moves –compute its trajectory –fill in the resulting exposed background –BUT there’s a problem... –why isn’t this an easy thing to do? vector

24 Temporal Compression 2 Bitmapped images do not have defined objects... that’s Vector graphics... What to do?

25 Temporal Compression 2 Define blocks of 16 x 16 pixels –called a macroblock Compute all possible movements of the block within a short range Compute a vector to define that movement Store the movement vectors Compress the vectors

26 More on Temporal Compression Need some place to start from Can be forward or backward prediction Called KeyFrames –pick a keyframe –compute next image from that –What happens when the scene completely changes? Pick a new key frame... But HOW? Requires powerful AI

27 Video Compression What does this? Coder/Decoder - Codec encodes and decodes video –can be symmetric –can be asymmetric

28 Finally... Why worry about size? When we know that computers are always getting faster and larger... why not just wait? First one on the market usually wins the market (if it succeeds!) Putting video on some small device with limited space and limited speed –iPhone –Spacecraft? Gotta be light weight and small!

29 A final worry... We have been talking about making video smaller There are a variety of techniques to do this Which to choose? –It is a tradeoff between compression technique and its computational complexity

30 Questions?

31 Digital Media Dr. Jim Rowan ITEC 2110 Video Part 3

32 Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand A. Woldeyohannes, Tesfamichael Barton, Paul H. Bois, Lauren C. Bonds, Allison E. Duncan, Jarred T. Lawson, Joseph I. Mulongo, Julio B. Pennison, Heather L. Reilly, Daniel J.

33 Roll call Jones, Crystal L. Marsh, Kerreen A. Thompson, Daniel G. Tran, Christopher V.

34 MPEG-4 Designed for streams that contain video, still images, animation, textures 3-D models Contains methods to divide scenes into arbitrarily shaped video objects The idea is that each object has an optimal compression technique BUT...

35 MPEG-4 Dividing a scene into arbitrarily shaped video objects is non-trivial Drop back to the rectangular object position Quicktime and DivX use the rectangular video object idea Uses forward interframe compression Using the simpler technique reduces the computational complexity allowing it to be implemented on small devices like portable video players

36 Other codecs Cinepak, Intel Indeo & Sorenson All use vector quantization –divides frame into rectangular blocks –these frames are called vectors but they don’t represent movement or direction Codec uses a collection of these vectors –contains typical patterns seen in the frames textures, patterns, sharp and soft edges –compares the vectors to the ones in the code book –if it is close, it uses the code book entry –(does this explain the patchwork painting of the screen when the digital signal goes bad?)

37 Vector quantization a frame contains indices into the code book reconstructs the image from vectors in the code book –makes decompression very straight forward and efficient –this makes the implementation of a player very easy What about the compression?

38 Vector quantization this is an asymmetric codec decompression takes ~150 times longer than compression Cinepak and Intel Indeo use temporal compression using simple differencing Sorenson uses motion compensation similar to the MPEG-4 standard

39 So... How do codecs vary? compression and decompression complexity –affects the artifacts that are created –affects the time required to carry them out –affects the volume of the data stream created –affects the type and expense of the equipment used –affects whether or not it can be implemented in hardware of software

40 Comparison Bear in mind that this comparison is not absolute and will vary from frame to frame but in general... MPEG-4 –detail is good (at the sacrifice of speed) DV –detail is good but the biggest Sorenson –loss of detail (see pg 218-219) Cinepak –loss of detail –smallest file

41 A word about QuickTime All standards so far have defined the data stream... not the file format QT is the defacto standard design of a component-base architectural framework –allows plugins (components) to be developed by others Every QT movie has a “time base” –records playback speed and current position relative to a time coordinate system to allow them to be replayed at the right speed on any system –If the playback speed of the device is not fast enough, QT drops frames keeping audio synchronization

42 More about QuickTime Plugins make it flexible so that it can accommodate new file formats –comes with a standard set of plugins (components) compressor components include –MPEG-4, Sorenson and Cinepak movie controller interface provides uniformity transcoder components to convert to other formats –supports true streaming and progressive download

43 Questions?


Download ppt "Digital Media Dr. Jim Rowan ITEC 2110 Video Part 2."

Similar presentations


Ads by Google