Commit Graph

463 Commits

Author SHA1 Message Date
jeffqjiangNew ac74540c19 * rocDecode/HEVC error resilience: Fixed a vulnerability with active PPS id. We should not assign the current active PPS id to an invalid value. (#529) 2025-03-12 17:49:52 -04:00
Lakshmi Kumar 2b4228a824 Warning fixes (#528)
* rocm version check for targets

* check rocm targets for gfx

* fix warnings

* review comments
2025-03-11 16:28:46 -04:00
spolifroni-amd dcddb9d5ea added howto use for the utility classes (#511)
* added howto use for the utility classes

* Update docs/conceptual/rocDecode-memory-types.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/conceptual/rocDecode-memory-types.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/how-to/using-rocDecode-bitstream.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/how-to/using-rocDecode-bitstream.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/how-to/using-rocDecode-bitstream.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/how-to/using-rocDecode-bitstream.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/how-to/using-rocdecode.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/how-to/using-rocdecode.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update using-rocDecode-ffmpeg.rst

* key frame -> keyframe

* `api` -> ``api``

* must -> need to

* added a sample walkthrough; removed the bitstream reader info; streamlined info

* Update docs/how-to/using-rocDecode-videodecode-sample.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/how-to/using-rocDecode-videodecode-sample.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update docs/how-to/using-rocdecode.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* Update rocDecode-samples.rst

* Update docs/how-to/using-rocdecode.rst

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>

* updated tables and other minor things

* updated with Leo's suggestion

* Update using-rocDecode-ffmpeg.rst

* added detail to information about the frame buffers

* small changes based on feedback

* updated

---------

Co-authored-by: Leo Paoletti <164940351+lpaoletti@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
2025-03-11 11:16:45 -04:00
jeffqjiangNew 263b57fde9 Added syntax error handling in VPS parsing. (#526)
* * rocDecode/HEVC: Added error handling in VPS parsing.

* * rocDecode/HEVC: Updated change log.

* * rocDecode/Error resilience: Improved syntax error check logging: add the parameter name.
2025-03-10 09:15:12 -04:00
jeffqjiangNew 27adeb8c47 Error resilience: Added HEVC slice syntax error handle for some corrupted streams. (#525)
* * rocDecode/Error resilience: Added HEVC slice syntax error handle for some corrupted streams.
 - Detect out of range total reference numbers.

* * rocDecode/Error resilience: Added additional checks for HEVC reference parameters.

* * rocDecode/Error resilence: Corrected checked range.
2025-03-05 08:44:59 -05:00
Lakshmi Kumar bcca70908c Code cleanup (#524)
* rocm version check for targets

* check rocm targets for gfx

* code cleanup

* code cleanup
2025-03-03 16:25:35 -05:00
jeffqjiangNew df11e95a71 * rocDecode/CTest: Added CTest for VP9 decode on bitstream reader. (#523) 2025-03-03 10:47:40 -05:00
jeffqjiangNew 5f779a6eb7 * rocDecoder/Bitstream reader: Added stream type detection optimization. (#522)
- During stream type evaluation, when we have a high confidence score, we stop and finalize, to avoid unnecessary exhaustive type search.
2025-03-03 09:31:49 -05:00
jeffqjiangNew a5863bceba VP9: Added VP9 IVF container detection and picture data parsing support to bitstream reader. (#519)
* * rocDecode/VP9: Added VP9 IVF containter detection and picture data parsing.

* * rocDecode/VP9 bitstream reader: Wording changes based on review comment.

* * rocDecode/VP9 IVF parser: Updated change log based on review comment.

* * rocDecode/VP9 IVF parser: Bumped up rocDecode version to 0.11.0.

* * rocDecode/VP9: Added VP9 IVF containter detection and picture data parsing.

* * rocDecode/VP9 bitstream reader: Wording changes based on review comment.

* * rocDecode/VP9 IVF parser: Updated change log based on review comment.

* * rocDecode/VP9 IVF parser: Bumped up rocDecode version to 0.11.0.

* * rocDecode/VP9 IVF parsing: Minor name correction.
2025-02-28 18:11:10 -05:00
Fiona-MCW 866ba6699b 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 d45cd48001.

---------

Co-authored-by: fgladwin <fgladwin@amd.com>
2025-02-28 16:40:50 -05:00
Aryan Salmanpour 9e0600a2d0 [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
2025-02-27 08:25:01 -05:00
jeffqjiangNew a78f6730c8 * rocDecode: Fix a typo in new sequence callback function name. (#520) 2025-02-25 20:43:46 -05:00
Lakshmi Kumar ad0bec2f14 Check ROCm targets (#513)
* rocm version check for targets

* check rocm targets for gfx
2025-02-25 14:52:17 -05:00
Sam Wu da81f34066 Update rocm-docs-core version (#516)
Required manual pip-compile of requirements.txt
2025-02-20 16:37:37 -05:00
Lakshmi Kumar e9f9aa9f58 Bug fix - videoToSequence sample (#514)
* rocm version check for targets

* fix sample

* cmake merge with develop

* address reciew comments

* comment update
2025-02-19 17:19:49 -05:00
jeffqjiangNew 1f53dedd4a 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.
2025-02-18 13:09:16 -05:00
Rajy Rawther c4fe8f5258 rename some macros so it doesn't clash with others (#510)
* rename macros so not to clash with others

* modified macro in all samples
2025-02-18 08:40:58 -05:00
jeffqjiangNew 2af7bbf4e7 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.
2025-02-12 17:18:09 -05:00
jeffqjiangNew 25463e594b 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.
2025-02-12 14:06:26 -05:00
Lakshmi Kumar 5e806d5465 gfx update (#505)
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
2025-02-11 09:07:34 -05:00
Aryan Salmanpour a2a7b63cad Update CHANGELOG (#506)
* Update CHANGELOG

* code clean up

* clean up
2025-02-04 15:56:21 -05:00
jeffqjiangNew 3b7e566095 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>
2025-02-04 12:57:01 -05:00
Aryan Salmanpour 320d1422af remove unused code (#504) 2025-02-03 13:21:43 -05:00
Rajy Rawther 03c9c407d3 ubuntu24.04 bug fix (#503)
* fix for build errors in ubuntu24.04

* UB24 bug fix
2025-01-29 17:08:35 -05:00
Rajy Rawther 5ca75ec203 fix for build errors in ubuntu24.04 (#501) 2025-01-29 08:40:06 -05:00
Daniel Su da2491a04c Setup - Install ffmpeg-devel on RHEL 9 (#500) 2025-01-28 09:03:23 -05:00
Kiriti Gowda 94ea9f3f86 Readme - Updates (#499) 2025-01-27 15:45:31 -05:00
Aryan Salmanpour bca75cf2b7 Eliminate the use of std::fs (#497) 2025-01-27 08:10:11 -05:00
jeffqjiangNew 46a344259b 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.
2025-01-23 15:28:41 -08:00
jeffqjiangNew dec6dacbc9 * rocDecode/HEVC: Added short term RPS parsing error handling. (#495) 2025-01-22 12:47:01 -05:00
Aryan Salmanpour 99fa534eb9 Fix a seg fault for videoDecodeRGB app in multi-GPU systems (#494) 2025-01-21 17:07:40 -05:00
Aryan Salmanpour 6ada77a9ad Optimize finding the compute partition mode (#493) 2025-01-18 10:12:02 -05:00
Aryan Salmanpour fe0fee01d0 code cleanup - remove unnecessary check (#492) 2025-01-16 14:06:28 -05:00
Aryan Salmanpour 760f7f7200 Update samples (#491) 2025-01-13 14:31:46 -05:00
jeffqjiangNew ef06f12dfa 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>
2025-01-10 14:44:06 -05:00
Aryan Salmanpour 6477cd1100 code clean up (#490) 2025-01-09 10:38:54 -05:00
Fiona Gladwin d45cd48001 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
2025-01-08 19:51:13 -05:00
Rajy Rawther f02751900d fix for build errors with FFMpeg version 6 (#489)
* fix for build errors with FFMpeg version 6

* set initialize for reconfigure
2025-01-08 13:26:08 -08:00
jeffqjiangNew 9c113d5ee9 * 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.
2025-01-07 20:43:49 -05:00
jeffqjiangNew 888940f52c * 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.
2025-01-06 12:33:12 -05:00
Aryan Salmanpour 3624040ce7 Update Copyright year to 2025 (#486)
* Update Copyright year to 2025

* update year to 2025
2025-01-05 16:25:39 -05:00
Kiriti Gowda 913b6728f0 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
2025-01-02 09:42:31 -05:00
Rajy Rawther 5365ceabec 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>
2024-12-20 16:50:15 -05:00
jeffqjiangNew 5336913a09 * rocDecode/HEVC: Added in stream DPB buffer size change detection and handling. (#482) 2024-12-19 17:29:52 -05:00
Aryan Salmanpour 0b24f96bbb 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
2024-12-19 14:12:57 -05:00
Aryan Salmanpour e3816a23e6 Add support for ROCR_VISIBLE_DEVICES environment variable (#478) 2024-12-17 12:04:59 -05:00
Aryan Salmanpour c02fbcf658 Enable the CMake ROCDECODE_ROCPROFILER_REGISTER option by default (#469) 2024-12-09 18:24:30 -05:00
David Rosca 80e08f47c2 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.
2024-12-09 14:46:57 -05:00
jeffqjiangNew 597b29a7c9 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>
2024-12-06 14:46:30 -05:00
Aryan Salmanpour 91ab3b1577 Use a pointer for the horizontal_pitch parameter in the rocDecGetVideoFrame API (#475) 2024-12-05 19:22:07 -05:00