Download presentation
Presentation is loading. Please wait.
Published byBertha Lee Modified over 8 years ago
1
Vorlesung Codierungstheorie Quellencodierung Bild- und Videokompression
2
# 203.07.2016 Gordon Cichon Entropy Coding: Unary Coding Golomb Coding Static Huffman Coding Adaptive Huffman Coding Arithmetic Coding Run Length Encoding (RLE) e.g. BMP Differential Encoding Context Sensitive Coding Lempel-Ziv-* LZ77 Gameboy LZW (Welch) GIF, TIFF Deflate PNG, zlib, zip, etc. Lossy Image Coding JPEG The human eye Color Space Conversion, RGB YUV YCrCb, Chroma Subsampling Blocks 8x8, Discrete Cosine Transformation (H.264: wavelet transform) Ordering of Coefficients, Differentical Coding of DC color Thresholding Entropy Encoding Effects: low-contrast edges, deblocking filter Video Coding: MPEG-2, MPEG-4, H.264 Analog video (also for BMP): CRT scan order Prediction: spatial, temporal I-Frames 1e6 bit, P-Frames 3e5 bit, B-Frames 1e5 bit Motion Compensation, Optical Flow, Lukas Canade
3
03.07.2016 Gordon Cichon 3 Numeral Systems unary systems additive systems: (roman: I, II, III, IV, V, X, C, M, MMXI) positional systems common base: 2, 10, 16 10216 111 2102 3113 41004 51015 61106 71117 810008 910019 101010A 111011B 121100C 131101D 141110E 151111F 161000010
4
03.07.2016 Dr. Gordon Cichon 4 Example: Numeral Systems Example: 2014 10 2014-1024 = 990-512 = 478-256 = 222-128 = 98-64 = 30 30-16 = 14-8 = 6-4 = 2-2 = 0 binary:111 1101 1110 2 hexadecimal: 7DE 16 2020 1 2121 2 2 4 2323 8 2424 16 2525 32 2626 64 2727 128 2828 256 2929 512 2 10 1024 2 11 2048 2 12 4096
5
Run Length Encoding Compresses Repetition of Symbols e.g. A A A B B B B B 3x A, 5x B Special case: binary data {0,1} 0 0 0 1 1 1 1 1 3, 5 Disadvantage: compressed data may be longer than original Soltution: Escape symbol with original data A A A L M U B B B B B 3x A, ESC LMU, 5x B Examples: BMP image format # 503.07.2016 Referat Markus Mustermann
6
Windows Bitmap Format (BMP) # 603.07.2016 Referat Markus Mustermann OffsetTypeNameDescription 0uint16_tbfType„BM“ = 0x42 0x4D 2uint32_tbfSizeTotal size in bytes 6uint32_tbfReserved0 10uint32_tbfOffBitsOffset to image data (54 if no color table) 14uint32_tbiSize40 (sizeof(BITMAPINFOHEADER)) 18uint32_tbiWidthWidth of image 22uint32_tbiHeightHeight of image (negative: top-down, positive: bottom-up) 26uint16_tbiPlanes1 28uint16_tbiBitCountBits per pixel (1,4,8,16,24,32)
7
Windows Bitmap Format (BMP) – Part 2 # 703.07.2016 Referat Markus Mustermann OffsetTypeNameDescription 30uint32_tbiCompression0: BI_RGB 1: BI_RLE4 2: BI_RLE8 3: BI_BITFIELDS 34uint32_tbiSizeImageSize of image data in bytes 38uint32_tbiXPelsPerMet er Bits per pixel in X direction (or 0) 42uint32_tbiYPelsPerMet er Bits per pixel in Y direction (or 0) 46uint32_tbiClrUsedNumber of entries in color table (max 2 biBitCount ) 50uint32_tbiClrImportantSame as biClrUsed
8
Windows Bitmap Format (BMP) – Part 3 Color Table: biClrUsed entries of form: Blue, green, red, „0“ as bytes Image data: 24 bpp blue, green, red as bytes 1,4,8 bpp index into color table # 803.07.2016 Referat Markus Mustermann
9
Windows Bitmap Format (BMP) – RLE BI_RLE4, BL_RLE8 in biCompression (offset 30) Two bytes (a, b) a times „b“ e.g. A A A B B B B B 0x03 0x41 0x05 0x42 If a=0: # 903.07.2016 Referat Markus Mustermann Value of bDescription 0End of image line 1End of image 2(a‘,b‘): Skip a‘ columns and b‘ rows 3-255ESC for b bytes (align to 16 bits)
10
Differential Encoding # 1003.07.2016 Referat Markus Mustermann EncoderDecoder
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.