Skip to content
Snippets Groups Projects
Commit f9990a46 authored by François Cartegnie's avatar François Cartegnie :fingers_crossed:
Browse files

packetizer: h264: fix reading prediction weight tables

(cherry picked from commit f878115e)
parent cdc04a5e
No related branches found
No related tags found
1 merge request!5688[3.0] packetizer: h264: fix reading prediction weight tables
Pipeline #489391 passed with stage
in 22 minutes and 19 seconds
......@@ -591,8 +591,8 @@ static bool h264_parse_picture_parameter_set_rbsp( bs_t *p_bs,
}
}
bs_read_ue( p_bs ); /* num_ref_idx_l0_default_active_minus1 */
bs_read_ue( p_bs ); /* num_ref_idx_l1_default_active_minus1 */
p_pps->num_ref_idx_l01_default_active_minus1[0] = bs_read_ue( p_bs );
p_pps->num_ref_idx_l01_default_active_minus1[1] = bs_read_ue( p_bs );
p_pps->weighted_pred_flag = bs_read( p_bs, 1 );
p_pps->weighted_bipred_idc = bs_read( p_bs, 2 );
bs_read_se( p_bs ); /* pic_init_qp_minus26 */
......
......@@ -150,6 +150,7 @@ struct h264_picture_parameter_set_t
uint8_t i_redundant_pic_present_flag;
uint8_t weighted_pred_flag;
uint8_t weighted_bipred_idc;
uint32_t num_ref_idx_l01_default_active_minus1[2];
};
struct h264_sequence_parameter_set_extension_t
......
......@@ -101,7 +101,8 @@ bool h264_decode_slice( const uint8_t *p_buffer, size_t i_buffer,
if( p_pps->i_redundant_pic_present_flag )
bs_read_ue( &s ); /* redudant_pic_count */
unsigned num_ref_idx_l01_active_minus1[2] = {0 , 0};
uint32_t num_ref_idx_l01_active_minus1[2] = { p_pps->num_ref_idx_l01_default_active_minus1[0],
p_pps->num_ref_idx_l01_default_active_minus1[1] };
if( i_slice_type == 1 || i_slice_type == 6 ) /* B slices */
bs_read1( &s ); /* direct_spatial_mv_pred_flag */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment