2023-06-12 14:45:01 -07:00
# rocDecode
2023-11-06 08:51:47 -08:00
rocDecode is a high performance video decode SDK for AMD hardware. rocDecode API lets developers access the video decoding features available on the GPU.
2023-07-26 17:47:47 -04:00
2023-11-06 08:51:47 -08:00
## Supported Codecs
* H.264 - 8 bit
2023-11-06 12:10:12 -05:00
* H.265 (HEVC) - 8 bit, and 10 bit
2023-10-12 14:08:12 -07:00
2023-07-26 17:47:47 -04:00
## Prerequisites:
* Linux distribution
2023-10-12 14:08:12 -07:00
+ Ubuntu - `20.04` / `22.04`
* [ROCm supported hardware ](https://rocm.docs.amd.com/en/latest/release/gpu_os_support.html )
* Install [ROCm 5.5 or later ](https://rocmdocs.amd.com/en/latest/deploy/linux/installer/install.html ) with `--usecase=graphics,rocm --no-32`
* CMake `3.5` or later
* libva-dev `2.7` or later
```
sudo apt install libva-dev
` ``
2023-07-26 17:47:47 -04:00
2023-10-25 15:56:36 -07:00
* libdrm-dev ` 2.4` or later
` ``
sudo apt install libdrm-dev
` ``
2023-10-12 14:08:12 -07:00
* **Note** [rocDecode-setup.py](rocDecode-setup.py) script can be used for installing all the dependencies
2023-07-26 17:47:47 -04:00
## Build instructions:
2023-10-12 14:08:12 -07:00
Please follow the instructions below to build and install the rocDecode library.
2023-07-26 17:47:47 -04:00
` ``
cd rocDecode
mkdir build; cd build
cmake ..
make -j8
sudo make install
` ``
2023-11-06 08:51:47 -08:00
* run tests - Requires ` FFMPEG` install
2023-10-12 14:08:12 -07:00
` ``
make test
` ``
**NOTE:** run tests with verbose option ` make test ARGS="-VV"`
* make package
` ``
sudo make test package
` ``
2023-11-06 08:51:47 -08:00
## Verify Installation
The installer will copy
* 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
Build and run sample
` ``
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
` ``
2023-07-26 17:47:47 -04:00
## Samples:
The tool provides a few samples to decode videos [here](samples/). Please refer to the individual folders to build and run the samples.
2023-11-06 08:51:47 -08:00
### Prerequisites
* [FFMPEG](https://ffmpeg.org/about.html) - required to run sample applications & make test
` ``
sudo apt install ffmpeg libavcodec-dev libavformat-dev libswscale-dev
` ``
2023-07-26 17:47:47 -04:00
## Docker:
2023-10-12 14:08:12 -07:00
Docker files to build rocDecode containers are available [here](docker/)
## Documentation
Run the steps below to build documentation locally.
* Doxygen
` ``
doxygen .Doxyfile
` ``
## Tested configurations
* Linux distribution
+ Ubuntu - ` 20.04` / ` 22.04`
* ROCm:
+ rocm-core - ` 5.6.1.50601-93`
+ amdgpu-core - ` 1:5.6.50601-1649308`
* FFMPEG - ` 4.2.7` / ` 4.4.2-0`
* libva-dev - ` 2.7.0-2` / ` 2.14.0-1`
2023-10-25 15:56:36 -07:00
* libdrm-dev - ` 2.4.107` / ` 2.4.113`
* rocDecode Setup Script - ` V1.2`