Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR to track all project development. Will be closed once done. #6

Open
wants to merge 116 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
3263f22
add Makefile, add build dir to ignores
CodePurble May 4, 2021
6daa476
Merge branch 'main' into work-rp
CodePurble May 10, 2021
fb2702d
Merge branch 'main' into work-rp
CodePurble May 11, 2021
29a8e20
add wavelet paper
CodePurble May 11, 2021
13f81ae
Merge branch 'main' into work-rp
CodePurble May 17, 2021
6042aed
add wavelib as a submodule
CodePurble May 17, 2021
2905795
Merge pull request #1 from CodePurble/work-rp
CodePurble May 17, 2021
2f29db2
remove wavelib submodule
CodePurble May 18, 2021
941858e
add fork of wavelib as submodule
CodePurble May 18, 2021
98fbca5
add util script to rawify image
CodePurble May 18, 2021
41ee11f
remove wavelib submodule
CodePurble May 18, 2021
5146627
add fork of wavelib as submodule
CodePurble May 18, 2021
882bb07
add util script to rawify image
CodePurble May 18, 2021
80608d7
add Makefile, add build dir to ignores
CodePurble May 4, 2021
9738bd1
add wavelet paper
CodePurble May 11, 2021
df5a06d
add wavelib as a submodule
CodePurble May 17, 2021
3a30cbc
remove wavelib submodule
CodePurble May 18, 2021
4801294
add fork of wavelib as submodule
CodePurble May 18, 2021
eee34c1
add util script to rawify image
CodePurble May 18, 2021
836a06c
update wavelib submodule
CodePurble May 18, 2021
f0d0b06
update: gitignore
CodePurble May 18, 2021
8fbef2e
python script now outputs raw binary pixel values
CodePurble May 18, 2021
63d0959
Add initial C source tests for wavelib
CodePurble May 18, 2021
13afb4e
Merge branch 'develop' into work-rp
CodePurble May 18, 2021
8600f9b
Merge pull request #4 from CodePurble/work-rp
CodePurble May 18, 2021
7fb1f3f
Fix merged conflicts
skandaprasad May 18, 2021
5b93967
Merged wavelib
skandaprasad May 18, 2021
4c01cc4
Implement writebinary file
skandaprasad May 19, 2021
595a6ac
Merge pull request #5 from CodePurble/work-sp
CodePurble May 19, 2021
5f124ca
Refactor main
CodePurble May 19, 2021
2da77ac
update wavelib submodule
CodePurble May 20, 2021
3040ae2
Add utils for type conversion of arrays
CodePurble May 20, 2021
645ceea
update submodules
CodePurble May 20, 2021
f3c947a
Refactor main
CodePurble May 19, 2021
17a64f7
update wavelib submodule
CodePurble May 20, 2021
b001a4f
Add utils for type conversion of arrays
CodePurble May 20, 2021
b16a89d
update submodules
CodePurble May 20, 2021
5082fcb
update submodules, wavelib is now a cmake sub-project
CodePurble May 27, 2021
828cfed
Merge branch 'work-rp' into develop
CodePurble May 27, 2021
23a2308
No changes
skandaprasad May 30, 2021
91c788c
add smaller image for ease of use
CodePurble May 31, 2021
7eafd8b
get_gscale_raw now reads input files as args
CodePurble May 31, 2021
ff4233d
remove unused Makefile
CodePurble May 31, 2021
81607e3
implement quadtree-like data structure (sb_tree) for holding subbands
CodePurble Jun 2, 2021
0289570
memory corruption by secret double free fixed
CodePurble Jun 4, 2021
5402664
add smaller image for ease of use
CodePurble May 31, 2021
396b153
get_gscale_raw now reads input files as args
CodePurble May 31, 2021
fc65469
remove unused Makefile
CodePurble May 31, 2021
d0ce014
implement quadtree-like data structure (sb_tree) for holding subbands
CodePurble Jun 2, 2021
cd4cb81
memory corruption by secret double free fixed
CodePurble Jun 4, 2021
430a967
remove debug printfs in sb_tree
CodePurble Jun 7, 2021
6516524
add documentation files: presentation, report and images
CodePurble Jun 7, 2021
8638fc3
add docs, fix merge commit in sbtree.c
CodePurble Jun 7, 2021
3944f2b
add docs, fix merge conflict in sbtree.c
CodePurble Jun 7, 2021
22d8763
Merge branch 'develop' into work-rp
CodePurble Jun 7, 2021
b1bb569
Merge branch 'develop' into work-sp
skandaprasad Jun 7, 2021
2c7f7d7
Start implementing EZW Morton Scan Tree
skandaprasad Jun 8, 2021
fb3a7da
Merge branch 'develop' into work-rp
CodePurble Jun 8, 2021
c794208
update submodules
CodePurble Jun 23, 2021
9218fb3
The sub-band tree structure is now filled reverse
CodePurble Jun 26, 2021
b6ba431
Add helper docs for eggs-16x16 image
CodePurble Jun 26, 2021
244a575
reorganize utils dir
CodePurble Jun 29, 2021
981c8d3
implement function to get quads from coeffs
CodePurble Jun 30, 2021
0a75d78
broken smap implementation
CodePurble Jul 1, 2021
227f940
implement generic queue structure
CodePurble Jul 1, 2021
514886a
Closes Issue #9
skandaprasad Jul 1, 2021
9844641
update gitignore, remove cyclic include
CodePurble Jul 1, 2021
1ca0869
remove gdb history
CodePurble Jul 1, 2021
bc6ba81
Implement Morton scan tree (see issue #15)
CodePurble Jul 1, 2021
f45e5ec
Upload notes of ezw algo
skandaprasad Jul 6, 2021
e547e8e
Merge branch 'develop' into work-sp
skandaprasad Jul 6, 2021
0b31a05
move notes into correct dir
CodePurble Jul 6, 2021
61dced9
Add stack implementation, separate node type
CodePurble Jul 7, 2021
80e9d8d
Implement dominant pass for a given threshold
CodePurble Jul 16, 2021
7643314
Implement dominant pass for a given threshold (see #15)
CodePurble Jul 16, 2021
2d1ac7d
Merge branch 'develop' into work-rp
CodePurble Jul 16, 2021
0708d57
add print options for queue data
CodePurble Jul 21, 2021
9dab5a7
refactor: switch cases in queue printer
CodePurble Jul 21, 2021
9e3fffa
docs: update notes with new mini-header format
CodePurble Jul 21, 2021
75918a8
new: add initial bitstream implementation
CodePurble Jul 27, 2021
ed407d1
:warning: danger
CodePurble Jul 27, 2021
01620e3
fix: dominant pass now takes into account required non `SP|SN` coeffs
CodePurble Jul 27, 2021
b8b4476
fix: subordinate pass encoding bugs
CodePurble Jul 27, 2021
4d144f7
feat: preliminary EZW alg and bitstream implementation
CodePurble Jul 27, 2021
4776b3e
The compression is working correctly (I think so at least)
CodePurble Jul 29, 2021
443b4dd
fix: read dimensions only on first read, generalise EZW to given
CodePurble Aug 1, 2021
7de13b7
docs: add optimisation messages
CodePurble Aug 1, 2021
d3012a8
feat: parse command line args with getopt
CodePurble Aug 1, 2021
6807916
fix: store image dimensions after reading properly
CodePurble Aug 1, 2021
af7bde3
added swap program for gsl
skandaprasad Aug 5, 2021
1513743
feat(wip): add reconstruction function
CodePurble Aug 5, 2021
8eee64f
feat: get row major array from a Morton scan array
CodePurble Aug 6, 2021
fe82570
Merge branch 'work-rp' into develop (see #15 wip)
CodePurble Aug 6, 2021
260bac4
refactor: report sources now split into multiple files
CodePurble Aug 6, 2021
2ec2934
Merge branch 'develop' into work-sp
skandaprasad Aug 6, 2021
8638fdf
wip gsl_swap
skandaprasad Aug 6, 2021
0941f32
Merge branch 'work-sp' of github.com:CodePurble/libezw into work-sp
CodePurble Aug 6, 2021
6f93ce1
fix: spotty `gsl_swap` alg
CodePurble Aug 6, 2021
3a918f7
fix: increase size of iterations variable to accomodate larger
CodePurble Aug 8, 2021
42dedfe
fix: correct the encoding scheme
CodePurble Aug 8, 2021
5e26d0a
Merge branch 'hotfix-encode' into develop
CodePurble Aug 8, 2021
f0a3674
update: add implementation details of compression to report
CodePurble Aug 8, 2021
5d2753b
wip, updated intro of report
skandaprasad Aug 9, 2021
e218ea7
update: finish final presentation
CodePurble Aug 9, 2021
e7b5648
settled report intro
skandaprasad Aug 9, 2021
4f89b46
finish implementation section
CodePurble Aug 9, 2021
4b75e1c
Merge branch 'hotfix-report-rp' into develop
CodePurble Aug 9, 2021
29f49e5
refactor: wrap lines at 79 chars
CodePurble Aug 9, 2021
c26c583
add images
skandaprasad Aug 9, 2021
2dda3f1
Revert "add images"
skandaprasad Aug 9, 2021
7685ef0
Merge branch 'develop' of https://github.com/CodePurble/libezw into d…
skandaprasad Aug 9, 2021
7fb7ae8
add missing images
skandaprasad Aug 9, 2021
7182773
Merge branch 'develop' of github.com:CodePurble/libezw into develop
CodePurble Aug 9, 2021
641ee25
docs: do grammar and spelling corrections
CodePurble Aug 9, 2021
fcdb3d4
Create LICENSE
CodePurble Oct 5, 2022
9f07bb0
Add license notice to README
CodePurble Oct 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# langserver
.ccls-cache/
.cache/

# gdb
.gdb_history

*.ezw
perf/
build/
compile_commands.json

# Prerequisites
*.d
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "wavelib"]
path = wavelib
url = https://github.com/codepurble/wavelib.git
Binary file added 2021-06-07-Note-19-23.xoj
Binary file not shown.
27 changes: 27 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.10)
project(libezw)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall")
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

add_subdirectory(wavelib)

include_directories(include)
add_executable(main
./src/ezw.c
./src/main.c
./src/utils.c
./src/sbtree.c
./src/smap.c
./src/node.c
./src/queue.c
./src/stack.c
./src/bitstream.c
)

target_link_libraries(main PUBLIC wavelib m) # "m" to link math.h
# target_link_libraries(main PUBLIC wavelib gsl gslcblas m) # "m" to link math.h

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Ramprakash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# libezw
C library for EZW based compression (WIP)

## License
This code is under the [MIT License](https://github.com/CodePurble/libezw/blob/develop/LICENSE)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/Lichtenstein_img_processing_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/Lichtenstein_img_processing_test_bw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/New_NIE_Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/New_NIE_crest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/block-diag.pdf
Binary file not shown.
68 changes: 68 additions & 0 deletions docs/img/block-diag.pdf_tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
%% Creator: Inkscape 1.0.2 (e86c870879, 2021-01-15, custom), www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file 'block-diag.pdf' (pdf, eps, ps)
%%
%% To include the image in your LaTeX document, write
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics{<filename>.pdf}
%% To scale the image, write
%% \def\svgwidth{<desired width>}
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics[width=<desired width>]{<filename>.pdf}
%%
%% Images with a different path to the parent latex file can
%% be accessed with the `import' package (which may need to be
%% installed) using
%% \usepackage{import}
%% in the preamble, and then including the image with
%% \import{<path to file>}{<filename>.pdf_tex}
%% Alternatively, one can specify
%% \graphicspath{{<path to file>/}}
%%
%% For more information, please see info/svg-inkscape on CTAN:
%% http://tug.ctan.org/tex-archive/info/svg-inkscape
%%
\begingroup%
\makeatletter%
\providecommand\color[2][]{%
\errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
\renewcommand\color[2][]{}%
}%
\providecommand\transparent[1]{%
\errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
\renewcommand\transparent[1]{}%
}%
\providecommand\rotatebox[2]{#2}%
\newcommand*\fsize{\dimexpr\f@size pt\relax}%
\newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}%
\ifx\svgwidth\undefined%
\setlength{\unitlength}{812.24998887bp}%
\ifx\svgscale\undefined%
\relax%
\else%
\setlength{\unitlength}{\unitlength * \real{\svgscale}}%
\fi%
\else%
\setlength{\unitlength}{\svgwidth}%
\fi%
\global\let\svgwidth\undefined%
\global\let\svgscale\undefined%
\makeatother%
\begin{picture}(1,0.31486612)%
\lineheight{1}%
\setlength\tabcolsep{0pt}%
\put(0,0){\includegraphics[width=\unitlength,page=1]{block-diag.pdf}}%
\put(0.78433979,0.19471835){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}Entropy\\Encoder\end{tabular}}}}%
\put(0,0){\includegraphics[width=\unitlength,page=2]{block-diag.pdf}}%
\put(0.21313016,0.17157899){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}Transformer\end{tabular}}}}%
\put(0,0){\includegraphics[width=\unitlength,page=3]{block-diag.pdf}}%
\put(0.48982453,0.17207761){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}Quantizer\end{tabular}}}}%
\put(0,0){\includegraphics[width=\unitlength,page=4]{block-diag.pdf}}%
\put(0.01307853,0.28974701){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}s(n1, n2)\end{tabular}}}}%
\put(0,0){\includegraphics[width=\unitlength,page=5]{block-diag.pdf}}%
\put(0.89707124,0.01156786){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}Bitstream\end{tabular}}}}%
\put(0,0){\includegraphics[width=\unitlength,page=6]{block-diag.pdf}}%
\end{picture}%
\endgroup%
Loading