Lines Matching refs:shdr
986 H264SliceHeader* shdr) {
989 if (!shdr->IsISlice() && !shdr->IsSISlice()) {
990 READ_BOOL_OR_RETURN(&shdr->ref_pic_list_modification_flag_l0);
991 if (shdr->ref_pic_list_modification_flag_l0) {
992 res = ParseRefPicListModification(shdr->num_ref_idx_l0_active_minus1,
993 shdr->ref_list_l0_modifications);
999 if (shdr->IsBSlice()) {
1000 READ_BOOL_OR_RETURN(&shdr->ref_pic_list_modification_flag_l1);
1001 if (shdr
1002 res = ParseRefPicListModification(shdr->num_ref_idx_l1_active_minus1,
1003 shdr->ref_list_l1_modifications);
1058 H264SliceHeader* shdr) {
1059 READ_UE_OR_RETURN(&shdr->luma_log2_weight_denom);
1060 TRUE_OR_RETURN(shdr->luma_log2_weight_denom < 8);
1063 READ_UE_OR_RETURN(&shdr->chroma_log2_weight_denom);
1064 TRUE_OR_RETURN(shdr->chroma_log2_weight_denom < 8);
1066 Result res = ParseWeightingFactors(shdr->num_ref_idx_l0_active_minus1,
1068 shdr->luma_log2_weight_denom,
1069 shdr->chroma_log2_weight_denom,
1070 &shdr->pred_weight_table_l0);
1074 if (shdr->IsBSlice()) {
1075 res = ParseWeightingFactors(shdr->num_ref_idx_l1_active_minus1,
1077 shdr->luma_log2_weight_denom,
1078 shdr->chroma_log2_weight_denom,
1079 &shdr->pred_weight_table_l1);
1087 H264Parser::Result H264Parser::ParseDecRefPicMarking(H264SliceHeader* shdr) {
1088 if (shdr->idr_pic_flag) {
1089 READ_BOOL_OR_RETURN(&shdr->no_output_of_prior_pics_flag);
1090 READ_BOOL_OR_RETURN(&shdr->long_term_reference_flag);
1092 READ_BOOL_OR_RETURN(&shdr->adaptive_ref_pic_marking_mode_flag);
1095 if (shdr->adaptive_ref_pic_marking_mode_flag) {
1097 for (i = 0; i < arraysize(shdr->ref_pic_marking); ++i) {
1098 marking = &shdr->ref_pic_marking[i];
1122 if (i == arraysize(shdr->ref_pic_marking)) {
1133 H264SliceHeader* shdr) {
1139 memset(shdr, 0, sizeof(*shdr));
1141 shdr->idr_pic_flag = (nalu.nal_unit_type == 5);
1142 shdr->nal_ref_idc = nalu.nal_ref_idc;
1143 shdr->nalu_data = nalu.data;
1144 shdr->nalu_size = nalu.size;
1146 READ_UE_OR_RETURN(&shdr->first_mb_in_slice);
1147 READ_UE_OR_RETURN(&shdr->slice_type);
1148 TRUE_OR_RETURN(shdr->slice_type < 10);
1150 READ_UE_OR_RETURN(&shdr->pic_parameter_set_id);
1152 pps = GetPPS(shdr->pic_parameter_set_id);
1163 READ_BITS_OR_RETURN(sps->log2_max_frame_num_minus4 + 4, &shdr->frame_num);
1165 READ_BOOL_OR_RETURN(&shdr->field_pic_flag);
1166 if (shdr->field_pic_flag) {
1172 if (shdr->idr_pic_flag)
1173 READ_UE_OR_RETURN(&shdr->idr_pic_id);
1177 &shdr->pic_order_cnt_lsb);
1179 !shdr->field_pic_flag)
1180 READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt_bottom);
1184 READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt[0]);
1186 !shdr->field_pic_flag)
1187 READ_SE_OR_RETURN(&shdr->delta_pic_order_cnt[1]);
1191 READ_UE_OR_RETURN(&shdr->redundant_pic_cnt);
1192 TRUE_OR_RETURN(shdr->redundant_pic_cnt < 128);
1195 if (shdr->IsBSlice())
1196 READ_BOOL_OR_RETURN(&shdr->direct_spatial_mv_pred_flag);
1198 if (shdr->IsPSlice() || shdr->IsSPSlice() || shdr->IsBSlice()) {
1199 READ_BOOL_OR_RETURN(&shdr->num_ref_idx_active_override_flag);
1200 if (shdr->num_ref_idx_active_override_flag) {
1201 READ_UE_OR_RETURN(&shdr->num_ref_idx_l0_active_minus1);
1202 if (shdr->IsBSlice())
1203 READ_UE_OR_RETURN(&shdr->num_ref_idx_l1_active_minus1);
1205 shdr->num_ref_idx_l0_active_minus1 =
1207 if (shdr->IsBSlice()) {
1208 shdr->num_ref_idx_l1_active_minus1 =
1213 if (shdr->field_pic_flag) {
1214 TRUE_OR_RETURN(shdr->num_ref_idx_l0_active_minus1 < 32);
1215 TRUE_OR_RETURN(shdr->num_ref_idx_l1_active_minus1 < 32);
1217 TRUE_OR_RETURN(shdr->num_ref_idx_l0_active_minus1 < 16);
1218 TRUE_OR_RETURN(shdr->num_ref_idx_l1_active_minus1 < 16);
1224 res = ParseRefPicListModifications(shdr);
1229 if ((pps->weighted_pred_flag && (shdr->IsPSlice() || shdr->IsSPSlice())) ||
1230 (pps->weighted_bipred_idc == 1 && shdr->IsBSlice())) {
1231 res = ParsePredWeightTable(*sps, shdr);
1237 res = ParseDecRefPicMarking(shdr);
1242 if (pps->entropy_coding_mode_flag && !shdr->IsISlice() &&
1243 !shdr->IsSISlice()) {
1244 READ_UE_OR_RETURN(&shdr->cabac_init_idc);
1245 TRUE_OR_RETURN(shdr->cabac_init_idc < 3);
1248 READ_SE_OR_RETURN(&shdr->slice_qp_delta);
1250 if (shdr->IsSPSlice() || shdr->IsSISlice()) {
1251 if (shdr->IsSPSlice())
1252 READ_BOOL_OR_RETURN(&shdr->sp_for_switch_flag);
1253 READ_SE_OR_RETURN(&shdr->slice_qs_delta);
1257 READ_UE_OR_RETURN(&shdr->disable_deblocking_filter_idc);
1258 TRUE_OR_RETURN(shdr->disable_deblocking_filter_idc < 3);
1260 if (shdr->disable_deblocking_filter_idc != 1) {
1261 READ_SE_OR_RETURN(&shdr->slice_alpha_c0_offset_div2);
1262 IN_RANGE_OR_RETURN(shdr->slice_alpha_c0_offset_div2, -6, 6);
1264 READ_SE_OR_RETURN(&shdr->slice_beta_offset_div2);
1265 IN_RANGE_OR_RETURN(shdr->slice_beta_offset_div2, -6, 6);
1275 shdr->header_bit_size = (shdr->nalu_size - epb) * 8 - br_.NumBitsLeft();