Build and install rocDecode from source#
2026-06-03
2 min read time
To build rocDecode as part of the ROCm Core SDK, see TheRock build instructions. TheRock is the recommended way to build ROCm components from source.
Alternatively, you can build rocDecode standalone using the following instructions.
Prerequisites#
rocDecode requires a supported AMD GPU. For more information, see ROCm Core SDK components.
HIP runtime and development libraries
AMD Clang++ compiler (C++17 required)
Libva and VA-API drivers
Libdrm (amdgpu)
CMake and pkg-config
To build and run samples and extended tests, FFmpeg development libraries must be installed separately. For example, on Ubuntu:
sudo apt install libavcodec-dev libavformat-dev libavutil-dev
Build and install#
rocDecode is delivered as part of TheRock. For TheRock installation details, refer to the TheRock documentation.
The rocDecode source code is available from the ROCm systems GitHub repository. Use sparse checkout when cloning the rocJPEG project. Clone the repo using sparse-checkout.
git clone --no-checkout --filter=blob:none https://github.com/ROCm/rocm-systems.git cd rocm-systems git sparse-checkout init --cone git sparse-checkout set projects/rocdecode
Then use
git checkoutto check out the branch you need.git checkout develop cd projects/rocdecode
Build and install rocDecode using the following commands:
mkdir build && cd build cmake ../ make -j8 sudo make install
After installation, the rocDecode libraries will be copied to
/opt/rocm/liband the rocDecode header files will be copied to/opt/rocm/include/rocdecode.To run the installed CTest-based verification:
mkdir rocdecode-test && cd rocdecode-test cmake /opt/rocm/share/rocdecode/test/ ctest -VV
Run
make testto test your build. To run the test with the verbose option, runmake test ARGS="-VV".