h265parser: Store NumDeltaPocs of reference for hardware accelerators

That's the value of NumDeltaPocs[RefRpsIdx] and we might be able to derive
the value from given sps and slice header.
Because well known hardware implementations refer to the value, however,
storing the value makes things easier.

Following is the list of hardware implementations
* DXVA2: ucNumDeltaPocsOfRefRpsIdx
* NVDEC/VDPAU: NumDeltaPocsOfRefRpsIdx
This commit is contained in:
Seungha Yang 2020-02-26 17:33:59 +09:00
parent ba3430a059
commit 353013fcaa
2 changed files with 28 additions and 0 deletions

View file

@ -805,6 +805,7 @@ gst_h265_parser_parse_short_term_ref_pic_sets (GstH265ShortTermRefPicSet *
deltaRps = (1 - 2 * stRPS->delta_rps_sign) * (stRPS->abs_delta_rps_minus1 + 1); /* 7-46 */
RefRPS = &sps->short_term_ref_pic_set[RefRpsIdx];
stRPS->NumDeltaPocsOfRefRpsIdx = RefRPS->NumDeltaPocs;
for (j = 0; j <= RefRPS->NumDeltaPocs; j++) {
READ_UINT8 (nr, used_by_curr_pic_flag[j], 1);

View file

@ -735,6 +735,32 @@ struct _GstH265VPS {
* the value of the variable deltaRps.
* @abs_delta_rps_minus1: delta_rps_sign and abs_delta_rps_minus1 together specify
* the value of the variable deltaRps
* @NumDeltaPocs: sum of @NumNegativePics and @NumPositivePics.
* @NumNegativePics: Derived value depending on inter_ref_pic_set_prediction_flag.
* If inter_ref_pic_set_prediction_flag is equal to 0, this specifies
* the number of entries in the stRpsIdx-th candidate
* short-term RPS that have poc values less than the poc of the current picture.
* @NumPositivePics: Derived value depending on inter_ref_pic_set_prediction_flag.
* If inter_ref_pic_set_prediction_flag is equal to 0, this specifies
* the number of entires in the stRpsIdx-th candidate
* short-term RPS that have poc values greater than the poc value of the current picture.
* @UsedByCurrPicS0: Derived value depending on inter_ref_pic_set_prediction_flag.
* If inter_ref_pic_set_prediction_flag is equal to 0,
* equal to zero specifies that the i-th entry in the stRpsIdx-th
* candidate short-term RPS that has poc value less than of the current picture
* is not used for reference by the current picture
* @UsedByCurrPicS1: Derived value depending on inter_ref_pic_set_prediction_flag.
* If inter_ref_pic_set_prediction_flag is equal to 0,
* equal to zero specifies that the i-th entry in the current
* candidate short-term RPS that has poc value greater than that of the current picture
* is not used for reference by the current picture.
* @DeltaPocS0: Derived value depending on inter_ref_pic_set_prediction_flag.
* See 7.4.8 Short-term reference picture set semantics
* @DeltaPocS1: Derived value depending on inter_ref_pic_set_prediction_flag.
* See 7.4.8 Short-term reference picture set semantics
* @NumDeltaPocsOfRefRpsIdx: The value of NumDeltaPocs[RefRpsIdx].
* If inter_ref_pic_set_prediction_flag is equal to 0,
* this value should be ignored (Since: 1.18)
*
* Defines the #GstH265ShortTermRefPicSet params
*/
@ -753,6 +779,7 @@ struct _GstH265ShortTermRefPicSet
guint8 UsedByCurrPicS1[16];
gint32 DeltaPocS0[16];
gint32 DeltaPocS1[16];
guint8 NumDeltaPocsOfRefRpsIdx;
};
/**