575 Коммитов

Автор SHA1 Сообщение Дата
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
jeffqjiangNew b7df2fb2b9 VP9: Inter decode is up and running. (#460)
* * rocDecode/VP9: Inter decode is up and running.
 - Added reference list setup for VA-API.
 - Added update reference frame process (8.10).
 - Added set up past independence function.
 - Added DPB and decode pool management.
 - Added display management.
 - Added super frame detection and parsing.
 - Added VA-API parameter logging functions for debugging purposes.

* * rocDecode/VP9: Minor change: removed an extra newline.

* * rocDecode/VP9: Removed todo comments. No functional changes.

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

* * rocDecode/VP9: Minor changes based on review comment.

[ROCm/rocdecode commit: 3e6f18c636]
2024-11-25 13:51:25 -05:00
spolifroni-amd 94aed66ec3 reverted readme (#459)
* reverted readme

* Update README.md

---------

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

[ROCm/rocdecode commit: 4e36702f03]
2024-11-20 13:32:22 -05:00
jeffqjiangNew f7cffa4db2 HEVC: Cut HEVC parser creation time from about 40 milliseconds to about 50 microseconds. (#458)
* * rocDecode/HEVC: Cut HEVC parser creation time from about 40 milliseconds to about 50 microseconds.

* * rocDecode/HEVC: Added necessary parameter init in parser constructor.

---------

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

[ROCm/rocdecode commit: 27e9ed23ed]
2024-11-19 15:10:35 -05:00
spolifroni-amd a1d84696ca edited the readme file so that it doesn't duplicate what's in the documentation (#457)
[ROCm/rocdecode commit: e780dce449]
2024-11-19 10:37:16 -05:00
Lakshmi Kumar 2a0fde6173 bug fix for batch sample (#456)
[ROCm/rocdecode commit: 3da7e20b86]
2024-11-18 15:45:56 -05:00
jeffqjiangNew dfcad4048d * rocDecode/HEVC: Fixed an issue in RPS decode function. (#455)
- In searching for a short term reference picture in DPB, we need to make sure it is used.

[ROCm/rocdecode commit: 85faa096e5]
2024-11-15 15:41:50 -05:00
Kiriti Gowda c8ff82a943 SLES - Updates (#454)
* SLES - Updates

* Updates

* Cleanup

* Update CHANGELOG.md

Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>

* CXX Compiler - Use AMD Clang++

* Docs - Updates

* ROCm Version - Upgraded to 6.3.0

* Readme - cleanup

* Readme - minor updates

* Readme - Fix note

---------

Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>

[ROCm/rocdecode commit: 6339767b4c]
2024-11-15 15:35:53 -05:00
jeffqjiangNew 04c28ec306 Added initial code for VP9 support. (#442)
* * rocDecode/VP9: Initial code for VP9.
 - Added structures for VA-API.
 - Added defines for uncompressed header and parsing functions.

* * rocDecode/VP9: Added decode frame call to VA-API.

* * rocDecode/VP9: Added new sequence notification function.

* * rocDecode/VP9: Intra decode started to work.

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

---------

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

[ROCm/rocdecode commit: 3eb6bc2192]
2024-11-14 10:17:46 -05:00
jeffqjiangNew d30754651f * rocDecode/HEVC: Added empty NAL detection. (#452)
[ROCm/rocdecode commit: b3f8fec41b]
2024-11-13 13:28:29 -05:00
spolifroni-amd a10329af7a Removed install.rst since it's been replaced. (#451)
[ROCm/rocdecode commit: 6b37dd606f]
2024-11-12 14:36:41 -05:00
spolifroni-amd 67052ff454 made changes to installation and landing pages (#445)
* initial commit of changes to the installation and landing pages

* deleted original install; fixed the toc; fixed typos

* fixed some wording issues; fixed some formatting issues

* adding back install.rst to try to fix the conflict

---------

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

[ROCm/rocdecode commit: 6cc30f12a4]
2024-11-12 10:40:37 -05:00
Rajy Rawther 3344bee39d Added bitstream validation code for HEVC parser (#450)
* fix for while loop hang

* fix for while loop hang

* add more data validation code in parser

* minor change

* addressed review comments

* fix conformance failures with new code

* added more checks

[ROCm/rocdecode commit: 69ec7af8bd]
2024-11-11 17:33:17 -05:00
Mátyás Aradi 291a0e6c81 Fix link (#426)
[ROCm/rocdecode commit: 8e1cb24851]
2024-11-08 11:24:38 -05:00
Kiriti Gowda bd3b6208fa GPU Arch Updates (#448)
[ROCm/rocdecode commit: 69eb625d2d]
2024-11-06 20:37:07 -05:00
Lakshmi Kumar a511a33966 set disp_delay to 1 for all samples (#446)
[ROCm/rocdecode commit: cb7b2c7f2f]
2024-11-06 14:45:34 -05:00
Rajy Rawther c238421b51 fix for while loop hang (#447)
[ROCm/rocdecode commit: 5820f38592]
2024-11-06 14:41:57 -05:00
Icarus Sparry (work) d9c58d6986 Setup - Fix status return (#444)
The code is full of ERROR_CHECK(os.system("some shell commands")).

Unfortunately the return value from os.system is a 16 bit value with the return code in the upper 8 bits and a number of flags related to the traps in the lower 8 bits. The existing code passes this 16 bit value to the os.exit call, which just uses the bottom 8 bits. Unless the child process is killed by a signal these 8 bits will be zero, which is taken as "success", rather than passing on the exit status of the child process.

So even something as simple as 
    ERROR_CHECK(os.system("false"))
will report a status of 256 in the print statement but will call sys.exit() with a value of 0 in the lower 8 bits.

This change folds the top and bottom halves of the 16 bit value into an 8 bit value. This will be non-zero, so a shell script running rocDecode-setup.py will know something has failed an ERROR_CHECK, rather than the current situation where it thinks things are correct.

[ROCm/rocdecode commit: 40dd67b19a]
2024-11-05 14:10:06 -08:00
Aryan Salmanpour c6635a9de5 VideoDecode samples - Set the default display_delay to 1 (#441)
[ROCm/rocdecode commit: 81e341b786]
2024-10-25 14:20:33 -04:00
spolifroni-amd 3f746445a7 updated the changelog for 6.3 (#439)
[ROCm/rocdecode commit: 8636edce54]
2024-10-24 14:14:25 -04:00
Aryan Salmanpour 896998cc14 Revert "Allow overriding CMAKE_CXX_COMPILER (#436)" (#440)
This reverts commit 5b9907034e.

[ROCm/rocdecode commit: b2149abcef]
2024-10-24 13:28:50 -04:00
jeffqjiangNew f3f91675ff * rocDecode/AV1: Fixed an errror in get Q index function during code inspection. (#438)
[ROCm/rocdecode commit: d9b235db5a]
2024-10-24 11:51:22 -04:00
Jeremy Newton 5b9907034e Allow overriding CMAKE_CXX_COMPILER (#436)
Using set as-is doesn't allow the user to set their own rocm path.
This is useful for community packagers or debugging.

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>

[ROCm/rocdecode commit: 07ecb5e7d6]
2024-10-24 11:36:14 -04:00
Aryan Salmanpour 8b4e416360 Find the minimum supported libva version 1.16 when building rocdecode (#437)
* Find the minimum supported libva version 1.16 when building rocdecode

* Update the changelog

* Update the Error message if libva-amdgpu-dev/libva-amdgpu-devel not found

* Add missing comma

[ROCm/rocdecode commit: e463cbd0f2]
2024-10-23 13:54:23 -04:00
Jeremy Newton 4867830142 Fix libva requirements for rocdecode (#435)
* Fix libva requirements for rocdecode

mesa-amdgpu-va-drivers is built with libva 2.16 (VA-API 1.16), so it
provides the entry point "__vaDriverInit_1_16". For rocdecode to use
mesa, it also needs to make sure it has a high enough requirement on
libva to be compatible with this function.

Strictly speaking, it doesn't matter what libva is used as long as it's
2.16 or newer, since libva is backwards compatible. An OR conditions is
used to favour distro packages when possible to avoid causing issues
with existing libraries built against the distro version.

For libva dev packages, we can just use libva-amdgpu-dev/el directly.

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>

* Update to use libva-amdgpu

To reflect the package change, update the README, rocDecode-setup.py,
and the CHANEGLOG.

Putting the minimum VA-API version in the README isn't required as the
user is expected to just install the latest libva-amdgpu to match the
mesa VA-API version.

---------

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>

[ROCm/rocdecode commit: 859103755a]
2024-10-22 11:41:00 -04:00
Rajy Rawther 6837a86bf5 Add new API rocDecParserMarkFrameForReuse() for Parser (#430)
* added new API to release video frame for decoder and parser

* removed ReleseFrame() from low level parser classes

* Removed rocDecReleaseFrame() from decoder and added in parser

* address review comments

* revert un-necessary files

* minor fix

* remove unused function

* minor formatting fix

[ROCm/rocdecode commit: 29bfe5e3bd]
2024-10-09 13:29:08 -04:00