mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 13:40:31 +00:00
jpeg-codec - JPEG encoder and decoder library and console application
AUTHOR:
Martin Srom
DESCRIPTION:
The first test implementation of the JPEG image compression standard for NVIDIA GPUs
used for real-time transmission of high-definition video.
OVERVIEW:
-It uses NVIDIA CUDA platform.
-Not optimized yet (it is only the first test implementation).
-Encoder and Decoder use Huffman coder for entropy encoding/decoding.
-Encoder produces baseline JPEG codestream which consists of proper codestream headers and one scan
for each color component without subsampling and it uses restart flags that allows fast parallel encoding.
The quality of encoded images can be specified by value 0-100 as standard defines.
-Decoder can decompress only JPEG codestreams that contains separate scan for each color component
which aren't subsampled. If scan contains restart flags, decoder can use parallelism for fast decoding.
-Encoding/Decoding is divided into following phases:
Encoding: Decoding
1) Input data loading 1) Input data loading
2) Preprocessing 2) Parsing codestream
3) Forward DCT 3) Huffman decoder
4) Huffman encoder 4) Inverse DCT
5) Formatting codestream 5) Postprocessing
and they are implemented on CPU or/and GPU:
-CPU:
-Input data loading
-Parsing codestream
-Huffman encoder/decoder (when restart flags are disabled)
-Output data formatting
-GPU:
-Preprocessing/Postprocessing (color component parsing, color transformation RGB <-> YCbCr)
-Forward/Inverse DCT (Discrete cosine transform) implementation from NVIDIA
npp library (NVIDIA Performance Primitives)
-Huffman encoder/decoder (when restart flags are enabled)
PERFORMANCE:
Following tables summarizes encoding/decoding performance using GTX 580 for different quality
settings (time, PSNR and size values are averages of encoding several images, each of them
multiple times):
Encoding:
| 4k (4096x2160) | HD (1920x1080)
--------+----------------------------------+---------------------------------
quality | duration | psnr | size | duration | psnr | size
--------+----------+----------+------------+---------------------------------
10 | 26.57 ms | 30.08 dB | 497.00 kB | 6.62 ms | 28.15 dB | 135.50 kB
20 | 26.68 ms | 33.32 dB | 607.50 kB | 6.68 ms | 31.14 dB | 174.00 kB
30 | 26.76 ms | 35.83 dB | 732.00 kB | 6.73 ms | 32.68 dB | 209.50 kB
40 | 26.83 ms | 36.86 dB | 823.50 kB | 6.78 ms | 33.70 dB | 239.50 kB
50 | 26.96 ms | 37.70 dB | 914.50 kB | 6.81 ms | 34.58 dB | 269.50 kB
60 | 27.00 ms | 38.41 dB | 1018.00 kB | 6.88 ms | 35.44 dB | 303.00 kB
70 | 27.13 ms | 39.57 dB | 1176.00 kB | 6.94 ms | 36.62 dB | 355.00 kB
80 | 27.29 ms | 40.71 dB | 1442.50 kB | 7.00 ms | 38.01 dB | 440.50 kB
90 | 27.78 ms | 42.42 dB | 2069.50 kB | 7.12 ms | 40.25 dB | 650.50 kB
100 | 34.69 ms | 46.49 dB | 6650.00 kB | 9.20 ms | 46.34 dB | 2126.50 kB
Decoding:
| 4k (4096x2160) | HD (1920x1080)
--------+----------------------------------+---------------------------------
quality | duration | psnr | size | duration | psnr | size
--------+----------+----------+------------+---------------------------------
10 |
20 |
30 |
40 |
50 |
60 |
70 |
80 |
90 |
100 |
USAGE:
...
jpeg-codec library:
...
jpeg-codec application:
...