Lines Matching refs:sh

228 int hal_h265d_slice_rpl(void *dxva, SliceHeader_t *sh, RefPicListTab_t *ref)  in hal_h265d_slice_rpl()  argument
230 RK_U8 nb_list = sh->slice_type == B_SLICE ? 2 : 1; in hal_h265d_slice_rpl()
273 while ((RK_U32)rpl_tmp.nb_refs < sh->nb_refs[list_idx]) { in hal_h265d_slice_rpl()
295 if (sh->rpl_modification_flag[list_idx]) { in hal_h265d_slice_rpl()
296 for (i = 0; i < sh->nb_refs[list_idx]; i++) { in hal_h265d_slice_rpl()
297 int idx = sh->list_entry_lx[list_idx][i]; in hal_h265d_slice_rpl()
303 rpl->nb_refs = MPP_MIN((RK_U32)rpl->nb_refs, sh->nb_refs[list_idx]); in hal_h265d_slice_rpl()
377 SliceHeader_t sh; in hal_h265d_slice_output_rps() local
396 memset(&sh, 0, sizeof(SliceHeader_t)); in hal_h265d_slice_output_rps()
418 READ_ONEBIT(gb, &sh.first_slice_in_pic_flag); in hal_h265d_slice_output_rps()
421 READ_ONEBIT(gb, &sh.no_output_of_prior_pics_flag); in hal_h265d_slice_output_rps()
423 READ_UE(gb, &sh.pps_id); in hal_h265d_slice_output_rps()
425 if (sh.pps_id >= 64 ) { in hal_h265d_slice_output_rps()
426 mpp_err( "PPS id out of range: %d\n", sh.pps_id); in hal_h265d_slice_output_rps()
430 sh.dependent_slice_segment_flag = 0; in hal_h265d_slice_output_rps()
431 if (!sh.first_slice_in_pic_flag) { in hal_h265d_slice_output_rps()
444 READ_ONEBIT(gb, &sh.dependent_slice_segment_flag); in hal_h265d_slice_output_rps()
448 READ_BITS(gb, slice_address_length, &sh.slice_segment_addr); in hal_h265d_slice_output_rps()
450 if (sh.slice_segment_addr >= (RK_U32)(ctb_width * ctb_height)) { in hal_h265d_slice_output_rps()
453 sh.slice_segment_addr); in hal_h265d_slice_output_rps()
457 if (!sh.dependent_slice_segment_flag) { in hal_h265d_slice_output_rps()
458 sh.slice_addr = sh.slice_segment_addr; in hal_h265d_slice_output_rps()
462 sh.slice_segment_addr = sh.slice_addr = 0; in hal_h265d_slice_output_rps()
466 if (!sh.dependent_slice_segment_flag) { in hal_h265d_slice_output_rps()
470 READ_UE(gb, &sh.slice_type); in hal_h265d_slice_output_rps()
471 if (!(sh.slice_type == I_SLICE || in hal_h265d_slice_output_rps()
472 sh.slice_type == P_SLICE || in hal_h265d_slice_output_rps()
473 sh.slice_type == B_SLICE)) { in hal_h265d_slice_output_rps()
475 sh.slice_type); in hal_h265d_slice_output_rps()
484 READ_ONEBIT(gb, &sh.pic_output_flag); in hal_h265d_slice_output_rps()
487 READ_BITS(gb, 2, &sh.colour_plane_id ); in hal_h265d_slice_output_rps()
492 … READ_BITS(gb, (dxva_cxt->pp.log2_max_pic_order_cnt_lsb_minus4 + 4), &sh.pic_order_cnt_lsb); in hal_h265d_slice_output_rps()
551 READ_ONEBIT(gb, &sh.slice_temporal_mvp_enabled_flag); in hal_h265d_slice_output_rps()
553 sh.slice_temporal_mvp_enabled_flag = 0; in hal_h265d_slice_output_rps()
555 sh.short_term_rps = NULL; in hal_h265d_slice_output_rps()
559 READ_ONEBIT(gb, &sh.slice_sample_adaptive_offset_flag[0]); in hal_h265d_slice_output_rps()
560 READ_ONEBIT(gb, &sh.slice_sample_adaptive_offset_flag[1]); in hal_h265d_slice_output_rps()
561 sh.slice_sample_adaptive_offset_flag[2] = in hal_h265d_slice_output_rps()
562 sh.slice_sample_adaptive_offset_flag[1]; in hal_h265d_slice_output_rps()
564 sh.slice_sample_adaptive_offset_flag[0] = 0; in hal_h265d_slice_output_rps()
565 sh.slice_sample_adaptive_offset_flag[1] = 0; in hal_h265d_slice_output_rps()
566 sh.slice_sample_adaptive_offset_flag[2] = 0; in hal_h265d_slice_output_rps()
569 sh.nb_refs[L0] = sh.nb_refs[L1] = 0; in hal_h265d_slice_output_rps()
570 if (sh.slice_type == P_SLICE || sh.slice_type == B_SLICE) { in hal_h265d_slice_output_rps()
572 sh.nb_refs[L0] = dxva_cxt->pp.num_ref_idx_l0_default_active_minus1 + 1; in hal_h265d_slice_output_rps()
573 if (sh.slice_type == B_SLICE) in hal_h265d_slice_output_rps()
574 sh.nb_refs[L1] = dxva_cxt->pp.num_ref_idx_l1_default_active_minus1 + 1; in hal_h265d_slice_output_rps()
579 READ_UE(gb, &sh.nb_refs[L0]); in hal_h265d_slice_output_rps()
580 sh.nb_refs[L0] += 1; in hal_h265d_slice_output_rps()
581 if (sh.slice_type == B_SLICE) { in hal_h265d_slice_output_rps()
582 READ_UE(gb, &sh.nb_refs[L1]); in hal_h265d_slice_output_rps()
583 sh.nb_refs[L1] += 1; in hal_h265d_slice_output_rps()
586 if (sh.nb_refs[L0] > MAX_REFS || sh.nb_refs[L1] > MAX_REFS) { in hal_h265d_slice_output_rps()
588 sh.nb_refs[L0], sh.nb_refs[L1]); in hal_h265d_slice_output_rps()
592 sh.rpl_modification_flag[0] = 0; in hal_h265d_slice_output_rps()
593 sh.rpl_modification_flag[1] = 0; in hal_h265d_slice_output_rps()
608 READ_ONEBIT(gb, &sh.rpl_modification_flag[0]); in hal_h265d_slice_output_rps()
609 if (sh.rpl_modification_flag[0]) { in hal_h265d_slice_output_rps()
610 for (i = 0; (RK_U32)i < sh.nb_refs[L0]; i++) in hal_h265d_slice_output_rps()
611 READ_BITS(gb, mpp_ceil_log2(nb_refs), &sh.list_entry_lx[0][i]); in hal_h265d_slice_output_rps()
614 if (sh.slice_type == B_SLICE) { in hal_h265d_slice_output_rps()
615 READ_ONEBIT(gb, &sh.rpl_modification_flag[1]); in hal_h265d_slice_output_rps()
616 if (sh.rpl_modification_flag[1] == 1) in hal_h265d_slice_output_rps()
617 for (i = 0; (RK_U32)i < sh.nb_refs[L1]; i++) in hal_h265d_slice_output_rps()
618 READ_BITS(gb, mpp_ceil_log2(nb_refs), &sh.list_entry_lx[1][i]); in hal_h265d_slice_output_rps()
624 if (!sh.dependent_slice_segment_flag && in hal_h265d_slice_output_rps()
625 sh.slice_type != I_SLICE) { in hal_h265d_slice_output_rps()
626 RK_U32 nb_list = I_SLICE - sh.slice_type; in hal_h265d_slice_output_rps()
628 hal_h265d_slice_rpl(dxva, &sh, &ref); in hal_h265d_slice_output_rps()
646 if (sh.slice_type == I_SLICE) in hal_h265d_slice_output_rps()