575 Commits

Auteur SHA1 Bericht Datum
Rajy Rawther 2639f74e4a rr: Add debug flags for valgrind (#77)
* commending out ParseSeiMessage because it is causing segfault

* CMake changes for valgrind

[ROCm/rocdecode commit: 628e1d2610]
2023-11-20 12:07:13 -05:00
Rajy Rawther e925faf9fe commending out ParseSeiMessage because it is causing segfault (#76)
[ROCm/rocdecode commit: 210976616f]
2023-11-17 20:56:05 -05:00
Rajy Rawther 13654ccef6 Rr/parser clean up (#75)
* minor clean_up on parser struct allocation

* minor clean_up

* address review comments

[ROCm/rocdecode commit: cbf6857f74]
2023-11-17 20:55:53 -05:00
Rajy Rawther d77c19c254 Rr/vaapi decoder mem check (#74)
* add some checks for buffer requirements

* address review comments

[ROCm/rocdecode commit: 81abe58fb4]
2023-11-17 17:33:12 -05:00
jeffqjiangNew 43a70df640 * rocDecode/HEVC: Removed parsing of entry_point_offset_minus1[] and beyond in slice header since these syntax elements are not used by HW decode. (#73)
[ROCm/rocdecode commit: c528f46843]
2023-11-17 15:59:29 -05:00
jeffqjiangNew 6ec565f17b * rocDecode/HEVC: Fixed the segmentation fault at the end of decode session on stream chimei_demo_1080p_h265_60fps.mp4 or similar streams. (#72)
Root cause: num_entry_point_offsets in the slice header of frame #2164 is 674, exceeding the entry_point_offset_minus1[440] array size. Parser writes beyond the array boundary, corrupting memory. Frame #2164 is not in conformance of the HEVC spec.

We need to put the constraint from the spec on the num_entry_point_offsets parsed from the stream. Also need to change the array size to the max possible for 8K.

[ROCm/rocdecode commit: b6d0c41a59]
2023-11-17 12:57:19 -05:00
Aryan Salmanpour 4bfd23aa13 Code clean up - remove unused headers from demuxer, unused ffmpeg dependencies, and redundent info from videodecode sample (#71)
[ROCm/rocdecode commit: 071b37b3bd]
2023-11-17 12:46:27 -05:00
Kiriti Gowda 9b062a4f57 Dev Package - Add FFMPEG Deps (#70)
* Dev Package - Add FFMPEG Deps

* Print Deps

* Deps Fix

* CI - Package Details

[ROCm/rocdecode commit: b94b4f7947]
2023-11-16 16:34:47 -05:00
Aryan Salmanpour f62b0fa617 Add additional debug info if we couldn't find the matching pic in reference list and return error (#69)
* Add additional debug info if we couldn't find the matching pic in refrence list and return error

* Correct the debug info message

[ROCm/rocdecode commit: 5d5db9a017]
2023-11-16 12:39:23 -05:00
Aryan Salmanpour efc870b974 update the videodecode sample to call GetFrame/ReleaseFrame regradless of dumping frames (#68)
[ROCm/rocdecode commit: 28c86ba813]
2023-11-16 12:08:15 -05:00
Kiriti Gowda 606189387d rocDecode - runtime, dev, ASAN package (#52)
* rocDecode - runtime, dev, ASAN

* Package - Updates & cleanup

* Package - Fix

* Package - Deps Info

* rocDecode - Package Depends Cleanup

* CI - Verify Runtime & Dev Packages

* Jenkins - Save all built packages

* Jenkins - Groovy Updates

* Package - Cleanup

* CMakeList - updates

* CI - save all packages

* CI - Save Test Logs

[ROCm/rocdecode commit: f67f9033c8]
2023-11-15 21:32:10 -05:00
jeffqjiangNew b961ebfe19 IRAP POC calculation fix. (#66)
* * rocDecode/HEVC: Fixed a bug in IRAP picture order count calculation. Added a few picture type check utilities.

* * rocDecode/HEVC: Minor coding style changes. No functional changes.

[ROCm/rocdecode commit: 69c2243c9c]
2023-11-15 16:07:18 -05:00
Aryan Salmanpour 0a166ff271 code cleanup - use google style for videodecode sample and RocVideoDecoder class - no functional change (#65)
* code cleanup - use google style for videodecode sample and RocVideoDecoder class - no functional change

* rename SaveSurfToFile to SaveFrameToFile

[ROCm/rocdecode commit: 851c537904]
2023-11-15 15:49:16 -05:00
Rajy Rawther c15be83df5 Rr/fix output surface dims (#64)
* fix output surface dimensions

* fix bug

[ROCm/rocdecode commit: a4652d6a53]
2023-11-15 13:46:37 -05:00
Aryan Salmanpour 817b9f44af Update the make test and Readme by removing the H.264 (#63)
[ROCm/rocdecode commit: c44a000c73]
2023-11-15 10:57:55 -05:00
jeffqjiangNew 463ed05a63 Do not set up slice ref list for intra frames for VAAPI calls. (#62)
* * rocDecode/HEVC: Do not set up slice ref list for intra frames.

* *rocDecode/HEVC: Condensed slice type check code. No functionaly changes.

[ROCm/rocdecode commit: 1d4f038695]
2023-11-14 15:44:35 -05:00
jeffqjiangNew 9d9ac34a91 * rocDecode/HEVC: Fixed a few issues in reference list setup. Also looks like we need to use VA surface IDs on all buffers including the reference (need to confirm with VA driver team). (#61)
[ROCm/rocdecode commit: 3357aba104]
2023-11-14 11:42:13 -05:00
Aryan Salmanpour 64441167c4 Fix a seg fault when saving a frame in SaveSurfToFile (#60)
[ROCm/rocdecode commit: 592426595e]
2023-11-13 14:38:29 -05:00
Rajy Rawther 4c7210745f Rr/add low latency (#59)
* added picture_index associated with frame and fixed bug

* added option to force low_latency display

* add force_zero_latency option for videodecode sample

[ROCm/rocdecode commit: d163eb1764]
2023-11-13 13:53:19 -05:00
Aryan Salmanpour e86c9487b5 Add support for the rocDecUnMapVideoFrame API (#58)
[ROCm/rocdecode commit: eb5614d250]
2023-11-13 12:54:32 -05:00
Rajy Rawther 97c86ddac2 added picture_index associated with frame and fixed bug (#56)
[ROCm/rocdecode commit: ddded3a6d2]
2023-11-13 12:22:22 -05:00
Aryan Salmanpour 77481cf7e0 Close fds after importing the surVAAPI face to HIP memory (#55)
[ROCm/rocdecode commit: 730b80b600]
2023-11-10 18:24:21 -05:00
jeffqjiangNew 30c4df3af1 Added picture decode submission to VA-API driver. (#54)
* * rocDeocde/HEVC: Added several "reserved" fields to structs to match the corresponding VA-API structs.

* * rocDecode/HEVC: Added decode submission to VA-API driver.

* * rocDecode/HEVC: Corrected data buffer id type.

[ROCm/rocdecode commit: 3c7f29dab4]
2023-11-10 17:15:47 -05:00
Aryan Salmanpour 9ac1a081de Add support for rocDecMapVideoFrame API (#53)
[ROCm/rocdecode commit: 7a90c0c054]
2023-11-10 17:02:57 -05:00
Rajy Rawther 59c03a8df3 fix exception handling to gracefully exit (#49)
* fix exception handling to gracefully exit

* addressed review comments

[ROCm/rocdecode commit: 55ebf353cc]
2023-11-10 15:44:40 -05:00
Lakshmi Kumar def60bd433 Add a sample for measuring the video decoding performance using multi-forks (#51)
* fork example

* review comments

* change logic to find vcn

[ROCm/rocdecode commit: 146d243f69]
2023-11-10 11:28:24 -05:00
Lakshmi Kumar a1d39cf9f9 Add a sample for measuring the video decoding performance using multi-threads (#50)
* introducing perf example

* chnages for google standards

* adding exception handling

* review comments

* change logic to find vcn devices

* adding comments

[ROCm/rocdecode commit: 5bac02fab3]
2023-11-10 11:23:44 -05:00
jeffqjiangNew 0b39cc1c2c * rocDecode/HEVC: Fixed a regression introduced by PR#30. We should not abort parsing when we see NAL unit types that we are not interested in. Instead, we should just ignore and continue. (#48)
[ROCm/rocdecode commit: 80845837af]
2023-11-09 14:57:22 -05:00
jeffqjiangNew 7db33e7837 Decode callback implementation step 3: completion. (#47)
* * rocDecode/HEVC: Filled HEVC picture parameter structures for decode callback. Added some missing inferences in tile size and weighted prediction table parsing.

* * rocDecode/HEVC: Changed CurrPicIdx assignment from POC to pic_idx.

* * rocDecode/HEVC: Rmoved one TODO comment, which has been done.

* * rocDecode/HEVC: Corrected two typos in comment.

* * rocDecode/HEVC: No need to set up scaling lists in decode callback when scaling list is not enabled.

[ROCm/rocdecode commit: 8ed03b5ad0]
2023-11-09 13:52:02 -05:00
Aryan Salmanpour d44d320717 Add support for rocDecGetDecodeStatus API (#46)
[ROCm/rocdecode commit: 6ab31ce40e]
2023-11-09 08:47:58 -05:00
Aryan Salmanpour b27fe23cd1 Return an error if the video parser creation fails (#45)
[ROCm/rocdecode commit: 9afec26af0]
2023-11-08 11:54:35 -05:00
Aryan Salmanpour d72a1ca3c5 Add support to GetDecoderCaps to correctly return decoder caps for gfx arch names with a suffix (#43)
[ROCm/rocdecode commit: 3a5fc3608b]
2023-11-08 10:25:45 -05:00
Aryan Salmanpour d9c139d2ab Add nullptr check for parser APIs before dereferencing the parser's handle (#44)
[ROCm/rocdecode commit: ecbd787e4a]
2023-11-08 10:18:17 -05:00
Aryan Salmanpour b459dc6f33 Add support for creating a vaapi context and surfaces for decoding (#41)
[ROCm/rocdecode commit: 2c940dd9d0]
2023-11-07 13:47:53 -05:00
Aryan Salmanpour e25ad867c0 Create the correct render node names on MI300A/MI300X (#38)
[ROCm/rocdecode commit: ba484a91a9]
2023-11-07 11:08:20 -05:00
jeffqjiangNew 39f7496dd3 * rocDecode/HEVC: Updated RocdecPicParams structure to align with VA-API. (#40)
[ROCm/rocdecode commit: 2f64a10c5a]
2023-11-06 22:06:03 -05:00
jeffqjiangNew 6a37f8bbb2 Decode callback step 1: Added skeleton decode callback to get the flow going. (#39)
* * rocDecode/HEVC: Added skeleton decode callback to get the flow going.

* *rocDecode/HEVC: Added error handling for decode call.

[ROCm/rocdecode commit: f56a64d832]
2023-11-06 22:04:25 -05:00
Aryan 043eb5e602 Update README
[ROCm/rocdecode commit: cefdfb7405]
2023-11-06 12:10:12 -05:00
Kiriti Gowda 7f64bb0b61 FFMPEG - Updates (#33)
* FFMPEG - Updates

* Readme - Updates

* Sample - Install

* Install Sample Deps

* Samples - Updates

* Sample - Added missing header

[ROCm/rocdecode commit: d34d85027c]
2023-11-06 11:51:47 -05:00
Lakshmi Kumar 295091beb8 Parser - sei message (#30)
* sei mesaage aprser

* sei callback fn

* copy payload and add condition for callback

* compile error fix

* review comments

* review  comment

[ROCm/rocdecode commit: 213ffc517e]
2023-11-06 09:25:09 -05:00
jeffqjiangNew 97f1b39d98 * rocDecode/HEVC: Fixed a bug in slice header parsing where short term RPS is not properly assigned when SPS short term RPS is referred and the number of these RPSs are 1. Also added error handling in ref list construction to avoid infinite looping. (#36)
[ROCm/rocdecode commit: f5e5d981e1]
2023-11-06 08:22:31 -05:00
Aryan Salmanpour 174b672159 Fix a bug in GetVideoCodecString function where it didn't return the correct codec string (#35)
[ROCm/rocdecode commit: 0d9b056ee5]
2023-11-06 08:20:53 -05:00
Aryan Salmanpour 0c7e31bbfa Add support for gfx1100 - update the vcn lookup table (#34)
[ROCm/rocdecode commit: f47fd89f62]
2023-11-02 22:05:17 -04:00
jeffqjiangNew 170cc43cfb Added all preparing steps in decode process before calling VA-API. (#32)
* rocDecode/HEVC parsing: Implemented correct logic to set active VPS, SPS and PPS: start from slice header and up. Added video image size change detection. Fixed slice_segment_address bits calculation in slice segment header parsing.

* rocDecode/HEVC: Changed variable naming to Google style.

* rocDecode/HEVC: Added VPS, SPS, PPS, and slice segment header content logging functions for debug purposes.

* rocDecode/HEVC: Compacted opening bracket lines to keep coding style consistency.

* * rocDecode/HEVC: Fixed an issue in profile-tier-level parsing where 44 bits are skipped in an incorrect way using ReadBits() which can only consume 32 bits max. Also formated SPS parsing code by using pointer instead of array element.

* * rocDecode/HEVC: Fixed the incorrect array size for sps_max_dec_pic_buffering_minus1, sps_max_num_reorder_pics and sps_max_num_reorder_pics in SPS structure define.

* * rocDecode/HEVC: Modified scaling list parsing to make sure we explicitly follow the spec.

* * rocDecode/HEVC: Added a few syntax elements to short team RPS structure, updated RPS parsing function and logging function.

* * rocDecode/HEVC: In PPS parsing function, use structure pointer instead of structure array element to improve coding clarity.

* * rocDecode/HEVC: Compacted the opening bracket lines. No functional changes.

* * rocDecode/HEVC: Added full parsing of slice segment header. Added PPS range extension parsing.

* * rocDecode/HEVC: Fixed a build error in debug mode due to merging from master branch: removing a redundant debug function.

* * rocDecode/HEVC: Changed the condition for sequence call back from picture size change to more general case where a new SPS is activated. Also moved the call from slice header parsing to upper level where frame data is processed.

* * rocDecode: Compacted opening bracket line. No functional changes.

* * rocDecode/HEVC: Moved POC calculation from slice header parsing to picture level, since we only need to do the calculation once per picture.

* * rocDecode/HEVC: Added RPS decode function.

* *rocDecode/HEVC: Added reference picture list construction.

* * rocDecode/HEVC: Added current picture marking in DPB.

* * rocDecode/HEVC: Removed VA surface id from DPB buffer info structure.

* * rocDecode/HEVC: Do not construct ref list for I pictures.

[ROCm/rocdecode commit: 7a537bbb88]
2023-11-02 18:08:24 -04:00
Aryan Salmanpour a227d5fbcf Fix a bug for the video sequence callback function (#31)
[ROCm/rocdecode commit: 874bd59d89]
2023-11-02 14:34:52 -04:00
Rajy Rawther 691521af5a roc_video_decode class update (#29)
* WIP: class implementation

* add more definitions

* rocvideodecode implementation

* formatting fixes

* address review comments

* rocvideodecode class update

* videodec sample app-enable all apis

[ROCm/rocdecode commit: 89a278bd1b]
2023-11-01 21:16:02 -04:00
Aryan Salmanpour b6557252a0 Add support for rocDecCreateDecoder API (#28)
* Add support for rocDecCreateDecoder API

* check the decoder config support before initializing the vaapi

* rename RocdecDecoderCreateInfo to RocDecoderCreateInfo

* fix a typo

[ROCm/rocdecode commit: 32f854c159]
2023-11-01 09:22:46 -04:00
jeffqjiangNew 9a80f51b34 HEVC: Sequence call back changes. (#27)
* rocDecode/HEVC parsing: Implemented correct logic to set active VPS, SPS and PPS: start from slice header and up. Added video image size change detection. Fixed slice_segment_address bits calculation in slice segment header parsing.

* rocDecode/HEVC: Changed variable naming to Google style.

* rocDecode/HEVC: Added VPS, SPS, PPS, and slice segment header content logging functions for debug purposes.

* rocDecode/HEVC: Compacted opening bracket lines to keep coding style consistency.

* * rocDecode/HEVC: Fixed an issue in profile-tier-level parsing where 44 bits are skipped in an incorrect way using ReadBits() which can only consume 32 bits max. Also formated SPS parsing code by using pointer instead of array element.

* * rocDecode/HEVC: Fixed the incorrect array size for sps_max_dec_pic_buffering_minus1, sps_max_num_reorder_pics and sps_max_num_reorder_pics in SPS structure define.

* * rocDecode/HEVC: Modified scaling list parsing to make sure we explicitly follow the spec.

* * rocDecode/HEVC: Added a few syntax elements to short team RPS structure, updated RPS parsing function and logging function.

* * rocDecode/HEVC: In PPS parsing function, use structure pointer instead of structure array element to improve coding clarity.

* * rocDecode/HEVC: Compacted the opening bracket lines. No functional changes.

* * rocDecode/HEVC: Added full parsing of slice segment header. Added PPS range extension parsing.

* * rocDecode/HEVC: Fixed a build error in debug mode due to merging from master branch: removing a redundant debug function.

* * rocDecode/HEVC: Changed the condition for sequence call back from picture size change to more general case where a new SPS is activated. Also moved the call from slice header parsing to upper level where frame data is processed.

* * rocDecode: Compacted opening bracket line. No functional changes.

[ROCm/rocdecode commit: 88a34e4db0]
2023-10-27 15:13:12 -04:00
Lakshmi Kumar cae878ccd4 sequence callback function (#25)
* seq callback function

* bug fix

* changing some params for callback

* review comments

* switch case

* fixing minor border cases

[ROCm/rocdecode commit: 47ede638a3]
2023-10-27 09:11:00 -04:00
jeffqjiangNew b713923621 Added full parsing of the slice segment header. (#26)
* rocDecode/HEVC parsing: Implemented correct logic to set active VPS, SPS and PPS: start from slice header and up. Added video image size change detection. Fixed slice_segment_address bits calculation in slice segment header parsing.

* rocDecode/HEVC: Changed variable naming to Google style.

* rocDecode/HEVC: Added VPS, SPS, PPS, and slice segment header content logging functions for debug purposes.

* rocDecode/HEVC: Compacted opening bracket lines to keep coding style consistency.

* * rocDecode/HEVC: Fixed an issue in profile-tier-level parsing where 44 bits are skipped in an incorrect way using ReadBits() which can only consume 32 bits max. Also formated SPS parsing code by using pointer instead of array element.

* * rocDecode/HEVC: Fixed the incorrect array size for sps_max_dec_pic_buffering_minus1, sps_max_num_reorder_pics and sps_max_num_reorder_pics in SPS structure define.

* * rocDecode/HEVC: Modified scaling list parsing to make sure we explicitly follow the spec.

* * rocDecode/HEVC: Added a few syntax elements to short team RPS structure, updated RPS parsing function and logging function.

* * rocDecode/HEVC: In PPS parsing function, use structure pointer instead of structure array element to improve coding clarity.

* * rocDecode/HEVC: Compacted the opening bracket lines. No functional changes.

* * rocDecode/HEVC: Added full parsing of slice segment header. Added PPS range extension parsing.

* * rocDecode/HEVC: Fixed a build error in debug mode due to merging from master branch: removing a redundant debug function.

[ROCm/rocdecode commit: 298d8e3a8f]
2023-10-26 11:38:46 -04:00