Commit Graph

450 Commits

Author SHA1 Message Date
Fiona-MCW 98f1dfce8d VideoSeekContext - Introduce requested frame pts (#521)
* Introduce required frame pts in Video demuxer

* Revert "Support to obtain dts from demuxer and seek (#479)"

This reverts commit 65edd2198d.

---------

Co-authored-by: fgladwin <fgladwin@amd.com>

[ROCm/rocdecode commit: 866ba6699b]
2025-02-28 16:40:50 -05:00
Aryan Salmanpour bdad2ca18e [Samples] - fix the issue of out-of-order processing in the videoDecodeRGB sample (#518)
* [Samples] - fix the issue of out-of-order processing in the videoDecodeRGB sample

* Add a comment

* Add hipStreamSyncronize

[ROCm/rocdecode commit: 9e0600a2d0]
2025-02-27 08:25:01 -05:00
jeffqjiangNew 4e8f655fde * rocDecode: Fix a typo in new sequence callback function name. (#520)
[ROCm/rocdecode commit: a78f6730c8]
2025-02-25 20:43:46 -05:00
Lakshmi Kumar ca9451d891 Check ROCm targets (#513)
* rocm version check for targets

* check rocm targets for gfx

[ROCm/rocdecode commit: ad0bec2f14]
2025-02-25 14:52:17 -05:00
Sam Wu c3eb6d4322 Update rocm-docs-core version (#516)
Required manual pip-compile of requirements.txt

[ROCm/rocdecode commit: da81f34066]
2025-02-20 16:37:37 -05:00
Lakshmi Kumar 5724fb0b1c Bug fix - videoToSequence sample (#514)
* rocm version check for targets

* fix sample

* cmake merge with develop

* address reciew comments

* comment update

[ROCm/rocdecode commit: e9f9aa9f58]
2025-02-19 17:19:49 -05:00
jeffqjiangNew 4ac1b8dd67 Optimization: Reduced decode session start latency for certain output surface memory types. (#512)
* *rocDecode/Optimization: Reduced decode session start latency for certain output surface memory types.

* * rocDecode/Optimization: Video decode RGB sample creates itsown HIP
  stream.

* * rocDecode/Optimization: Created separate HIP stream in each thread in
  video decode RGB sample.

* * rocDecode/Optimization: Addressed the lower FPS report in RGB sample:
  move HIP stream creation out of FPS calculation scope.

* * rocDecode/Optimize: Removed comments.

[ROCm/rocdecode commit: 1f53dedd4a]
2025-02-18 13:09:16 -05:00
Rajy Rawther 3b6a4d3293 rename some macros so it doesn't clash with others (#510)
* rename macros so not to clash with others

* modified macro in all samples

[ROCm/rocdecode commit: c4fe8f5258]
2025-02-18 08:40:58 -05:00
jeffqjiangNew c8a7b82794 VP9: Added support for video size change (scaling down) on inter frames. (#508)
* * rocDecode/VP9: Added support for video size change (scaling down) on inter frames.
 - A new reconfigure mode is added, where we keep the existing VAAPI surfaces and context, and work on the smaller images and store the images in the surfaces.

* * rocDecode/VP9 resize: Added changes based on review comments.

[ROCm/rocdecode commit: 2af7bbf4e7]
2025-02-12 17:18:09 -05:00
jeffqjiangNew 2b198dcc32 Doc: HW decode capability update. (#509)
* * rocDecode/Doc: HW decode capability update.
 - Added AV1 and VP9 decode caps and small corrections.

* * rocDecode/Doc: Removed gfx940 and gfx941 from HW capability table.

* * rocDecode/Doc: HW decode capability update.
 - Added AV1 and VP9 decode caps and small corrections.

* * rocDecode/Doc: Removed gfx940 and gfx941 from HW capability table.

* * rocDecode/Doc: Updated change log.

[ROCm/rocdecode commit: 25463e594b]
2025-02-12 14:06:26 -05:00
Lakshmi Kumar 348b73425b gfx update (#505)
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

[ROCm/rocdecode commit: 5e806d5465]
2025-02-11 09:07:34 -05:00
Aryan Salmanpour b71b55ac17 Update CHANGELOG (#506)
* Update CHANGELOG

* code clean up

* clean up

[ROCm/rocdecode commit: a2a7b63cad]
2025-02-04 15:56:21 -05:00
jeffqjiangNew 6a57493c23 Sample: Added a new sample app: videodecodepicfiles. (#498)
* * rocDecode/sample: Added a new sample app, videodecodepicfiles, which reads individual picture data from a group of files with each file containing bitstream of a coded picture.

* * rocDecode/Pic files sample: Minor change in title.

* * rocDecode/Pic files sample: Minor changes in comments.

* * rocDecode/Pic files sample: Removed the commented code.

* * rocDecode/Pic files sample: Changes in change log based on review comments.

---------

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

[ROCm/rocdecode commit: 3b7e566095]
2025-02-04 12:57:01 -05:00
Aryan Salmanpour 08a70a5ae4 remove unused code (#504)
[ROCm/rocdecode commit: 320d1422af]
2025-02-03 13:21:43 -05:00
Rajy Rawther 81155a7787 ubuntu24.04 bug fix (#503)
* fix for build errors in ubuntu24.04

* UB24 bug fix

[ROCm/rocdecode commit: 03c9c407d3]
2025-01-29 17:08:35 -05:00
Rajy Rawther 89b657dc38 fix for build errors in ubuntu24.04 (#501)
[ROCm/rocdecode commit: 5ca75ec203]
2025-01-29 08:40:06 -05:00
Daniel Su c5bd77fec9 Setup - Install ffmpeg-devel on RHEL 9 (#500)
[ROCm/rocdecode commit: da2491a04c]
2025-01-28 09:03:23 -05:00
Kiriti Gowda 122354fbdd Readme - Updates (#499)
[ROCm/rocdecode commit: 94ea9f3f86]
2025-01-27 15:45:31 -05:00
Aryan Salmanpour 2f754d1ffb Eliminate the use of std::fs (#497)
[ROCm/rocdecode commit: bca75cf2b7]
2025-01-27 08:10:11 -05:00
jeffqjiangNew 6b61183723 Create separate VA display for each decoder instance. (#496)
* * rocDecode: Experiment per decode instance va display.

* * rocDecode/Perf: Removed comments.

* * rocDecode/VA context: Minor changes based on review comment.

[ROCm/rocdecode commit: 46a344259b]
2025-01-23 15:28:41 -08:00
jeffqjiangNew 4ac1c26cfc * rocDecode/HEVC: Added short term RPS parsing error handling. (#495)
[ROCm/rocdecode commit: dec6dacbc9]
2025-01-22 12:47:01 -05:00
Aryan Salmanpour 624aa94c37 Fix a seg fault for videoDecodeRGB app in multi-GPU systems (#494)
[ROCm/rocdecode commit: 99fa534eb9]
2025-01-21 17:07:40 -05:00
Aryan Salmanpour df70c8eb87 Optimize finding the compute partition mode (#493)
[ROCm/rocdecode commit: 6ada77a9ad]
2025-01-18 10:12:02 -05:00
Aryan Salmanpour a6d3c91163 code cleanup - remove unnecessary check (#492)
[ROCm/rocdecode commit: fe0fee01d0]
2025-01-16 14:06:28 -05:00
Aryan Salmanpour e1eb7ba766 Update samples (#491)
[ROCm/rocdecode commit: 760f7f7200]
2025-01-13 14:31:46 -05:00
jeffqjiangNew f963a7c3a0 Added the new GPU VA context class to handle VA connections to GPU. Removed the hard coded HW decoder capability info. (#415)
* * rocDecode: Removed the hard coded HW decoder capability info.
 - We now probe HW decoder capabilities through VA-API from the driver.

* * rocDecode: Added number of decoder prob and a few missing tear down calls.

* * rocDecode/HW cap change: Added a new singleton class, GpuVaContext, to handle HIP and VA initialization and VA attributes probe for both HW capability check and decoder initialization.

* * rocDecode/HW caps: Removed GpuVaContext class out of vaapi_videodecoder.h and into a new file. Removed debug logs. Removed roc_decoder_caps.h.

* * rocDecode/HW caps: Fixed a crash issue with multi-thread cases. Called to vaInitialize() and vaTerminte() should be paired.

* * rocDecode/HW caps: Added multi-GPU support.

* * rocDecode/HW cap: Moved GpuVaContext class implementation back to VAAPI layer.

* * rocDecode/HW cap: Added changed based on review comments.

* * rocDecode/HW cap: Added changes based on review comments.

* * rocDecode/HW cap: GPU VA context class name change based on review comment.

---------

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

[ROCm/rocdecode commit: ef06f12dfa]
2025-01-10 14:44:06 -05:00
Aryan Salmanpour 43711e5e62 code clean up (#490)
[ROCm/rocdecode commit: 6477cd1100]
2025-01-09 10:38:54 -05:00
Fiona Gladwin 65edd2198d Support to obtain dts from demuxer and seek (#479)
* Add support to obtain dts from demuxer

Add changes in seek to store the required dst and obtained dts in the context

* Minor changes

[ROCm/rocdecode commit: d45cd48001]
2025-01-08 19:51:13 -05:00
Rajy Rawther 75add792ab fix for build errors with FFMpeg version 6 (#489)
* fix for build errors with FFMpeg version 6

* set initialize for reconfigure

[ROCm/rocdecode commit: f02751900d]
2025-01-08 13:26:08 -08:00
jeffqjiangNew 9d96ca1354 * rocDecode/VP9: Increased DPB buffer size to handle streams with the maximum number of the reference frames allowed. (#488)
- DPB buffer size was set to NUM_REF_FRAMES(8) which can not handle streams with 8 reference frames. We increase DPB size from 8 to 10 (same strategy as AV1) to be able to handle these streams.

[ROCm/rocdecode commit: 9c113d5ee9]
2025-01-07 20:43:49 -05:00
jeffqjiangNew 733f676b3b * rocDecode/VP9: Fixed issues with filter parameters. (#487)
- Fixed a condition check in loop filter frame init process.
 - Removed the redundant conversion in interpolation filter assignment in VAAPI. The conversion has been done already when we parse the interpolation filter syntax.

[ROCm/rocdecode commit: 888940f52c]
2025-01-06 12:33:12 -05:00
Aryan Salmanpour c597fb2a4c Update Copyright year to 2025 (#486)
* Update Copyright year to 2025

* update year to 2025

[ROCm/rocdecode commit: 3624040ce7]
2025-01-05 16:25:39 -05:00
Kiriti Gowda 9b64f18bc0 CMakeLists - Updates and cleanup (#483)
* CMakeLists - Updates and cleanup

* CTest - CXX Compiler Updates

* Package - Remove FFMPEG exe deps

* CMakeLists - Updates and cleanup

* CTest - CXX Compiler Updates

* Package - Remove FFMPEG exe deps

* FFMPEG - Updates

[ROCm/rocdecode commit: 913b6728f0]
2025-01-02 09:42:31 -05:00
Rajy Rawther 8136f59dc0 Rr/ffmpeg sw decoder (#480)
* WIP: ffmpeg based software decoder

* minor update

* WIP: FFMpeg SW decoder support

* FFMpeg decoder working version

* working version without threading

* multithreading working with FFMpeg decoder

* moved ffmpeg decoder to separate folder

* updated changelog

* minor change

* resolved review comments

* resolved review comments

* fixed a bug in hipMemcpy for copying decoded output to GPU

* added support for multithreading in FFMpeg decoder

* addressed review comments

* fixed format changes requested

---------

Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

[ROCm/rocdecode commit: 5365ceabec]
2024-12-20 16:50:15 -05:00
jeffqjiangNew 6bcc0a4067 * rocDecode/HEVC: Added in stream DPB buffer size change detection and handling. (#482)
[ROCm/rocdecode commit: 5336913a09]
2024-12-19 17:29:52 -05:00
Aryan Salmanpour af9338cb65 Add support for mapping GPU UUIDs to render nodes (#481)
* Add initial support for mapping uuid to render ndodes

* use uuid to find the render node

* Adjust offset for MI300 partition modes

* code cleanup

[ROCm/rocdecode commit: 0b24f96bbb]
2024-12-19 14:12:57 -05:00
Aryan Salmanpour abf59d439a Add support for ROCR_VISIBLE_DEVICES environment variable (#478)
[ROCm/rocdecode commit: e3816a23e6]
2024-12-17 12:04:59 -05:00
Aryan Salmanpour 67ab645a6d Enable the CMake ROCDECODE_ROCPROFILER_REGISTER option by default (#469)
[ROCm/rocdecode commit: c02fbcf658]
2024-12-09 18:24:30 -05:00
David Rosca 2a4a772f41 Create surfaces with linear modifier (#465)
Mesa will be enabling tiling for all VA surfaces by default,
but HIP doesn't support modifiers for dmabuf import.

[ROCm/rocdecode commit: 80e08f47c2]
2024-12-09 14:46:57 -05:00
jeffqjiangNew 0cb331b369 CTest updates. (#473)
* * rocDecode: Core test updates.
 - Added VP9 test.
 - Added tests for video decode raw sample.
 - Changed test video streams to raw elementary or IVF formats.

* * rocDecode/CTest: Added back mp4 files.

* * rocDecode/CTest: Minor changes based on review comments.

* * rocDecode/CTest: Added stream file installation.

* * rocDecode/CTest: Changed the file back to mp4.

* Add support for VP9 handling in the videoDecodeBatch sample

* add linking with threads for videodecode app

---------

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>

[ROCm/rocdecode commit: 597b29a7c9]
2024-12-06 14:46:30 -05:00
Aryan Salmanpour 1f890c442e Use a pointer for the horizontal_pitch parameter in the rocDecGetVideoFrame API (#475)
[ROCm/rocdecode commit: 91ab3b1577]
2024-12-05 19:22:07 -05:00
Rajy Rawther 4b66519cd3 Fixed a bug in hostToDevice copy (#472)
* WIP: ffmpeg based software decoder

* minor update

* WIP: FFMpeg SW decoder support

* FFMpeg decoder working version

* working version without threading

* multithreading working with FFMpeg decoder

* moved ffmpeg decoder to separate folder

* updated changelog

* minor change

* resolved review comments

* resolved review comments

* fixed a bug in hipMemcpy for copying decoded output to GPU

---------

Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>

[ROCm/rocdecode commit: 0cf22e1cec]
2024-12-05 16:45:04 -05:00
Aryan Salmanpour e5f513c9d6 Update rocDecode dispatch table for bit stream reader APIs (#471)
[ROCm/rocdecode commit: 37794d045f]
2024-12-05 14:40:17 -05:00
Aryan Salmanpour 932141e2fb Fix a CMakeLists bug for videoDecodeRaw test (#470)
[ROCm/rocdecode commit: 679d2fd1f2]
2024-12-05 10:56:52 -05:00
jeffqjiangNew c8a16141e4 Added the bit stream reader feature. (#433)
* * rocDecode/ES parser: Added elementary stream file parser for HEVC and AVC.

* * rocDecode/ES parser: Added elementary stream file parser for AV1. Also cleaned up the bitstream ring buffer code.

* * rocDecode/ES parser: Added the IVF container file parser for AV1. Also fixed a bug in fill ring buffer function.

* * rocDecode/ES file parder: Added supported stream type detection.
 - The stream type detection checks the unique syntax patterns of the stream type and calculate the likeliheed score. Based on the score, the most likely type is determined.
 - The current supported stream types are: AVC/HEVC/AV1 elementary streams, IVF AV1 streams.

* * rocDecode/ES file parser: Fixed an AVC decode regression due to a copy and paste error.

* * rocDecode/ES file parser: Added bit depth parsing for codec support check; Added stronger AV1 detection for IVF AV1 stream type.

* * rocDecode/ES file parser: Removed debugging logs.

* * rocDecode/ES file parser: Added exmaple code to use the built-in file parser.

* * rocDecode/Bitstream reader: Renamed the elementary parser feature to bitstream reader and re-organized the code.
 - Moved the bitstream reader code to rocDecode core lib from utility.
 - Added bitstream reader interface in parallel with rocDecode parser and decoder interfaces.

* * rocDecode/Bitstream reader: Added sample to use bitstream reader, instead of FFMPEG demuxer, to get picture data. Also reverted the original sample app back to using FFMPEG demuxer only.

* * rocDecode/Bitstream reader: Renamed the new sample app.

* * rocDecode/Bitstream reader: FFMPEG dependency reduction.
 - Moved MD5 functions out of RocVideoDecoder utility class. This removed RocVideoDecoder's dependency on FFMPEG.
 - Added the new MD5 utility, which depends on FFMPEG lib. MD5 message digest generation is now performed in the MD5 utility.
 - Modified decode sampples that uses MD5 generation function.
 - Removed FFMPEG dependency from video decoder basic sample.

* * rocDecode/Bitstream reader: Added option to use bitstream reader to video decode sample and conformance test script. Added the missing destroy bitstream reader call in video decode basic sample.

* * rocDecode/Bitstream reader: Minor format change. No functional changes.

* * rocDecode/Bitstream reader: Added handling of unsupported stream file type by the bitstream reader to decode sample apps.

* * rocDecode/Bitstream reader: Fixed build errors of several samples.

* * rocDecode/Bitstream reader: Added changes based on review comments.

* * rocDecode/Bitstream reader: File name changes based on review comments.

* * rocDecode/Bitstream reader: Moved MD5 code into single header file. Added changes based on review comments.

* * rocDecode/Bitstream reader: Removed redundant path.

* * rocDecode/Bitstream reader: Changed rocDecode version to 0.10.0. Added minor changes based on review comments.

---------

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

[ROCm/rocdecode commit: e62aa3e09b]
2024-12-05 09:46:24 -05:00
Rajy Rawther fb82691ef2 ffmpeg software decoder implementation (#461)
* WIP: ffmpeg based software decoder

* minor update

* WIP: FFMpeg SW decoder support

* FFMpeg decoder working version

* working version without threading

* multithreading working with FFMpeg decoder

* moved ffmpeg decoder to separate folder

* updated changelog

* minor change

* resolved review comments

* resolved review comments

---------

Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

[ROCm/rocdecode commit: 52eb62fabf]
2024-12-04 14:11:02 -05:00
Kiriti Gowda a7fd0610e3 Samples & Test - Compiler Updates (#468)
* Compiler - set CXX Compiler if not set

* CXX Compiler - Set CXX compiler in CTest

* Test - Ctest cleanup

* Samples - Update CXX Compiler option

[ROCm/rocdecode commit: 924d19eb65]
2024-12-03 16:03:26 -05:00
Kiriti Gowda d9091f0cc2 Revert "Compiler - set CXX Compiler if not set (#466)" (#467)
This reverts commit 2eb3bd30ef.

[ROCm/rocdecode commit: 4f10c3893b]
2024-12-02 13:47:49 -08:00
Kiriti Gowda 2eb3bd30ef Compiler - set CXX Compiler if not set (#466)
[ROCm/rocdecode commit: 7a6073103a]
2024-12-02 13:02:09 -08:00
Aryan Salmanpour dfa22cbbe1 Add support for rocDecode APIs dispatch table (#462)
[ROCm/rocdecode commit: 3dfb669f57]
2024-11-27 16:14:30 -05:00