ICSY ICSY ICSY. 1 p. log Compression. How to contact. Multimediale Visualisierungssysteme WS 2000/2001. Acknowledgements.

Size: px
Start display at page:

Download "ICSY ICSY ICSY. 1 p. log Compression. How to contact. Multimediale Visualisierungssysteme WS 2000/2001. Acknowledgements."

Transcription

1 η = i Multimediale Visualisierungssysteme WS 2/2 p i 5. Compression log 2 p i Prof. Dr. Paul Müller AG: Integrierte Kommunikationssysteme How to contact Prof. Dr. Paul Müller 34 / 32 Tel.: 63 / mueller@uni uni-kl.de Bernd Reuther 32 / 344 Tel.: 63 / reuther@informatik informatik.uni-kl.de Ye Yuan 32 / 346 Tel.: 63 / yuan@informatik informatik.uni-kl.de 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Acknowledgements Literatur Prof. Dr. Ralf Steinmetz, Stephan G. Eick, Dr. Andreas U. Mauthe, Dr. Peter Thomas, Prof. Dr. Hans Irtel TU-Darmstadt Bell-Labs Fa. TecMath Fa. TecMath Uni Mannheim Guojun Lu and Computing for Distributed Multimedia, Artech House 996 Ralf Steinmetz Multimedia Technologie, Einführung und Grundlagen, Springer Verlag, 993 Borko Furht, Milan Milenkovic A Guided Tour of Multimedia and Applications IEEE Computer Society Press, 995 Universität Kaiserslautern: Dipl.. Inform. Bernd Reuther Dipl.. Inform. Ye Yuan François Fluckinger Understanding Networked Multimedia, applications and technology, Prentice Hall, 995 Andrew S. Tanenbaum Computer Networks, third edition Prentice Hall, 994 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

2 Site Map 5. Compression E.g., video sequence 25 images/sec. 3 Byte/Pixel Image resolution 64 * 48 Pixel Data rate = 64 * 48 * 3 Byte * 25/s = 234 byte/s ~ 22 MByte/s Compression is required 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG General Requirements Mode Dependent Requirements. low delay Compression 3. high quality Dialogue and retrieval mode requirements: Independency of frame size and video frame rate Synchronization of audio, video, and other media Dialogue mode requirements: Compression and decompression in real-time 2. low complexity efficient complementation End-to-end delay < 5ms Dependency on application type: Dialogue mode Retrieval mode Retrieval mode requirements: Fast forward and backward data retrieval Random access within /2 s 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

3 Categories and Techniques Entropy Coding Entropy Coding Source Coding Hybrid Coding Run-Length Coding Lempel - Ziv Huffman Coding, Arithmetic Coding,... Adaptive Coding Prediction Transformation Layered Coding Vector Quantization JPEG MPEG H.26 DVI RTV, DVI PLV,... DPCM DM FFT DCT Bit Position Subsampling Sub-Band Coding Entropy is the average information content of an information Source S: HS ( ) = η = p i log i p i p i is the probability for the occurrence of S i in S log indicates the number of bits needed to code S p i i Examples: a picture with a uniform distribution of gray-scale values: p i = /4; log 2 / p i = 2; H(S) = 2 a picture with a non uniform distribution of gray-scale values: p i = /8 for i=,..,2; p 4 = 5/8; log 2 / p i = 3 for i=,..,2; log 2 / p 4,67872; H (S), ,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG The braile Entropy Coding Example: Letter statistic compared to Morse Code: Letter probability probability Morse Code German English e 6,65% 2,4% n,36% 6,4% i 8,4% 6,46% t 5,43% 8,9% a 5,5% 8,9% o 2,25% 8,3% x,3%,2% y,3% 2,4% 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

4 Run-length Coding Lempel - Ziv (LZ77) Run-length coding compresses: same successive symbols Example: Coding a b b c d e e e e e e e a x b c a b b c d x 7 e a x x b c x marks the beginning of a coded sequence special coding is required to code x as a symbol, here x x is used. How to code a bit stream? Zero suppression is a special form of run-length coding Algorithm for compression of character sequences: assumption: sequences of characters are repeated idea: replace a character sequence by a reference to an earlier occurence. Define a search buffer = already encoded data look ahead buffer = not yet encoded data 2. Find the longest match between the first characters of the look ahead buffer and an arbitrary character sequence in the search buffer 3. Produce output <offset, length, next_character> offset + length = reference to earlier occurence next_character = the first character following the match in the look ahead buffer 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Lempel - Ziv (LZ77) Lempel - Ziv (LZ77) Example: Pos Char A A B C B B A B C Step Pos Match Char Output - A <,,A> 2 2 A B <,,B> C <,,C> 4 5 B B <2,,B> 5 7 AB C <5,2,C> Remarks: the search and look ahead buffer have a limited size the bits needed to encode pointers and length information depends on the buffer sizes worst case: the character sequences are longer than one of the buffers typical size are 4-64 KB sometimes other representation of the triple are used next_char only if necessary (i.e. no match found) enabling dynamic change of buffer sizes LZ77 or variants are often used before entropy coding LZ77 + Huffmann coding are used by gzip and for PNG graphics gif uses only LZW (a variant of LZ77) 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

5 Huffman Coding Huffman Coding Use short bit patterns for frequently used symbols. Sort all symbols by probability 2. Get the two symbols with the lowest probability, remove them from the list and insert a parent symbol to the sorted list where the t probability is the sum of both symbols 3. If there are at least two elements left continue with step 2 4. Assign and to the branches of the tree Example: : 38 bits are used for regular coding Symbol Count regular E 35 A 2 D B 5 C 45 P(95) B(5) C(45) Symbol Count E 35 A 2 D P 95 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Huffman Coding Huffman Coding 2 P2(25) D() P(95) B(5) C(45) 3 E(35) P3(255) A(2) P2(25) D() P(95) B(5) C(45) Symbol Count P2 25 E 35 A 2 Symbol Count P3 255 P2 25 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

6 Huffman Coding Adaptive Algorithms 4 5 bits are used for huffman coding P4(46) P3(255) P2(25) E(35) A(2) D() P(95) Interactive Example Previous algorithm requires statistical knowledge which is often not available (e.g. live audio, video) Even when statistical knowledge is available, it could be much overhead to sent large coding. B(5) C(45) Symbol Count huffman E 35 A 2 D B 5 C 45 Solution - Use adaptive algorithms, i.e. Adaptive Huffman Coding 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Adaptive Huffman Coding Adaptive Huffman Coding Encoder Initialize_model(); while (( c = getc(input))!= eof) { encode (c, output); update_model(c); } Decoder Initialize_model(); while (( c = decode(input))!= eof) { putc (c, output); update_model(c); } Example n-th Huffman tree 9. W=7 Important: encoder and decoder have to use exactly the same initialization and update_model routines update_model does two things: increment the count 2 update the resulting Huffman tree during the updates, the Huffman tree will be maintained its sibling property, i.e. the nodes are arranged in order of increasing weights when swapping is necessary, the farthest node with weight W is swapped with the node whose weight has just been increased to W+ (If the node with the weight W has a subtree beneath it, then the subtree will go with it) 7. W=7 8. W= (E) 5. W=3 6. W=4.A-W= 2.B-W=2 3.C-W=2 4.D-W=2 resulting code for A: 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

7 Adaptive Huffman Coding Adaptive Huffman Coding n+2-th Huffman tree A was incremented twice node A and D swapped.d-w=2 5. W=4 new code for A: 7. W=9 2.B-W=2 9. W=9 6. W=5 3.C-W=2 8. W= (E) 4.A-W=3 A was incremented twice.d-w=2 5. W=4 7. W= 2.B-W=2 6. W=7 The 4th (A) and the 5th node have to swap. 9. W=2 3.C-W=2 8. W= (E) 4.A-W=5 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Adaptive Huffman Coding Adaptive Huffman Coding resulting tree after st swap 7. W= 9. W=2 8. W= (E) n+4-th Huffman tree 7. W= (E) 9. W=2 8. W= 5.A-W=5 6. W=6 5.A-W=5 6. W=6 3.C-W=2 4. W=4.D-W=2 2.B-W=2 8th (E) and the 7th node have to swap new code for A: 3.C-W=2 4. W=4.D-W=2 2.B-W=2 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

