h265parse: fix typo in member of GstH265SPS

Rename sps_extnsion_params to sps_extension_params

Fix comment about vui_parameters_present_flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3072>
This commit is contained in:
Stéphane Cerveau 2022-09-23 17:18:35 +02:00 committed by GStreamer Marge Bot
parent 99bbb1ef35
commit fb09c028e3
7 changed files with 72 additions and 59 deletions

View file

@ -975,20 +975,20 @@ _h265_bit_writer_sps (const GstH265SPS * sps,
if (sps->sps_range_extension_flag) {
WRITE_BITS (bw,
sps->sps_extnsion_params.transform_skip_rotation_enabled_flag, 1);
sps->sps_extension_params.transform_skip_rotation_enabled_flag, 1);
WRITE_BITS (bw,
sps->sps_extnsion_params.transform_skip_context_enabled_flag, 1);
WRITE_BITS (bw, sps->sps_extnsion_params.implicit_rdpcm_enabled_flag, 1);
WRITE_BITS (bw, sps->sps_extnsion_params.explicit_rdpcm_enabled_flag, 1);
sps->sps_extension_params.transform_skip_context_enabled_flag, 1);
WRITE_BITS (bw, sps->sps_extension_params.implicit_rdpcm_enabled_flag, 1);
WRITE_BITS (bw, sps->sps_extension_params.explicit_rdpcm_enabled_flag, 1);
WRITE_BITS (bw,
sps->sps_extnsion_params.extended_precision_processing_flag, 1);
WRITE_BITS (bw, sps->sps_extnsion_params.intra_smoothing_disabled_flag, 1);
sps->sps_extension_params.extended_precision_processing_flag, 1);
WRITE_BITS (bw, sps->sps_extension_params.intra_smoothing_disabled_flag, 1);
WRITE_BITS (bw,
sps->sps_extnsion_params.high_precision_offsets_enabled_flag, 1);
sps->sps_extension_params.high_precision_offsets_enabled_flag, 1);
WRITE_BITS (bw,
sps->sps_extnsion_params.persistent_rice_adaptation_enabled_flag, 1);
sps->sps_extension_params.persistent_rice_adaptation_enabled_flag, 1);
WRITE_BITS (bw,
sps->sps_extnsion_params.cabac_bypass_alignment_enabled_flag, 1);
sps->sps_extension_params.cabac_bypass_alignment_enabled_flag, 1);
}
if (sps->sps_multilayer_extension_flag) {

View file

@ -2128,20 +2128,21 @@ gst_h265_parse_sps (GstH265Parser * parser, GstH265NalUnit * nalu,
if (sps->sps_range_extension_flag) {
READ_UINT8 (&nr,
sps->sps_extnsion_params.transform_skip_rotation_enabled_flag, 1);
sps->sps_extension_params.transform_skip_rotation_enabled_flag, 1);
READ_UINT8 (&nr,
sps->sps_extnsion_params.transform_skip_context_enabled_flag, 1);
READ_UINT8 (&nr, sps->sps_extnsion_params.implicit_rdpcm_enabled_flag, 1);
READ_UINT8 (&nr, sps->sps_extnsion_params.explicit_rdpcm_enabled_flag, 1);
sps->sps_extension_params.transform_skip_context_enabled_flag, 1);
READ_UINT8 (&nr, sps->sps_extension_params.implicit_rdpcm_enabled_flag, 1);
READ_UINT8 (&nr, sps->sps_extension_params.explicit_rdpcm_enabled_flag, 1);
READ_UINT8 (&nr,
sps->sps_extnsion_params.extended_precision_processing_flag, 1);
READ_UINT8 (&nr, sps->sps_extnsion_params.intra_smoothing_disabled_flag, 1);
sps->sps_extension_params.extended_precision_processing_flag, 1);
READ_UINT8 (&nr, sps->sps_extension_params.intra_smoothing_disabled_flag,
1);
READ_UINT8 (&nr,
sps->sps_extnsion_params.high_precision_offsets_enabled_flag, 1);
sps->sps_extension_params.high_precision_offsets_enabled_flag, 1);
READ_UINT8 (&nr,
sps->sps_extnsion_params.persistent_rice_adaptation_enabled_flag, 1);
sps->sps_extension_params.persistent_rice_adaptation_enabled_flag, 1);
READ_UINT8 (&nr,
sps->sps_extnsion_params.cabac_bypass_alignment_enabled_flag, 1);
sps->sps_extension_params.cabac_bypass_alignment_enabled_flag, 1);
}
if (sps->sps_multilayer_extension_flag) {
@ -2166,22 +2167,25 @@ gst_h265_parse_sps (GstH265Parser * parser, GstH265NalUnit * nalu,
128 - sps->sps_scc_extension_params.palette_max_size);
READ_UINT8 (&nr,
sps->sps_scc_extension_params.
sps_palette_predictor_initializers_present_flag, 1);
if (sps->sps_scc_extension_params.
sps_palette_predictor_initializers_present_flag) {
sps->
sps_scc_extension_params.sps_palette_predictor_initializers_present_flag,
1);
if (sps->
sps_scc_extension_params.sps_palette_predictor_initializers_present_flag)
{
guint comp;
READ_UE_MAX (&nr,
sps->sps_scc_extension_params.
sps_num_palette_predictor_initializer_minus1,
sps->
sps_scc_extension_params.sps_num_palette_predictor_initializer_minus1,
sps->sps_scc_extension_params.palette_max_size +
sps->sps_scc_extension_params.delta_palette_max_predictor_size - 1);
for (comp = 0; comp < (sps->chroma_format_idc == 0 ? 1 : 3); comp++) {
guint num_bits;
guint num =
sps->sps_scc_extension_params.
sps_num_palette_predictor_initializer_minus1 + 1;
sps->
sps_scc_extension_params.sps_num_palette_predictor_initializer_minus1
+ 1;
num_bits = (comp == 0 ? sps->bit_depth_luma_minus8 + 8 :
sps->bit_depth_chroma_minus8 + 8);
@ -2482,10 +2486,12 @@ gst_h265_parse_pps (GstH265Parser * parser, GstH265NalUnit * nalu,
READ_UINT8 (&nr,
pps->pps_scc_extension_params.pps_curr_pic_ref_enabled_flag, 1);
READ_UINT8 (&nr,
pps->pps_scc_extension_params.
residual_adaptive_colour_transform_enabled_flag, 1);
if (pps->pps_scc_extension_params.
residual_adaptive_colour_transform_enabled_flag) {
pps->
pps_scc_extension_params.residual_adaptive_colour_transform_enabled_flag,
1);
if (pps->
pps_scc_extension_params.residual_adaptive_colour_transform_enabled_flag)
{
READ_UINT8 (&nr,
pps->pps_scc_extension_params.pps_slice_act_qp_offsets_present_flag,
1);
@ -2498,10 +2504,12 @@ gst_h265_parse_pps (GstH265Parser * parser, GstH265NalUnit * nalu,
}
READ_UINT8 (&nr,
pps->pps_scc_extension_params.
pps_palette_predictor_initializers_present_flag, 1);
if (pps->pps_scc_extension_params.
pps_palette_predictor_initializers_present_flag) {
pps->
pps_scc_extension_params.pps_palette_predictor_initializers_present_flag,
1);
if (pps->
pps_scc_extension_params.pps_palette_predictor_initializers_present_flag)
{
READ_UE_MAX (&nr,
pps->pps_scc_extension_params.pps_num_palette_predictor_initializer,
sps->sps_scc_extension_params.palette_max_size +
@ -2532,8 +2540,8 @@ gst_h265_parse_pps (GstH265Parser * parser, GstH265NalUnit * nalu,
comp++) {
guint num_bits;
guint num =
pps->pps_scc_extension_params.
pps_num_palette_predictor_initializer;
pps->
pps_scc_extension_params.pps_num_palette_predictor_initializer;
num_bits = (comp == 0 ?
pps->pps_scc_extension_params.luma_bit_depth_entry_minus8 + 8 :

View file

@ -1183,7 +1183,7 @@ struct _GstH265SPS
guint8 strong_intra_smoothing_enabled_flag;
guint8 vui_parameters_present_flag;
/* if vui_parameters_present_flat */
/* if vui_parameters_present_flag */
GstH265VUIParams vui_params;
guint8 sps_extension_flag;
@ -1196,7 +1196,12 @@ struct _GstH265SPS
guint8 sps_extension_4bits;
/* if sps_range_extension_flag */
GstH265SPSExtensionParams sps_extnsion_params;
/**
* _GstH265SPS.sps_extension_params:
*
* Since: 1.22
*/
GstH265SPSExtensionParams sps_extension_params;
/* if sps_scc_extension_flag */
GstH265SPSSccExtensionParams sps_scc_extension_params;

View file

@ -552,7 +552,7 @@ gst_nv_h265_dec_picture_params_from_sps (GstNvH265Dec * self,
#define COPY_FIELD_WITH_PREFIX(f) \
(params)->G_PASTE(sps_,f) = (sps)->f
#define COPY_FIELD_EXTENSION(f) \
(params)->f = (sps)->sps_extnsion_params.f
(params)->f = (sps)->sps_extension_params.f
params->pic_width_in_luma_samples = sps->width;
params->pic_height_in_luma_samples = sps->height;

View file

@ -574,7 +574,7 @@ _fill_picture_range_ext_parameter (GstVaH265Dec * decoder,
{
VAPictureParameterBufferHEVCRext *pic_param = &decoder->pic_param.rext;
GstH265SPSExtensionParams *sps_ext = &sps->sps_extnsion_params;
GstH265SPSExtensionParams *sps_ext = &sps->sps_extension_params;
GstH265PPSExtensionParams *pps_ext = &pps->pps_extension_params;
/* *INDENT-OFF* */

View file

@ -365,7 +365,7 @@ static const GstH265SPS sps = {
.sps_3d_extension_flag = 0,
.sps_scc_extension_flag = 0,
.sps_extnsion_params = {
.sps_extension_params = {
.transform_skip_rotation_enabled_flag = 0,
.transform_skip_context_enabled_flag = 0,
.implicit_rdpcm_enabled_flag = 0,
@ -785,15 +785,15 @@ GST_START_TEST (test_h265_bitwriter_vps_sps_pps_slice_hdr)
CHECK_FIELD (sps_multilayer_extension_flag);
CHECK_FIELD (sps_3d_extension_flag);
CHECK_FIELD (sps_scc_extension_flag);
CHECK_FIELD (sps_extnsion_params.transform_skip_rotation_enabled_flag);
CHECK_FIELD (sps_extnsion_params.transform_skip_context_enabled_flag);
CHECK_FIELD (sps_extnsion_params.implicit_rdpcm_enabled_flag);
CHECK_FIELD (sps_extnsion_params.explicit_rdpcm_enabled_flag);
CHECK_FIELD (sps_extnsion_params.extended_precision_processing_flag);
CHECK_FIELD (sps_extnsion_params.intra_smoothing_disabled_flag);
CHECK_FIELD (sps_extnsion_params.high_precision_offsets_enabled_flag);
CHECK_FIELD (sps_extnsion_params.persistent_rice_adaptation_enabled_flag);
CHECK_FIELD (sps_extnsion_params.cabac_bypass_alignment_enabled_flag);
CHECK_FIELD (sps_extension_params.transform_skip_rotation_enabled_flag);
CHECK_FIELD (sps_extension_params.transform_skip_context_enabled_flag);
CHECK_FIELD (sps_extension_params.implicit_rdpcm_enabled_flag);
CHECK_FIELD (sps_extension_params.explicit_rdpcm_enabled_flag);
CHECK_FIELD (sps_extension_params.extended_precision_processing_flag);
CHECK_FIELD (sps_extension_params.intra_smoothing_disabled_flag);
CHECK_FIELD (sps_extension_params.high_precision_offsets_enabled_flag);
CHECK_FIELD (sps_extension_params.persistent_rice_adaptation_enabled_flag);
CHECK_FIELD (sps_extension_params.cabac_bypass_alignment_enabled_flag);
#undef CHECK_FIELD
memset (header_data, 0, sizeof (header_data));

View file

@ -2057,23 +2057,23 @@ fill_picture (GstVaapiDecoderH265 * decoder, GstVaapiPictureH265 * picture,
#define COPY_REXT_BFM(a, s, f) \
pic_rext_param->a.bits.f = s.f
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
transform_skip_rotation_enabled_flag);
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
transform_skip_context_enabled_flag);
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
implicit_rdpcm_enabled_flag);
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
explicit_rdpcm_enabled_flag);
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
extended_precision_processing_flag);
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
intra_smoothing_disabled_flag);
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
high_precision_offsets_enabled_flag);
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
persistent_rice_adaptation_enabled_flag);
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extnsion_params,
COPY_REXT_BFM (range_extension_pic_fields, sps->sps_extension_params,
cabac_bypass_alignment_enabled_flag);
COPY_REXT_BFM (range_extension_pic_fields, pps->pps_extension_params,