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

106 Коммитов

Автор SHA1 Сообщение Дата
Rajy Rawther 69ec7af8bd 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
2024-11-11 17:33:17 -05:00
Rajy Rawther 5820f38592 fix for while loop hang (#447) 2024-11-06 14:41:57 -05:00
jeffqjiangNew d9b235db5a * rocDecode/AV1: Fixed an errror in get Q index function during code inspection. (#438) 2024-10-24 11:51:22 -04:00
Rajy Rawther 29bfe5e3bd 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
2024-10-09 13:29:08 -04:00
jeffqjiangNew 6253248188 Added real decode speed report to set it apart from the current output speed report in sample apps (#409)
* * rocDecode: Added real decode speed report.
 - The current decode speed report is actually output/display speed report.
 - Due to AV1's extensive use of alternate reference frames that are not display, AV1 decoded frame count and output/displayed frame count can be quite different, making the current speed report not an accurate decode speed measurement.
 - We now added the actual decode speed report, besides the existing speed report, now called output/display FPS.

* * rocDecode: Added real decode speed report.
 - The current decode speed report is actually output/display speed report.
 - Due to AV1's extensive use of alternate reference frames that are not display, AV1 decoded frame count and output/displayed frame count can be quite different, making the current speed report not an accurate decode speed measurement.
 - We now added the actual decode speed report, besides the existing speed report, now called output/display FPS.

* * rocDecode/Sample script: Added missing changes for sample_mode 0 case.
2024-08-20 17:43:33 -04:00
jeffqjiangNew a863ee26a9 * rocDecode/AV1: Performance improvement: prevent synchronous decode submissions. (#406)
- Set the display delay to DECODE_BUF_POOL_EXTENSION (2) to avoid immediate output/display of a decoded frame.
2024-08-12 10:29:43 -04:00
jeffqjiangNew 30ee6787b2 AV1: Fixed an issue with multiple tile group OBUs per picture cases. (#404)
* * rocDecode/AV1: Fixed an issue with multiple tile group OBUs per picture cases.
 - We now use the single base pointer for all tiles in all tile group OBUs and submit them once per picture.

* * rocDecode/AV1: Fixed a typo.
2024-08-07 10:16:17 -04:00
jeffqjiangNew 6a75dc4dcf * rocDecode/AV1: Fixed a bug in set frame refs process that triggers a conformance error check later. (#400) 2024-07-29 17:16:21 -04:00
jeffqjiangNew d0924490a8 * rocDecode/AV1: Fixed a surface size issue in upscaling cases. (#399) 2024-07-26 12:24:32 -04:00
jeffqjiangNew 4f8191edc0 Added the missing presentation time stamp (pts) to decode return info for displayed pictures. (#398)
* * rocDecode: Added the missing pts to decode return info for decoded pictures.

* * rocDecode: Added the missing pts to decode return info for decoded pictures.
2024-07-25 16:53:20 -04:00
jeffqjiangNew 96944030aa * rocDecode/AV1: Added support for getting frame size from reference frames case. Fixed the data type of several quantization parameters. (#397) 2024-07-25 14:55:14 -04:00
jeffqjiangNew 96c65d74a6 Enabled AV1 decode by default. (#391)
* * rocDecode/AV1: Enabled AV1 decode by default.

* * rocDecode/AV1: Added changes suggested in code review.
 - Bumped up rocDecode version to 0.7.0.
 - Added AV1 support statement in readme file.
2024-07-22 12:32:12 -04:00
jeffqjiangNew ac82d17e9f * rocDecode/AV1: Added support for film grain synthesis and several other fixes. (#389)
- Added film grain parameter saving and loading procedures.
 - Added buffer management for film grain synthesis output.
 - Fixed the corruption issue with 10-bit film grain streams. We need to see surface attibutes based on pixel format when creating VAAPI surfaces.
 - Added missing global motion, loop filter and segmentation parameter loading in load reference frame procedure.
 - Fixed an issue with one tile streams.
 - Fixed an issue with un-initialized frame header structure after frame decode.
 - Fixed a bug with decode buffer status update.
2024-07-19 21:01:36 -04:00
jeffqjiangNew a36dd186df AV1: Added a few changes to enable general testing (non-film-grain). (#383)
* * rocDecode/AV1: Added a few changes to enable general testing (non-film-grain).
 - Added show existing frame support.
 - Added load_previous() function.
 - Added more operations to reference frame update process.
 - Added reference frame loading process.
 - Added decode frame wrapup process.
 - Added DPB recycling.
 - Added DPB content logging funcion for debugging purposes.

* * rocDecode/AV1: Removed a line which was added accidentally in the previous commit.
2024-07-15 10:40:59 -04:00
jeffqjiangNew a91dcdc72f * rocDecode/AV1: Fixed the decoded image surface size issue with 10-bit streams. (#378)
- The root cause is that the bit depth idx parameter setup is missing in VA-API picture parameter setup.
2024-06-28 13:52:36 -04:00
jeffqjiangNew 54419dcca3 * rocDecode/AV1: Basic inter decode is up and running. (#376)
- Added initial support for DPB and decode/display buffer management.
 - Added initial display support.
 - Added reference frame set up.
 - Fixed an issue with cdef_y_sec_strength/cdef_uv_sec_strength parsing. We should leave the conditional increment to VA-API driver or below due to VA-API formatting.
2024-06-27 10:26:21 -04:00
jeffqjiangNew 2be11821fc AV1: Intra decode started to be up and running. (#372)
* * rocDecode/AV1: Added new sequence callback and submit decode calls.

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

* * rocDecode/AV1: Do not build PrintVaapiParams() in normal (non-debug) mode.
2024-06-26 12:46:11 -04:00
jeffqjiangNew ac272886b1 * rocDecode/AV1: Fixed a bug in the calculation of the floor of the base 2 logarithm. (#367) 2024-06-10 14:02:10 -04:00
jeffqjiangNew 63d3245176 AV1: Added OBU parsing and frame data parsing. (#364)
* * rocDecode/AV1: Added OBU parsing at picture level.

* * rocDecode/AV1: Added a few todos and fixed a few issues in frame header parsing.

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

* * rocDecode/AV1: Removed more empty lines.
2024-06-10 12:07:23 -04:00
jeffqjiangNew 61c8661b9c rocDecode: Added decode buffer pool implementation for AVC and HEVC. (#355)
* * rocDecode: Initial check in for decode buffer pool.

* * rocDecode: All 135 streams pass.

* * rocDecode: Fixed a build error in debug mode.

* * rocDecode/HEVC: Removed two workaround in HEVC DPB management, after decode buffer pool implementa
tion.
 - WR 1: Conditional bumping (when max_num_reorder_pics > 0) to avoid synchronous job submission in
C.5.2.3.
 - WR 2: Add two more buffers in DPB to avoid buffer over-writing.

* * rocDecode/HEVC: Added display delay feature.

* * rocDecode/HEVC: Fixed the -z option issue within the context of the new decode buffer pool implementation.

* * rocDecode/HEVC: Removed redundent code.

* * rocDecode/AVC: Added decode buffer pool implementation for AVC.

* * rocDecode: Added a few changes.
 - Added display delay feature to AVC.
 - Removed a workaround for AVC: AVC_MAX_DPB_FRAMES was increased to 18. Now it is back to 16.
 - Removed a workaround for AVC: increased DPB buffer size by 2. Now it is back to normal.
 - Code format changes for HEVC.

* * rocDecode/AVC: Fixed the -z option issue within the context of the new decode buffer pool implementation.

* * rocDecode: Merged OutputDecodedPictures() method to upper class RocVideoParser.

* * rocDecode: Code cleanup. No functional changes.

* * rocDecode: Made decode buffer pool size adaptive.
 - Removed the hard coded decode buffer pool size set in the decoder.
 - Exposed the display delay parameter from RocVideoDecoder class to the user.
 - Now the decoder buffer pool size is determined from the DPB buffer size and display delay parameter.

* * rocDecode: Several changes based on code review.
 - Merged decode and display use status into one parameter.
 - Removed the surface index from DecodeFrameBuffer, which is now implicitly referred by the array index.
 - Changed a function name for better clarity.

* * rocDecode: Added a comment.
2024-05-31 13:14:02 -04:00
jeffqjiangNew 1ac4cf7f52 * rocDecode/HEVC: Added error handling for the cases where there is no slice data in the decode payload. (#354) 2024-05-14 14:07:23 -04:00
jeffqjiangNew ba36534f1f 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. (#335)
* * 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>
2024-05-03 15:18:08 -04:00
jeffqjiangNew 0f905f527c * 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>
2024-05-02 08:46:47 -04:00
jeffqjiangNew d2b742ab4b 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.
2024-05-01 08:29:26 -04:00
jeffqjiangNew bd4e410a8d 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.
2024-04-30 21:21:05 -04:00
jeffqjiangNew a8bcc1e62f * rocDecode/AVC: Added support for gaps in frame_num. (#319)
- Fixed decode failure of conformance stream MR3_TANDBERG_B.264.
2024-04-19 16:51:41 -04:00
jeffqjiangNew 4188000079 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.
2024-04-15 08:32:03 -04:00
jeffqjiangNew 6b03950181 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.
2024-04-11 09:01:54 -04:00
Pavel Tcherniaev f8bf587f92 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>
2024-04-05 08:15:15 -04:00
Aryan Salmanpour 2d877cd357 Enable decoding AVC (H.264) codec by default and enable CTest for it (#309) 2024-04-04 19:47:35 -04:00
jeffqjiangNew e96b782dcf * rocDecode/AV1: Added stream syntax defines and sequence header parsing. (#306) 2024-04-03 15:04:18 -04:00
jeffqjiangNew d38931ddae * 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>
2024-04-01 20:58:31 -04:00
Lakshmi Kumar 6265f675c1 av1 initial commit (#298) 2024-03-26 18:59:15 -04:00
jeffqjiangNew 7cf22e5920 * 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.
2024-03-26 18:53:42 -04:00
jeffqjiangNew 44c14236ae * 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) 2024-03-11 20:48:10 -04:00
jeffqjiangNew 5c18444bcc 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>
2024-03-07 21:35:19 -05:00
Aryan Salmanpour eced98721c Disable AVC codec support by default for 6.1 release (#264) 2024-02-27 17:56:15 -05:00
jeffqjiangNew a48fc69caf * rocDecode/AVC: Fixed a bug in more RBSP data check function. (#263) 2024-02-27 17:37:32 -05:00
jeffqjiangNew 244eb517ab * 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.
2024-02-27 09:03:29 -05:00
jeffqjiangNew f9c226ca84 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.
2024-02-26 10:07:40 -05:00
jeffqjiangNew 4709c0981f 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>
2024-02-22 08:53:29 -05:00
jeffqjiangNew 9b006616ed * rocDecode/AVC: Added SEI message extraction support. Also merged common AVC and HEVC SEI support code to super class. (#250) 2024-02-15 08:42:51 -05:00
jeffqjiangNew ca3333f7b9 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>
2024-02-14 18:06:43 -05:00
jeffqjiangNew c496dfd3f2 * rocDecode/AVC: Added support for multiple slice parameter buffer submission for AVC multi-slice streams. (#234) 2024-02-12 10:22:42 -05:00
jeffqjiangNew 00127f16f1 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.
2024-02-09 15:09:49 -05:00
jeffqjiangNew 300be009de * rocDecode/AVC: Added initial B frame support. (#214)
- Basic B frames are decoded clean now.
2024-02-01 09:58:00 -05:00
jeffqjiangNew 90cddfe655 * 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.
2024-01-31 09:10:41 -05:00
jeffqjiangNew 6bd8509bec 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.
2024-01-29 12:09:36 -05:00
jeffqjiangNew cd6401750e 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.
2024-01-24 18:03:46 -05:00
jeffqjiangNew 426067898c 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.
2024-01-23 17:30:29 -08:00