Home | History | Annotate | Download | only in vda

Lines Matching refs:shdr

1133     H264SliceHeader* shdr) {
1136 if (!shdr->IsISlice() && !shdr->IsSISlice()) {
1137 READ_BOOL_OR_RETURN(&shdr->ref_pic_list_modification_flag_l0);
1138 if (shdr->ref_pic_list_modification_flag_l0) {
1139 res = ParseRefPicListModification(shdr->num_ref_idx_l0_active_minus1,
1140 shdr->ref_list_l0_modifications);
1146 if (shdr->IsBSlice()) {
1147 READ_BOOL_OR_RETURN(&shdr->ref_pic_list_modification_flag_l1);
1148 if (shdr->ref_pic_list_modification_flag_l1) {
1149 res = ParseRefPicListModification(shdr->num_ref_idx_l1_active_minus1,
1150 shdr->ref_list_l1_modifications);
1204 H264SliceHeader* shdr) {
1205 READ_UE_OR_RETURN(&shdr->luma_log2_weight_denom);
1206 TRUE_OR_RETURN(shdr->luma_log2_weight_denom < 8);
1209 READ_UE_OR_RETURN(&shdr->chroma_log2_weight_denom);
1210 TRUE_OR_RETURN(shdr->chroma_log2_weight_denom < 8);
1213 shdr->num_ref_idx_l0_active_minus1, sps.chroma_array_type,
1214 shdr->luma_log2_weight_denom, shdr->chroma_log2_weight_denom,
1215 &shdr->pred_weight_table_l0);
1219 if (shdr->IsBSlice()) {
1221 shdr->num_ref_idx_l1_active_minus1, sps.chroma_array_type,
1222 shdr->luma_log2_weight_denom, shdr->chroma_log2_weight_denom,
1223 &shdr->pred_weight_table_l1);
1231 H264Parser::Result H264Parser::ParseDecRefPicMarking(H264SliceHeader* shdr) {
1234 if (shdr->idr_pic_flag) {
1235 READ_BOOL_OR_RETURN(&shdr->no_output_of_prior_pics_flag);
1236 READ_BOOL_OR_RETURN(&shdr->long_term_reference_flag);
1238 READ_BOOL_OR_RETURN(&shdr->adaptive_ref_pic_marking_mode_flag);
1241 if (shdr->adaptive_ref_pic_marking_mode_flag) {
1243 for (i = 0; i < arraysize(shdr->ref_pic_marking); ++i) {
1244 marking = &shdr->ref_pic_marking[i];
1268 if (i == arraysize(shdr->ref_pic_marking)) {
1275 shdr->dec_ref_pic_marking_bit_size = bits_left_at_start - br_.NumBitsLeft();
1280 H264SliceHeader* shdr) {
1286 memset(shdr, 0, sizeof(*shdr));
1288 shdr->idr_pic_flag = (nalu.nal_unit_type == 5);
1289 shdr->nal_ref_idc = nalu.nal_ref_idc;
1290 shdr->nalu_data = nalu.data;
1291 shdr->nalu_size = nalu.size;
1293 READ_UE_OR_RETURN(&shdr->first_mb_in_slice);
1294 READ_UE_OR_RETURN(&shdr->slice_type);
1295 TRUE_OR_RETURN(shdr->slice_type < 10);
1297 READ_UE_OR_RETURN(&shdr->pic_parameter_set_id);
1299 pps = GetPPS(shdr->pic_parameter_set_id);
1310 READ_BITS_OR_RETURN(sps->log2_max_frame_num_minus4 + 4, &shdr->frame_num);
1312 READ_BOOL_OR_RETURN(&shdr->field_pic_flag);
1313 if (shdr->field_pic_flag) {
1319 if (shdr->idr_pic_flag)
1320 READ_UE_OR_RETURN(&shdr->idr_pic_id);
1325 &shdr->pic_order_cnt_lsb);
1327 !shdr->field_pic_flag)
1328 READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt_bottom);
1332 READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt0);
1334 !shdr->field_pic_flag)
1335 READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt1);
1338 shdr->pic_order_cnt_bit_size =
1342 READ_UE_OR_RETURN(&shdr->redundant_pic_cnt);
1343 TRUE_OR_RETURN(shdr->redundant_pic_cnt < 128);
1346 if (shdr->IsBSlice())
1347 READ_BOOL_OR_RETURN(&shdr->direct_spatial_mv_pred_flag);
1349 if (shdr->IsPSlice() || shdr->IsSPSlice() || shdr->IsBSlice()) {
1350 READ_BOOL_OR_RETURN(&shdr->num_ref_idx_active_override_flag);
1351 if (shdr->num_ref_idx_active_override_flag) {
1352 READ_UE_OR_RETURN(&shdr->num_ref_idx_l0_active_minus1);
1353 if (shdr->IsBSlice())
1354 READ_UE_OR_RETURN(&shdr->num_ref_idx_l1_active_minus1);
1356 shdr->num_ref_idx_l0_active_minus1 =
1358 if (shdr->IsBSlice()) {
1359 shdr->num_ref_idx_l1_active_minus1 =
1364 if (shdr->field_pic_flag) {
1365 TRUE_OR_RETURN(shdr->num_ref_idx_l0_active_minus1 < 32);
1366 TRUE_OR_RETURN(shdr->num_ref_idx_l1_active_minus1 < 32);
1368 TRUE_OR_RETURN(shdr->num_ref_idx_l0_active_minus1 < 16);
1369 TRUE_OR_RETURN(shdr->num_ref_idx_l1_active_minus1 < 16);
1375 res = ParseRefPicListModifications(shdr);
1380 if ((pps->weighted_pred_flag && (shdr->IsPSlice() || shdr->IsSPSlice())) ||
1381 (pps->weighted_bipred_idc == 1 && shdr->IsBSlice())) {
1382 res = ParsePredWeightTable(*sps, shdr);
1388 res = ParseDecRefPicMarking(shdr);
1393 if (pps->entropy_coding_mode_flag && !shdr->IsISlice() &&
1394 !shdr->IsSISlice()) {
1395 READ_UE_OR_RETURN(&shdr->cabac_init_idc);
1396 TRUE_OR_RETURN(shdr->cabac_init_idc < 3);
1399 READ_SE_OR_RETURN(&shdr->slice_qp_delta);
1401 if (shdr->IsSPSlice() || shdr->IsSISlice()) {
1402 if (shdr->IsSPSlice())
1403 READ_BOOL_OR_RETURN(&shdr->sp_for_switch_flag);
1404 READ_SE_OR_RETURN(&shdr->slice_qs_delta);
1408 READ_UE_OR_RETURN(&shdr->disable_deblocking_filter_idc);
1409 TRUE_OR_RETURN(shdr->disable_deblocking_filter_idc < 3);
1411 if (shdr->disable_deblocking_filter_idc != 1) {
1412 READ_SE_OR_RETURN(&shdr->slice_alpha_c0_offset_div2);
1413 IN_RANGE_OR_RETURN(shdr->slice_alpha_c0_offset_div2, -6, 6);
1415 READ_SE_OR_RETURN(&shdr->slice_beta_offset_div2);
1416 IN_RANGE_OR_RETURN(shdr->slice_beta_offset_div2, -6, 6);
1426 shdr->header_bit_size = (shdr->nalu_size - epb) * 8 - br_.NumBitsLeft();