FPGA上开源的高性能JPEG解码器verilog源代码免费分享-FPGA开源项目论坛-FPGA CPLD-ChipDebug

FPGA上开源的高性能JPEG解码器verilog源代码免费分享

该帖子部分内容已隐藏
付费阅读
3积分
此内容为付费阅读,请付费后查看

这是一个用verilog写的用于FPGA的高吞吐率的JPEG解码器。

d079bbff3f085309

特性

  • Baseline JPEG Decoder IP (sequential encoded images).
  • 32-bit AXI Stream input.
  • Input format: JPEG (JPEG File Interchange Format)
  • Output format: 24-bit RGB output in 8×8 blocks (row-major ordering).
  • Support for Monochrome, 4:4:4, 4:2:0 chroma subsampling support.
  • Support for fixed standard Huffman tables (reduced logic usage, fast).
  • Support for dynamic Huffman tables (from JPEG input stream -> slower decode, more logic).
  • Dynamic DQT tables from JPEG input stream.
  • Synthesizable Verilog 2001, Verilator and FPGA friendly.
  • Multipliers and tables / FIFO’s map efficiently to FPGA resources (DSP48, blockRAM, etc).
  • Verified using co-simulation against a C-model and tested on FPGA with thousands of images.

设计目标

  1. 快速地对回放视频解码。
  2. 支持最小的JPEG baseline 特性集。
  3. 更容易测试(通过C-模型验证)
  4. 尽可能映射到FPGA硬核BlockRAM, DSP资源。

FPGA 映射

当前版本的 JPEG 解码器在 Xilinx 7 系列 FPGA(实现后)上使用以下资源;
资源使用

ef719bf012085256

该设计还能够满足 >= 75MHz 的时序。

性能

峰值解码性能如下:

  • Monochrome = 66 cycles per 8×8 pixels (1.0 cycles per pixel)
  • YCbCr 4:2:0 = 137 cycles per 8×8 pixels (2.1 cycles per pixel)
  • YCbCr 4:4:4 = 198 cycles per 8×8 pixels (3.1 cycles per pixel)

应用案例

此设计的目的是替换我基于 Motion JPEG 的 FPGA 视频播放器中使用的第 3 方 JPEG 解码器内核。
Motion JPEG 的压缩性能比基于 MPEG 的视频差,但所需硬件的复杂性足够低,可以在低端 FPGA 上使用。

视频播放通常需要每秒至少 25 帧,因此每个 JPEG 帧的预算不到 40 毫秒。
这一事实推动了为此实施所采取的设计选择。

显然,分辨率越高,必须在 40 毫秒预算内从 JPEG 解码器生成的像素越多,因此该内核设计为在输出阶段具有高吞吐量 
- 额外的资源专用于 IDCT 变换和输出重新订购阶段以促进这一点。

限制

不支持以下特性:

  • Restart markers
  • 4:2:2 H/V chroma subsampling (only 4:4:4 and 4:2:0 are supported).

在 GNU Image Manipulation Program 下,目前不支持以下“X”选项;

注意:当设计参数 SUPPORT_WRITABLE_DHT=1 时,可以支持“优化的”霍夫曼表。
此功能大大增加了内核尺寸并降低了性能。

将要支持的特性

  • Add support for the first layer of progressive JPEG images.
  • Add option to reduce arithmetic precision to reduce design size.
  • Add lightweight variant of the core with reduced performance (for smaller FPGAs).

7bcf620b78085320

下载地址:

请登录后发表评论