bb085a9bf1
* Add a new sample for jpeg decoding using multiple threads * code clean up * code clean up * code cleanup * remove extra line * code clean up - change some variable names * code clean up * Move common functions to a new header for samples * move additional functions to the common samples header * move the common functions to a new header file and modify the readme * modify the sample's README * Add a CTEST for the jpegDecodeThreads sample * Add a samples overview README * modify the jpeg decode threads sample * add finding the threads * rename jpegDecodeThreads to jpegDecodeMultiThreads * Make changes based on the reviewers comments * use one instance of the rocjpeg_utils * code cleanup
1.4 KiB
1.4 KiB
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., native, yuv, y, rgb, rgb_planar). This sample can be configured with a device ID and optionally able to dump the output to a file.
Prerequisites:
- Install rocJPEG
Build
mkdir jpeg_decode_sample && cd jpeg_decode_sample
cmake ../
make -j
Run
./jpegdecode -i <[input path] - input path to a single JPEG image or a directory containing JPEG images - [required]>
-be <[backend] - select rocJPEG backend (0 for hardware-accelerated JPEG decoding using VCN,
1 for hybrid JPEG decoding using CPU and GPU HIP kernels (currently not supported)) [optional - default: 0]>
-fmt <[output format] - select rocJPEG output format for decoding, one of the [native, yuv, y, rgb, rgb_planar] [optional - default: native]>
-o <[output path] - path to an output file or a path to a directory - write decoded images to a file or directory based on selected output format [optional]>
-d <[device id] - specify the GPU device id for the desired device (use 0 for the first device, 1 for the second device, and so on); [optional - default: 0]>