Home | History | Annotate | Download | only in parser

Lines Matching refs:pInfo

14 h264_Status h264_Parse_Slice_Header_1(void *parent,h264_Info* pInfo, h264_Slice_Header_t *SliceHeader)
18 //h264_Slice_Header_t* SliceHeader = &pInfo->SliceHeader;
24 SliceHeader->first_mb_in_slice = h264_GetVLCElement(parent, pInfo, false);
27 slice_type = h264_GetVLCElement(parent, pInfo, false);
37 data = h264_GetVLCElement(parent, pInfo, false);
57 h264_Status h264_Parse_Slice_Header_2(void *parent, h264_Info* pInfo, h264_Slice_Header_t *SliceHeader)
61 //h264_Slice_Header_t* SliceHeader = &pInfo->SliceHeader;
69 viddec_pm_get_bits(parent, &code, pInfo->active_SPS.log2_max_frame_num_minus4+4);
77 if(!(pInfo->active_SPS.sps_disp.frame_mbs_only_flag))
94 max_mb_num = pInfo->img.FrameHeightInMbs * pInfo->img.PicWidthInMbs;
96 max_mb_num = pInfo->img.FrameHeightInMbs * pInfo->img.PicWidthInMbs/2;
100 ///if(pInfo->img.MbaffFrameFlag)
101 if(pInfo->active_SPS.sps_disp.mb_adaptive_frame_field_flag & (!(pInfo->SliceHeader.field_pic_flag))) {
109 if(pInfo->nal_unit_type == h264_NAL_UNIT_TYPE_IDR)
111 SliceHeader->idr_pic_id = h264_GetVLCElement(parent, pInfo, false);
114 if(pInfo->active_SPS.pic_order_cnt_type == 0)
116 viddec_pm_get_bits(parent, &code , pInfo->active_SPS.log2_max_pic_order_cnt_lsb_minus4+4);
120 if((pInfo->active_PPS.pic_order_present_flag) && !(SliceHeader->field_pic_flag))
122 SliceHeader->delta_pic_order_cnt_bottom = h264_GetVLCElement(parent, pInfo, true);
130 if((pInfo->active_SPS.pic_order_cnt_type == 1) && !(pInfo->active_SPS.delta_pic_order_always_zero_flag))
132 SliceHeader->delta_pic_order_cnt[0] = h264_GetVLCElement(parent, pInfo, true);
133 if((pInfo->active_PPS.pic_order_present_flag) && !(SliceHeader->field_pic_flag))
135 SliceHeader->delta_pic_order_cnt[1] = h264_GetVLCElement(parent, pInfo, true);
139 if(pInfo->active_PPS.redundant_pic_cnt_present_flag)
141 SliceHeader->redundant_pic_cnt = h264_GetVLCElement(parent, pInfo, false);
152 //if((pInfo->active_PPS.num_slice_groups_minus1 > 0) && (pInfo->active_PPS.slice_group_map_type >= 3) && (pInfo->active_PPS.slice_group_map_type <= 5) )
165 h264_Status h264_Parse_Slice_Header_3(void *parent, h264_Info* pInfo, h264_Slice_Header_t *SliceHeader)
169 //h264_Slice_Header_t* SliceHeader = &pInfo->SliceHeader;
190 SliceHeader->num_ref_idx_l0_active = pInfo->active_PPS.num_ref_idx_l0_active;
191 SliceHeader->num_ref_idx_l1_active = pInfo->active_PPS.num_ref_idx_l1_active;
200 SliceHeader->num_ref_idx_l0_active = h264_GetVLCElement(parent, pInfo, false) + 1;
203 SliceHeader->num_ref_idx_l1_active = h264_GetVLCElement(parent, pInfo, false)+1;
217 if(h264_Parse_Ref_Pic_List_Reordering(parent, pInfo, SliceHeader) != H264_STATUS_OK)
226 if(((pInfo->active_PPS.weighted_pred_flag) && ((SliceHeader->slice_type == h264_PtypeP) || (SliceHeader->slice_type == h264_PtypeSP))) || ((pInfo->active_PPS.weighted_bipred_idc == 1) && (SliceHeader->slice_type == h264_PtypeB)))
231 pInfo->h264_pwt_enabled = 1;
232 pInfo->h264_pwt_start_byte_offset = byte_offset;
233 pInfo->h264_pwt_start_bit_offset = bits_offset;
235 if(h264_Parse_Pred_Weight_Table(parent, pInfo, SliceHeader) != H264_STATUS_OK)
244 pInfo->h264_pwt_end_byte_offset = byte_offset-1;
245 pInfo->h264_pwt_end_bit_offset = 8;
249 pInfo->h264_pwt_end_byte_offset = byte_offset;
250 pInfo->h264_pwt_end_bit_offset = bits_offset;
262 if(h264_Parse_Dec_Ref_Pic_Marking(parent, pInfo, SliceHeader) != H264_STATUS_OK)
268 if((pInfo->active_PPS.entropy_coding_mode_flag) && (SliceHeader->slice_type != h264_PtypeI) && (SliceHeader->slice_type != h264_PtypeSI))
270 SliceHeader->cabac_init_idc = h264_GetVLCElement(parent, pInfo, false);
282 SliceHeader->slice_qp_delta = h264_GetVLCElement(parent, pInfo, true);
283 if( (SliceHeader->slice_qp_delta > (25-pInfo->active_PPS.pic_init_qp_minus26)) || (SliceHeader->slice_qp_delta < -(26+pInfo->active_PPS.pic_init_qp_minus26)))
295 SliceHeader->slice_qs_delta = h264_GetVLCElement(parent, pInfo, true);
297 if( (SliceHeader->slice_qs_delta > (25-pInfo->active_PPS.pic_init_qs_minus26)) || (SliceHeader->slice_qs_delta < -(26+pInfo->active_PPS.pic_init_qs_minus26)) )
301 if(pInfo->active_PPS.deblocking_filter_control_present_flag)
303 SliceHeader->disable_deblocking_filter_idc = h264_GetVLCElement(parent, pInfo, false);
306 SliceHeader->slice_alpha_c0_offset_div2 = h264_GetVLCElement(parent, pInfo, true);
312 SliceHeader->slice_beta_offset_div2 = h264_GetVLCElement(parent, pInfo, true);
329 //if((pInfo->active_PPS.num_slice_groups_minus1 > 0) && (pInfo->active_PPS.slice_group_map_type >= 3) && (pInfo->active_PPS.slice_group_map_type <= 5) )
352 h264_Status h264_Parse_Ref_Pic_List_Reordering(void *parent, h264_Info* pInfo,h264_Slice_Header_t *SliceHeader)
354 //h264_Slice_Header_t* SliceHeader = &pInfo->SliceHeader;
377 SliceHeader->sh_refpic_l0.reordering_of_pic_nums_idc[reorder] = h264_GetVLCElement(parent, pInfo, false);
380 SliceHeader->sh_refpic_l0.list_reordering_num[reorder].abs_diff_pic_num_minus1 = h264_GetVLCElement(parent, pInfo, false);
384 SliceHeader->sh_refpic_l0.list_reordering_num[reorder].long_term_pic_num = h264_GetVLCElement(parent, pInfo, false);
407 SliceHeader->sh_refpic_l1.reordering_of_pic_nums_idc[reorder] = h264_GetVLCElement(parent, pInfo, false);
410 SliceHeader->sh_refpic_l1.list_reordering_num[reorder].abs_diff_pic_num_minus1 = h264_GetVLCElement(parent, pInfo, false);
414 SliceHeader->sh_refpic_l1.list_reordering_num[reorder].long_term_pic_num = h264_GetVLCElement(parent, pInfo, false);
426 h264_Status h264_Parse_Pred_Weight_Table(void *parent, h264_Info* pInfo,h264_Slice_Header_t *SliceHeader)
431 SliceHeader->sh_predwttbl.luma_log2_weight_denom = h264_GetVLCElement(parent, pInfo, false);
433 if(pInfo->active_SPS.sps_disp.chroma_format_idc != 0)
435 SliceHeader->sh_predwttbl.chroma_log2_weight_denom = h264_GetVLCElement(parent,pInfo, false);
445 SliceHeader->sh_predwttbl.luma_weight_l0[i] = h264_GetVLCElement(parent, pInfo, true);
446 SliceHeader->sh_predwttbl.luma_offset_l0[i] = h264_GetVLCElement(parent, pInfo, true);
454 if(pInfo->active_SPS.sps_disp.chroma_format_idc != 0)
463 SliceHeader->sh_predwttbl.chroma_weight_l0[i][j] = h264_GetVLCElement(parent, pInfo, true);
464 SliceHeader->sh_predwttbl.chroma_offset_l0[i][j] = h264_GetVLCElement(parent, pInfo, true);
488 SliceHeader->sh_predwttbl.luma_weight_l1[i] = h264_GetVLCElement(parent, pInfo, true);
489 SliceHeader->sh_predwttbl.luma_offset_l1[i] = h264_GetVLCElement(parent, pInfo, true);
497 if(pInfo
506 SliceHeader->sh_predwttbl.chroma_weight_l1[i][j] = h264_GetVLCElement(parent, pInfo, true);
507 SliceHeader->sh_predwttbl.chroma_offset_l1[i][j] = h264_GetVLCElement(parent, pInfo, true);
536 h264_Status h264_Parse_Pred_Weight_Table(void *parent, h264_Info* pInfo,h264_Slice_Header_t *SliceHeader)
540 //h264_Slice_Header_t* SliceHeader = &pInfo->SPS.SliceHeader;
542 //SliceHeader->sh_predwttbl.luma_log2_weight_denom = h264_GetVLCElement(pInfo, false, "luma_log2_weight_denom");
543 val = h264_GetVLCElement(parent, pInfo, false);
545 if(pInfo->active_SPS.sps_disp.chroma_format_idc != 0)
547 //SliceHeader->sh_predwttbl.chroma_log2_weight_denom = h264_GetVLCElement(pInfo, false, "chroma_log2_weight_denom");
548 val = h264_GetVLCElement(parent,pInfo, false);
553 //SliceHeader->sh_predwttbl.luma_weight_l0_flag = h264_GetBits(pInfo, 1, "luma_weight_l0_flag");
559 //SliceHeader->sh_predwttbl.luma_weight_l0[i] = h264_GetVLCElement(pInfo, true, "luma_weight_l0");
560 val = h264_GetVLCElement(parent, pInfo, true);
561 //SliceHeader->sh_predwttbl.luma_offset_l0[i] = h264_GetVLCElement(pInfo, true, "luma_offset_l0");
562 val = h264_GetVLCElement(parent, pInfo, true);
570 if(pInfo->active_SPS.sps_disp.chroma_format_idc != 0)
572 //SliceHeader->sh_predwttbl.chroma_weight_l0_flag = h264_GetBits(pInfo, 1, "chroma_weight_l0_flag");
578 //SliceHeader->sh_predwttbl.chroma_weight_l0[i][j] = h264_GetVLCElement(pInfo, true, "chroma_weight_l0");
579 val = h264_GetVLCElement(parent, pInfo, true);
580 //SliceHeader->sh_predwttbl.chroma_offset_l0[i][j] = h264_GetVLCElement(pInfo, true, "chroma_offset_l0");
581 val = h264_GetVLCElement(parent, pInfo, true);
600 //SliceHeader->sh_predwttbl.luma_weight_l1_flag = h264_GetBits(pInfo, 1, "luma_weight_l1_flag");
604 //SliceHeader->sh_predwttbl.luma_weight_l1[i] = h264_GetVLCElement(pInfo, true, "luma_weight_l1");
605 val = h264_GetVLCElement(parent, pInfo, true);
606 //SliceHeader->sh_predwttbl.luma_offset_l1[i] = h264_GetVLCElement(pInfo, true, "luma_offset_l1");
607 val = h264_GetVLCElement(parent, pInfo, true);
615 if(pInfo->active_SPS.sps_disp.chroma_format_idc != 0)
617 //SliceHeader->sh_predwttbl.chroma_weight_l1_flag = h264_GetBits(pInfo, 1, "chroma_weight_l1_flag");
623 //SliceHeader->sh_predwttbl.chroma_weight_l1[i][j] = h264_GetVLCElement(pInfo, true, "chroma_weight_l1");
624 val = h264_GetVLCElement(parent, pInfo, true);
625 //SliceHeader->sh_predwttbl.chroma_offset_l1[i][j] = h264_GetVLCElement(pInfo, true, "chroma_offset_l1");
626 val = h264_GetVLCElement(parent, pInfo, true);
663 h264_Status h264_Parse_Dec_Ref_Pic_Marking(void *parent, h264_Info* pInfo,h264_Slice_Header_t *SliceHeader)
665 //h264_Slice_Header_t* SliceHeader = &pInfo->SliceHeader;
669 if(pInfo->nal_unit_type == h264_NAL_UNIT_TYPE_IDR)
676 pInfo->img.long_term_reference_flag = (uint8_t)code;
697 SliceHeader->sh_dec_refpic.memory_management_control_operation[i] = h264_GetVLCElement(parent, pInfo, false);
700 SliceHeader->sh_dec_refpic.difference_of_pic_num_minus1[i] = h264_GetVLCElement(parent, pInfo, false);
705 SliceHeader->sh_dec_refpic.long_term_pic_num[i] = h264_GetVLCElement(parent, pInfo, false);
710 SliceHeader->sh_dec_refpic.long_term_frame_idx[i] = h264_GetVLCElement(parent, pInfo, false);
715 SliceHeader->sh_dec_refpic.max_long_term_frame_idx_plus1[i] = h264_GetVLCElement(parent, pInfo, false);
720 pInfo->img.curr_has_mmco_5 = 1;