2
0
jeffqjiangNew 00127f16f1 Implemented proper slice parameter buffer submission for multiple slice streams. (#226)
* * rocDecode: Implemented proper slice parameter buffer submission for multiple slice streams.
 - We were submitting single slice parameter buffer for multiple slice streams. This works for other APIs but not for VAAPI, which requires to send slice parameter buffer once per slice.
 - At step 1, all the multi-slice structures are fixed sized (256). Will make them dynamic in the next step.
 - With this change, all 135 HEVC conformance streams now pass.

* * rocDecode: Multiple slice change step 2: make the fixed size slice info structure lists dynamic.

* * rocDecode: Minor changes in comments. No functional changes.

* *rocDecode: Changed INIT_SLICE_PARAM_LIST_NUM from 256 back to 16. 256 was set during debug process.

* * rocDecode: Add suggest changes from code review.

* * rocDecode: Moved slice_params_buf_id_ initialization to class VaapiVideoDecoder declaration, as suggested by code review.
2024-02-09 15:09:49 -05:00
2023-11-21 13:25:56 -07:00
2024-02-09 10:41:03 -08:00
2024-02-09 13:31:44 -05:00
2024-02-07 15:06:11 -05:00
2024-01-10 12:14:41 -08:00
2024-01-09 13:43:34 -05:00
2024-02-09 13:31:44 -05:00

MIT licensed

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
    • RHEL - 8 / 9
    • SLES - 15-SP4
  • ROCm supported hardware

    • NOTE: gfx908 or higher required
  • Install ROCm 6.1.0 or later with amdgpu-install with --usecase=multimediasdk,rocm --no-32

    • NOTE: To install rocdecode with minimum requirements follow instructions here

To build from source

  • CMake 3.5 or later
sudo apt install cmake
sudo apt install pkg-config
  • FFMPEG runtime and headers - for tests and samples
sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev

NOTE:

  • All package installs are shown with the apt package manager, use the appropriate package manager depending on the OS.

  • Ubuntu 22.04 - Install 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 and install instructions

Package install

Install rocDecode runtime, development, and test packages.

  • 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

NOTE: Package install will auto install all dependencies.

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

Source build and install

git clone https://github.com/ROCm/rocDecode.git
cd rocDecode
mkdir build && cd build
cmake ../
make -j8
sudo make install
  • run tests - Requires FFMPEG dev install

    make test
    

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

  • make package

    sudo make 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

NOTE: FFMPEG dev install required to run samples and tests

Verify with sample application

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

Verify with rocdecode-test package

The test package will install the ctest module to test the rocdecode. Follow the below steps to test the package install

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

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

    • On Ubuntu
    sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev
    
    • On RHEL/SLES - install ffmpeg development packages manually or use rocDecode-setup.py script

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
    • RHEL - 8 / 9
    • SLES - 15-SP4
  • ROCm:
    • rocm-core - 5.6.1.50601-93
    • amdgpu-core - 1:5.6.50601-1649308
  • FFMPEG - 4.2.7 / 4.4.2-0
  • rocDecode Setup Script - V1.4
S
Descrição
Descrição não fornecida
Leia-me 282 MiB
Linguagens
C++ 67.5%
C 20.6%
Python 6.6%
CMake 3.4%
Shell 0.6%
Outros 1.1%