diff --git a/projects/rocdecode/samples/testScripts/README.md b/projects/rocdecode/samples/testScripts/README.md index 552304352f..b629d5fe94 100644 --- a/projects/rocdecode/samples/testScripts/README.md +++ b/projects/rocdecode/samples/testScripts/README.md @@ -1,18 +1,31 @@ +# rocDecode Test Scripts + ## Pre-requisites to run python script -* Python3 -* ```python3 -m pip install pandas``` -* ```python3 -m pip install tabulate``` +* Install [rocDecode](../../README.md#build-and-install-instructions) -## Script to run rocDecode +* [FFMPEG](https://ffmpeg.org/about.html) -``` -python3 run_rocDecode_tests.py --help + * On `Ubuntu` + + ```shell + sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev + ``` + + * On `RHEL`/`SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script + +* Python3 and pip packages - `pandas`, & ` tabulate` + +```shell +python3 -m pip install pandas tabulate ``` +## Scripts -usage: +**Usage:** -``` +* **run_rocDecodeSamples.py** + +```shell usage: run_rocDecodeSamples.py [--rocDecode_directory ROCDECODE_DIRECTORY] [--gpu_device_id GPU_DEVICE_ID] [--files_directory FILES_DIRECTORY] @@ -33,7 +46,9 @@ optional arguments: The number of threads is only for the videoDecodePerf sample (sample_mode = 1) - optional (default:4) ``` -``` +* **run_rocDecode_Conformance.py** + +```shell usage: run_rocDecode_Conformance.py [--rocDecode_directory ROCDECODE_DIRECTORY] [--gpu_device_id GPU_DEVICE_ID] [--files_directory FILES_DIRECTORY] diff --git a/projects/rocdecode/samples/videoDecode/README.md b/projects/rocdecode/samples/videoDecode/README.md index 98a553ce06..69583f4ad7 100644 --- a/projects/rocdecode/samples/videoDecode/README.md +++ b/projects/rocdecode/samples/videoDecode/README.md @@ -1,33 +1,32 @@ -# Video Decode Sample -This sample illustrates the FFMPEG demuxer to get the individual frames which are then decoded on AMD hardware using rocDecode library. +# Video decode sample + +The video decode sample illustrates decoding a single packetized video stream using FFMPEG demuxer, video parser, and rocDecoder to get the individual decoded frames in YUV format. This sample cab ne configured with a device ID and optionally able to dump the output to a file. This sample uses the high level RocVideoDecoder class which connects both the video parser and Rocdecoder. This process repeats in a loop until all frames have been decoded. ## Prerequisites: -* Linux distribution - + 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` - -* rocDecode - -* CMake `3.5` or later +* Install [rocDecode](../../README.md#build-and-install-instructions) * [FFMPEG](https://ffmpeg.org/about.html) + + * On `Ubuntu` + + ```shell + sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev ``` - sudo apt install ffmpeg - ``` + + * On `RHEL`/`SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script ## Build -``` -mkdir build -cd build + +```shell +mkdir video_decode_sample && cd video_decode_sample cmake ../ make -j ``` -# Run -``` + +## Run + +```shell ./videodecode -i -o -d diff --git a/projects/rocdecode/samples/videoDecodeFork/README.md b/projects/rocdecode/samples/videoDecodeFork/README.md index f3a95d5cbf..900d78829d 100644 --- a/projects/rocdecode/samples/videoDecodeFork/README.md +++ b/projects/rocdecode/samples/videoDecodeFork/README.md @@ -1,35 +1,34 @@ -# Video Decode Sample -This sample illustrates the FFMPEG demuxer to get the individual frames which are then decoded on AMD hardware using rocDecode library. +# Video decode fork sample -This sample uses fork() to create multiple processes to decode the same input video parallely. +The video decode fork sample creates multiple processes which demux and decode the same video in parallel. The demuxer uses FFMPEG to get the individual frames which are then sent to the decoder APIs. The sample uses shared memory to keep count of the number of frames decoded in the different processes. Each child process needs to exit successfully for the sample to complete successfully. + +This sample shows scaling in performance for `N` VCN engines as per GPU architecture. ## Prerequisites: -* Linux distribution - + 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` - -* rocDecode - -* CMake `3.5` or later +* Install [rocDecode](../../README.md#build-and-install-instructions) * [FFMPEG](https://ffmpeg.org/about.html) + + * On `Ubuntu` + + ```shell + sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev ``` - sudo apt install ffmpeg - ``` + + * On `RHEL`/`SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script ## Build -``` -mkdir build -cd build + +```shell +mkdir video_decode_fork_sample && cd video_decode_fork_sample cmake ../ make -j ``` -# Run -``` + +## Run + +```shell ./videodecodefork -i -f = 1) [optional; default:4]> -d = 0) [optional - default:0]> diff --git a/projects/rocdecode/samples/videoDecodeMem/README.md b/projects/rocdecode/samples/videoDecodeMem/README.md index fa3377659b..55acf15058 100644 --- a/projects/rocdecode/samples/videoDecodeMem/README.md +++ b/projects/rocdecode/samples/videoDecodeMem/README.md @@ -1,38 +1,39 @@ -# Video Decode Sample -This sample illustrates a way to pass the data chunk-by-chunk sequentially to the FFMPEG demuxer which are then decoded on AMD hardware using rocDecode library. +# Video decode memory sample + +The video decode memory sample illustrates a way to pass the data chunk-by-chunk sequentially to the FFMPEG demuxer which are then decoded on AMD hardware using rocDecode library. + +The sample provides a user class `FileStreamProvider` derived from the existing `VideoDemuxer::StreamProvider` to read a video file and fill the buffer owned by the demuxer. It then takes frames from this buffer for further parsing and decoding. ## Prerequisites: -* Linux distribution - + 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` - -* rocDecode - -* CMake `3.5` or later +* Install [rocDecode](../../README.md#build-and-install-instructions) * [FFMPEG](https://ffmpeg.org/about.html) + + * On `Ubuntu` + + ```shell + sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev ``` - sudo apt install ffmpeg - ``` + + * On `RHEL`/`SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script ## Build -``` -mkdir build -cd build + +```shell +mkdir video_decode_mem_sample && cd video_decode_mem_sample cmake ../ make -j ``` -# Run -``` -./videodecodemem -i - -o - -d - -z - -sei - -crop - -m + +## Run + +```shell +./videodecodemem -i + -o + -d + -z + -sei + -crop + -m ``` \ No newline at end of file diff --git a/projects/rocdecode/samples/videoDecodeMultiFiles/README.md b/projects/rocdecode/samples/videoDecodeMultiFiles/README.md index 61743b4dcd..7b68eff821 100644 --- a/projects/rocdecode/samples/videoDecodeMultiFiles/README.md +++ b/projects/rocdecode/samples/videoDecodeMultiFiles/README.md @@ -1,38 +1,41 @@ -# Video Decode Multi Files Sample -This sample illustrates the FFMPEG demuxer to get the individual frames which are then decoded on AMD hardware using rocDecode library. +# Video decode multi files sample -This sample takes multiple files as a list and decodes each of them one after the other. +The video decode multiple files sample illustrates the use of providing a list of files as input to showcase the reconfigure option in rocDecode library. The input video files have to be of the same codec type to use the reconfigure option but can have different resolution or resize parameters. + +The reconfigure option can be disabled by the user if needed. The input file is parsed line by line and data is stored in a queue. The individual video files are demuxed and decoded one after the other in a loop. Outpuot for each individual input file can also be stored if needed. ## Prerequisites: -* Linux distribution - + 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` - -* rocDecode - -* CMake `3.5` or later +* Install [rocDecode](../../README.md#build-and-install-instructions) * [FFMPEG](https://ffmpeg.org/about.html) + + * On `Ubuntu` + + ```shell + sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev ``` - sudo apt install ffmpeg - ``` + + * On `RHEL`/`SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script ## Build -``` -mkdir build -cd build + +```shell +mkdir video_decode_multi_files_sample && cd video_decode_multi_files_sample cmake ../ make -j ``` -# Run -* Example input file list - example.txt +## Run +```shell +./videodecodemultifiles -i + -d + -use_reconfigure ``` +### Note: Example input file list - example.txt + +```shell infile input1.[mp4/mov...] [required] outfile output1.yuv [optional] z 0 [optional] @@ -43,11 +46,4 @@ infile input2.[mp4/mov...] [optional] outfile output2.yuv [optional] ... ... -``` - -``` -./videodecodemultifiles -i - -d - -use_reconfigure -``` +``` \ No newline at end of file diff --git a/projects/rocdecode/samples/videoDecodePerf/README.md b/projects/rocdecode/samples/videoDecodePerf/README.md index 40ec20364b..ccfa9b5e25 100644 --- a/projects/rocdecode/samples/videoDecodePerf/README.md +++ b/projects/rocdecode/samples/videoDecodePerf/README.md @@ -1,35 +1,34 @@ -# Video Decode Sample +# Video decode performance sample + This sample illustrates the FFMPEG demuxer to get the individual frames which are then decoded on AMD hardware using rocDecode library. This sample uses multiple threads to decode the same input video parallely. ## Prerequisites: -* Linux distribution - + 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` - -* rocDecode - -* CMake `3.5` or later +* Install [rocDecode](../../README.md#build-and-install-instructions) * [FFMPEG](https://ffmpeg.org/about.html) + + * On `Ubuntu` + + ```shell + sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev ``` - sudo apt install ffmpeg - ``` + + * On `RHEL`/`SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script ## Build -``` -mkdir build -cd build + +```shell +mkdir video_decode_perf_sample && cd video_decode_perf_sample cmake ../ make -j ``` -# Run -``` + +## Run + +```shell ./videodecodeperf -i -t -d = 0) [optional - default:0]> diff --git a/projects/rocdecode/samples/videoDecodeRGB/README.md b/projects/rocdecode/samples/videoDecodeRGB/README.md index db2efb433e..73490e25f9 100644 --- a/projects/rocdecode/samples/videoDecodeRGB/README.md +++ b/projects/rocdecode/samples/videoDecodeRGB/README.md @@ -1,11 +1,36 @@ -# Video Decode Sample -This sample illustrates the FFMPEG demuxer to get the individual frames which are then decoded using rocDecode API and optionally color-converted using custom HIP kernels on AMD hardware. This sample converts decoded YUV output to one of the RGB or BGR formats(24bit, 32bit, 464bit) +# Video decode RGB sample -## Build and run the sample: -``` -mkdir build -cd build -cmake .. +This sample illustrates the FFMPEG demuxer to get the individual frames which are then decoded using rocDecode API and optionally color-converted using custom HIP kernels on AMD hardware. This sample converts decoded YUV output to one of the RGB or BGR formats(24bit, 32bit, 464bit) in a separate thread allowing to run both VCN hardware and compute engine in parallel. + +This sample uses HIP kernels to showcase the color conversion. Whenever a frame is ready after decoding, the `ColorSpaceConversionThread` is notified and can be used for post-processing. + +## Prerequisites: + +* Install [rocDecode](../../README.md#build-and-install-instructions) + +* [FFMPEG](https://ffmpeg.org/about.html) + + * On `Ubuntu` + + ```shell + sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev + ``` + + * On `RHEL`/`SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script + +## Build + +```shell +mkdir video_decode_rgb_sample && cd video_decode_rgb_sample +cmake ../ make -j -./videodecodergb -i -o -d -of +``` + +## Run + +```shell +./videodecodergb -i + -o + -d + -of ``` \ No newline at end of file