jeffqjiangNew 0fbd030b5d Fixed the random crash associated with undecodable RASL pictures. (#141)
* * rocDecode/HEVC: Fixed the random crash associated with undecodable RASL pictures.
  - When a CRA picutre occurs, all the pictures in the DPB are emptied. However, the following RASL (Random Access Skipped Leading) picture can still reference these emptied pictures, making them undecodeble.
  - We initialized the reference picture lists with (0xFF), representing invalid picture index. Normally these invalid indices are replaced by valid values during RPS decoding. However, on undecodable RASL pictures, we can not find an existing reference picture in DPB, leaving the invalid index untouched and resulting invalid indexing later on.
  - Now we initialize the reference picture lists with a valid value 0. Also we add index range check on reference buffer at VA-API layer to avoid invalid memory access.

* * rocDecode/HEVC: Fixed a typo in sampel app message.
2023-12-15 15:54:43 -05:00
2023-11-21 13:25:56 -07:00
2023-12-14 10:42:52 -05:00
2023-12-14 10:42:52 -05:00
2023-12-14 10:42:52 -05:00
2023-12-13 09:49:52 -05:00
2023-12-13 09:49:52 -05:00

rocDecode

rocDecode is a high performance video decode SDK for AMD GPUs. rocDecode API lets developers access the video decoding features available on the GPU.

Supported Codecs

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

Prerequisites

  • Linux distribution

    • Ubuntu - 20.04 / 22.04
  • ROCm supported hardware

  • Install ROCm 5.5 or later with --usecase=graphics,rocm --no-32

  • CMake 3.5 or later

  • libva-dev 2.7 or later

    sudo apt install libva-dev
    
  • libdrm-dev 2.4 or later

    sudo apt install libdrm-dev
    
  • libstdc++-12-dev

    sudo apt install libstdc++-12-dev
    

Prerequisites setup script for Linux

For the convenience of the developer, we provide the setup script rocDecode-setup.py which will install all the dependencies required by this project.

Usage:

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

NOTE: This script only needs to be executed once.

Build instructions

Please follow the instructions below to build and install the rocDecode library.

 cd rocDecode
 mkdir build; cd build
 cmake ..
 make -j8
 sudo make install
  • run tests - Requires FFMPEG install

    make test
    

    NOTE: run tests with verbose option make test ARGS="-VV"

  • make package

    sudo make test package
    

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

NOTE: FFMPEG install required to run samples

Samples

The tool provides a few samples to decode videos here. Please refer to the individual folders to build and run the samples.

Sample Prerequisites

  • FFMPEG - required to run sample applications & make test

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

Docker

Docker files to build rocDecode containers are available here

Documentation

Run the steps below to build documentation locally.

  • Sphinx
cd docs
pip3 install -r sphinx/requirements.txt
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
  • 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
  • libva-dev - 2.7.0-2 / 2.14.0-1
  • libdrm-dev - 2.4.107 / 2.4.113
  • FFMPEG - 4.2.7 / 4.4.2-0
  • rocDecode Setup Script - V1.3
S
Описание
No description provided
Readme 282 MiB
Languages
C++ 67.5%
C 20.6%
Python 6.6%
CMake 3.4%
Shell 0.6%
Разное 1.1%