8 Huffman Coding Valuation Arithmetic Coding Advantages The huffman codes are optimal according to information theory The Algorithm is simple Disadvantage Huffman is designed to code single characters only. Therefore at least one bit is required per character, e.g. a word of 8 character requires at least an 8 bit code Not suitable for strings of different length or changing probabilities for charaters in a different context respectivly Examples for both interpretations of that problem: Huffman coding does not support different propabilities for: c h s and sch For a usual german text p( e ) > p( h ) is valid, but if the preceding characters have been sc then p( h ) > p( e ) is valid (nonsatisfying) solutions for both scenarios Solution: Use a special coding where sch is one character only, but this requires knowledge about frequent character combinations in advance Solution: use different huffman codes with respect to the context, but this leads to large code tables which must be appended to the coded data Arithmetic coding generates codes that are optimal according to information theory and supports strings of different length The probalistic model is separated from the encoding operation: Probalistic model: assign a codeword to each possible string. The codewords consist of half open subintervals of the interval [,) Encoding: a given subinterval can be uniquely identified by any value of that interval. Use the value with the shortest binary representation to identify the subinterval In practice, the subinterval is refined incrementally using the probabilities of the individual events or of event sequences. If strings of different length are used then extra information is needed to detect the end of a string 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Arithmetic Encoding Example Arithmetic Decoding Example probailities Termination rules: a and! are termination symbols Strings starting with b have a length of max 4. Decode: Bit Output - b - b a - a - b bb b 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

9 Source Coding: images Transformation and Quantization Take into account the specific data characteristics and the human sensitiveness to that type of data. Example: properties of human vision Luminance: is the overall response to the total light energy, it depends on energy and wavelength of the light. The human eye is much more sensitive to changes of the luminance than for changes of the wavelength Lightness: is the whiteness of a specific object An object reflecting less than 3% of the incident light is perceived as black An object reflecting more than 8% of the incident light is perceived as white Light of different wavelength do not just appear as different colours The human eye is more sensitive to certain wavelength than to others, our eye is much more sensitive to yellow or yellowgreen then to red or violet. The RGB image representation does not allow direct access to all image attriburtes. Transform the image into more appropiate representations: To color spaces that separate luminance and color YUV or YIQ LAB To frequency space that represent changes within the picture Discrete Cosine Transformation (DCT) Wavelet decomposition In the new representation the image attributes are quantizised to apropiate values, i.e. image information is reduced. 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Discrete Cosine Transformation (DCT) Discrete Cosine Transformation (DCT) Typical pictures have minimal changes in colour or luminance between two adjacent pixels A frequency representation describes the amount of variation DCT is a transformation between absolute values and a frequency representation DCT can be used for source coding Basis pictures of the one dimensional DCT: Basis pictures of the two dimensional DCT: 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

10 DCT + Quantization Discrete Cosine Transformation (DCT) Assumption: changes of colour and luminance between adjacent pixels is low DCT is applicable for photos DCT is not applicable for vector graphics or two coloured pictures (black text, white background) DCT is a loss less technique: information is lost because of precision limits The result of DCT typically is quantized: a) The original image representation. b) Result of the DCT, nearly all information of the picture is represented with low frequency, the rest is nearly null. c) Result of the quantization, the precision of the values has been reduced, most values are exactly null now. This is the Result of the source coding. d) Result of the decompression process. coefficients are divided by defined values to reduce precision two approaches: use the same divisor for the whole matrix use a special divisor for each matrix position, this allows to weight the coefficients. Typically use small divisors for the low frequencies and use higher divisors for high frequencies. During quantisation information is lost, the divisor defines the amount of lost information. 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Hybrid Coding Steps for Images, Video and Audio Basic Encoding Steps: source image Video: lossy Audio: lossless e.g.: -resolution - frame rate lossy sometimes lossless Quantization preparation Transformation e.g.: - DCT - Subband coding compressed e.g.: - Linear - DC, AC values lossless Entropy encoding e.g.: - run length - Huffman image 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Image preparation The colour representation may take into account human sensitiveness Example: RGB YUV R G B PAL-Norm color representation: Y =,3 R +,59 G +, B U =,493 (B Y) = -, R -,29G +,44 B V =,877 (R Y) =,62 R,52 G, B The precision of luminance (Y) may be higher than precision of chrominance (U + V) this image preparation may also include simple source coding Y luminance U V chrominance 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

11 Color sampling ratio for YUV Color sampling example a:b:c notation for sampling ratio according to ITU-R R (former CCIR) recommendation 6-2: Encoding parameters of digital television for studios 4:4:4 no loss of information 4:2:2 2: horizontal downsampling, no vertical downsampling (= 4 Y samples for every 2 U and 2 V samples per scanline ) 4:: 4:2: 4: horizontal downsampling, no vertical downsampling (= 4 Y samples for every U and V samples per scanline ) 2: horizontal downsampling, 2: vertical downsampling (= 4 Y samples for every 2 U or 2 V samples per scanline, U and V are processed on alternating scanlines only) 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Interactive Example 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Hybrid Coding: JPEG Quantization International Standard JPEG = Joint Photographics Expert Group Coding/Decoding of continuous-tone still images Image preparation and coding: R G B Input data * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Zig-Zag Scan Entropy coding Y U V Image prepreparation Quantization (e.g. div by 6) planes to n* 8x8 blocks DCT for each block Typically realized as reduction of number precision Quantization leads to loss of information division by Q-factor: Q fixed Q-factor for the whole picture fixed Q-factor for a block, variable between blocks (used if predefined limit of data must not be exceeded) spectral quantization: variable Q-factors within a block, table of Q-factors is fixed for the whole picture low Q-factors for important DCT coefficient and vice versa different tables of Q-factors for the Y and the U V planes JPEG does not define Q-factors, Q but there are recommend Q-factor tables for spectral quantization 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

12 JPEG Example JPEG Examples Interactive examples: JPEG PNG Size: 3.64 bytes Size: 8 bytes Size: bytes Size: 9.47 bytes 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG JPEG Summary Wavelet image compression Different resolution of individual components possible Image preparation using YUV representation Loss less / lossy modes loss of information by DCT is minimal loss of information by quantisation may be significant, but amount of lost data is adjustable quantisation: the JPEG standard defines two default quantization tables, one for luminance and one for chrominance Like DCT the wavelet image compression divide images in different wave bands DCT frequencies are represented by cosines waves applied to 8x8 samples only to reduce complexity Wavelet (= a small wave) frequencies are represented by wavelets entropy coding: first step: run-length coding, the zig-zag scan leads to a sequence of zeros at the end second step: huffman or arithmetic coding applied to high frequencies only to reduce complexity in a recursive process low frequencies are doubled and encoded like higher frequencies ( = multi scale analysis) 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

