* * rocDecode: Added error handling of missing headers in cases where they are not parsed but referred in the frame decode process. One example is when frame seek is performed and the target picture is not a random access point.
* * rocDecode/HEVC: Added some missing error handlings.
---------
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
* * 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>
* * 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.
* * 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.
* * 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.
* * 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.
* * 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.
- Moved HEVC standard specific defines out of HevcVideoParser class to a new file.
- Changed some namings to be more specification compliant.
- No functional changes.
* * 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.
- 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.
* * rocDecode/HEVC: Fixed a POC calculation error in some corner cases.
* * rocDecode/HEVC: Added a newline between two functions. No functional changes.
* * 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.
* * 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.
- 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.
- 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.
- 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.
- 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.
- When we hit IRAP (Intra Random Access Point) picture and need to bump all remaining decoded pictures from DPB, call display callback immediately, instead of delaying the callback to the IRAP decode process.
* * rocDecode/HEVC: Added picture output operation in DPB and display callback function.
- To avoid serialization of decode submissions and/or display callback in certain cases, increased DPB buffer size by 1 and tweaked picture bumping procedure.
* * rocDecode/HEVC: Added flushing of the remaining pictures from DPB at the end of decode session.
* * rocDecode/HEVC: Changed output_pic_num to num_output_pics to void some confusion. Set top_field_first to 1.
* * rocDecode/HEVC: Added a few return error checks.
* * rocDecode/HEVC: Added picture output operation in DPB and display callback function.
- To avoid serialization of decode submissions and/or display callback in certain cases, increased DPB buffer size by 1 and tweaked picture bumping procedure.
* * rocDecode/HEVC: Added a few error checks and minor format changes.
* * rocDecode/HEVC: Re-enabled SEI message processing.
- Added "-sei" command option to extract SEI messages from stream.
- Added support for SEI info parsing for multiple SEI NAL units with multiple payloads.
- Fixed a SEI syntax parsing issue and several procssing issues.
- Fixed a double free memory issue in SEI data buffer handling in HandlePictureDisplay().
* * rocDecode/HEVC: Coding format changes.
* * rocDecode/HEVC: Minor format changes.
* commending out ParseSeiMessage because it is causing segfault
* CMake changes for valgrind
* added function pointer validity for sei callback
* fix review comments
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.
* * 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.
* * 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.
* 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.
* 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 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.