Граф коммитов

84 Коммитов

Автор SHA1 Сообщение Дата
jeffqjiangNew 5faecc9c59 * rocDecode/AVC: Added field picture support in reference list modification and adaptive referecne picture marking. (#332)
- 4 more conformance streams now pass.

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

[ROCm/rocdecode commit: 0f905f527c]
2024-05-02 08:46:47 -04:00
jeffqjiangNew 3e74cd919b AVC: Added support for picture adaptive frame-field (PICAFF) feature. (#325)
* * rocDecode/AVC: Added initial field picture decode support.
 - 7 conformance streams pass.

* * rocDecode/AVC: Minor change based on review comment.

* * rocDecode/AVC: Fixed an issue with getting the decoded frame buffer index for the second field.
 - 10 more field conformance streams now pass.

* * rocDecode/AVC: Added support for picture adaptive frame-field feature.
 - 10 more field conformance streams now pass.

* * rocDecode/AVC: Added a missing change during last merge.

[ROCm/rocdecode commit: d2b742ab4b]
2024-05-01 08:29:26 -04:00
jeffqjiangNew 86ad715056 AVC: Added initial field picture decode support. (#323)
* * rocDecode/AVC: Added initial field picture decode support.
 - 7 conformance streams pass.

* * rocDecode/AVC: Minor change based on review comment.

* * rocDecode/AVC: Fixed an issue with getting the decoded frame buffer index for the second field.
 - 10 more field conformance streams now pass.

* * rocDecode/AVC: Changed from C type cast to C++ type cast.

[ROCm/rocdecode commit: bd4e410a8d]
2024-04-30 21:21:05 -04:00
jeffqjiangNew 5a4735ea87 * rocDecode/AVC: Added support for gaps in frame_num. (#319)
- Fixed decode failure of conformance stream MR3_TANDBERG_B.264.

[ROCm/rocdecode commit: a8bcc1e62f]
2024-04-19 16:51:41 -04:00
jeffqjiangNew e86a11681c AVC: Fixed the decode failure of conformance stream MR2_TANDBERG_E.264. (#314)
* * rocDecode/AVC: Fixed the decode failure of conformance stream MR2_TANDBERG_E.264.
 - Fixed a bug in memory management control operation 4 process.

* * rocDecode/AVC: Added the missing assignment of top/bottom POC of ref_pic_list_1 in VAAPI slice parameter struct. This change did not make any effective functional changes.

[ROCm/rocdecode commit: 4188000079]
2024-04-15 08:32:03 -04:00
jeffqjiangNew c76a8e6885 AV1: Added frame header and tile group OBU parsing. (#312)
* * rocDecode/AV1: Added frame header OBU parsing.

* * rocDecode/AV1: Added a missing function description.

* * rocDecode/AV1: Added tile group OBU parsing.

[ROCm/rocdecode commit: 6b03950181]
2024-04-11 09:01:54 -04:00
Pavel Tcherniaev 13d85bfab8 added frame rate calculation to AVC parser (#307)
* added frame rate calculation to AVC parser

* fixed typo in avc_parser.h and removed cout debug statements from avc_parser.cpp

* made all changes discussed with Jeff

---------

Co-authored-by: jeffqjiangNew <142832361+jeffqjiangNew@users.noreply.github.com>

[ROCm/rocdecode commit: f8bf587f92]
2024-04-05 08:15:15 -04:00
Aryan Salmanpour 36840419cc Enable decoding AVC (H.264) codec by default and enable CTest for it (#309)
[ROCm/rocdecode commit: 2d877cd357]
2024-04-04 19:47:35 -04:00
jeffqjiangNew 190f2d9d33 * rocDecode/AV1: Added stream syntax defines and sequence header parsing. (#306)
[ROCm/rocdecode commit: e96b782dcf]
2024-04-03 15:04:18 -04:00
jeffqjiangNew 036a24f829 * rocDecode/AVC: Added support for memory management control operation equal to 5 and fixed an issue in reference picture list modification. (#304)
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

[ROCm/rocdecode commit: d38931ddae]
2024-04-01 20:58:31 -04:00
Lakshmi Kumar a05ef46999 av1 initial commit (#298)
[ROCm/rocdecode commit: 6265f675c1]
2024-03-26 18:59:15 -04:00
jeffqjiangNew f655289b43 * rocDecode/AVC: Fixed the decode failure of the conformance stream MR2_MW_A.264. (#297)
- We should always clear the number of short term and long term references in DPB buffer structure when IDR occurs.

[ROCm/rocdecode commit: 7cf22e5920]
2024-03-26 18:53:42 -04:00
jeffqjiangNew 158a1a900c * rocDecode/AVC: Fixed an issue in reference list modification. We need to search all reference buffers in DPB, instead of the list of the current slice, for the replacement. (#284)
[ROCm/rocdecode commit: 44c14236ae]
2024-03-11 20:48:10 -04:00
jeffqjiangNew 6ef0d46f4a AVC: Added two decode error handlings. (#280)
* * rocDecode/AVC: Added two decode error handlings.
 - Exit with error when the stream is coded field pictures.
 - Exit with error when the stream has multiple slice groups. VCN HW does not support it.

* * rocDecode/AVC: Added a missing error return from the last commit.

---------

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

[ROCm/rocdecode commit: 5c18444bcc]
2024-03-07 21:35:19 -05:00
Aryan Salmanpour 0cd3ed9aae Disable AVC codec support by default for 6.1 release (#264)
[ROCm/rocdecode commit: eced98721c]
2024-02-27 17:56:15 -05:00
jeffqjiangNew 1c4e9bb5f5 * rocDecode/AVC: Fixed a bug in more RBSP data check function. (#263)
[ROCm/rocdecode commit: a48fc69caf]
2024-02-27 17:37:32 -05:00
jeffqjiangNew ca1c6b59b7 * rocDecode/AVC: Added error handling for no slice data cases. (#261)
- At the end of some streams, the demuxer sends a picture payload of NAL units that do not contain slice data. In such cases, we return gracefully without causing a decoder error.

[ROCm/rocdecode commit: 244eb517ab]
2024-02-27 09:03:29 -05:00
jeffqjiangNew 401031ef31 AVC: Added adaptive memory control decoded reference picture marking process and a few fixes. (#256)
* * rocDecode/AVC: Added adaptive memory control decoded reference picture marking process. Other changes include:
 - Replaced part of reference list modification implementation with a cleaner and more correct logic. It was found that the steps suggested
in the spec resulted errors on some streams.
 - Fixed an issue in reference picture list construction. We still need to do picture number calculation (8.2.4.1) for I pictures.
 - Fixed a bug in VAAPI slice parameter setup for ref list 1 for B pictures.

* * rocDecode/AVC: Fixed the scaling list setup for VAAPI.
 - Put the scaling list in zig-zag scan order.

* * rocDecode/AVC: Added adaptive memory control decoded reference picture marking process. Other changes include:
 - Replaced part of reference list modification implementation with a cleaner and more correct logic. It was found that the steps suggested
in the spec resulted errors on some streams.
 - Fixed an issue in reference picture list construction. We still need to do picture number calculation (8.2.4.1) for I pictures.
 - Fixed a bug in VAAPI slice parameter setup for ref list 1 for B pictures.

* * rocDecode/AVC: Fixed the scaling list setup for VAAPI.
 - Put the scaling list in zig-zag scan order.

* * rocDecode/AVC: Replaced Todo comments with error messages, based on code review.

[ROCm/rocdecode commit: f9c226ca84]
2024-02-26 10:07:40 -05:00
jeffqjiangNew 513ad63637 AVC: Added reference picture list modification. (#254)
* * rocDecode/AVC: Added reference picture list modification.

* * rocDecode/AVC: Removed a debug log.

---------

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

[ROCm/rocdecode commit: 4709c0981f]
2024-02-22 08:53:29 -05:00
jeffqjiangNew 4c68b8c1fd * rocDecode/AVC: Added SEI message extraction support. Also merged common AVC and HEVC SEI support code to super class. (#250)
[ROCm/rocdecode commit: 9b006616ed]
2024-02-15 08:42:51 -05:00
jeffqjiangNew 11450f86ef AVC: Added DPB management, decoded picture output and display callback. (#244)
* * rocDecode/AVC: Added display callback implementation.

* *rocDecode/AVC: Fixed a few issues with decoded buffer output and bumping from DPB.

* * rocDecode: Name changes based on code review.

---------

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

[ROCm/rocdecode commit: ca3333f7b9]
2024-02-14 18:06:43 -05:00
jeffqjiangNew c919735380 * rocDecode/AVC: Added support for multiple slice parameter buffer submission for AVC multi-slice streams. (#234)
[ROCm/rocdecode commit: c496dfd3f2]
2024-02-12 10:22:42 -05:00
jeffqjiangNew cd37b816b6 Implemented proper slice parameter buffer submission for multiple slice streams. (#226)
* * rocDecode: Implemented proper slice parameter buffer submission for multiple slice streams.
 - We were submitting single slice parameter buffer for multiple slice streams. This works for other APIs but not for VAAPI, which requires to send slice parameter buffer once per slice.
 - At step 1, all the multi-slice structures are fixed sized (256). Will make them dynamic in the next step.
 - With this change, all 135 HEVC conformance streams now pass.

* * rocDecode: Multiple slice change step 2: make the fixed size slice info structure lists dynamic.

* * rocDecode: Minor changes in comments. No functional changes.

* *rocDecode: Changed INIT_SLICE_PARAM_LIST_NUM from 256 back to 16. 256 was set during debug process.

* * rocDecode: Add suggest changes from code review.

* * rocDecode: Moved slice_params_buf_id_ initialization to class VaapiVideoDecoder declaration, as suggested by code review.

[ROCm/rocdecode commit: 00127f16f1]
2024-02-09 15:09:49 -05:00
jeffqjiangNew 39cc3e2a44 * rocDecode/AVC: Added initial B frame support. (#214)
- Basic B frames are decoded clean now.

[ROCm/rocdecode commit: 300be009de]
2024-02-01 09:58:00 -05:00
jeffqjiangNew 031c28105c * rocDecode/AVC: Fixed a few issues with P frame. (#212)
- Moved decoded reference picture marking after decode picture submission, according to the spec.
 - Fixed several errors in the decoding process.
 - Added two debug functions to log out DPB content and VAAPI buffer info.
 - P frames look good now.

[ROCm/rocdecode commit: 90cddfe655]
2024-01-31 09:10:41 -05:00
jeffqjiangNew e140ba1249 AVC: Added several steps in slice decoding process (8.2) (#208)
* * rocDecode/AVC: Added decode picture callback from parser to decoder and VAAPI decode submission.

* * rocDecode/AVC: Minor changes based on code review comments.

* * rocDecode/AVC: Removed a redundant line.

* * rocDecode/AVC: Added picture order count calculation.

* * rocDecode/AVC: Added initial implementation of reference list setup.

* * rocDecode/AVC: Added decoded reference picture marking.

* * rocDecode/AVC: Minor changes based on code review.

[ROCm/rocdecode commit: 6bd8509bec]
2024-01-29 12:09:36 -05:00
jeffqjiangNew a0e7d3c29f Changed rocDecode API header variable naming to Google C++ style. (#196)
* * rocDecode: Changed rocDecode API header variable naming to Google C++ style.

* * rocDecode: Unified AVC/H264 naming to AVC. Minor naming changes on HEVC related names.

* * rocDecode: Minor comment fix based on code review.

[ROCm/rocdecode commit: cd6401750e]
2024-01-24 18:03:46 -05:00
jeffqjiangNew fd2b762fab AVC: Added decode picture callback from parser to decoder and VAAPI decode submission. (#190)
* * rocDecode/AVC: Added decode picture callback from parser to decoder and VAAPI decode submission.

* * rocDecode/AVC: Minor changes based on code review comments.

* * rocDecode/AVC: Removed a redundant line.

* * rocDecode/AVC: Condensed several lines based on code review feedback.

[ROCm/rocdecode commit: 426067898c]
2024-01-23 17:30:29 -08:00
Hui Liu 439eca4c3d fix mem leak (#194)
[ROCm/rocdecode commit: e7dbd65315]
2024-01-23 11:23:30 -08:00
jeffqjiangNew 5527ee0b79 Fixed display aspect ratio calculation for both AVC and HEVC. (#187)
* * rocDecode: Fixed display aspect ratio calculation.
 - We were assigning sample aspect ration (SAR) from VUI directly to display aspect ratio (DAR). Now we follow the correct procedure.

* * rocDecode: Fixed an error in display aspect ratio calculation. Should include sample aspect ratio in the final step.

[ROCm/rocdecode commit: cf82317396]
2024-01-18 11:31:54 -08:00
jeffqjiangNew e416b5a192 Added new sequence notification callback for AVC. (#184)
* * rocDecode/AVC: Added new sequence notification callback.

* * rocDecode/AVC: Removed the commented out code.

* * rocDecode/AVC: Changed function name to better describe the operation.

* * rocDecode/AVC: Minor formatting change.

[ROCm/rocdecode commit: a7bb9953c6]
2024-01-17 14:24:58 -05:00
jeffqjiangNew 40408ce2b3 Added initial AVC parser. (#176)
* * rocDecode/AVC: Added initial AVC parser.
 - Added AVC SPS, PPS and slice header parsing functions.
 - Merged common parsing code from AVC and HEVC parsers to their super class.

* * rocDecode/AVC: Formating changes. No functional changes.

[ROCm/rocdecode commit: 395a1249c1]
2024-01-16 20:57:40 -05:00
jeffqjiangNew f90684cc40 * rocDecode/HEVC: Code clean up. (#163)
- Moved HEVC standard specific defines out of HevcVideoParser class to a new file.
 - Changed some namings to be more specification compliant.
 - No functional changes.

[ROCm/rocdecode commit: 2a4026470f]
2024-01-10 11:44:07 -05:00
jeffqjiangNew 4c9a35a6a8 * rocDecode: Updated Copyright message for 2024. (#160)
[ROCm/rocdecode commit: 04fe74f390]
2024-01-09 20:47:16 -05:00
jeffqjiangNew bacf9f6700 Fixed a couple of errors in long term reference picture set parsing and long term reference picture list construction. (#151)
* * rocDecode/HEVC: Fixed a couple of errors in long term reference picture set parsing and long term reference picture list construction.

* * rocDecode/HEVC: Coding format change: removed newline in front of else statements. No functional changes.

[ROCm/rocdecode commit: c5483c751e]
2024-01-05 09:15:33 -05:00
jeffqjiangNew 2b9ea06e5c * rocDecode/HEVC: Fixed an issue in reference list reconstruction. (#149)
- Removed a size check which was put in in early bring up stage and causes some conformance stream failures.
  - Also capped the DPB buffer size to 16 when we increase it from the spec value.

[ROCm/rocdecode commit: 6db0b79144]
2024-01-02 15:55:52 -05:00
jeffqjiangNew 3567946884 Fixed a POC calculation error in some corner cases. (#145)
* * rocDecode/HEVC: Fixed a POC calculation error in some corner cases.

* * rocDecode/HEVC: Added a newline between two functions. No functional changes.

[ROCm/rocdecode commit: 1cdbac7d70]
2023-12-18 08:20:55 -05:00
jeffqjiangNew 8d44a48ee0 Fixed a bug in reference picture list modification parsing. (#143)
* * rocDecode/HEVC: Fixed the random crash associated with undecodable RASL pictures.
  - When a CRA picutre occurs, all the pictures in the DPB are emptied. However, the following RASL (Random Access Skipped Leading) picture can still reference these emptied pictures, making them undecodeble.
  - We initialized the reference picture lists with (0xFF), representing invalid picture index. Normally these invalid indices are replaced by valid values during RPS decoding. However, on undecodable RASL pictures, we can not find an existing reference picture in DPB, leaving the invalid index untouched and resulting invalid indexing later on.
  - Now we initialize the reference picture lists with a valid value 0. Also we add index range check on reference buffer at VA-API layer to avoid invalid memory access.

* * rocDecode/HEVC: Fixed a typo in sampel app message.

* *rocDecode/HEVC: Fixed a bug in reference picture list modification parsing.
  - This fixed the test failure of two conformance streams.

[ROCm/rocdecode commit: c9cfcde12d]
2023-12-15 16:08:19 -05:00
jeffqjiangNew 7b2035c071 Fixed the random crash associated with undecodable RASL pictures. (#141)
* * rocDecode/HEVC: Fixed the random crash associated with undecodable RASL pictures.
  - When a CRA picutre occurs, all the pictures in the DPB are emptied. However, the following RASL (Random Access Skipped Leading) picture can still reference these emptied pictures, making them undecodeble.
  - We initialized the reference picture lists with (0xFF), representing invalid picture index. Normally these invalid indices are replaced by valid values during RPS decoding. However, on undecodable RASL pictures, we can not find an existing reference picture in DPB, leaving the invalid index untouched and resulting invalid indexing later on.
  - Now we initialize the reference picture lists with a valid value 0. Also we add index range check on reference buffer at VA-API layer to avoid invalid memory access.

* * rocDecode/HEVC: Fixed a typo in sampel app message.

[ROCm/rocdecode commit: 0fbd030b5d]
2023-12-15 15:54:43 -05:00
jeffqjiangNew 82d328b627 * rocDecode/HEVC: Fixed the decode failure of the conformance stream BUMPING_A_ericsson_1.bit. (#133)
- This stream tests output order conformance, in particular the bumping process. Four temporal layers are used and IRAP pictures with no_output_of_prior_pics_flag equal to 1 are present in the bitstream.

[ROCm/rocdecode commit: 42f109369e]
2023-12-13 09:48:15 -05:00
jeffqjiangNew 7cd5d6c0ee * rocDecode/HEVC: Added frame rate info report when it is available, from the parser. (#130)
[ROCm/rocdecode commit: 7240ee8973]
2023-12-12 13:47:19 -05:00
jeffqjiangNew a265b9a3da * rocDecode: Fix for the performance regression introduced by PR#114. (#128)
- Skip the additional buffer bumping specified in process C.5.2.2., to avoid synchronous job submission in some cases.
  - Increase DPB buffer size now by 2 to avoid overwriting pictures to be output.

[ROCm/rocdecode commit: a2dfa8bc26]
2023-12-08 17:53:01 -05:00
jeffqjiangNew 64d7f1c37f * rocDecode/HEVC: In flush DPB function, added a check for any buffers that need for output before any actions. This prevents any potential issues. (#121)
[ROCm/rocdecode commit: fcd63b9358]
2023-12-06 09:39:49 -05:00
Aryan Salmanpour 08c99da4fa Add nullptr parameters check for all decoder/parser APIs and some code clean up (#120)
[ROCm/rocdecode commit: 9257cd6fcf]
2023-12-05 13:06:34 -05:00
jeffqjiangNew dd3b609a09 * rocDecode/HEVC: Fix for decode errors on a few conformance streams. (#114)
- Re-wrote short term RPS parsing function. The previous code generates incorrect results on some conformance streams.
  - No longer skip the additional buffer bumping specified in process C.5.2.2. This avoids the situation where the current frame overwrites the previously decoded buffer that is being output/displayed.

[ROCm/rocdecode commit: 5e65788bdd]
2023-12-04 11:53:26 -05:00
Aryan Salmanpour bf9ca09a9a Chamne the return type of FillSeqCallbackFn to int and check to see if it returns any error (#112)
[ROCm/rocdecode commit: ae63fbacab]
2023-12-01 14:50:33 -05:00
jeffqjiangNew 10545bcd94 * rocDecode/HEVC: When video size changes, set new SPS activation flag. This takes care of the case where a new SPS replaces the old SPS with the same id but with different dimensions. (#110)
[ROCm/rocdecode commit: a878a106fb]
2023-11-30 18:32:25 -05:00
Aryan Salmanpour 7358b1b595 use std::max to avoid compilation issue (#107)
[ROCm/rocdecode commit: c1a8ac48b4]
2023-11-30 11:29:39 -05:00
jeffqjiangNew f89b8e0d80 * rocDecode/HEVC: Fixed corruptions in RASL (Random Access Skipped Leading) pictures of an associated CRA picture. (#96)
- It appears that the root cause of the corruption is the loss of some reference info of the RASL pictures at VA-API driver level.
  - For reasons that are not documented in VA-API, or simply implementation limitations, the DPB buffer status when a CRA picture is decoded, needs to be sent to VA-API driver to the correct decoding of the associated RASL pictures. The info is stored in PocStFoll and PocLtFoll and is not needed for CRA picture decode, which is an intra picture. Without this info, the following RASL picture decode will run into problem even when its reference picture info is correctly specified.
  - Note this appears to be a VA-API specific issue because it did not occur on other platforms.

[ROCm/rocdecode commit: 2d14eb61b2]
2023-11-29 08:33:00 -05:00
jeffqjiangNew b4216ccb63 * rocDecode/HEVC: Fixed a method name typo. (#92)
[ROCm/rocdecode commit: 27d28dd5f4]
2023-11-28 14:03:13 -05:00