Files
rocm-systems/samples/jpegDecode
Aryan Salmanpour 694a4bc07f Add support for memory pool management for vaapi surfaces and vaapi-hip interops (#17)
* Add support for memory pool management for vaapi surfaces

* reuse memories for each channel if the sizes remain unchanged

* rename hip_interop to hip_interop_dev_mem
2024-04-22 14:37:45 -04:00
..

JPEG decode sample

The jpeg decode sample illustrates decoding a JPEG images using rocJPEG library to get the individual decoded images in one of the supported output format (i.e., unchanged, yuv, y, rgbi). This sample can be configured with a device ID and optionally able to dump the output to a file.

Prerequisites:

Build

mkdir jpeg_decode_sample && cd jpeg_decode_sample
cmake ../
make -j

Run

    ./jpegdecode -i <Path to single image or directory of images - [required]>
                 -be <Select rocJPEG backend (0 for ROCJPEG_BACKEND_HARDWARE, using VCN hardware-accelarated JPEG decoder, 1 ROCJPEG_BACKEND_HYBRID, using CPU and GPU HIP kernles for JPEG decoding) [optional]>
                 -fmt <Select rocJPEG output format for decoding, one of the [native, yuv, y, rgbi] [optional - default: native]>
                 -o <Output file path or directory - Write decoded images based on the selected outfut format to this file or directory [optional]>
                 -d <GPU device id (0 for the first GPU device, 1 for the second GPU device, etc.) [optional - default: 0]>