Lines Matching refs:dec_pic

391 static MPP_RET dpb_mark_malloc(H264dVideoCtx_t *p_Vid, H264_StorePic_t *dec_pic)  in dpb_mark_malloc()  argument
397 RK_S32 structure = dec_pic->structure; in dpb_mark_malloc()
398 RK_S32 layer_id = dec_pic->layer_id; in dpb_mark_malloc()
400 if (!dec_pic->combine_flag) { in dpb_mark_malloc()
564 impl->poc = dec_pic->poc; in dpb_mark_malloc()
565 impl->viewid = dec_pic->layer_id; in dpb_mark_malloc()
566 impl->status.is_intra = dec_pic->slice_type == H264_I_SLICE; in dpb_mark_malloc()
567 impl->status.is_idr = dec_pic->idr_flag; in dpb_mark_malloc()
568 impl->status.is_non_ref = !dec_pic->used_for_reference; in dpb_mark_malloc()
569 impl->status.is_lt_ref = dec_pic->long_term_reference_flag; in dpb_mark_malloc()
570 impl->status.is_b_frame = ((dec_pic->slice_type % 5) == H264_B_SLICE); in dpb_mark_malloc()
592 p_Vid->g_framecnt, dec_pic->combine_flag, cur_mark->mark_idx, in dpb_mark_malloc()
593 cur_mark->slot_idx, dec_pic->slice_type, dec_pic->structure, in dpb_mark_malloc()
599 dec_pic->mem_mark = p_Vid->active_dpb_mark[layer_id]; in dpb_mark_malloc()
600 dec_pic->mem_mark->pic = dec_pic; in dpb_mark_malloc()
604 dec_pic->mem_mark = NULL; in dpb_mark_malloc()
608 static MPP_RET check_dpb_discontinuous(H264_StorePic_t *p_last, H264_StorePic_t *dec_pic, H264_SLIC… in check_dpb_discontinuous() argument
612 if (p_last && dec_pic && (dec_pic->slice_type != H264_I_SLICE) in check_dpb_discontinuous()
616 if (dec_pic->combine_flag) { in check_dpb_discontinuous()
617 if (dec_pic->frame_num != p_last->frame_num) in check_dpb_discontinuous()
622 if (dec_pic->frame_num != frame_num && in check_dpb_discontinuous()
623 dec_pic->frame_num != ((frame_num + 1) % currSlice->p_Vid->max_frame_num)) in check_dpb_discontinuous()
631 …p_last->slice_type, dec_pic->slice_type, p_last->frame_num, dec_pic->frame_num, p_last->poc, dec_p… in check_dpb_discontinuous()
634 if (dec_pic->idr_flag || dec_pic->used_for_reference) in check_dpb_discontinuous()
635 currSlice->p_Vid->last_ref_frame_num = dec_pic->frame_num; in check_dpb_discontinuous()
642 H264_StorePic_t *dec_pic = NULL; in alloc_decpic() local
649 dec_pic = alloc_storable_picture(p_Vid, currSlice->structure); in alloc_decpic()
650 MEM_CHECK(ret, dec_pic); in alloc_decpic()
657 dec_pic->top_poc = currSlice->toppoc; in alloc_decpic()
658 dec_pic->bottom_poc = currSlice->bottompoc; in alloc_decpic()
659 dec_pic->frame_poc = currSlice->framepoc; in alloc_decpic()
660 dec_pic->ThisPOC = currSlice->ThisPOC; in alloc_decpic()
669 dec_pic->iCodingType = FRAME_MB_PAIR_CODING; in alloc_decpic()
671 dec_pic->iCodingType = FRAME_CODING; in alloc_decpic()
674 dec_pic->iCodingType = FIELD_CODING; in alloc_decpic()
676 dec_pic->layer_id = currSlice->layer_id; in alloc_decpic()
677 dec_pic->view_id = currSlice->view_id; in alloc_decpic()
678 dec_pic->inter_view_flag = currSlice->inter_view_flag; in alloc_decpic()
679 dec_pic->anchor_pic_flag = currSlice->anchor_pic_flag; in alloc_decpic()
680 if (dec_pic->layer_id == 1) { in alloc_decpic()
686 dec_pic->poc = currSlice->toppoc; in alloc_decpic()
688 dec_pic->poc = currSlice->bottompoc; in alloc_decpic()
690 dec_pic->poc = currSlice->framepoc; in alloc_decpic()
695 dec_pic->slice_type = p_Vid->type; in alloc_decpic()
696 dec_pic->used_for_reference = (currSlice->nal_reference_idc != 0); in alloc_decpic()
697 dec_pic->idr_flag = currSlice->idr_flag; in alloc_decpic()
698 dec_pic->no_output_of_prior_pics_flag = currSlice->no_output_of_prior_pics_flag; in alloc_decpic()
699 dec_pic->long_term_reference_flag = currSlice->long_term_reference_flag; in alloc_decpic()
700 dec_pic->adaptive_ref_pic_buffering_flag = currSlice->adaptive_ref_pic_buffering_flag; in alloc_decpic()
701 dec_pic->dec_ref_pic_marking_buffer = currSlice->dec_ref_pic_marking_buffer; in alloc_decpic()
704 dec_pic->mb_aff_frame_flag = currSlice->mb_aff_frame_flag; in alloc_decpic()
705 dec_pic->PicWidthInMbs = p_Vid->PicWidthInMbs; in alloc_decpic()
706 dec_pic->pic_num = currSlice->frame_num; in alloc_decpic()
707 dec_pic->frame_num = currSlice->frame_num; in alloc_decpic()
708 dec_pic->chroma_format_idc = active_sps->chroma_format_idc; in alloc_decpic()
710 dec_pic->frame_mbs_only_flag = active_sps->frame_mbs_only_flag; in alloc_decpic()
711 dec_pic->frame_cropping_flag = active_sps->frame_cropping_flag; in alloc_decpic()
712 if (dec_pic->frame_cropping_flag) { in alloc_decpic()
713 dec_pic->frame_crop_left_offset = active_sps->frame_crop_left_offset; in alloc_decpic()
714 dec_pic->frame_crop_right_offset = active_sps->frame_crop_right_offset; in alloc_decpic()
715 dec_pic->frame_crop_top_offset = active_sps->frame_crop_top_offset; in alloc_decpic()
716 dec_pic->frame_crop_bottom_offset = active_sps->frame_crop_bottom_offset; in alloc_decpic()
718 dec_pic->frame_crop_left_offset = 0; in alloc_decpic()
719 dec_pic->frame_crop_right_offset = 0; in alloc_decpic()
720 dec_pic->frame_crop_top_offset = 0; in alloc_decpic()
721 dec_pic->frame_crop_bottom_offset = 0; in alloc_decpic()
723 dec_pic->width = p_Vid->width; in alloc_decpic()
724 dec_pic->height = p_Vid->height; in alloc_decpic()
725 dec_pic->width_after_crop = p_Vid->width_after_crop; in alloc_decpic()
726 dec_pic->height_after_crop = p_Vid->height_after_crop; in alloc_decpic()
727 dec_pic->combine_flag = get_field_dpb_combine_flag(p_Dpb->last_picture, dec_pic); in alloc_decpic()
729 FUN_CHECK(ret = dpb_mark_malloc(p_Vid, dec_pic)); in alloc_decpic()
731 FUN_CHECK(ret = check_dpb_discontinuous(p_Vid->last_pic, dec_pic, currSlice)); in alloc_decpic()
733 dec_pic->mem_malloc_type = Mem_Malloc; in alloc_decpic()
734 dec_pic->colmv_no_used_flag = 0; in alloc_decpic()
735 p_Vid->dec_pic = dec_pic; in alloc_decpic()
739 mpp_mem_pool_put_f(p_Vid->pic_st, dec_pic); in alloc_decpic()
740 p_Vid->dec_pic = NULL; in alloc_decpic()
1911 RK_S32 cur_poc = p_Dec->p_Vid->dec_pic->poc; in prepare_init_ref_info()
2071 p_err->first_iframe_poc = p_Vid->dec_pic->poc; //!< recoder first i frame poc in init_picture()
2077 … FUN_CHECK(ret = idr_memory_management(p_Vid->p_Dpb_layer[currSlice->layer_id], p_Vid->dec_pic)); in init_picture()
2081 if (p_Vid->last_pic != NULL && p_Vid->dec_pic->poc != 0) { in init_picture()
2082 if (p_Vid->last_pic->frame_num >= p_Vid->dec_pic->frame_num in init_picture()
2083 && p_Vid->last_pic->poc >= p_Vid->dec_pic->poc in init_picture()
2084 && p_Vid->dec_pic->slice_type == H264_I_SLICE in init_picture()
2085 && p_Vid->dec_pic->structure == 3) { in init_picture()
2134 ret = exit_picture(p_Dec->p_Vid, &p_Dec->p_Vid->dec_pic); in update_dpb()