Comhaid
rocm-systems/projects/rocdecode/samples/videoDecodeMem

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.

Prerequisites:

Build

mkdir build
cd build
cmake ../
make -j

Run

./videodecodemem -i <input video file [required]> 
              -o <output path to save decoded YUV frames [optional]> 
              -d <GPU device ID - 0:device 0 / 1:device 1/ ... [optional - default:0]>
              -z <force_zero_latency - Decoded frames will be flushed out for display immediately [optional]>
              -sei <extract SEI messages [optional]>
              -crop <crop rectangle for output (not used when using interopped decoded frame) [optional - default: 0,0,0,0]>
              -m <output_surface_memory_type - decoded surface memory [optional - default: 0][0 : OUT_SURFACE_MEM_DEV_INTERNAL/ 1 : OUT_SURFACE_MEM_DEV_COPIED/ 2 : OUT_SURFACE_MEM_HOST_COPIED]>