Kiriti Gowda a46f98b044 Lib VA/DRM - Fix & Updates (#266)
* lib VA/DRM - Fix & Updates

* Setup - Add lib drm dev

* Setup - Updates
2024-02-28 12:29:50 -05:00
2023-11-21 13:25:56 -07:00
2024-02-16 16:06:23 -08:00
2024-02-28 12:29:50 -05:00
2024-02-09 15:46:48 -05:00
2024-01-10 12:14:41 -08:00
2024-02-27 18:16:01 -05:00

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

  • H.265 (HEVC) - 8 bit, and 10 bit

Prerequisites

Important

gfx908 or higher GPU required

Important

  • --usecase=multimediasdk,rocm --no-32
  • CMake 3.5 or later

    sudo apt install cmake
    
  • pkg-config

    sudo apt install pkg-config
    
  • FFmpeg runtime and headers - for tests and samples

    sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev
    

Important

If using Ubuntu 22.04, you must install libstdc++-12-dev

sudo apt install libstdc++-12-dev

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.

  python rocDecode-setup.py  --rocm_path [ ROCm Installation Path - optional (default:/opt/rocm)]
                             --developer [ Setup Developer Options - optional (default:ON) [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.

  • Runtime package - rocdecode only provides the rocdecode library librocdecode.so
  • Development package - rocdecode-dev/rocdecode-devel provides the library, header files, and samples
  • Test package - rocdecode-test provides CTest to verify installation

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, run:

git clone https://github.com/ROCm/rocDecode.git
cd rocDecode
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:

  • Libraries into /opt/rocm/lib
  • Header files into /opt/rocm/include/rocdecode
  • Samples folder into /opt/rocm/share/rocdecode
  • Documents folder into /opt/rocm/share/doc/rocdecode

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:

  • Ubuntu:

    sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev
    
  • RHEL/SLES:

    Install ffmpeg development packages manually or use rocDecode-setup.py script

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

  • Linux
    • Ubuntu - 20.04 / 22.04
    • RHEL - 8 / 9
    • SLES - 15-SP4
  • ROCm:
    • rocm-core - 6.1.0.60100-28
    • amdgpu-core - 1:6.1.60100-1731559
  • FFmpeg - 4.2.7 / 4.4.2-0
  • rocDecode Setup Script - V1.4
S
Description
No description provided
Readme 282 MiB
Languages
C++ 67.5%
C 20.6%
Python 6.6%
CMake 3.4%
Shell 0.6%
Other 1.1%