280 likes | 299 Views
4k…. 4K format was named because it has 4000 pixels horizontal resolution approximately. Meanwhile, standard 1080p and 720p resolutions were named because of there vertical resolution. The new standard renders more than four times higher image definition than 1080p resolutions for example.
E N D
4k… • 4K format was named because it has 4000 pixels horizontal resolution approximately. • Meanwhile, standard 1080p and 720p resolutions were named because of there vertical resolution. • The new standard renders more than four times higher image definition than 1080p resolutions for example
To get a feel of the file size of uncompressed video, let's compute the file size of an uncompressed 1-second video with the same resolution and frame rate as HDV 1080i/p video.
The 1-second Video • 1440 1080 pixels…1620 x 1080 • 24-bit color • 30 fps • 1 second long • Audio: stereo (2 channels) • Audio: 48 kHz, 16-bit
File Size Calculation The picture component: • Total pixels in each frame: • File size of a frame: • File size of 30 frames (1 second):
File Size Calculation 1,119,744,000 bits = 1,119,744,000 bits / (8 bits/bytes) = 139,968,000 bytes 133 MB
File Size Calculation Audio: Sampling rate length of the audio bit-depth number of channels = 48,000 samples/sec 1 second 16 bits/sample 2 = 1,536,000 bits =
File Size Calculation Total file size of this 1-second uncompressed video = size of the picture component + audio size 10 seconds would be 1.33 GB!
File Size Calculation Total file size of this 1-second uncompressed video = video size + audio size 133 MB + 188 KB = 133 MB 10 seconds would be 1.33 GB! Note that the audio size is insignificant compared to the picture component of the video.
Data Rate • Amount of video data to be processed per second
Data Rate Example • Data rate of a 48x-speed CD-ROM drive: 7 MB/s • Previous video file size example:1-second uncompression video, 133 MB • Data rate = 133 MB / 1 second = 133 MB/second • Way too high for the 48x-speed CD-ROM drive! • Very choppy playback on 48x-speed CD-ROM drive
Effect of File Size vs. Data Rateon Video Playback • Data rate: • If high: choppy playback • Amount of data to be processed per second • Larger file size can have a low data rate if it is a long video • Smaller file size can have a high data rate if it is a short video • File size: • If high: • Requires larger storage space • Not unnecessary choppy playback • The impact of file size on smoothness of playback also depends on the video duration.
General Strategies for Reducing Video File Size • General Strategies for reducing digital image file size • Reduce duration of the video so you have less frames
Why General Strategies for Reducing Digital Image File Size Work for Video • Reduce frame size because: • Reduce frame rate because: • Video compression with high compression because: • Lower picture quality option because:
Temporal compression-video • Only pixels that change from time frame to frame • Frame 1 becomes a reference frame • What pixels are encoded for: • Frame pixels that change • 1 reference frame,,, no saving..any one? • 2 • 3 • 4
Video compression… • Within a frame(jpg) • RLE • Number of pixels , followed by pixel value . E.g.22 pixels of value ,#2552552 • At frame level • lossless
When might never compress? • when
Kennedy The quote has 17 words, made up of 61 letters, 16 spaces, one dash and one period. If each letter, space or punctuation mark takes up one unit of memory, we get a total file size of 79 units. To get the file size down, we need to look for redundancies In John F. Kennedy's 1961 inaugural address, he delivered this famous line: inaugural address 1961
Finding Redundancy As an example, let's look at a type of information we're all familiar with: words. In John F. Kennedy's 1961 inaugural address, he delivered this famous line: "Ask not what your country can do for you -- ask what you can do for your country."
space The quote has 17 words, made up of: 61 letters, 61+16+1=79 16 spaces, one dash and one period. If each letter, space or punctuation mark takes up one unit of memory, we get a total file size of 79 units
redundancy We see: notice that: • "ask" appears two times • "what" appears two times • "your" appears two times • "country" appears two times • "can" appears two times • "do" appears two times • "for" appears two times • "you" appears two times nearly half y redundancy (18 characters)
Popular compressor Most compression programs use a variation of the LZ adaptive dictionary-based algorithm to shrink files. "LZ" refers to Lempel and Ziv, the algorithm's creators, and "dictionary" refers to the method of cataloging pieces of data. The system for arranging dictionaries varies, but it could be as simple as a numbered list Used by gif
Assume dictionary: • 1 qsk • 2 what • 3 your • 4 country • 5.can • 6 for • 7 you 1 not2 3 4 5 6 7 8—1 2 8 5 6 7 3 4
Your turn • Humpty Dumpty" Nursery Rhyme Lyrics :Ten Humpty Dumpty sat on a wallOne Humpty Dumpty had a great fallAll the king's horses and all the king's menCouldn't put Humpty together again • Show the LZ dictionary
Finding Redundancy As we go thru the words, we pick out the words That are repeated Put them into the index value instead of the word Does ask repeat? What? Note? your? Seems to say, can throw out 8 numbers cause we have redundant one.
re and one time followed by "you,“ giving us a repeated pattern of "can do for you." This lets us write 15 characters (including spaces) with one numeric value for each pattern The program proceeds in this way, picking up all repeated bits of information and then calculating which patterns it should write to the dictionary. No matter what specific method you use, this in-depth searching system lets you compress the file much more efficiently than you could by just picking out words. Using the and adding "__" for spaces, we come up with this larger dictionary: 1. ask__ 2. what__ 3. you 4. r__country 5. __can__do__for__you
Run length Encoding • lossless data compression in which runs of data are stored as a single data value and count, rather than as the original run. • This is most useful on data that contains many such runs