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.
This commit is contained in:
jeffqjiangNew
2024-02-09 15:09:49 -05:00
committed by GitHub
parent 3211b77aff
commit 00127f16f1
7 changed files with 298 additions and 256 deletions
+5 -4
View File
@@ -805,8 +805,7 @@ typedef struct _RocdecPicParams {
uint32_t bitstream_data_len; /**< IN: Number of bytes in bitstream data buffer */
const uint8_t *bitstream_data; /**< IN: Ptr to bitstream data for this picture (slice-layer) */
uint32_t num_slices; /**< IN: Number of slices in this picture */
const uint32_t *slice_data_offsets; /**< IN: num_slices entries, contains offset of each slice within
the bitstream data buffer */
int ref_pic_flag; /**< IN: This picture is a reference picture */
int intra_pic_flag; /**< IN: This picture is entirely intra coded */
uint32_t reserved[30]; /**< Reserved for future use */
@@ -821,10 +820,12 @@ typedef struct _RocdecPicParams {
uint32_t codec_reserved[256];
} pic_params;
/*! \brief Variable size array. The user should allocate one slice param struct for each slice.
*/
union {
// Todo: Add slice params defines for other codecs.
RocdecAvcSliceParams avc;
RocdecHevcSliceParams hevc;
RocdecAvcSliceParams *avc;
RocdecHevcSliceParams *hevc;
} slice_params;
union {