JPEG Decoder¶
Jpeg Decoder example resides in L2/demos/jpegDec
directory. The tutorial provides a step-by-step guide that covers commands for building and running kernel.
Executable Usage¶
- Work Directory(Step 1)
The steps for library download and environment setup can be found in Vitis Codec Library. For getting the design,
cd L2/demos/jpegDec
- Build kernel(Step 2)
Run the following make command to build your XCLBIN and host binary targeting a specific device. Please be noticed that this process will take a long time, maybe couple of hours.
make run TARGET=hw DEVICE=xilinx_u50_gen3x16_xdma_201920_3
- Run kernel(Step 3)
To get the benchmark results, please run the following command.
./build_dir.hw.xilinx_u50_gen3x16_xdma_201920_3/host.exe -xclbin build_dir.hw.xilinx_u50_gen3x16_xdma_201920_3/jpegDecoder.xclbin -JPEGFile t0.jpg
JPEG Decoder Input Arguments:
Usage: host.exe -[-xclbin -JPEGFile] -xclbin: the kernel name -JPEGFile: the path point to input *.jpg
Note: Default arguments are set in Makefile, you can use other Pictures listed in the table.
- Example output(Step 4)
Found Platform Platform Name: Xilinx INFO: Found Device=xilinx_u50_gen3x16_xdma_201920_3 INFO: Importing kernelJpegDecoder.xclbin Loading: 'kernelJpegDecoder.xclbin' INFO: Kernel has been created INFO: Finish kernel setup ... INFO: Finish kernel execution INFO: Finish E2E execution INFO: Data transfer from host to device: 108 us INFO: Data transfer from device to host: 726 us INFO: Average kernel execution per run: 1515 us ... INFO: android.yuv will be generated from the jpeg decoder's output INFO: android.yuv is generated correctly
Profiling¶
The hardware resource utilizations are listed in the following table. Different tool versions may result slightly different resource.
Kernel | BRAM | URAM | DSP | FF | LUT | Frequency(MHz) |
jpegDecoder | 28 | 0 | 39 | 23653 | 24591 | 243 |
To check the output yuv file, download https://sourceforge.net/projects/raw-yuvplayer/ . Then upload the rebuild_image.yuv, set the right sample radio and custom size on the software, and check the yuv file.
Picture | Latency(ms) |
---|---|
android.jpg | 1.515 |
t0.jpg | 0.790 |
Note