CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
99 lines
3.0 KiB
Markdown
99 lines
3.0 KiB
Markdown
[](https://opensource.org/licenses/MIT)
|
|
|
|
<p align="center"><img width="70%" src="docs/data/AMD_rocJPEG_Logo.png" /></p>
|
|
|
|
rocJPEG is a high performance JPEG decode SDK for AMD GPUs. Using the rocJPEG API, you can access the JPEG decoding features available on your GPU.
|
|
|
|
> [!NOTE]
|
|
> The published documentation is available at [rocJPEG](https://rocm.docs.amd.com/projects/rocJPEG/en/latest/) in an organized, easy-to-read format, with search and a table of contents. The documentation source files reside in `projects/rocjpeg/docs` in this repository. As with all ROCm projects, the documentation is open source. For more information on contributing to the documentation, see [Contribute to ROCm documentation](https://rocm.docs.amd.com/en/latest/contribute/contributing.html).
|
|
|
|
## Supported JPEG chroma subsampling
|
|
|
|
* YUV 4:4:4
|
|
* YUV 4:4:0
|
|
* YUV 4:2:2
|
|
* YUV 4:2:0
|
|
* YUV 4:0:0
|
|
|
|
## Prerequisites
|
|
|
|
### Hardware
|
|
* **GPU**: [AMD Radeon™ Graphics](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html) / [AMD Instinct™ Accelerators](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html)
|
|
|
|
> [!IMPORTANT]
|
|
> `gfx908` or higher GPU required
|
|
|
|
### ROCm via TheRock
|
|
|
|
rocJPEG is built and installed as part of [TheRock](https://github.com/ROCm/TheRock). All core dependencies are provided by the TheRock build, including:
|
|
|
|
* HIP runtime and development libraries
|
|
* AMD Clang++ compiler (C++17 required)
|
|
* Libva and VA-API drivers
|
|
* Libdrm (amdgpu)
|
|
* CMake and pkg-config
|
|
|
|
## Build and install
|
|
|
|
rocJPEG is built as part of [TheRock](https://github.com/ROCm/TheRock). To build standalone from source:
|
|
|
|
```shell
|
|
git clone https://github.com/ROCm/rocm-systems.git
|
|
cd rocm-systems/projects/rocjpeg
|
|
mkdir build && cd build
|
|
cmake ../
|
|
make -j8
|
|
sudo make install
|
|
```
|
|
|
|
### Run tests
|
|
|
|
```shell
|
|
make test
|
|
```
|
|
|
|
> [!NOTE]
|
|
> To run tests with verbose option, use `make test ARGS="-VV"`.
|
|
|
|
## Verify installation
|
|
|
|
After installation, the following files are available:
|
|
|
|
* Libraries in `/opt/rocm/lib`
|
|
* Header files in `/opt/rocm/include/rocjpeg`
|
|
* Samples in `/opt/rocm/share/rocjpeg`
|
|
* Documents in `/opt/rocm/share/doc/rocjpeg`
|
|
|
|
### Using sample application
|
|
|
|
To verify your installation using a sample application, run:
|
|
|
|
```shell
|
|
mkdir rocjpeg-sample && cd rocjpeg-sample
|
|
cmake /opt/rocm/share/rocjpeg/samples/jpegDecode/
|
|
make -j8
|
|
./jpegdecode -i /opt/rocm/share/rocjpeg/images/mug_420.jpg
|
|
```
|
|
|
|
### Using CTest
|
|
|
|
To verify your installation using CTest, run:
|
|
|
|
```shell
|
|
mkdir rocjpeg-test && cd rocjpeg-test
|
|
cmake /opt/rocm/share/rocjpeg/test/
|
|
ctest -VV
|
|
```
|
|
|
|
## Samples
|
|
|
|
You can access samples to decode your images in the
|
|
[samples](https://github.com/ROCm/rocm-systems/tree/develop/projects/rocjpeg/samples) directory. Refer to the
|
|
individual folders to build and run the samples.
|
|
|
|
## Tested configurations
|
|
|
|
* Linux
|
|
* Ubuntu - `22.04` / `24.04`
|
|
* [TheRock](https://github.com/ROCm/TheRock) - `7.12` or later
|