diff --git a/README.html b/README.html index fe59c5b..16a98ea 100644 --- a/README.html +++ b/README.html @@ -235,19 +235,19 @@ -

ImageEncoder

William Thenaers - v0.0.0.7

Build

  1. Install g++-7 with the commands in install_g++.sh

  2. Build the encoder with: +

    ImageEncoder version

    William Thenaers

    Build

    1. Install g++-7 with the commands in install_g++.sh

    2. Build the encoder with: make encoder

      Build the decoder with: make decoder

      Or build both with: make or make all

    3. Got to the ./bin folder and run the encoder/decoder -with a file containing the settings.

    Info

    • Linux builds (through Win10 bash) and Windows builds are provided in ./bin

    • A QtCreator .qbs project file is included for debugging, the makefile will always build for release by default.

    • Everything was implemented according to the assignment, i.e. nothing is excluded.

    • One extra thing is an offset for each pixel before the DCT step (and after the iDCT), here the value of 128 is subtracted from the pixels (and added during decoding) to make the DCT components smaller and easier to fit in less space.

    • The encoded image has the following structure:

      PropertyAmount of bits
      Bit length for quant matrix coeff5
      Quant matrix coeffs16 * bit_len
      Whether to use RLE1
      Image width15
      Image height15
      Block datadifferent for every block
      Bit length for data in block5
      Data length (if using RLE)block bit_len

      For the example quant matrix in the assignment, the header is 20.5 bytes of data.

    • The en/decoder will give a compression percentage after writing the resulting file. (< 100.0: result is smaller, > 100.0: result is bigger )

    • The Block size is provided as a Template argument and can be changed in Block.hpp. +with a file containing the settings.

Info

Extra

Extra

Example

Example

Test results

Size statistics

Example imageResolutionRaw sizeEncodedRatioHuffmanRatio
ex08x864b82b128%82b128%
ex1936x936876 096b413 210b47%327 658b37%
ex2512x512262 144b104 597b40%83 274b32%
ex3400x400160 000b76 033b48%61 230b38%
ex44096x9123 735 552b1 834 256b49%1 473 058b39%
ex52160x21604 665 600b1 598 931b34%1 369 376b29%
ex6512x256131 072b42 198b32%34 191b26%

Timing statistics

Example imageResolutionEnc TimeDec TimeHuffman encHuffman decOpenMP encOpenMP dec
ex08x87.0ms5.1ms8.0ms5.5ms11.9ms5.6ms
ex1936x936239.8ms201.1ms266.4ms220.2ms126.0ms79.5ms
ex2512x51274.8ms65.6ms85.7ms67.9ms43.0ms29.0ms
ex3400x40049.0ms42.0ms57.7ms45.6ms29.5ms20.6ms
ex44096x9121019.0ms842.1ms1139.5ms851.26ms461.9ms327.3ms
ex52160x21601241.7ms1060.8ms1334.7ms1046.7ms506.1ms373.1ms
ex6512x25638.5ms33.8ms46.2ms35.3ms23.9ms17.4ms

Regular, With extra Huffman compression and Huffman with OpenMP

Class diagram

Class Diagram

 

+This way the decoder could do the same thing, because it knows the bit length, and the original value is properly decoded (signed or unsigned).

Final result

Test results

Size statistics

Example imageResolutionRaw sizeEncodedRatioHuffmanRatio
ex08x864b82b128%82b128%
ex1936x936876 096b413 210b47%327 658b37%
ex2512x512262 144b104 597b40%83 274b32%
ex3400x400160 000b76 033b48%61 230b38%
ex44096x9123 735 552b1 834 256b49%1 473 058b39%
ex52160x21604 665 600b1 598 931b34%1 369 376b29%
ex6512x256131 072b42 198b32%34 191b26%

Timing statistics

Example imageResolutionEnc TimeDec TimeHuffman encHuffman decOpenMP encOpenMP dec
ex08x87.0ms5.1ms8.0ms5.5ms11.9ms5.6ms
ex1936x936239.8ms201.1ms266.4ms220.2ms126.0ms79.5ms
ex2512x51274.8ms65.6ms85.7ms67.9ms43.0ms29.0ms
ex3400x40049.0ms42.0ms57.7ms45.6ms29.5ms20.6ms
ex44096x9121019.0ms842.1ms1139.5ms851.26ms461.9ms327.3ms
ex52160x21601241.7ms1060.8ms1334.7ms1046.7ms506.1ms373.1ms
ex6512x25638.5ms33.8ms46.2ms35.3ms23.9ms17.4ms

Regular, With extra Huffman compression and Huffman with OpenMP

Class diagram

Class Diagram

 

\ No newline at end of file diff --git a/README.md b/README.md index 792b61f..4b56f16 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# ImageEncoder -#### William Thenaers - v0.0.0.7 +# [ImageEncoder](https://github.com/Wosser1sProductions/ImageEncoder) ![version](https://img.shields.io/badge/release-v0.0.0.7-brightgreen.svg) +#### William Thenaers ## Build 1. Install g++\-7 with the commands in install_g++.sh