exercise 2 encoder decoder framework
play

Exercise 2: Encoder / Decoder Framework Goals : Implement basic - PowerPoint PPT Presentation

Exercise 2: Encoder / Decoder Framework Goals : Implement basic framework for encoder and decoder (without any real data processing) Implement block-wise processing of samples Encoder Operation Read image in PGM format Write data to bitstream


  1. Exercise 2: Encoder / Decoder Framework Goals : Implement basic framework for encoder and decoder (without any real data processing) Implement block-wise processing of samples Encoder Operation Read image in PGM format Write data to bitstream (on the basis of square B × B blocks) image width W and image height H (each as 16-bit value) block size B (as 16-bit value) process B × B blocks in raster-scan order (i.e., block line by block line) write samples of each block in line-by-line order Decoder Operation Read data from bitstream (on the basis of square B × B blocks as specified above) Write image in PGM format Heiko Schwarz (Freie Universität Berlin) — Image and Video Coding

  2. Exercise 2: Encoder / Decoder Framework structure of “pgm” files : Raw Data Format P5 // ascii (fixed) Format used as encoder input and decoder output width height // ascii 255 // ascii (max. value) Gray-level images in PGM format <binary data > // binary http://netpbm.sourceforge.net/doc/pgm.html binary data : samples in raster-scan order (line by line) PGM Header (in ASCII format) each sample is an 8-bit value (byte) The two bytes “P5” followed by whitespace(s) with a value between 0 and 255 Image width followed by whitespace(s) Image height followed by whitespace(s) Maximum sample value (always 255 in our case) Single whitespace character (typically newline) PGM Data (in binary format) Samples in line-by-line order Each sample (0..255) is represented by one byte Heiko Schwarz (Freie Universität Berlin) — Image and Video Coding

  3. Exercise 2: Encoder / Decoder Framework Suggested command line parameters encoder parameters : >./ encoder -i (input) -b (bitstream) [optional options] required parameters : -i (input) - input image in pgm format -b (bitstream) - bitstream file written by encoder optional parameters : -bs (blocksize) - block size in samples (default: 16) decoder parameters : >./ decoder -b (bitstream) -o (output) required parameters : -b (bitstream) - bitstream file to be read by decoder -o (output) - reconstructed image in pgm format Heiko Schwarz (Freie Universität Berlin) — Image and Video Coding

Recommend


More recommend