This repo contains an implemetation of JPEG decoder. Currently only baseline DCT and extended sequential DCT modes are supported. The project uses fast and optimized DCT algorithm as a thirdparty.
Decoding large 21600x10800px Earth Topography image without chroma subsampling (YCbCr444) takes just 1.5 seconds on x64 Intel Core i7-9750H @ 2.60GHz CPU.
To run demo follow the next steps:
git clone --recurse-submodules https://github.com/Mr6one/JpegDecoder.git
cd JpegDecoder/demo
mkdir build && cd build
cmake .. && make -j4
./main path/to/jpeg/image
To use library inside your project via CMake follow the next steps:
add_subdirectory(/path/to/jpeg ${CMAKE_CURRENT_BINARY_DIR}/jpeg)
target_include_directories(${linking_target} PRIVATE ${jpeg_SOURCE_DIR}/include)
target_link_libraries(${linking_target} PRIVATE jpeg)
and then
#include "jpeg.hpp"
- Wallace G. K. The JPEG still picture compression standard //IEEE transactions on consumer electronics. – 1992. – Т. 38. – №. 1. – С. xviii-xxxiv.
- Rabbani M., Joshi R. An overview of the JPEG 2000 still image compression standard //Signal processing: Image communication. – 2002. – Т. 17. – №. 1. – С. 3-48.
- Hamilton E. JPEG file interchange format. – 2004.