diff --git a/README.md b/README.md index 66707b9..869d9af 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,38 @@ Lossy image codec using discrete wavelet transform. It supports/implements: - Deslauriers-Dubuc 13/7 and CDF 5/3, wavelets. -- Configurable quality loss ([examples](#examples) below). +- Configurable quality loss ([showcase](#showcase) below). - 8 bits per component. 4 channels. - Reversible YCoCg color transformation. - Elias coding + Rle compression. Nonetheless can handle ratios of 1:12 before artifacts became visible. - Good performance. There is care on cache and memory usage. -- Everything is done with integers. Ensure always identical outputs (even in lossy compression) and provides gain in performance. +- Everything is done with integers, ensuring always identical outputs (even in lossy compression). And in an experimental state: - Lossless compression. +Showcase +-------- + +### Cafe + +| 12:1 (327.74 kB) | 24:1 (163.12 kB) | 48:1 (81.86 kB) | +| ---------------- | ---------------- | --------------- | +| [![cafe-thumb-12](https://user-images.githubusercontent.com/6278300/163314607-5b6d2a36-0825-47ed-921c-bea1bf0bea43.png)][5] | [![cafe-thumb-24](https://user-images.githubusercontent.com/6278300/163314614-4f64cc19-5ae1-47e4-877a-dca7b27df758.png)][6] | [![cafe-thumb-48](https://user-images.githubusercontent.com/6278300/163314619-8096aa3b-1ae7-4c96-ab02-1848dff241b9.png)][7] | + +- From [Rec. ITU-T T.24](https://www.itu.int/net/itu-t/sigdb/genimage/T24-25.htm), 50% resized. +- [Uncompressed][4]: 3932.16 kB (3.9 MB), 1024x1280 px. + + +### Tractor + +| 12:1 (973.95 kB) | 24:1 (506.31 kB) | 48:1 (252.05 kB) | +| ---------------- | ---------------- | ---------------- | +| [![tractor-thumb12](https://user-images.githubusercontent.com/6278300/163320662-eb990d27-3d95-4059-8002-dc6426640bd2.png)][9] | [![tractor-thumb24](https://user-images.githubusercontent.com/6278300/163320676-8c24c9dc-fcad-4834-9ff7-575425dc6ef8.png)][10] | [![tractor-thumb48](https://user-images.githubusercontent.com/6278300/163320856-f88460d1-fdd0-4640-add4-9dc67a3b9bdd.png)][11] | + +- From [UNISI & UNIFI Dataset, University of Siena](http://clem.dii.unisi.it/~vipp/datasets.html), 50% resized. +- [Uncompressed][8]: 12063.74 kB (12 MB), 1632x2464 px. + Compilation ----------- @@ -34,8 +56,8 @@ cmake --build . --config Release ``` -Usage ------ +Tools usage +----------- Two executables: `akoenc` and `akodec` will let you try the codec. Run them without any argument to read the usage help. But, in most cases is: ``` @@ -45,29 +67,6 @@ akoenc -q 16 -i "input.png" -o "out.ako" - There is also a noise gate, with `-g 16`, it can be used as a denoiser to help with compression. It is possible to use both, or disable either one with a value of zero. -Examples --------- - -### Cafe - -| 12:1 (327.74 kB) | 24:1 (163.12 kB) | 48:1 (81.86 kB) | -| ---------------- | ---------------- | --------------- | -| [![cafe-thumb-12](https://user-images.githubusercontent.com/6278300/163314607-5b6d2a36-0825-47ed-921c-bea1bf0bea43.png)][5] | [![cafe-thumb-24](https://user-images.githubusercontent.com/6278300/163314614-4f64cc19-5ae1-47e4-877a-dca7b27df758.png)][6] | [![cafe-thumb-48](https://user-images.githubusercontent.com/6278300/163314619-8096aa3b-1ae7-4c96-ab02-1848dff241b9.png)][7] | - -- From [Rec. ITU-T T.24](https://www.itu.int/net/itu-t/sigdb/genimage/T24-25.htm), 50% resized. -- [Uncompressed][4]: 3932.16 kB (3.9 MB), 1024x1280 px. - - -### Tractor - -| 12:1 (973.95 kB) | 24:1 (506.31 kB) | 48:1 (252.05 kB) | -| ---------------- | ---------------- | ---------------- | -| [![tractor-thumb12](https://user-images.githubusercontent.com/6278300/163320662-eb990d27-3d95-4059-8002-dc6426640bd2.png)][9] | [![tractor-thumb24](https://user-images.githubusercontent.com/6278300/163320676-8c24c9dc-fcad-4834-9ff7-575425dc6ef8.png)][10] | [![tractor-thumb48](https://user-images.githubusercontent.com/6278300/163320856-f88460d1-fdd0-4640-add4-9dc67a3b9bdd.png)][11] | - -- From [UNISI & UNIFI Dataset, University of Siena](http://clem.dii.unisi.it/~vipp/datasets.html), 50% resized. -- [Uncompressed][8]: 12063.74 kB (12 MB), 1632x2464 px. - - References ---------- diff --git a/resources/ans-cdf.hpp b/resources/research/ans1/ans-cdf.hpp similarity index 100% rename from resources/ans-cdf.hpp rename to resources/research/ans1/ans-cdf.hpp diff --git a/resources/ans1-core.cpp b/resources/research/ans1/ans1-core.cpp similarity index 100% rename from resources/ans1-core.cpp rename to resources/research/ans1/ans1-core.cpp diff --git a/resources/ans2-normalization.cpp b/resources/research/ans1/ans2-normalization.cpp similarity index 100% rename from resources/ans2-normalization.cpp rename to resources/research/ans1/ans2-normalization.cpp diff --git a/resources/ans-d1.txt b/resources/research/ans1/data1.txt similarity index 100% rename from resources/ans-d1.txt rename to resources/research/ans1/data1.txt diff --git a/resources/ans-d2.txt b/resources/research/ans1/data2.txt similarity index 100% rename from resources/ans-d2.txt rename to resources/research/ans1/data2.txt diff --git a/resources/ans-d3.txt b/resources/research/ans1/data3.txt similarity index 100% rename from resources/ans-d3.txt rename to resources/research/ans1/data3.txt