ROCm / rocDecode

rocDecode is a high performance video decode SDK for AMD hardware
https://rocm.docs.amd.com/projects/rocDecode/en/latest
Other
10 stars 14 forks source link

MIT licensed

rocDecode is a high-performance video decode SDK for AMD GPUs. Using the rocDecode API, you can access the video decoding features available on your GPU.

Supported codecs

Prerequisites

[!IMPORTANT]

  • On Ubuntu 22.04 - Additional package required: libstdc++-12-dev

    sudo apt install libstdc++-12-dev
  • On RHEL/SLES - Additional packages required: libdrm-amdgpu and mesa-amdgpu-dri-drivers

    sudo yum install libdrm-amdgpu mesa-amdgpu-dri-drivers

[!NOTE]

  • All package installs are shown with the apt package manager. Use the appropriate package manager for your operating system.
  • To install rocDecode with minimum requirements, follow the quick-start instructions

Prerequisites setup script

For your convenience, we provide the setup script, rocDecode-setup.py, which installs all required dependencies. Run this script only once.

python3 rocDecode-setup.py  --rocm_path [ ROCm Installation Path  - optional (default:/opt/rocm)]
                            --runtime   [ Setup runtime requirements - optional (default:ON) [options:ON/OFF]]
                            --developer [ Setup Developer Options - optional (default:OFF) [options:ON/OFF]]

Installation instructions

The installation process uses the following steps:

Package install

To install rocDecode runtime, development, and test packages, run the line of code for your operating system.

Ubuntu

  sudo apt install rocdecode rocdecode-dev rocdecode-test

RHEL

  sudo yum install rocdecode rocdecode-devel rocdecode-test

SLES

  sudo zypper install rocdecode rocdecode-devel rocdecode-test

[!NOTE] Package install auto installs all dependencies.

[!IMPORTANT] RHEL/SLES package install requires manual FFMPEG dev install

Source install

To build rocDecode from source and install, run:

git clone https://github.com/ROCm/rocDecode.git
cd rocDecode
python3 rocDecode-setup.py
mkdir build && cd build
cmake ../
make -j8
sudo make install

Run tests

  make test

[!IMPORTANT] make test requires FFMPEG dev install

[!NOTE] To run tests with verbose option, use make test ARGS="-VV".

Make package

  sudo make package

Verify installation

The installer copies:

Using sample application

To verify your installation using a sample application, run:

  mkdir rocdecode-sample && cd rocdecode-sample
  cmake /opt/rocm/share/rocdecode/samples/videoDecode/
  make -j8
  ./videodecode -i /opt/rocm/share/rocdecode/video/AMD_driving_virtual_20-H265.mp4

Using test package

To verify your installation using the rocdecode-test package, run:

  mkdir rocdecode-test && cd rocdecode-test
  cmake /opt/rocm/share/rocdecode/test/
  ctest -VV

Samples

You can access samples to decode your videos in our GitHub repository. Refer to the individual folders to build and run the samples.

FFmpeg is required for sample applications and make test. To install FFmpeg, refer to the instructions listed for your operating system:

Docker

You can find rocDecode Docker containers in our GitHub repository.

Documentation

Run the following code to build our documentation locally.

cd docs
pip3 install -r sphinx/requirements.txt
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html

For more information on documentation builds, refer to the Building documentation page.

Tested configurations