13 Wavelet image compression Wavelet examples Mexican Hat Wavelet Haar Wavelet ~ ~ H ( x ) is low pass filter, G( x) is high pass filter (defined by Wavelet) et) Filters are applied to rows and columns Restart process with ( x, y) optionally also for the other images f LL 2 w( x) = ( x ) e 2 x / 2 if x <.5 w( x) = if.5 x < otherwise Wavelets should be simple w( x) only for x "near" the local change of color can be described by a relocated and deformed wavelet 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Wavelet compression Example + Info Fractal image compression Decompression video example (original from University of Bristol, UK Idea: compression of images by using self similarities Describe image fragments as modified other image fragments scaling, moving, rotating or flipping More information: Amaras Wavelet page Software: WaveConvert / sawave (Uni-Rostock) Example modification of contrast and brightness Mathematical background: Result from Banachs Fixpoint theorem: the fractal can be constructed by iterating the same process the image is the fixpoint fractal compression means find a function converging to that fixpoint 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

14 Fractal image compression Fractal compression Examples + Info Fractal image compression in general is very complex Method to reduce complexity: recursive partition of the image in rectangles containing few information Iteration steps of decompression describe one rectangle as a modification of another Remarks: no pixel values are stored, the compression results are iterative functions describing the image More information: Fractal Image Encoding (Yuval Fisher) ( the quality of the resulting image can t be guaranteed for a given number of iterations Software: fracomp ( Fractal Imager ( 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG MPEG MPEG video formats International standard of ISO 993 MPEG = Moving Pictures Expert Group Today the first standard is often called MPEG- Definition of Compression algorithms Formats for storing or transmitting compressed media Includes Video and Audio coding Properties Asymetric codec, the encoder is more complex than the decoder The resulting bitrate is limited.5 Mbit/s for video 448 kbits/ for audio Image preparation Separation of luminance and chrominance (similar to YUV using 4:2:) More attributes required than for JPEG Relation of width an hight of the pixels, to support different TV formats, example: 4:3 for PAL 6:9 for HDTV (Europe and USA) : Picture frequency 25 Hz or 3 Hz for interlaced PAL or NTSC 5 Hz and 6 Hz for non-interlaced Video 23,976 Hz is the lowest possible frequency 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

15 MPEG layered video stream MPEG video compression. Sequence Layer - Controls buffering of video data, each sequence starts with the constant bitrate and amount of memory required for the following sequence 2. Group of Pictures Layer Layer - A set of pictures where at least one (usually the first) is encoded without references to other pictures (I-frame). The order of pictures within this layer may be different from the presentation order. During image preparation the chrominace precision is reduced 2. Each 8x8 block is transformed using the DCT, quantizised,, run-length and huffman encoded 3. Picture Layer - Contains one picture 4. Slice Layer - A set of macroblocks using the same DCT-Quatization scaling 3. Temporal correlations between video frames are used to reduce the size of 6x6 pixel makro blocks 5. Macroblock Layer - A block of 6x6 pixel build of four 8x8 blocks of the luminace plane and of two 8x8 blocks of the chrominance planes (one block of each chrominance plane) 6. Block Layer Layer - One 8x8 block compressed using DCT Frame # Frame #2 Frame #3 Parts of frame # which change only slightly, may be encoded as references to frame # in frame #2 and frame #3 Moving vectors are references to a 6x6 pixel area in prior or following frames describing temporal corelations 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Using Moving Vectors MPEG frames types While encoding a makro block the encoders seeks for a similar 6x6 area in other frames. If such an area has been found the macro block is encoded by: The moving vector, describing the frame and the position of the similar area Calculate the difference of the actual 6x6 pixel and the similar area (using luminance and chrominance planes) Applying the DCT + quantization + entropy encoding to the difference only. A special value is used to describe a complete empty 8x8 block MPEG defines how to describe a moving vector only MPEG does not define an algortihm for finding such a vector good encoders find good matches in prior or following frames medium encoders find some matches in other frames bad encoders do not even try to find moving vectors Usually only the lumiance values are used to find similar areas two adjacent makro blocks often have similar moving vectors Several frame types with different temporal correlations: full frames are transmitted periodically (I-Frames) frames that depend only on preceding frames (P-Frames) are used to simplify the calculation of B-Frames temporal correlations may depend on frames of the past and frames of the future (B-Frames) Sequence of I-, I, P-, P, and B-Frames: B I B B P B References B P I t I-Frames (Intracoded) P-Frames (Predictive Coded) B-Frames (Bidirectionally Coded) D-Frames (DC Coded) 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

16 MPEG frame types MPEG frame types I-frames Coding without relation to other images Apply DCT to 8 x 8 pixel blocks + spectral quantization + entropy coding ~ JPEG P-frames Coding with relation to prior P or I frames B-frames Coding with relation to prior and following I and P frames Makro blocks of B-frames may be encoded like makro blocks of P-frames or may be described as an interpolation of I or P frame macro blocks and its differences to the macro block to be coded Makro blocks of P-frames may be encoded like makro blocks of I- frames or moving vectors may be used, so that only the difference to a prior frame must be encoded I-frame B-frame P-frame I-frame Moving vector P-frame Difference between the makro block of the I-frame and source image of the P-frame Difference between the interpolation of the P-frame and I- frame makro block and source image of the B-frame Moving vector 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG MPEG frame types MPEG-2 D-frames contain low frequency information only, i.e. the DC coefficient (=, coefficient) only used to support fast forward not necessary when periodic I-frames are used MPEG-2 is an extension to MPEG- for high quality video The standard is flexible Profiles are defined for application classes Different levels of qualities per profile MPEG-2 defines scaling capabilities,, i.e. a decoder can select the required scale Spatial, the horizontal and vertical resolution can be adapted by the receiver Each picture is coded in different sizes, whereby the coding of size n contains only the differences to the image of size n- Rate, the number of frames per second may be defined by the receiver Adequate placing of I-frames and (optionally) D-frames enables the playback with different frame rates 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

17 MPEG-2 Profiles MPEG-4 Profiles Level attributes High Level 92x52 High-44 Level 44x52 Main Level 72x572 Low Level 352x288 Simple Profile No B- frames 5 Mbit/s Not scalable Main Profile 8 Mbit/s 6 Mbit/s 5 Mbit/s 4 Mbit/s 4:2: SNR scalable Profile SNR scalable 5 Mbit/s 4 Mbit/s B-frames Spatial scalable Profile SNR or spatial scalable 6 Mbit/s High Profile 4:2: or 4:2:2 Mbit/s 8 Mbit/s 2 Mbit/s Work on the standard startet 993 with these requirements: Efficiently represent a number of data types: Video from very low bitrates to very high quality conditions; Music and speech data for a very wide bitrate range Generic dynamic 3-D objects as well as specific objects such as human faces and bodies; Speech and music to be synthesized by the decoder, including support for 3-D audio spaces; Text and graphics; Provide, in the encoding layer, resilience to residual errors for the various data types, for difficult channel conditions such as mobile ones; Independently represent the various objects in the scene, allowing independent access for their manipulation and re-use; Compose audio and visual, natural and synthetic, objects into one audiovisual scene; Describe the objects and the events in the scene; Provide interaction and hyperlinking capabilities; Manage and protect intellectual property on audiovisual content and algorithms, so that only authorized users have access. Provide a delivery media independent representation format, to transparently cross the borders of different delivery environments. 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG MPEG-4 Scene (Example) MPEG-4 Scene Description, Multiplexing & Composition A scene is described by an object tree and coordinates for each AVO Each AVO is encoded by a special CoDec, e.g. wavelet for textures Multiplexing and composition Source: 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Source: 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

18 MPEG-4 Remarks H.26 / H.263 The standard is very flexible, it may be extended by new compression techniques Data types Extensions to the standard are descirbed by the MPEG-4 Syntactic Description Language (MSDL) The scene description of MPEG-4 is based on VRML Compression efficiency: Modelling of a scene adds complexitiy to the encoder an decoder Distinction between forground and background will lead to a better compression (compared with MPEG- or 2) in most cases Video compression for video conferences Compression in real time Targeted to ISDN Compressed data stream: p* 64 Kbit/s, p=,..., 3 The data stream structure contains more information than just video: error correction information image sequence number (H.26: 5 bit / H.263: 8 bit) control commands from encoder to decoder start / stop playing video freeze a still image + timeout for automatic restart of video play... Order of appearance and technical influences: H.26 MPEG- H.263 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG H.26 / H.263 image preparation Video input must provide 29,97 images per second YUV representation with color sampling ratio of 4:2: Image sizes: CIF (Common Intermediate Format) 352 x 288 QCIF (Quarter-CIF) 76 x 44 H.263 only: SQCIF (Sub Quarter CIF) 28 x 96 4CIF (4 time CIF) 74 x 576 6CIF (6 times CIF) 48 x 52 Decoders must implement QCIF only the rest is optional Structures: H.26 / H.263 coding block = 8 x 8 pixel of Y U or V plane macro block = 4 blocks of Y plane + block of U and V plane group of blocks (GOB) = 33 macro blocks Intraframe coding: apply DCT to blocks quantization with fixed Q-factors for DC coefficient (= coefficient at position,) for AC coefficients ( = all other coefficients) between macro blocks within a GOB the Q-factor may be changed Interframe coding (more options for H.263): there is a moving vector for each macro block the moving vector may be null otherwise the macro block contains the difference only there is a special code if the difference is null 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

19 Further Video Compression Standards Audio Compression Digital Video Interactive (DVI): Intel/IBM Technology for digital video 2 Levels of quality: DVI PLV (Production Level Video) (VCR) VHS quality DVI RTV (Real Time Video) worse quality Conventional, lossless compression method, such like Run Length Coding, can be use to compress sound file, but the results depend heavily on the specific sound Some lossy sound compression methods, like silence compression and companding (Compressing/Expanding), which taking the advantage of our perception of sound, can get better quality Silence compression: some small samples are treated as if they are silence(as samples of zero), since some people have less sensitive hearinh Companding: ear requires more presice samples at low amplitudes than high amplitudes. Compandind uses a nonlinear formula to reduce the number of bits per samples 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG µ-law and A-LawA Audio Compression µ-law and A-Law: encoder International standard, logarithm-based, to encode digitized audio sample for ISDN digital telephony services Experiments indicating that the low amplitudes of speech signals containing more information than the high amplitudes Encoder receiving 4-bit input sample x, normalizing it to x, its is within the interval [-,+], G.7 standard recommends µ = 255 P µ-law Codeword Format S2 E.g. : 656 S S Q3 Q2 Q Q ln( + µ x) x = sgn( x), ln( + µ ) +, for x > wheresgn( x) =, for x =, for x < Since logarithms is complex, so in practice the encoder performs much simpler calculations that produce an approximation 2 9 Q3 8 Q2 7 Q 6 Q 5. Adding 33 to the absolute value of the input sample 2. Determining the bit position of the significant -bit among bits 5 through 2 of the input 3. Subtracting 5 from that position -> Segment Code 4. The 4-bits quantization code is set of the four bits following the bit position determined in step ,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

20 Audio Compression MPEG Audio P S2 S S Q3 µ-law and A-Law: decoder. Multiply the quantization code by 2 and add 33 ->5, so 5 x = Multiply the result by 2 raised to the power of the segment code 4 ->4, so 43 x 2 = Decrement the result by = Use bit P to determine the sign ->-655 Q2 Q Q MPEG-: (992, ISO/IEC 72-3) signal-channel (mono) and two-channel (stereo) coding of digitized sound signal used for high quality audio at 32, 44. and 48 KHz sampling rate 3 coding methods are defined: Layer-, Layer-2, Layer-3 Predefined bit rates range from 32 to 448 kbit/s for layer-, from 32 to 384 kbit/s for Layer-2, and from 32 to 32 kbit/s for Layer-3 MPEG-2 BC: (994, ISO/IEC 388-3) A backwards compatible multichannel extension to MPEG-, up to 5 main channels plus a low frequent enhancement channel (5. channels) can be coded Low sample rate extension, sampling frequencies at 6, 22.5 and 24 KHz Lower bit rate extension, bit rates down from 32 to 256 kbit/s for Layer-, and from 8 to 6 kbit/s for Layer-2 and Layer-3 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG MPEG Audio Layer MPEG-2 AAC (Advanced Audio Coding): (997, ISO/IEC 388-7) A high quality audio coding standard for to 48 channels at sampling rates of 8 to 96 KHz Not backward compatible, cannot be read and interpreted by an MPEG- audio encoder MPEG-4: (999, ISO/IEC ) Object-based coding Both in MPEG- and MPEG-2 BC are three layers defined. These Layers represent a family of coding algorithms. Basic model is the same, but codec complexity, performance and delay increase with each layer Layer- Compression ratio 4: Delay 9 to 5 ms Application Digital compact Cassette(DCC) 384kbit/s,Stereo Layer-2 6: to 8: 35 to ms DVD Layer-3 (MP3) : to 2: 59 to 5 ms Digital audio Broadcast kbit/s 256kbit/s Internet Audio 2-28kbit/s 28kbit/s 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

21 Psychoacoustic Psychoacoustic 2 MPEG is modern perceptual audio coding techniques exploit the psychoacoustic principles. The term psychoacoustic describes the characteristic of the human auditory system Sensitivity of human hearing Range is about 2 Hz to 2 KHz, most sensitive at 2 to 4 KHZ Spectral masking effect Critical band: narrow at low audible frequencies, wide at high frequencies Temporal masking effect Making effect before and after a strong sound Pre masking is about 2 to 5 ms, the postmasking can be up till ms 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG MPEG Audio encoder Format of Compressed Data Layer- The input audio stream passes through a filter bank that divides the input into 32 subbands of frequency (the audio samples are transformed from time domain to frequency domain). The subband samples are packeged into frames containing 384 samples in Layer- (2 samples/subband * 32) and 52 samples in Layer-2/3 (36 * 32) The input audio stream simultaneously passes through a psychoacoustic model that determines the masking threshold (SMR, Signal-to-Mask Ratio) for each subband Header (32) CRC (,6) Bit Allocation (28-256) 256) Scalefactors (-384) Samples Ancillary data The header of each frame contains general information such as the synchronization information, MPEG layer, the sampling frequency, the number of channels, the bit-rate and coding mode Bit allocation describes the number of bits per sample each subband (samples in different subbands could be represent with different number of bits), for Lyer- this allocation can be to 5 bits per suband The 2 signals of each subband are scaled such that the largest one becomes very close to one but not greater than one, each scale factor has 6 bits 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

22 Format of Compressed Data Layer-2 Format of Compressed Data Layer-3 Header (32) CRC (,6) Bit Allocation (26-88) SCSFI (-6) Scale- factors (-384) Samples 52 samples in Layer-2/3 (36 * 32) in each frame A frame is divided into 3 parts, each resembles a Layer- frame SCFSI (scale factor selection information) has 2 bits, it indicates whether, 2 or 3 sacle factors per subband are written in the frame Ancillary data Header Side Info Frame For Layer-3 is variable bit rate allowed Encoder can borrow bits donated from past frames Side information includes a 9 bits point, main_data_begin, Header 32 2 Herder Side Info Frame 2 CRC (,6) Side information (36,256) Header Side Info Frame 3 4 samples Header Side Info Frame ,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG Bit Allocation Bit Allocation The psychoacoustic model and the bit allocation algorithm are invoked to determine the number of bits allocated to the quantization of each scaled sample in each subband The bit allocation algorithm works in this way, that the quantization noise (difference between the original spectral values and the quantized spectral values) is below the masking threshold, while using not more than the available bits over a frame. Since the sample rate, samples per frame and bit rate are known, so the available bits per frame is fixed For the most efficient compression, each subband should be allocated no more bits than necessary to make the quatization noise inaudible MNR = SNR SMR MNR: Mask-to-Noise Ratio SNR: Signal-to-Noise Ratio, (defined in standard,depending on the number of bits per sample) SMR: Signal-to-Mask Ratio, (computed in psychoacoustic model) For Layer- and Layer-2 : The process repeats until no more code bits can be allocated or until all the subbands have reached their maximum limit For Layer-3 : Bit Allocation is similar to Layer-/2, adds noise allocation The process stops if: All scale-factor bands have the allowed noise or less The next iteration would cause the amplification for any of the bands to exceed the maximum allowed value The next iteration would require a requantization of all the bands The Layer-3 uses Nonuniform quantization Uses Huffmann Coding 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

23 MPEG-2 2 AAC (Advanced Audio Coding) MPEG-2 AAC is the state of the art audio coding scheme for generic coding of stereo multichannel signals, it gives up backwards compatibility to MPEG- AAC follows the same basic coding paradigm as Layer-3 (high frequency resolution filter bank, non-uniform quantization, Huffman coding, iteration loop structure), but improves on Layer-3 in a lot of details and uses new coding tools for improved quality at low bit-rates AAC on the contrary standards only the format of the encoded audio data. The only audio coding scheme used within the MPEG-4 standard Application Digital broadcasting system Audio via Internet 2,2 Universität Kaiserslautern, Fachbereich Informatik, AG

Multimediale Visualisierungssysteme WS 2000/2001

Multimediale Visualisierungssysteme WS 2000/2001 Multimediale Visualisierungssysteme WS 2000/2001 5. Compression η = i p i log 2 1 p i Prof. Dr. Paul Müller AG: Integrierte Kommunikationssysteme How to contact Prof. Dr. Paul Müller 34 / 312 Tel.: 0631

More information

Entropy Coding. - to shorten the average code length by assigning shorter codes to more probable symbols => Morse-, Huffman-, Arithmetic Code

Entropy Coding. - to shorten the average code length by assigning shorter codes to more probable symbols => Morse-, Huffman-, Arithmetic Code Entropy Coding } different probabilities for the appearing of single symbols are used - to shorten the average code length by assigning shorter codes to more probable symbols => Morse-, Huffman-, Arithmetic

More information

5.9. Video Compression (1)

5.9. Video Compression (1) 5.9. Video Compression (1) Basics: video := time sequence of single images frequent point of view: video compression = image compression with a temporal component assumption: successive images of a video

More information

Repetition 1st lecture

Repetition 1st lecture Repetition 1st lecture Human Senses in Relation to Technical Parameters Multimedia - what is it? Human senses (overview) Historical remarks Color models RGB Y, Cr, Cb Data rates Text, Graphic Picture,

More information

ICSY Integrated. Multimediale Visualisierungssysteme WS 2000/2001. Introduction. Communica. Systems. tion. Prof. Dr. Paul Müller

ICSY Integrated. Multimediale Visualisierungssysteme WS 2000/2001. Introduction. Communica. Systems. tion. Prof. Dr. Paul Müller Communica tion Multimediale Visualisierungssysteme WS 2000/2001 Introduction Prof. Dr. Paul Müller AG: Integrierte Kommunikationssysteme How to contact Prof. Dr. Paul Müller 34 / 312 Tel.: 0631 / 205-2263

More information

Multimedia Standards

Multimedia Standards Multimedia Standards SS 2017 Lecture 5 Prof. Dr.-Ing. Karlheinz Brandenburg Karlheinz.Brandenburg@tu-ilmenau.de Contact: Dipl.-Inf. Thomas Köllmer thomas.koellmer@tu-ilmenau.de 1 Organisational issues

More information

Lecture 8 JPEG Compression (Part 3)

Lecture 8 JPEG Compression (Part 3) CS 414 Multimedia Systems Design Lecture 8 JPEG Compression (Part 3) Klara Nahrstedt Spring 2012 Administrative MP1 is posted Today Covered Topics Hybrid Coding: JPEG Coding Reading: Section 7.5 out of

More information

Video Compression An Introduction

Video Compression An Introduction Video Compression An Introduction The increasing demand to incorporate video data into telecommunications services, the corporate environment, the entertainment industry, and even at home has made digital

More information

VIDEO COMPRESSION. Image Compression. Multimedia File Formats. Lossy Compression. Multimedia File Formats. October 8, 2009

VIDEO COMPRESSION. Image Compression. Multimedia File Formats. Lossy Compression. Multimedia File Formats. October 8, 2009 File Formats Lossy Compression Image Compression File Formats VIDEO COMPRESSION 121 (Basics) video := time sequence of single images frequent point of view: video compression = image compression with a

More information

Optical Storage Technology. MPEG Data Compression

Optical Storage Technology. MPEG Data Compression Optical Storage Technology MPEG Data Compression MPEG-1 1 Audio Standard Moving Pictures Expert Group (MPEG) was formed in 1988 to devise compression techniques for audio and video. It first devised the

More information

Audio-coding standards

Audio-coding standards Audio-coding standards The goal is to provide CD-quality audio over telecommunications networks. Almost all CD audio coders are based on the so-called psychoacoustic model of the human auditory system.

More information

CS 335 Graphics and Multimedia. Image Compression

CS 335 Graphics and Multimedia. Image Compression CS 335 Graphics and Multimedia Image Compression CCITT Image Storage and Compression Group 3: Huffman-type encoding for binary (bilevel) data: FAX Group 4: Entropy encoding without error checks of group

More information

Perceptual coding. A psychoacoustic model is used to identify those signals that are influenced by both these effects.

Perceptual coding. A psychoacoustic model is used to identify those signals that are influenced by both these effects. Perceptual coding Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal. Perceptual encoders, however, have been designed for the compression of general

More information

Audio-coding standards

Audio-coding standards Audio-coding standards The goal is to provide CD-quality audio over telecommunications networks. Almost all CD audio coders are based on the so-called psychoacoustic model of the human auditory system.

More information

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression IMAGE COMPRESSION Image Compression Why? Reducing transportation times Reducing file size A two way event - compression and decompression 1 Compression categories Compression = Image coding Still-image

More information

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS Television services in Europe currently broadcast video at a frame rate of 25 Hz. Each frame consists of two interlaced fields, giving a field rate of 50

More information

Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal.

Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal. Perceptual coding Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal. Perceptual encoders, however, have been designed for the compression of general

More information

Interframe coding A video scene captured as a sequence of frames can be efficiently coded by estimating and compensating for motion between frames pri

Interframe coding A video scene captured as a sequence of frames can be efficiently coded by estimating and compensating for motion between frames pri MPEG MPEG video is broken up into a hierarchy of layer From the top level, the first layer is known as the video sequence layer, and is any self contained bitstream, for example a coded movie. The second

More information

Lecture 6: Compression II. This Week s Schedule

Lecture 6: Compression II. This Week s Schedule Lecture 6: Compression II Reading: book chapter 8, Section 1, 2, 3, 4 Monday This Week s Schedule The concept behind compression Rate distortion theory Image compression via DCT Today Speech compression

More information

Lecture 5: Compression I. This Week s Schedule

Lecture 5: Compression I. This Week s Schedule Lecture 5: Compression I Reading: book chapter 6, section 3 &5 chapter 7, section 1, 2, 3, 4, 8 Today: This Week s Schedule The concept behind compression Rate distortion theory Image compression via DCT

More information

Lecture 8 JPEG Compression (Part 3)

Lecture 8 JPEG Compression (Part 3) CS 414 Multimedia Systems Design Lecture 8 JPEG Compression (Part 3) Klara Nahrstedt Spring 2011 Administrative MP1 is posted Extended Deadline of MP1 is February 18 Friday midnight submit via compass

More information

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding Perceptual Coding Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding Part II wrap up 6.082 Fall 2006 Perceptual Coding, Slide 1 Lossless vs.

More information

Audio and video compression

Audio and video compression Audio and video compression 4.1 introduction Unlike text and images, both audio and most video signals are continuously varying analog signals. Compression algorithms associated with digitized audio and

More information

Video coding. Concepts and notations.

Video coding. Concepts and notations. TSBK06 video coding p.1/47 Video coding Concepts and notations. A video signal consists of a time sequence of images. Typical frame rates are 24, 25, 30, 50 and 60 images per seconds. Each image is either

More information

5: Music Compression. Music Coding. Mark Handley

5: Music Compression. Music Coding. Mark Handley 5: Music Compression Mark Handley Music Coding LPC-based codecs model the sound source to achieve good compression. Works well for voice. Terrible for music. What if you can t model the source? Model the

More information

Chapter 14 MPEG Audio Compression

Chapter 14 MPEG Audio Compression Chapter 14 MPEG Audio Compression 14.1 Psychoacoustics 14.2 MPEG Audio 14.3 Other Commercial Audio Codecs 14.4 The Future: MPEG-7 and MPEG-21 14.5 Further Exploration 1 Li & Drew c Prentice Hall 2003 14.1

More information

Wireless Communication

Wireless Communication Wireless Communication Systems @CS.NCTU Lecture 6: Image Instructor: Kate Ching-Ju Lin ( 林靖茹 ) Chap. 9 of Fundamentals of Multimedia Some reference from http://media.ee.ntu.edu.tw/courses/dvt/15f/ 1 Outline

More information

Audio Compression. Audio Compression. Absolute Threshold. CD quality audio:

Audio Compression. Audio Compression. Absolute Threshold. CD quality audio: Audio Compression Audio Compression CD quality audio: Sampling rate = 44 KHz, Quantization = 16 bits/sample Bit-rate = ~700 Kb/s (1.41 Mb/s if 2 channel stereo) Telephone-quality speech Sampling rate =

More information

Image, video and audio coding concepts. Roadmap. Rationale. Stefan Alfredsson. (based on material by Johan Garcia)

Image, video and audio coding concepts. Roadmap. Rationale. Stefan Alfredsson. (based on material by Johan Garcia) Image, video and audio coding concepts Stefan Alfredsson (based on material by Johan Garcia) Roadmap XML Data structuring Loss-less compression (huffman, LZ77,...) Lossy compression Rationale Compression

More information

Principles of Audio Coding

Principles of Audio Coding Principles of Audio Coding Topics today Introduction VOCODERS Psychoacoustics Equal-Loudness Curve Frequency Masking Temporal Masking (CSIT 410) 2 Introduction Speech compression algorithm focuses on exploiting

More information

ELL 788 Computational Perception & Cognition July November 2015

ELL 788 Computational Perception & Cognition July November 2015 ELL 788 Computational Perception & Cognition July November 2015 Module 11 Audio Engineering: Perceptual coding Coding and decoding Signal (analog) Encoder Code (Digital) Code (Digital) Decoder Signal (analog)

More information

Multimedia Communications. Audio coding

Multimedia Communications. Audio coding Multimedia Communications Audio coding Introduction Lossy compression schemes can be based on source model (e.g., speech compression) or user model (audio coding) Unlike speech, audio signals can be generated

More information

Fundamentals of Video Compression. Video Compression

Fundamentals of Video Compression. Video Compression Fundamentals of Video Compression Introduction to Digital Video Basic Compression Techniques Still Image Compression Techniques - JPEG Video Compression Introduction to Digital Video Video is a stream

More information

Digital Video Processing

Digital Video Processing Video signal is basically any sequence of time varying images. In a digital video, the picture information is digitized both spatially and temporally and the resultant pixel intensities are quantized.

More information

ECE 417 Guest Lecture Video Compression in MPEG-1/2/4. Min-Hsuan Tsai Apr 02, 2013

ECE 417 Guest Lecture Video Compression in MPEG-1/2/4. Min-Hsuan Tsai Apr 02, 2013 ECE 417 Guest Lecture Video Compression in MPEG-1/2/4 Min-Hsuan Tsai Apr 2, 213 What is MPEG and its standards MPEG stands for Moving Picture Expert Group Develop standards for video/audio compression

More information

Lossy compression. CSCI 470: Web Science Keith Vertanen

Lossy compression. CSCI 470: Web Science Keith Vertanen Lossy compression CSCI 470: Web Science Keith Vertanen Digital audio Overview Sampling rate Quan5za5on MPEG audio layer 3 (MP3) JPEG s5ll images Color space conversion, downsampling Discrete Cosine Transform

More information

What is multimedia? Multimedia. Continuous media. Most common media types. Continuous media processing. Interactivity. What is multimedia?

What is multimedia? Multimedia. Continuous media. Most common media types. Continuous media processing. Interactivity. What is multimedia? Multimedia What is multimedia? Media types +Text + Graphics + Audio +Image +Video Interchange formats What is multimedia? Multimedia = many media User interaction = interactivity Script = time 1 2 Most

More information

Compression; Error detection & correction

Compression; Error detection & correction Compression; Error detection & correction compression: squeeze out redundancy to use less memory or use less network bandwidth encode the same information in fewer bits some bits carry no information some

More information

VIDEO AND IMAGE PROCESSING USING DSP AND PFGA. Chapter 3: Video Processing

VIDEO AND IMAGE PROCESSING USING DSP AND PFGA. Chapter 3: Video Processing ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINH TRƯỜNG ĐẠI HỌC BÁCH KHOA KHOA ĐIỆN-ĐIỆN TỬ BỘ MÔN KỸ THUẬT ĐIỆN TỬ VIDEO AND IMAGE PROCESSING USING DSP AND PFGA Chapter 3: Video Processing 3.1 Video Formats 3.2 Video

More information

Compression II: Images (JPEG)

Compression II: Images (JPEG) Compression II: Images (JPEG) What is JPEG? JPEG: Joint Photographic Expert Group an international standard in 1992. Works with colour and greyscale images Up 24 bit colour images (Unlike GIF) Target Photographic

More information

Multimedia. What is multimedia? Media types. Interchange formats. + Text +Graphics +Audio +Image +Video. Petri Vuorimaa 1

Multimedia. What is multimedia? Media types. Interchange formats. + Text +Graphics +Audio +Image +Video. Petri Vuorimaa 1 Multimedia What is multimedia? Media types + Text +Graphics +Audio +Image +Video Interchange formats Petri Vuorimaa 1 What is multimedia? Multimedia = many media User interaction = interactivity Script

More information

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck Compression Part 2 Lossy Image Compression (JPEG) General Compression Design Elements 2 Application Application Model Encoder Model Decoder Compression Decompression Models observe that the sensors (image

More information

Lossy compression CSCI 470: Web Science Keith Vertanen Copyright 2013

Lossy compression CSCI 470: Web Science Keith Vertanen Copyright 2013 Lossy compression CSCI 470: Web Science Keith Vertanen Copyright 2013 Digital audio Overview Sampling rate Quan5za5on MPEG audio layer 3 (MP3) JPEG s5ll images Color space conversion, downsampling Discrete

More information

CMPT 365 Multimedia Systems. Media Compression - Image

CMPT 365 Multimedia Systems. Media Compression - Image CMPT 365 Multimedia Systems Media Compression - Image Spring 2017 Edited from slides by Dr. Jiangchuan Liu CMPT365 Multimedia Systems 1 Facts about JPEG JPEG - Joint Photographic Experts Group International

More information

7.5 Dictionary-based Coding

7.5 Dictionary-based Coding 7.5 Dictionary-based Coding LZW uses fixed-length code words to represent variable-length strings of symbols/characters that commonly occur together, e.g., words in English text LZW encoder and decoder

More information

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression Digital Compression Page 8.1 DigiPoints Volume 1 Module 8 Digital Compression Summary This module describes the techniques by which digital signals are compressed in order to make it possible to carry

More information

15 Data Compression 2014/9/21. Objectives After studying this chapter, the student should be able to: 15-1 LOSSLESS COMPRESSION

15 Data Compression 2014/9/21. Objectives After studying this chapter, the student should be able to: 15-1 LOSSLESS COMPRESSION 15 Data Compression Data compression implies sending or storing a smaller number of bits. Although many methods are used for this purpose, in general these methods can be divided into two broad categories:

More information

Multimedia Systems Image III (Image Compression, JPEG) Mahdi Amiri April 2011 Sharif University of Technology

Multimedia Systems Image III (Image Compression, JPEG) Mahdi Amiri April 2011 Sharif University of Technology Course Presentation Multimedia Systems Image III (Image Compression, JPEG) Mahdi Amiri April 2011 Sharif University of Technology Image Compression Basics Large amount of data in digital images File size

More information

Compression; Error detection & correction

Compression; Error detection & correction Compression; Error detection & correction compression: squeeze out redundancy to use less memory or use less network bandwidth encode the same information in fewer bits some bits carry no information some

More information

Multimedia Communications Multimedia Technologies & Applications. Prof. Dr. Abdulmotaleb El Saddik

Multimedia Communications Multimedia Technologies & Applications. Prof. Dr. Abdulmotaleb El Saddik Multimedia Communications Multimedia Technologies & Applications Prof. Dr. Abdulmotaleb El Saddik Multimedia Communications Research Laboratory School of Information Technology and Engineering University

More information

Chapter 11.3 MPEG-2. MPEG-2: For higher quality video at a bit-rate of more than 4 Mbps Defined seven profiles aimed at different applications:

Chapter 11.3 MPEG-2. MPEG-2: For higher quality video at a bit-rate of more than 4 Mbps Defined seven profiles aimed at different applications: Chapter 11.3 MPEG-2 MPEG-2: For higher quality video at a bit-rate of more than 4 Mbps Defined seven profiles aimed at different applications: Simple, Main, SNR scalable, Spatially scalable, High, 4:2:2,

More information

Lecture 16 Perceptual Audio Coding

Lecture 16 Perceptual Audio Coding EECS 225D Audio Signal Processing in Humans and Machines Lecture 16 Perceptual Audio Coding 2012-3-14 Professor Nelson Morgan today s lecture by John Lazzaro www.icsi.berkeley.edu/eecs225d/spr12/ Hero

More information

CISC 7610 Lecture 3 Multimedia data and data formats

CISC 7610 Lecture 3 Multimedia data and data formats CISC 7610 Lecture 3 Multimedia data and data formats Topics: Perceptual limits of multimedia data JPEG encoding of images MPEG encoding of audio MPEG and H.264 encoding of video Multimedia data: Perceptual

More information

COMP 249 Advanced Distributed Systems Multimedia Networking. The Video Data Type Coding & Compression Basics

COMP 249 Advanced Distributed Systems Multimedia Networking. The Video Data Type Coding & Compression Basics COMP 9 Advanced Distributed Systems Multimedia Networking The Video Data Type Coding & Compression Basics Kevin Jeffay Department of Computer Science University of North Carolina at Chapel Hill jeffay@cs.unc.edu

More information

EE67I Multimedia Communication Systems Lecture 4

EE67I Multimedia Communication Systems Lecture 4 EE67I Multimedia Communication Systems Lecture 4 Lossless Compression Basics of Information Theory Compression is either lossless, in which no information is lost, or lossy in which information is lost.

More information

2.2: Images and Graphics Digital image representation Image formats and color models JPEG, JPEG2000 Image synthesis and graphics systems

2.2: Images and Graphics Digital image representation Image formats and color models JPEG, JPEG2000 Image synthesis and graphics systems Chapter 2: Representation of Multimedia Data Audio Technology Images and Graphics Video Technology Chapter 3: Multimedia Systems Communication Aspects and Services Chapter 4: Multimedia Systems Storage

More information

Video Compression Standards (II) A/Prof. Jian Zhang

Video Compression Standards (II) A/Prof. Jian Zhang Video Compression Standards (II) A/Prof. Jian Zhang NICTA & CSE UNSW COMP9519 Multimedia Systems S2 2009 jzhang@cse.unsw.edu.au Tutorial 2 : Image/video Coding Techniques Basic Transform coding Tutorial

More information

CSCD 443/533 Advanced Networks Fall 2017

CSCD 443/533 Advanced Networks Fall 2017 CSCD 443/533 Advanced Networks Fall 2017 Lecture 18 Compression of Video and Audio 1 Topics Compression technology Motivation Human attributes make it possible Audio Compression Video Compression Performance

More information

Ch. 2: Compression Basics Multimedia Systems

Ch. 2: Compression Basics Multimedia Systems Ch. 2: Compression Basics Multimedia Systems Prof. Ben Lee School of Electrical Engineering and Computer Science Oregon State University Outline Why compression? Classification Entropy and Information

More information

Audio Coding and MP3

Audio Coding and MP3 Audio Coding and MP3 contributions by: Torbjørn Ekman What is Sound? Sound waves: 20Hz - 20kHz Speed: 331.3 m/s (air) Wavelength: 165 cm - 1.65 cm 1 Analogue audio frequencies: 20Hz - 20kHz mono: x(t)

More information

2.4 Audio Compression

2.4 Audio Compression 2.4 Audio Compression 2.4.1 Pulse Code Modulation Audio signals are analog waves. The acoustic perception is determined by the frequency (pitch) and the amplitude (loudness). For storage, processing and

More information

7: Image Compression

7: Image Compression 7: Image Compression Mark Handley Image Compression GIF (Graphics Interchange Format) PNG (Portable Network Graphics) MNG (Multiple-image Network Graphics) JPEG (Join Picture Expert Group) 1 GIF (Graphics

More information

VC 12/13 T16 Video Compression

VC 12/13 T16 Video Compression VC 12/13 T16 Video Compression Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos Miguel Tavares Coimbra Outline The need for compression Types of redundancy

More information

Outline Introduction MPEG-2 MPEG-4. Video Compression. Introduction to MPEG. Prof. Pratikgiri Goswami

Outline Introduction MPEG-2 MPEG-4. Video Compression. Introduction to MPEG. Prof. Pratikgiri Goswami to MPEG Prof. Pratikgiri Goswami Electronics & Communication Department, Shree Swami Atmanand Saraswati Institute of Technology, Surat. Outline of Topics 1 2 Coding 3 Video Object Representation Outline

More information

Tech Note - 05 Surveillance Systems that Work! Calculating Recorded Volume Disk Space

Tech Note - 05 Surveillance Systems that Work! Calculating Recorded Volume Disk Space Tech Note - 05 Surveillance Systems that Work! Surveillance Systems Calculating required storage drive (disk space) capacity is sometimes be a rather tricky business. This Tech Note is written to inform

More information

Course Syllabus. Website Multimedia Systems, Overview

Course Syllabus. Website   Multimedia Systems, Overview Course Syllabus Website http://ce.sharif.edu/courses/93-94/2/ce342-1/ Page 1 Course Syllabus Textbook Z-N. Li, M.S. Drew, Fundamentals of Multimedia, Pearson Prentice Hall Upper Saddle River, NJ, 2004.*

More information

Digital Image Representation. Image Representation. Color Models

Digital Image Representation. Image Representation. Color Models Digital Representation Chapter : Representation of Multimedia Data Audio Technology s and Graphics Video Technology Chapter 3: Multimedia Systems Communication Aspects and Services Chapter 4: Multimedia

More information

Compression of Stereo Images using a Huffman-Zip Scheme

Compression of Stereo Images using a Huffman-Zip Scheme Compression of Stereo Images using a Huffman-Zip Scheme John Hamann, Vickey Yeh Department of Electrical Engineering, Stanford University Stanford, CA 94304 jhamann@stanford.edu, vickey@stanford.edu Abstract

More information

Index. 1. Motivation 2. Background 3. JPEG Compression The Discrete Cosine Transformation Quantization Coding 4. MPEG 5.

Index. 1. Motivation 2. Background 3. JPEG Compression The Discrete Cosine Transformation Quantization Coding 4. MPEG 5. Index 1. Motivation 2. Background 3. JPEG Compression The Discrete Cosine Transformation Quantization Coding 4. MPEG 5. Literature Lossy Compression Motivation To meet a given target bit-rate for storage

More information

Introduction to Video Coding

Introduction to Video Coding Introduction to Video Coding o Motivation & Fundamentals o Principles of Video Coding o Coding Standards Special Thanks to Hans L. Cycon from FHTW Berlin for providing first-hand knowledge and much of

More information

Multimedia Signals and Systems Motion Picture Compression - MPEG

Multimedia Signals and Systems Motion Picture Compression - MPEG Multimedia Signals and Systems Motion Picture Compression - MPEG Kunio Takaya Electrical and Computer Engineering University of Saskatchewan March 9, 2008 MPEG video coding A simple introduction Dr. S.R.

More information

Week 14. Video Compression. Ref: Fundamentals of Multimedia

Week 14. Video Compression. Ref: Fundamentals of Multimedia Week 14 Video Compression Ref: Fundamentals of Multimedia Last lecture review Prediction from the previous frame is called forward prediction Prediction from the next frame is called forward prediction

More information

Mahdi Amiri. February Sharif University of Technology

Mahdi Amiri. February Sharif University of Technology Course Presentation Multimedia Systems Overview of the Course Mahdi Amiri February 2014 Sharif University of Technology Course Syllabus Website http://ce.sharif.edu/courses/92-93/2/ce342-1/ Page 1 Course

More information

Digital video coding systems MPEG-1/2 Video

Digital video coding systems MPEG-1/2 Video Digital video coding systems MPEG-1/2 Video Introduction What is MPEG? Moving Picture Experts Group Standard body for delivery of video and audio. Part of ISO/IEC/JTC1/SC29/WG11 150 companies & research

More information

CMPT 365 Multimedia Systems. Media Compression - Video Coding Standards

CMPT 365 Multimedia Systems. Media Compression - Video Coding Standards CMPT 365 Multimedia Systems Media Compression - Video Coding Standards Spring 2017 Edited from slides by Dr. Jiangchuan Liu CMPT365 Multimedia Systems 1 Video Coding Standards H.264/AVC CMPT365 Multimedia

More information

Georgios Tziritas Computer Science Department

Georgios Tziritas Computer Science Department New Video Coding standards MPEG-4, HEVC Georgios Tziritas Computer Science Department http://www.csd.uoc.gr/~tziritas 1 MPEG-4 : introduction Motion Picture Expert Group Publication 1998 (Intern. Standardization

More information

( ) ; For N=1: g 1. g n

( ) ; For N=1: g 1. g n L. Yaroslavsky Course 51.7211 Digital Image Processing: Applications Lect. 4. Principles of signal and image coding. General principles General digitization. Epsilon-entropy (rate distortion function).

More information

Mpeg 1 layer 3 (mp3) general overview

Mpeg 1 layer 3 (mp3) general overview Mpeg 1 layer 3 (mp3) general overview 1 Digital Audio! CD Audio:! 16 bit encoding! 2 Channels (Stereo)! 44.1 khz sampling rate 2 * 44.1 khz * 16 bits = 1.41 Mb/s + Overhead (synchronization, error correction,

More information

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy JPEG JPEG Joint Photographic Expert Group Voted as international standard in 1992 Works with color and grayscale images, e.g., satellite, medical,... Motivation: The compression ratio of lossless methods

More information

AUDIO AND VIDEO COMMUNICATION MEEC EXERCISES. (with abbreviated solutions) Fernando Pereira

AUDIO AND VIDEO COMMUNICATION MEEC EXERCISES. (with abbreviated solutions) Fernando Pereira AUDIO AND VIDEO COMMUNICATION MEEC EXERCISES (with abbreviated solutions) Fernando Pereira INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Electrotécnica e de Computadores September 2014 1. Photographic

More information

Part 1 of 4. MARCH

Part 1 of 4. MARCH Presented by Brought to You by Part 1 of 4 MARCH 2004 www.securitysales.com A1 Part1of 4 Essentials of DIGITAL VIDEO COMPRESSION By Bob Wimmer Video Security Consultants cctvbob@aol.com AT A GLANCE Compression

More information

Lecture Coding Theory. Source Coding. Image and Video Compression. Images: Wikipedia

Lecture Coding Theory. Source Coding. Image and Video Compression. Images: Wikipedia Lecture Coding Theory Source Coding Image and Video Compression Images: Wikipedia Entropy Coding: Unary Coding Golomb Coding Static Huffman Coding Adaptive Huffman Coding Arithmetic Coding Run Length Encoding

More information

The Scope of Picture and Video Coding Standardization

The Scope of Picture and Video Coding Standardization H.120 H.261 Video Coding Standards MPEG-1 and MPEG-2/H.262 H.263 MPEG-4 H.264 / MPEG-4 AVC Thomas Wiegand: Digital Image Communication Video Coding Standards 1 The Scope of Picture and Video Coding Standardization

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY ACADEMIC YEAR / ODD SEMESTER QUESTION BANK

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY ACADEMIC YEAR / ODD SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY ACADEMIC YEAR 2011-2012 / ODD SEMESTER QUESTION BANK SUB.CODE / NAME YEAR / SEM : IT1301 INFORMATION CODING TECHNIQUES : III / V UNIT -

More information

INF5063: Programming heterogeneous multi-core processors. September 17, 2010

INF5063: Programming heterogeneous multi-core processors. September 17, 2010 INF5063: Programming heterogeneous multi-core processors September 17, 2010 High data volumes: Need for compression PAL video sequence 25 images per second 3 bytes per pixel RGB (red-green-blue values)

More information

compression and coding ii

compression and coding ii compression and coding ii Ole-Johan Skrede 03.05.2017 INF2310 - Digital Image Processing Department of Informatics The Faculty of Mathematics and Natural Sciences University of Oslo After original slides

More information

Audio Fundamentals, Compression Techniques & Standards. Hamid R. Rabiee Mostafa Salehi, Fatemeh Dabiran, Hoda Ayatollahi Spring 2011

Audio Fundamentals, Compression Techniques & Standards. Hamid R. Rabiee Mostafa Salehi, Fatemeh Dabiran, Hoda Ayatollahi Spring 2011 Audio Fundamentals, Compression Techniques & Standards Hamid R. Rabiee Mostafa Salehi, Fatemeh Dabiran, Hoda Ayatollahi Spring 2011 Outlines Audio Fundamentals Sampling, digitization, quantization μ-law

More information

Ch. 2: Compression Basics Multimedia Systems

Ch. 2: Compression Basics Multimedia Systems Ch. 2: Compression Basics Multimedia Systems Prof. Thinh Nguyen (Based on Prof. Ben Lee s Slides) Oregon State University School of Electrical Engineering and Computer Science Outline Why compression?

More information

Standard Codecs. Image compression to advanced video coding. Mohammed Ghanbari. 3rd Edition. The Institution of Engineering and Technology

Standard Codecs. Image compression to advanced video coding. Mohammed Ghanbari. 3rd Edition. The Institution of Engineering and Technology Standard Codecs Image compression to advanced video coding 3rd Edition Mohammed Ghanbari The Institution of Engineering and Technology Contents Preface to first edition Preface to second edition Preface

More information

Chapter 10. Basic Video Compression Techniques Introduction to Video Compression 10.2 Video Compression with Motion Compensation

Chapter 10. Basic Video Compression Techniques Introduction to Video Compression 10.2 Video Compression with Motion Compensation Chapter 10 Basic Video Compression Techniques 10.1 Introduction to Video Compression 10.2 Video Compression with Motion Compensation 10.3 Search for Motion Vectors 10.4 H.261 10.5 H.263 10.6 Further Exploration

More information

MULTIMEDIA COMMUNICATION

MULTIMEDIA COMMUNICATION MULTIMEDIA COMMUNICATION Laboratory Session: JPEG Standard Fernando Pereira The objective of this lab session about the JPEG (Joint Photographic Experts Group) standard is to get the students familiar

More information

Image and Video Coding I: Fundamentals

Image and Video Coding I: Fundamentals Image and Video Coding I: Fundamentals Heiko Schwarz Freie Universität Berlin Fachbereich Mathematik und Informatik H. Schwarz (FU Berlin) Image and Video Coding Organization Vorlesung: Montag 14:15-15:45

More information

2014 Summer School on MPEG/VCEG Video. Video Coding Concept

2014 Summer School on MPEG/VCEG Video. Video Coding Concept 2014 Summer School on MPEG/VCEG Video 1 Video Coding Concept Outline 2 Introduction Capture and representation of digital video Fundamentals of video coding Summary Outline 3 Introduction Capture and representation

More information

Lecture 3 Image and Video (MPEG) Coding

Lecture 3 Image and Video (MPEG) Coding CS 598KN Advanced Multimedia Systems Design Lecture 3 Image and Video (MPEG) Coding Klara Nahrstedt Fall 2017 Overview JPEG Compression MPEG Basics MPEG-4 MPEG-7 JPEG COMPRESSION JPEG Compression 8x8 blocks

More information

VIDEO COMPRESSION STANDARDS

VIDEO COMPRESSION STANDARDS VIDEO COMPRESSION STANDARDS Family of standards: the evolution of the coding model state of the art (and implementation technology support): H.261: videoconference x64 (1988) MPEG-1: CD storage (up to

More information

Appendix 4. Audio coding algorithms

Appendix 4. Audio coding algorithms Appendix 4. Audio coding algorithms 1 Introduction The main application of audio compression systems is to obtain compact digital representations of high-quality (CD-quality) wideband audio signals. Typically

More information

Lecture 5: Error Resilience & Scalability

Lecture 5: Error Resilience & Scalability Lecture 5: Error Resilience & Scalability Dr Reji Mathew A/Prof. Jian Zhang NICTA & CSE UNSW COMP9519 Multimedia Systems S 010 jzhang@cse.unsw.edu.au Outline Error Resilience Scalability Including slides

More information

Biomedical signal and image processing (Course ) Lect. 5. Principles of signal and image coding. Classification of coding methods.

Biomedical signal and image processing (Course ) Lect. 5. Principles of signal and image coding. Classification of coding methods. Biomedical signal and image processing (Course 055-355-5501) Lect. 5. Principles of signal and image coding. Classification of coding methods. Generalized quantization, Epsilon-entropy Lossless and Lossy

More information

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey Data Compression Media Signal Processing, Presentation 2 Presented By: Jahanzeb Farooq Michael Osadebey What is Data Compression? Definition -Reducing the amount of data required to represent a source

More information

Module 9 AUDIO CODING. Version 2 ECE IIT, Kharagpur

Module 9 AUDIO CODING. Version 2 ECE IIT, Kharagpur Module 9 AUDIO CODING Lesson 29 Transform and Filter banks Instructional Objectives At the end of this lesson, the students should be able to: 1. Define the three layers of MPEG-1 audio coding. 2. Define

More information