OpenCores
URL https://opencores.org/ocsvn/jpeg_core/jpeg_core/trunk

Subversion Repositories jpeg_core

[/] [jpeg_core/] [trunk/] [README.md] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ultra_embe
# High throughput JPEG decoder
2
 
3
Github: [https://github.com/ultraembedded/core_jpeg](https://github.com/ultraembedded/core_jpeg)
4
 
5
This project is a JPEG decoder core for FPGA written in Verilog.
6
 
7
![JPEG Core](docs/block_diagram.png)
8
 
9
## Features
10
* Baseline JPEG Decoder IP (sequential encoded images).
11
* 32-bit AXI Stream input.
12
* Input format: JPEG (JPEG File Interchange Format)
13
* Output format: 24-bit RGB output in 8x8 blocks (row-major ordering).
14
* Support for Monochrome, 4:4:4, 4:2:0 chroma subsampling support.
15
* Support for fixed standard Huffman tables (reduced logic usage, fast).
16
* Support for dynamic Huffman tables (from JPEG input stream -> slower decode, more logic).
17
* Dynamic DQT tables from JPEG input stream.
18
* Synthesizable Verilog 2001, Verilator and FPGA friendly.
19
* Multipliers and tables / FIFO's map efficiently to FPGA resources (DSP48, blockRAM, etc).
20
* Verified using co-simulation against a C-model and tested on FPGA with thousands of images.
21
 
22
## Design Aims
23
1. Fast decode performance suitable for video playback
24
2. Support a minimal JPEG baseline feature set.
25
3. Be well tested (with verification against a reference C-model).
26
4. Map to FPGA resources such as BlockRAM, DSP macros wherever possible.
27
 
28
## FPGA Mapping
29
The current version of the JPEG decoder uses the following resources on a Xilinx 7 series FPGA (post-implementation);
30
![Resource Usage](docs/resources.png)
31
 
32
The design is also able to meet timing >= 75MHz.
33
 
34
## Performance
35
Peak JPEG decode performance is as follows;
36
* Monochrome  = 66 cycles per 8x8 pixels  (1.0 cycles per pixel)
37
* YCbCr 4:2:0 = 137 cycles per 8x8 pixels (2.1 cycles per pixel)
38
* YCbCr 4:4:4 = 198 cycles per 8x8 pixels (3.1 cycles per pixel)
39
 
40
## Use Case
41
The purpose of this design was to replace a 3rd party JPEG decoder core used in my [Motion JPEG](https://en.wikipedia.org/wiki/Motion_JPEG) based [FPGA video player](https://github.com/ultraembedded/FPGAmp).
42
Motion JPEG has worse compression performance than MPEG based video, but the complexity of the HW required is low enough that it can be used on low(-ish)-end FPGAs.
43
 
44
Video playback usually requires at least 25 frames per second, hence there is a budget of less than 40ms per JPEG frame.
45
This fact drives the design choices taken for this implementation.
46
 
47
Clearly, the higher the resolution, the more pixels that must be produced from the JPEG decoder within that 40ms budget, so this core is designed to have high throughput in the output stages - with additional resources dedicated to the IDCT transform, and output re-ordering stages to facilitate this.
48
 
49
## Limitations
50
The current release does not support;
51
* Restart markers
52
* 4:2:2 H/V chroma subsampling (only 4:4:4 and 4:2:0 are supported).
53
 
54
Under the GNU Image Manipulation Program, the following 'X' options are **not** supported currently;
55
![Unsupported Opts](docs/supported_opts.png)
56
 
57
Note: Support for 'optimised' Huffman tables is possible when design parameter SUPPORT_WRITABLE_DHT=1.
58
This functionality increases the core size substantially and reduces performance.
59
 
60
## Future Work / TODO
61
* Add support for the first layer of progressive JPEG images.
62
* Add option to reduce arithmetic precision to reduce design size.
63
* Add lightweight variant of the core with reduced performance (for smaller FPGAs).

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.