Lines Matching refs:ref

173 static void read_global_param(AV1Context *s, RK_S32 type, RK_S32 ref, RK_S32 idx)  in read_global_param()  argument
189 prev_gm_param = s->cur_frame.gm_params[ref].wmmat[idx]; in read_global_param()
191 prev_gm_param = s->ref[prev_frame].gm_params[ref].wmmat[idx]; in read_global_param()
210 s->cur_frame.gm_params[ref].wmmat_val[idx] = in read_global_param()
211 decode_signed_subexp_with_ref(s->raw_frame_header->gm_params[ref][idx], in read_global_param()
213 s->cur_frame.gm_params[ref].wmmat[idx] = in read_global_param()
214 (s->cur_frame.gm_params[ref].wmmat_val[idx] << prec_diff) + round; in read_global_param()
295 RK_S32 type, ref; in global_motion_params() local
299 for (ref = AV1_REF_FRAME_LAST; ref <= AV1_REF_FRAME_ALTREF; ref++) { in global_motion_params()
300 s->cur_frame.gm_params[ref].wmtype = AV1_WARP_MODEL_IDENTITY; in global_motion_params()
302 s->cur_frame.gm_params[ref].wmmat[i] = (i % 3 == 2) ? in global_motion_params()
309 for (ref = AV1_REF_FRAME_LAST; ref <= AV1_REF_FRAME_ALTREF; ref++) { in global_motion_params()
310 RK_U8 ref_uses_scaling = ctx->frame_width != ctx->ref_s[ref].frame_width || in global_motion_params()
311 ctx->frame_height != ctx->ref_s[ref].frame_height; in global_motion_params()
314 if (header->is_global[ref]) { in global_motion_params()
315 if (header->is_rot_zoom[ref]) { in global_motion_params()
318 type = header->is_translation[ref] ? AV1_WARP_MODEL_TRANSLATION in global_motion_params()
324 s->cur_frame.gm_params[ref].wmtype = type; in global_motion_params()
327 read_global_param(s, type, ref, 2); in global_motion_params()
328 read_global_param(s, type, ref, 3); in global_motion_params()
330 read_global_param(s, type, ref, 4); in global_motion_params()
331 read_global_param(s, type, ref, 5); in global_motion_params()
333 s->cur_frame.gm_params[ref].wmmat[4] = -s->cur_frame.gm_params[ref].wmmat[3]; in global_motion_params()
334 s->cur_frame.gm_params[ref].wmmat[5] = s->cur_frame.gm_params[ref].wmmat[2]; in global_motion_params()
338 read_global_param(s, type, ref, 0); in global_motion_params()
339 read_global_param(s, type, ref, 1); in global_motion_params()
343 shear_params_valid = get_shear_params_valid(ctx, ref); in global_motion_params()
346 ctx->cur_frame.gm_params[ref].alpha = -32768; in global_motion_params()
347 ctx->cur_frame.gm_params[ref].beta = -32768; in global_motion_params()
348 ctx->cur_frame.gm_params[ref].gamma = -32768; in global_motion_params()
349 ctx->cur_frame.gm_params[ref].delta = -32768; in global_motion_params()
352 ref, in global_motion_params()
353 ctx->cur_frame.gm_params[ref].alpha, in global_motion_params()
354 ctx->cur_frame.gm_params[ref].beta, in global_motion_params()
355 ctx->cur_frame.gm_params[ref].gamma, in global_motion_params()
356 ctx->cur_frame.gm_params[ref].delta); in global_motion_params()
386 ref_hint = s->ref[header->ref_frame_idx[i]].order_hint; in skip_mode_params()
415 ref_hint = s->ref[header->ref_frame_idx[i]].order_hint; in skip_mode_params()
478 src = &s->ref[film_grain->film_grain_params_ref_idx].film_grain; in load_grain_params()
573 if (!f->ref || f->ref->ref_count <= 0 || f->slot_index >= 0x7f) { in av1d_frame_unref()
578 f->ref->ref_count--; in av1d_frame_unref()
579 …_REF, "ref %p, f->ref->ref_count %d, ref->invisible= %d", f->ref, f->ref->ref_count, f->ref->invis… in av1d_frame_unref()
580 if (!f->ref->ref_count) { in av1d_frame_unref()
587 if (!f->ref->is_output) { in av1d_frame_unref()
593 f->ref->invisible = 0; in av1d_frame_unref()
598 mpp_free(f->ref); in av1d_frame_unref()
599 f->ref = NULL; in av1d_frame_unref()
601 f->ref = NULL; in av1d_frame_unref()
626 s->cur_frame.ref->is_output = 1; in set_output_frame()
656 dst->ref = src->ref; in av1d_frame_ref()
657 dst->ref->ref_count++; in av1d_frame_ref()
716 s->cur_frame.ref->lst2_frame_offset = s->ref[lst2_buf_idx].order_hint; in update_reference_list()
717 s->cur_frame.ref->lst3_frame_offset = s->ref[lst3_buf_idx].order_hint; in update_reference_list()
718 s->cur_frame.ref->gld_frame_offset = s->ref[gld_buf_idx].order_hint; in update_reference_list()
719 s->cur_frame.ref->alt_frame_offset = s->ref[alt_buf_idx].order_hint; in update_reference_list()
720 s->cur_frame.ref->lst_frame_offset = s->ref[lst_buf_idx].order_hint; in update_reference_list()
721 s->cur_frame.ref->bwd_frame_offset = s->ref[bwd_buf_idx].order_hint; in update_reference_list()
722 s->cur_frame.ref->alt2_frame_offset = s->ref[alt2_buf_idx].order_hint; in update_reference_list()
730 i, i, s->ref[i].slot_index); in update_reference_list()
731 if (s->ref[i].ref) in update_reference_list()
732 av1d_frame_unref(ctx, &s->ref[i]); in update_reference_list()
734 if ((ret = av1d_frame_ref(ctx, &s->ref[i], &s->cur_frame)) < 0) { in update_reference_list()
755 if (frame->ref) in get_current_frame()
832 frame->ref = mpp_calloc(RefInfo, 1); in get_current_frame()
833 frame->ref->ref_count++; in get_current_frame()
834 frame->ref->is_intra_frame = !s->raw_frame_header->frame_type; in get_current_frame()
835 frame->ref->intra_only = (s->raw_frame_header->frame_type == 2); in get_current_frame()
836 frame->ref->is_output = 0; in get_current_frame()
838 frame->ref->invisible = 1; in get_current_frame()
883 mpp_frame_init(&s->ref[i].f); in av1d_parser_init()
884 if (!s->ref[i].f) { in av1d_parser_init()
888 s->ref[i].slot_index = 0x7f; in av1d_parser_init()
889 s->ref[i].ref = NULL; in av1d_parser_init()
893 s->cur_frame.ref = NULL; in av1d_parser_init()
916 for ( i = 0; i < MPP_ARRAY_ELEMS(s->ref); i++) { in av1d_parser_deinit()
917 if (s->ref[i].ref) { in av1d_parser_deinit()
918 av1d_frame_unref(ctx, &s->ref[i]); in av1d_parser_deinit()
920 mpp_frame_deinit(&s->ref[i].f); in av1d_parser_deinit()
921 s->ref[i].f = NULL; in av1d_parser_deinit()
923 if (s->cur_frame.ref) { in av1d_parser_deinit()
1019 if (s->cur_frame.ref) { in av1d_parser_frame()
1024 &s->ref[s->raw_frame_header->frame_to_show_map_idx]); in av1d_parser_frame()
1095 if (s->ref[ref_idx].slot_index < 0x7f) { in av1d_parser_frame()
1096 mpp_buf_slot_set_flag(s->slots, s->ref[ref_idx].slot_index, SLOT_HAL_INPUT); in av1d_parser_frame()
1098 task->refer[j] = s->ref[ref_idx].slot_index; in av1d_parser_frame()
1185 for ( i = 0; i < MPP_ARRAY_ELEMS(s->ref); i++) { in av1d_paser_reset()
1186 AV1Frame *f = &s->ref[i]; in av1d_paser_reset()
1188 if (f->ref) in av1d_paser_reset()
1189 av1d_frame_unref(ctx, &s->ref[i]); in av1d_paser_reset()
1192 if (s->cur_frame.ref) { in av1d_paser_reset()