@ -1324,7 +1324,7 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept
int idx_y , int idx_cb , int idx_cr , int inp_length )
{
unsigned int split_octant_flag , part_num_y , coded_res_flag , res_coeff_q , res_coeff_r ;
int bit_depth_cm_input_y , bit_depth_cm_output_y , cm_res_bits ;
int cm_res_bits ;
part_num_y = 1 < < pps - > cm_y_part_num_log2 ;
@ -1346,10 +1346,9 @@ static void colour_mapping_octants(GetBitContext *gb, HEVCPPS *pps, int inp_dept
if ( coded_res_flag )
for ( int c = 0 ; c < 3 ; c + + ) {
res_coeff_q = get_ue_golomb_long ( gb ) ;
bit_depth_cm_input_y = 8 + pps - > luma_bit_depth_cm_input_minus8 ;
bit_depth_cm_output_y = 8 + pps - > luma_bit_depth_cm_output_minus8 ;
cm_res_bits = FFMAX ( 0 , 10 + bit_depth_cm_input_y - bit_depth_cm_output_y -
pps - > cm_res_quant_bits - ( pps - > cm_delta_flc_bits_minus1 + 1 ) ) ;
cm_res_bits = FFMAX ( 0 , 10 + pps - > luma_bit_depth_cm_input -
pps - > luma_bit_depth_cm_output -
pps - > cm_res_quant_bits - pps - > cm_delta_flc_bits ) ;
res_coeff_r = cm_res_bits ? get_bits ( gb , cm_res_bits ) : 0 ;
if ( res_coeff_q | | res_coeff_r )
skip_bits1 ( gb ) ;
@ -1367,13 +1366,13 @@ static void colour_mapping_table(GetBitContext *gb, HEVCPPS *pps)
pps - > cm_octant_depth = get_bits ( gb , 2 ) ;
pps - > cm_y_part_num_log2 = get_bits ( gb , 2 ) ;
pps - > luma_bit_depth_cm_input_minus8 = get_ue_golomb_long ( gb ) ;
pps - > chroma_bit_depth_cm_input_minus8 = get_ue_golomb_long ( gb ) ;
pps - > luma_bit_depth_cm_output_minus8 = get_ue_golomb_long ( gb ) ;
pps - > chroma_bit_depth_cm_output_minus8 = get_ue_golomb_long ( gb ) ;
pps - > luma_bit_depth_cm_input = get_ue_golomb ( gb ) + 8 ;
pps - > chroma_bit_depth_cm_input = get_ue_golomb ( gb ) + 8 ;
pps - > luma_bit_depth_cm_output = get_ue_golomb ( gb ) + 8 ;
pps - > chroma_bit_depth_cm_output = get_ue_golomb ( gb ) + 8 ;
pps - > cm_res_quant_bits = get_bits ( gb , 2 ) ;
pps - > cm_delta_flc_bits_minus1 = get_bits ( gb , 2 ) ;
pps - > cm_delta_flc_bits = get_bits ( gb , 2 ) + 1 ;
if ( pps - > cm_octant_depth = = 1 ) {
pps - > cm_adapt_threshold_u_delta = get_se_golomb_long ( gb ) ;
@ -1415,10 +1414,10 @@ static int pps_multilayer_extension(GetBitContext *gb, AVCodecContext *avctx,
pps - > resample_phase_set_present_flag [ i ] = get_bits1 ( gb ) ;
if ( pps - > resample_phase_set_present_flag [ i ] ) {
pps - > phase_hor_luma [ pps - > ref_loc_offset_layer_id [ i ] ] = get_ue_golomb_long ( gb ) ;
pps - > phase_ver_luma [ pps - > ref_loc_offset_layer_id [ i ] ] = get_ue_golomb_long ( gb ) ;
pps - > phase_hor_chroma_plus8 [ pps - > ref_loc_offset_layer_id [ i ] ] = get_ue_golomb_long ( gb ) ;
pps - > phase_ver_chroma_plus8 [ pps - > ref_loc_offset_layer_id [ i ] ] = get_ue_golomb_long ( gb ) ;
pps - > phase_hor_luma [ pps - > ref_loc_offset_layer_id [ i ] ] = get_ue_golomb_31 ( gb ) ;
pps - > phase_ver_luma [ pps - > ref_loc_offset_layer_id [ i ] ] = get_ue_golomb_31 ( gb ) ;
pps - > phase_hor_chroma [ pps - > ref_loc_offset_layer_id [ i ] ] = get_ue_golomb ( gb ) - 8 ;
pps - > phase_ver_chroma [ pps - > ref_loc_offset_layer_id [ i ] ] = get_ue_golomb ( gb ) - 8 ;
}
}