/src/avm/av2/common/mvref_common.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2021, Alliance for Open Media. All rights reserved |
3 | | * |
4 | | * This source code is subject to the terms of the BSD 3-Clause Clear License |
5 | | * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear |
6 | | * License was not distributed with this source code in the LICENSE file, you |
7 | | * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/. If the |
8 | | * Alliance for Open Media Patent License 1.0 was not distributed with this |
9 | | * source code in the PATENTS file, you can obtain it at |
10 | | * aomedia.org/license/patent-license/. |
11 | | */ |
12 | | #ifndef AVM_AV2_COMMON_MVREF_COMMON_H_ |
13 | | #define AVM_AV2_COMMON_MVREF_COMMON_H_ |
14 | | |
15 | | #include "av2/common/av2_common_int.h" |
16 | | #include "av2/common/blockd.h" |
17 | | #include "av2/common/mv.h" |
18 | | |
19 | | #ifdef __cplusplus |
20 | | extern "C" { |
21 | | #endif |
22 | | |
23 | | #define MVREF_ROWS 1 |
24 | 197k | #define MVREF_COLS 2 |
25 | | |
26 | | // Set the upper limit of the motion vector component magnitude. |
27 | 0 | #define REFMVS_LIMIT ((1 << 11) - 1) |
28 | | |
29 | | typedef struct position { |
30 | | int row; |
31 | | int col; |
32 | | } POSITION; |
33 | | |
34 | | #define MAX_OFFSET_WIDTH 64 |
35 | 0 | #define MAX_OFFSET_HEIGHT 0 |
36 | 0 | #define MAX_OFFSET_HEIGHT_LOG2 (MAX_OFFSET_HEIGHT >> TMVP_MI_SZ_LOG2) |
37 | | #define MAX_OFFSET_WIDTH_LOG2 (MAX_OFFSET_WIDTH >> TMVP_MI_SZ_LOG2) |
38 | | |
39 | | static AVM_INLINE int get_mf_sb_size_log2(int sb_size, int mib_size_log2, |
40 | 0 | int tmvp_sample_step) { |
41 | 0 | (void)mib_size_log2; |
42 | |
|
43 | 0 | int mi_size_log2 = INT_MIN; |
44 | 0 | if (sb_size <= 64 || tmvp_sample_step == 1) { |
45 | 0 | mi_size_log2 = mi_size_high_log2[BLOCK_64X64]; |
46 | 0 | } else { |
47 | 0 | mi_size_log2 = mi_size_high_log2[BLOCK_128X128]; |
48 | 0 | } |
49 | 0 | return mi_size_log2 + MI_SIZE_LOG2; |
50 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_mf_sb_size_log2 Unexecuted instantiation: annexF.c:get_mf_sb_size_log2 Unexecuted instantiation: decodeframe.c:get_mf_sb_size_log2 Unexecuted instantiation: decodemv.c:get_mf_sb_size_log2 Unexecuted instantiation: decoder.c:get_mf_sb_size_log2 Unexecuted instantiation: decodetxb.c:get_mf_sb_size_log2 Unexecuted instantiation: detokenize.c:get_mf_sb_size_log2 Unexecuted instantiation: obu_fgm.c:get_mf_sb_size_log2 Unexecuted instantiation: obu.c:get_mf_sb_size_log2 Unexecuted instantiation: obu_ci.c:get_mf_sb_size_log2 Unexecuted instantiation: obu_atlas.c:get_mf_sb_size_log2 Unexecuted instantiation: obu_lcr.c:get_mf_sb_size_log2 Unexecuted instantiation: obu_ops.c:get_mf_sb_size_log2 Unexecuted instantiation: obu_buf.c:get_mf_sb_size_log2 Unexecuted instantiation: intrapred_avx2.c:get_mf_sb_size_log2 Unexecuted instantiation: alloccommon.c:get_mf_sb_size_log2 Unexecuted instantiation: av2_loopfilter.c:get_mf_sb_size_log2 Unexecuted instantiation: cdef.c:get_mf_sb_size_log2 Unexecuted instantiation: gdf.c:get_mf_sb_size_log2 Unexecuted instantiation: gdf_block.c:get_mf_sb_size_log2 Unexecuted instantiation: cfl.c:get_mf_sb_size_log2 Unexecuted instantiation: entropymode.c:get_mf_sb_size_log2 Unexecuted instantiation: level.c:get_mf_sb_size_log2 Unexecuted instantiation: mvref_common.c:get_mf_sb_size_log2 Unexecuted instantiation: pred_common.c:get_mf_sb_size_log2 Unexecuted instantiation: reconinter.c:get_mf_sb_size_log2 Unexecuted instantiation: reconintra.c:get_mf_sb_size_log2 Unexecuted instantiation: restoration.c:get_mf_sb_size_log2 Unexecuted instantiation: thread_common.c:get_mf_sb_size_log2 Unexecuted instantiation: tip.c:get_mf_sb_size_log2 Unexecuted instantiation: warped_motion.c:get_mf_sb_size_log2 Unexecuted instantiation: ccso.c:get_mf_sb_size_log2 Unexecuted instantiation: bru.c:get_mf_sb_size_log2 Unexecuted instantiation: obu_qm.c:get_mf_sb_size_log2 Unexecuted instantiation: optflow_refine_sse4.c:get_mf_sb_size_log2 Unexecuted instantiation: affine_optflow_refine_avx2.c:get_mf_sb_size_log2 Unexecuted instantiation: gdf_block_avx2.c:get_mf_sb_size_log2 |
51 | | |
52 | | static AVM_INLINE int get_block_position(const AV2_COMMON *cm, int *mi_r, |
53 | | int *mi_c, int blk_row, int blk_col, |
54 | 0 | MV mv, int sign_bias) { |
55 | 0 | const int sb_tmvp_size = cm->tmvp_proc_size; |
56 | 0 | const int sb_tmvp_size_log2 = cm->tmvp_proc_sizel2; |
57 | 0 | const int base_blk_row = (blk_row >> sb_tmvp_size_log2) << sb_tmvp_size_log2; |
58 | 0 | const int base_blk_col = (blk_col >> sb_tmvp_size_log2) << sb_tmvp_size_log2; |
59 | | |
60 | | // The motion vector in units of 1/8-pel |
61 | 0 | const int shift = (3 + TMVP_MI_SZ_LOG2); |
62 | 0 | const int row_offset = |
63 | 0 | (mv.row >= 0) ? (mv.row >> shift) : -((-mv.row) >> shift); |
64 | 0 | const int col_offset = |
65 | 0 | (mv.col >= 0) ? (mv.col >> shift) : -((-mv.col) >> shift); |
66 | |
|
67 | 0 | const int row = |
68 | 0 | (sign_bias == 1) ? blk_row - row_offset : blk_row + row_offset; |
69 | 0 | const int col = |
70 | 0 | (sign_bias == 1) ? blk_col - col_offset : blk_col + col_offset; |
71 | |
|
72 | 0 | if (row < 0 || row >= (cm->mi_params.mi_rows >> TMVP_SHIFT_BITS) || col < 0 || |
73 | 0 | col >= (cm->mi_params.mi_cols >> TMVP_SHIFT_BITS)) |
74 | 0 | return 0; |
75 | | |
76 | 0 | if (row < base_blk_row - MAX_OFFSET_HEIGHT_LOG2 || |
77 | 0 | row >= base_blk_row + sb_tmvp_size + MAX_OFFSET_HEIGHT_LOG2 || |
78 | 0 | col < base_blk_col - cm->tmvp_col_offset || |
79 | 0 | col >= base_blk_col + sb_tmvp_size + cm->tmvp_col_offset) |
80 | 0 | return 0; |
81 | | |
82 | 0 | *mi_r = row; |
83 | 0 | *mi_c = col; |
84 | |
|
85 | 0 | return 1; |
86 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_block_position Unexecuted instantiation: annexF.c:get_block_position Unexecuted instantiation: decodeframe.c:get_block_position Unexecuted instantiation: decodemv.c:get_block_position Unexecuted instantiation: decoder.c:get_block_position Unexecuted instantiation: decodetxb.c:get_block_position Unexecuted instantiation: detokenize.c:get_block_position Unexecuted instantiation: obu_fgm.c:get_block_position Unexecuted instantiation: obu.c:get_block_position Unexecuted instantiation: obu_ci.c:get_block_position Unexecuted instantiation: obu_atlas.c:get_block_position Unexecuted instantiation: obu_lcr.c:get_block_position Unexecuted instantiation: obu_ops.c:get_block_position Unexecuted instantiation: obu_buf.c:get_block_position Unexecuted instantiation: intrapred_avx2.c:get_block_position Unexecuted instantiation: alloccommon.c:get_block_position Unexecuted instantiation: av2_loopfilter.c:get_block_position Unexecuted instantiation: cdef.c:get_block_position Unexecuted instantiation: gdf.c:get_block_position Unexecuted instantiation: gdf_block.c:get_block_position Unexecuted instantiation: cfl.c:get_block_position Unexecuted instantiation: entropymode.c:get_block_position Unexecuted instantiation: level.c:get_block_position Unexecuted instantiation: mvref_common.c:get_block_position Unexecuted instantiation: pred_common.c:get_block_position Unexecuted instantiation: reconinter.c:get_block_position Unexecuted instantiation: reconintra.c:get_block_position Unexecuted instantiation: restoration.c:get_block_position Unexecuted instantiation: thread_common.c:get_block_position Unexecuted instantiation: tip.c:get_block_position Unexecuted instantiation: warped_motion.c:get_block_position Unexecuted instantiation: ccso.c:get_block_position Unexecuted instantiation: bru.c:get_block_position Unexecuted instantiation: obu_qm.c:get_block_position Unexecuted instantiation: optflow_refine_sse4.c:get_block_position Unexecuted instantiation: affine_optflow_refine_avx2.c:get_block_position Unexecuted instantiation: gdf_block_avx2.c:get_block_position |
87 | | |
88 | 0 | static AVM_INLINE void get_proc_size_and_offset(AV2_COMMON *cm) { |
89 | 0 | const SequenceHeader *const seq_params = &cm->seq_params; |
90 | 0 | const int sb_size = block_size_high[seq_params->sb_size]; |
91 | 0 | const int mf_sb_size_log2 = |
92 | 0 | get_mf_sb_size_log2(sb_size, cm->mib_size_log2, cm->tmvp_sample_step); |
93 | 0 | const int mf_sb_size = (1 << mf_sb_size_log2); |
94 | 0 | const int sb_tmvp_size = (mf_sb_size >> TMVP_MI_SZ_LOG2); |
95 | |
|
96 | 0 | cm->tmvp_proc_size = sb_tmvp_size; |
97 | 0 | cm->tmvp_proc_sizel2 = mf_sb_size_log2 - TMVP_MI_SZ_LOG2; |
98 | |
|
99 | 0 | if (cm->tmvp_sample_step > 1) { |
100 | 0 | cm->tmvp_row_offset = 0; |
101 | 0 | cm->tmvp_col_offset = sb_tmvp_size; |
102 | 0 | } else { |
103 | 0 | cm->tmvp_row_offset = 0; |
104 | 0 | cm->tmvp_col_offset = (sb_tmvp_size >> 1); |
105 | 0 | } |
106 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_proc_size_and_offset Unexecuted instantiation: annexF.c:get_proc_size_and_offset Unexecuted instantiation: decodeframe.c:get_proc_size_and_offset Unexecuted instantiation: decodemv.c:get_proc_size_and_offset Unexecuted instantiation: decoder.c:get_proc_size_and_offset Unexecuted instantiation: decodetxb.c:get_proc_size_and_offset Unexecuted instantiation: detokenize.c:get_proc_size_and_offset Unexecuted instantiation: obu_fgm.c:get_proc_size_and_offset Unexecuted instantiation: obu.c:get_proc_size_and_offset Unexecuted instantiation: obu_ci.c:get_proc_size_and_offset Unexecuted instantiation: obu_atlas.c:get_proc_size_and_offset Unexecuted instantiation: obu_lcr.c:get_proc_size_and_offset Unexecuted instantiation: obu_ops.c:get_proc_size_and_offset Unexecuted instantiation: obu_buf.c:get_proc_size_and_offset Unexecuted instantiation: intrapred_avx2.c:get_proc_size_and_offset Unexecuted instantiation: alloccommon.c:get_proc_size_and_offset Unexecuted instantiation: av2_loopfilter.c:get_proc_size_and_offset Unexecuted instantiation: cdef.c:get_proc_size_and_offset Unexecuted instantiation: gdf.c:get_proc_size_and_offset Unexecuted instantiation: gdf_block.c:get_proc_size_and_offset Unexecuted instantiation: cfl.c:get_proc_size_and_offset Unexecuted instantiation: entropymode.c:get_proc_size_and_offset Unexecuted instantiation: level.c:get_proc_size_and_offset Unexecuted instantiation: mvref_common.c:get_proc_size_and_offset Unexecuted instantiation: pred_common.c:get_proc_size_and_offset Unexecuted instantiation: reconinter.c:get_proc_size_and_offset Unexecuted instantiation: reconintra.c:get_proc_size_and_offset Unexecuted instantiation: restoration.c:get_proc_size_and_offset Unexecuted instantiation: thread_common.c:get_proc_size_and_offset Unexecuted instantiation: tip.c:get_proc_size_and_offset Unexecuted instantiation: warped_motion.c:get_proc_size_and_offset Unexecuted instantiation: ccso.c:get_proc_size_and_offset Unexecuted instantiation: bru.c:get_proc_size_and_offset Unexecuted instantiation: obu_qm.c:get_proc_size_and_offset Unexecuted instantiation: optflow_refine_sse4.c:get_proc_size_and_offset Unexecuted instantiation: affine_optflow_refine_avx2.c:get_proc_size_and_offset Unexecuted instantiation: gdf_block_avx2.c:get_proc_size_and_offset |
107 | | |
108 | | static AVM_INLINE int check_block_position(const AV2_COMMON *cm, int row, |
109 | 0 | int col, int blk_row, int blk_col) { |
110 | 0 | const int sb_tmvp_size = cm->tmvp_proc_size; |
111 | 0 | const int sb_tmvp_size_log2 = cm->tmvp_proc_sizel2; |
112 | 0 | const int base_blk_row = (blk_row >> sb_tmvp_size_log2) << sb_tmvp_size_log2; |
113 | 0 | const int base_blk_col = (blk_col >> sb_tmvp_size_log2) << sb_tmvp_size_log2; |
114 | |
|
115 | 0 | if (row < 0 || row >= (cm->mi_params.mi_rows >> TMVP_SHIFT_BITS) || col < 0 || |
116 | 0 | col >= (cm->mi_params.mi_cols >> TMVP_SHIFT_BITS)) |
117 | 0 | return 0; |
118 | | |
119 | 0 | if (row < base_blk_row - MAX_OFFSET_HEIGHT_LOG2 || |
120 | 0 | row >= base_blk_row + sb_tmvp_size + MAX_OFFSET_HEIGHT_LOG2 || |
121 | 0 | col < base_blk_col - cm->tmvp_col_offset || |
122 | 0 | col >= base_blk_col + sb_tmvp_size + cm->tmvp_col_offset) |
123 | 0 | return 0; |
124 | | |
125 | 0 | return 1; |
126 | 0 | } Unexecuted instantiation: av2_dx_iface.c:check_block_position Unexecuted instantiation: annexF.c:check_block_position Unexecuted instantiation: decodeframe.c:check_block_position Unexecuted instantiation: decodemv.c:check_block_position Unexecuted instantiation: decoder.c:check_block_position Unexecuted instantiation: decodetxb.c:check_block_position Unexecuted instantiation: detokenize.c:check_block_position Unexecuted instantiation: obu_fgm.c:check_block_position Unexecuted instantiation: obu.c:check_block_position Unexecuted instantiation: obu_ci.c:check_block_position Unexecuted instantiation: obu_atlas.c:check_block_position Unexecuted instantiation: obu_lcr.c:check_block_position Unexecuted instantiation: obu_ops.c:check_block_position Unexecuted instantiation: obu_buf.c:check_block_position Unexecuted instantiation: intrapred_avx2.c:check_block_position Unexecuted instantiation: alloccommon.c:check_block_position Unexecuted instantiation: av2_loopfilter.c:check_block_position Unexecuted instantiation: cdef.c:check_block_position Unexecuted instantiation: gdf.c:check_block_position Unexecuted instantiation: gdf_block.c:check_block_position Unexecuted instantiation: cfl.c:check_block_position Unexecuted instantiation: entropymode.c:check_block_position Unexecuted instantiation: level.c:check_block_position Unexecuted instantiation: mvref_common.c:check_block_position Unexecuted instantiation: pred_common.c:check_block_position Unexecuted instantiation: reconinter.c:check_block_position Unexecuted instantiation: reconintra.c:check_block_position Unexecuted instantiation: restoration.c:check_block_position Unexecuted instantiation: thread_common.c:check_block_position Unexecuted instantiation: tip.c:check_block_position Unexecuted instantiation: warped_motion.c:check_block_position Unexecuted instantiation: ccso.c:check_block_position Unexecuted instantiation: bru.c:check_block_position Unexecuted instantiation: obu_qm.c:check_block_position Unexecuted instantiation: optflow_refine_sse4.c:check_block_position Unexecuted instantiation: affine_optflow_refine_avx2.c:check_block_position Unexecuted instantiation: gdf_block_avx2.c:check_block_position |
127 | | |
128 | | static AVM_INLINE int get_block_position_no_constraint(const AV2_COMMON *cm, |
129 | | int *mi_r, int *mi_c, |
130 | | int blk_row, int blk_col, |
131 | 0 | MV mv, int sign_bias) { |
132 | | // The motion vector in units of 1/8-pel |
133 | 0 | const int shift = (3 + TMVP_MI_SZ_LOG2); |
134 | 0 | const int row_offset = |
135 | 0 | (mv.row >= 0) ? (mv.row >> shift) : -((-mv.row) >> shift); |
136 | 0 | const int col_offset = |
137 | 0 | (mv.col >= 0) ? (mv.col >> shift) : -((-mv.col) >> shift); |
138 | |
|
139 | 0 | const int row = |
140 | 0 | (sign_bias == 1) ? blk_row - row_offset : blk_row + row_offset; |
141 | 0 | const int col = |
142 | 0 | (sign_bias == 1) ? blk_col - col_offset : blk_col + col_offset; |
143 | |
|
144 | 0 | if (row < 0 || row >= (cm->mi_params.mi_rows >> TMVP_SHIFT_BITS) || col < 0 || |
145 | 0 | col >= (cm->mi_params.mi_cols >> TMVP_SHIFT_BITS)) |
146 | 0 | return 0; |
147 | | |
148 | 0 | *mi_r = row; |
149 | 0 | *mi_c = col; |
150 | |
|
151 | 0 | return 1; |
152 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_block_position_no_constraint Unexecuted instantiation: annexF.c:get_block_position_no_constraint Unexecuted instantiation: decodeframe.c:get_block_position_no_constraint Unexecuted instantiation: decodemv.c:get_block_position_no_constraint Unexecuted instantiation: decoder.c:get_block_position_no_constraint Unexecuted instantiation: decodetxb.c:get_block_position_no_constraint Unexecuted instantiation: detokenize.c:get_block_position_no_constraint Unexecuted instantiation: obu_fgm.c:get_block_position_no_constraint Unexecuted instantiation: obu.c:get_block_position_no_constraint Unexecuted instantiation: obu_ci.c:get_block_position_no_constraint Unexecuted instantiation: obu_atlas.c:get_block_position_no_constraint Unexecuted instantiation: obu_lcr.c:get_block_position_no_constraint Unexecuted instantiation: obu_ops.c:get_block_position_no_constraint Unexecuted instantiation: obu_buf.c:get_block_position_no_constraint Unexecuted instantiation: intrapred_avx2.c:get_block_position_no_constraint Unexecuted instantiation: alloccommon.c:get_block_position_no_constraint Unexecuted instantiation: av2_loopfilter.c:get_block_position_no_constraint Unexecuted instantiation: cdef.c:get_block_position_no_constraint Unexecuted instantiation: gdf.c:get_block_position_no_constraint Unexecuted instantiation: gdf_block.c:get_block_position_no_constraint Unexecuted instantiation: cfl.c:get_block_position_no_constraint Unexecuted instantiation: entropymode.c:get_block_position_no_constraint Unexecuted instantiation: level.c:get_block_position_no_constraint Unexecuted instantiation: mvref_common.c:get_block_position_no_constraint Unexecuted instantiation: pred_common.c:get_block_position_no_constraint Unexecuted instantiation: reconinter.c:get_block_position_no_constraint Unexecuted instantiation: reconintra.c:get_block_position_no_constraint Unexecuted instantiation: restoration.c:get_block_position_no_constraint Unexecuted instantiation: thread_common.c:get_block_position_no_constraint Unexecuted instantiation: tip.c:get_block_position_no_constraint Unexecuted instantiation: warped_motion.c:get_block_position_no_constraint Unexecuted instantiation: ccso.c:get_block_position_no_constraint Unexecuted instantiation: bru.c:get_block_position_no_constraint Unexecuted instantiation: obu_qm.c:get_block_position_no_constraint Unexecuted instantiation: optflow_refine_sse4.c:get_block_position_no_constraint Unexecuted instantiation: affine_optflow_refine_avx2.c:get_block_position_no_constraint Unexecuted instantiation: gdf_block_avx2.c:get_block_position_no_constraint |
153 | | |
154 | | // clamp_mv_ref |
155 | 639k | #define MV_BORDER (16 << 3) // Allow 16 pels in 1/8th pel units |
156 | | |
157 | 159k | static INLINE void clamp_mv_ref(MV *mv, int bw, int bh, const MACROBLOCKD *xd) { |
158 | 159k | const SubpelMvLimits mv_limits = { |
159 | 159k | xd->mb_to_left_edge - GET_MV_SUBPEL(bw) - MV_BORDER, |
160 | 159k | xd->mb_to_right_edge + GET_MV_SUBPEL(bw) + MV_BORDER, |
161 | 159k | xd->mb_to_top_edge - GET_MV_SUBPEL(bh) - MV_BORDER, |
162 | 159k | xd->mb_to_bottom_edge + GET_MV_SUBPEL(bh) + MV_BORDER |
163 | 159k | }; |
164 | 159k | clamp_mv(mv, &mv_limits); |
165 | 159k | } Unexecuted instantiation: av2_dx_iface.c:clamp_mv_ref Unexecuted instantiation: annexF.c:clamp_mv_ref Unexecuted instantiation: decodeframe.c:clamp_mv_ref Unexecuted instantiation: decodemv.c:clamp_mv_ref Unexecuted instantiation: decoder.c:clamp_mv_ref Unexecuted instantiation: decodetxb.c:clamp_mv_ref Unexecuted instantiation: detokenize.c:clamp_mv_ref Unexecuted instantiation: obu_fgm.c:clamp_mv_ref Unexecuted instantiation: obu.c:clamp_mv_ref Unexecuted instantiation: obu_ci.c:clamp_mv_ref Unexecuted instantiation: obu_atlas.c:clamp_mv_ref Unexecuted instantiation: obu_lcr.c:clamp_mv_ref Unexecuted instantiation: obu_ops.c:clamp_mv_ref Unexecuted instantiation: obu_buf.c:clamp_mv_ref Unexecuted instantiation: intrapred_avx2.c:clamp_mv_ref Unexecuted instantiation: alloccommon.c:clamp_mv_ref Unexecuted instantiation: av2_loopfilter.c:clamp_mv_ref Unexecuted instantiation: cdef.c:clamp_mv_ref Unexecuted instantiation: gdf.c:clamp_mv_ref Unexecuted instantiation: gdf_block.c:clamp_mv_ref Unexecuted instantiation: cfl.c:clamp_mv_ref Unexecuted instantiation: entropymode.c:clamp_mv_ref Unexecuted instantiation: level.c:clamp_mv_ref mvref_common.c:clamp_mv_ref Line | Count | Source | 157 | 159k | static INLINE void clamp_mv_ref(MV *mv, int bw, int bh, const MACROBLOCKD *xd) { | 158 | 159k | const SubpelMvLimits mv_limits = { | 159 | 159k | xd->mb_to_left_edge - GET_MV_SUBPEL(bw) - MV_BORDER, | 160 | 159k | xd->mb_to_right_edge + GET_MV_SUBPEL(bw) + MV_BORDER, | 161 | 159k | xd->mb_to_top_edge - GET_MV_SUBPEL(bh) - MV_BORDER, | 162 | 159k | xd->mb_to_bottom_edge + GET_MV_SUBPEL(bh) + MV_BORDER | 163 | 159k | }; | 164 | 159k | clamp_mv(mv, &mv_limits); | 165 | 159k | } |
Unexecuted instantiation: pred_common.c:clamp_mv_ref Unexecuted instantiation: reconinter.c:clamp_mv_ref Unexecuted instantiation: reconintra.c:clamp_mv_ref Unexecuted instantiation: restoration.c:clamp_mv_ref Unexecuted instantiation: thread_common.c:clamp_mv_ref Unexecuted instantiation: tip.c:clamp_mv_ref Unexecuted instantiation: warped_motion.c:clamp_mv_ref Unexecuted instantiation: ccso.c:clamp_mv_ref Unexecuted instantiation: bru.c:clamp_mv_ref Unexecuted instantiation: obu_qm.c:clamp_mv_ref Unexecuted instantiation: optflow_refine_sse4.c:clamp_mv_ref Unexecuted instantiation: affine_optflow_refine_avx2.c:clamp_mv_ref Unexecuted instantiation: gdf_block_avx2.c:clamp_mv_ref |
166 | | |
167 | | static INLINE int opfl_get_subblock_size(int bw, int bh, int plane, |
168 | 130k | int use_4x4) { |
169 | 130k | return ((plane || (bh <= 8 && bw <= 8)) && use_4x4) ? OF_MIN_BSIZE : OF_BSIZE; |
170 | 130k | } Unexecuted instantiation: av2_dx_iface.c:opfl_get_subblock_size Unexecuted instantiation: annexF.c:opfl_get_subblock_size Unexecuted instantiation: decodeframe.c:opfl_get_subblock_size Unexecuted instantiation: decodemv.c:opfl_get_subblock_size Unexecuted instantiation: decoder.c:opfl_get_subblock_size Unexecuted instantiation: decodetxb.c:opfl_get_subblock_size Unexecuted instantiation: detokenize.c:opfl_get_subblock_size Unexecuted instantiation: obu_fgm.c:opfl_get_subblock_size Unexecuted instantiation: obu.c:opfl_get_subblock_size Unexecuted instantiation: obu_ci.c:opfl_get_subblock_size Unexecuted instantiation: obu_atlas.c:opfl_get_subblock_size Unexecuted instantiation: obu_lcr.c:opfl_get_subblock_size Unexecuted instantiation: obu_ops.c:opfl_get_subblock_size Unexecuted instantiation: obu_buf.c:opfl_get_subblock_size Unexecuted instantiation: intrapred_avx2.c:opfl_get_subblock_size Unexecuted instantiation: alloccommon.c:opfl_get_subblock_size Unexecuted instantiation: av2_loopfilter.c:opfl_get_subblock_size Unexecuted instantiation: cdef.c:opfl_get_subblock_size Unexecuted instantiation: gdf.c:opfl_get_subblock_size Unexecuted instantiation: gdf_block.c:opfl_get_subblock_size Unexecuted instantiation: cfl.c:opfl_get_subblock_size Unexecuted instantiation: entropymode.c:opfl_get_subblock_size Unexecuted instantiation: level.c:opfl_get_subblock_size Unexecuted instantiation: mvref_common.c:opfl_get_subblock_size Unexecuted instantiation: pred_common.c:opfl_get_subblock_size reconinter.c:opfl_get_subblock_size Line | Count | Source | 168 | 130k | int use_4x4) { | 169 | 130k | return ((plane || (bh <= 8 && bw <= 8)) && use_4x4) ? OF_MIN_BSIZE : OF_BSIZE; | 170 | 130k | } |
Unexecuted instantiation: reconintra.c:opfl_get_subblock_size Unexecuted instantiation: restoration.c:opfl_get_subblock_size Unexecuted instantiation: thread_common.c:opfl_get_subblock_size Unexecuted instantiation: tip.c:opfl_get_subblock_size Unexecuted instantiation: warped_motion.c:opfl_get_subblock_size Unexecuted instantiation: ccso.c:opfl_get_subblock_size Unexecuted instantiation: bru.c:opfl_get_subblock_size Unexecuted instantiation: obu_qm.c:opfl_get_subblock_size Unexecuted instantiation: optflow_refine_sse4.c:opfl_get_subblock_size Unexecuted instantiation: affine_optflow_refine_avx2.c:opfl_get_subblock_size Unexecuted instantiation: gdf_block_avx2.c:opfl_get_subblock_size |
171 | | |
172 | | // Get the OPFL sub-block size based on luma component and derive |
173 | | // sub-block size for chroma based on sub-sampling. |
174 | | static INLINE void opfl_subblock_size_plane(const MACROBLOCKD *xd, int plane, |
175 | | int use_4x4, int *opfl_sub_bw, |
176 | 130k | int *opfl_sub_bh) { |
177 | 130k | const int width_y = xd->plane[AVM_PLANE_Y].width; |
178 | 130k | const int height_y = xd->plane[AVM_PLANE_Y].height; |
179 | 130k | const int sub_bsize_y = |
180 | 130k | opfl_get_subblock_size(width_y, height_y, AVM_PLANE_Y, use_4x4); |
181 | 130k | *opfl_sub_bw = |
182 | 130k | AVMMAX((sub_bsize_y >> xd->plane[plane].subsampling_x), OF_MIN_BSIZE); |
183 | 130k | *opfl_sub_bh = |
184 | 130k | AVMMAX((sub_bsize_y >> xd->plane[plane].subsampling_y), OF_MIN_BSIZE); |
185 | 130k | } Unexecuted instantiation: av2_dx_iface.c:opfl_subblock_size_plane Unexecuted instantiation: annexF.c:opfl_subblock_size_plane Unexecuted instantiation: decodeframe.c:opfl_subblock_size_plane Unexecuted instantiation: decodemv.c:opfl_subblock_size_plane Unexecuted instantiation: decoder.c:opfl_subblock_size_plane Unexecuted instantiation: decodetxb.c:opfl_subblock_size_plane Unexecuted instantiation: detokenize.c:opfl_subblock_size_plane Unexecuted instantiation: obu_fgm.c:opfl_subblock_size_plane Unexecuted instantiation: obu.c:opfl_subblock_size_plane Unexecuted instantiation: obu_ci.c:opfl_subblock_size_plane Unexecuted instantiation: obu_atlas.c:opfl_subblock_size_plane Unexecuted instantiation: obu_lcr.c:opfl_subblock_size_plane Unexecuted instantiation: obu_ops.c:opfl_subblock_size_plane Unexecuted instantiation: obu_buf.c:opfl_subblock_size_plane Unexecuted instantiation: intrapred_avx2.c:opfl_subblock_size_plane Unexecuted instantiation: alloccommon.c:opfl_subblock_size_plane Unexecuted instantiation: av2_loopfilter.c:opfl_subblock_size_plane Unexecuted instantiation: cdef.c:opfl_subblock_size_plane Unexecuted instantiation: gdf.c:opfl_subblock_size_plane Unexecuted instantiation: gdf_block.c:opfl_subblock_size_plane Unexecuted instantiation: cfl.c:opfl_subblock_size_plane Unexecuted instantiation: entropymode.c:opfl_subblock_size_plane Unexecuted instantiation: level.c:opfl_subblock_size_plane Unexecuted instantiation: mvref_common.c:opfl_subblock_size_plane Unexecuted instantiation: pred_common.c:opfl_subblock_size_plane reconinter.c:opfl_subblock_size_plane Line | Count | Source | 176 | 130k | int *opfl_sub_bh) { | 177 | 130k | const int width_y = xd->plane[AVM_PLANE_Y].width; | 178 | 130k | const int height_y = xd->plane[AVM_PLANE_Y].height; | 179 | 130k | const int sub_bsize_y = | 180 | 130k | opfl_get_subblock_size(width_y, height_y, AVM_PLANE_Y, use_4x4); | 181 | 130k | *opfl_sub_bw = | 182 | 130k | AVMMAX((sub_bsize_y >> xd->plane[plane].subsampling_x), OF_MIN_BSIZE); | 183 | 130k | *opfl_sub_bh = | 184 | 130k | AVMMAX((sub_bsize_y >> xd->plane[plane].subsampling_y), OF_MIN_BSIZE); | 185 | 130k | } |
Unexecuted instantiation: reconintra.c:opfl_subblock_size_plane Unexecuted instantiation: restoration.c:opfl_subblock_size_plane Unexecuted instantiation: thread_common.c:opfl_subblock_size_plane Unexecuted instantiation: tip.c:opfl_subblock_size_plane Unexecuted instantiation: warped_motion.c:opfl_subblock_size_plane Unexecuted instantiation: ccso.c:opfl_subblock_size_plane Unexecuted instantiation: bru.c:opfl_subblock_size_plane Unexecuted instantiation: obu_qm.c:opfl_subblock_size_plane Unexecuted instantiation: optflow_refine_sse4.c:opfl_subblock_size_plane Unexecuted instantiation: affine_optflow_refine_avx2.c:opfl_subblock_size_plane Unexecuted instantiation: gdf_block_avx2.c:opfl_subblock_size_plane |
186 | | |
187 | | static INLINE int32_t get_subblk_offset_x_hp(const int32_t *wmmat, |
188 | | int subblk_center_x, |
189 | | int subblk_center_y, |
190 | 0 | int unit_offset) { |
191 | 0 | const int32_t subblk_offset_x_hp = (int32_t)clamp64( |
192 | 0 | ((int64_t)(wmmat[2] - unit_offset) * subblk_center_x + |
193 | 0 | (int64_t)wmmat[3] * subblk_center_y + (int64_t)wmmat[0]), |
194 | 0 | INT32_MIN, INT32_MAX); |
195 | 0 | return subblk_offset_x_hp; |
196 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_subblk_offset_x_hp Unexecuted instantiation: annexF.c:get_subblk_offset_x_hp Unexecuted instantiation: decodeframe.c:get_subblk_offset_x_hp Unexecuted instantiation: decodemv.c:get_subblk_offset_x_hp Unexecuted instantiation: decoder.c:get_subblk_offset_x_hp Unexecuted instantiation: decodetxb.c:get_subblk_offset_x_hp Unexecuted instantiation: detokenize.c:get_subblk_offset_x_hp Unexecuted instantiation: obu_fgm.c:get_subblk_offset_x_hp Unexecuted instantiation: obu.c:get_subblk_offset_x_hp Unexecuted instantiation: obu_ci.c:get_subblk_offset_x_hp Unexecuted instantiation: obu_atlas.c:get_subblk_offset_x_hp Unexecuted instantiation: obu_lcr.c:get_subblk_offset_x_hp Unexecuted instantiation: obu_ops.c:get_subblk_offset_x_hp Unexecuted instantiation: obu_buf.c:get_subblk_offset_x_hp Unexecuted instantiation: intrapred_avx2.c:get_subblk_offset_x_hp Unexecuted instantiation: alloccommon.c:get_subblk_offset_x_hp Unexecuted instantiation: av2_loopfilter.c:get_subblk_offset_x_hp Unexecuted instantiation: cdef.c:get_subblk_offset_x_hp Unexecuted instantiation: gdf.c:get_subblk_offset_x_hp Unexecuted instantiation: gdf_block.c:get_subblk_offset_x_hp Unexecuted instantiation: cfl.c:get_subblk_offset_x_hp Unexecuted instantiation: entropymode.c:get_subblk_offset_x_hp Unexecuted instantiation: level.c:get_subblk_offset_x_hp Unexecuted instantiation: mvref_common.c:get_subblk_offset_x_hp Unexecuted instantiation: pred_common.c:get_subblk_offset_x_hp Unexecuted instantiation: reconinter.c:get_subblk_offset_x_hp Unexecuted instantiation: reconintra.c:get_subblk_offset_x_hp Unexecuted instantiation: restoration.c:get_subblk_offset_x_hp Unexecuted instantiation: thread_common.c:get_subblk_offset_x_hp Unexecuted instantiation: tip.c:get_subblk_offset_x_hp Unexecuted instantiation: warped_motion.c:get_subblk_offset_x_hp Unexecuted instantiation: ccso.c:get_subblk_offset_x_hp Unexecuted instantiation: bru.c:get_subblk_offset_x_hp Unexecuted instantiation: obu_qm.c:get_subblk_offset_x_hp Unexecuted instantiation: optflow_refine_sse4.c:get_subblk_offset_x_hp Unexecuted instantiation: affine_optflow_refine_avx2.c:get_subblk_offset_x_hp Unexecuted instantiation: gdf_block_avx2.c:get_subblk_offset_x_hp |
197 | | |
198 | | static INLINE int32_t get_subblk_offset_y_hp(const int32_t *wmmat, |
199 | | int subblk_center_x, |
200 | | int subblk_center_y, |
201 | 0 | int unit_offset) { |
202 | 0 | const int32_t subblk_offset_y_hp = (int32_t)clamp64( |
203 | 0 | ((int64_t)wmmat[4] * subblk_center_x + |
204 | 0 | (int64_t)(wmmat[5] - unit_offset) * subblk_center_y + (int64_t)wmmat[1]), |
205 | 0 | INT32_MIN, INT32_MAX); |
206 | 0 | return subblk_offset_y_hp; |
207 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_subblk_offset_y_hp Unexecuted instantiation: annexF.c:get_subblk_offset_y_hp Unexecuted instantiation: decodeframe.c:get_subblk_offset_y_hp Unexecuted instantiation: decodemv.c:get_subblk_offset_y_hp Unexecuted instantiation: decoder.c:get_subblk_offset_y_hp Unexecuted instantiation: decodetxb.c:get_subblk_offset_y_hp Unexecuted instantiation: detokenize.c:get_subblk_offset_y_hp Unexecuted instantiation: obu_fgm.c:get_subblk_offset_y_hp Unexecuted instantiation: obu.c:get_subblk_offset_y_hp Unexecuted instantiation: obu_ci.c:get_subblk_offset_y_hp Unexecuted instantiation: obu_atlas.c:get_subblk_offset_y_hp Unexecuted instantiation: obu_lcr.c:get_subblk_offset_y_hp Unexecuted instantiation: obu_ops.c:get_subblk_offset_y_hp Unexecuted instantiation: obu_buf.c:get_subblk_offset_y_hp Unexecuted instantiation: intrapred_avx2.c:get_subblk_offset_y_hp Unexecuted instantiation: alloccommon.c:get_subblk_offset_y_hp Unexecuted instantiation: av2_loopfilter.c:get_subblk_offset_y_hp Unexecuted instantiation: cdef.c:get_subblk_offset_y_hp Unexecuted instantiation: gdf.c:get_subblk_offset_y_hp Unexecuted instantiation: gdf_block.c:get_subblk_offset_y_hp Unexecuted instantiation: cfl.c:get_subblk_offset_y_hp Unexecuted instantiation: entropymode.c:get_subblk_offset_y_hp Unexecuted instantiation: level.c:get_subblk_offset_y_hp Unexecuted instantiation: mvref_common.c:get_subblk_offset_y_hp Unexecuted instantiation: pred_common.c:get_subblk_offset_y_hp Unexecuted instantiation: reconinter.c:get_subblk_offset_y_hp Unexecuted instantiation: reconintra.c:get_subblk_offset_y_hp Unexecuted instantiation: restoration.c:get_subblk_offset_y_hp Unexecuted instantiation: thread_common.c:get_subblk_offset_y_hp Unexecuted instantiation: tip.c:get_subblk_offset_y_hp Unexecuted instantiation: warped_motion.c:get_subblk_offset_y_hp Unexecuted instantiation: ccso.c:get_subblk_offset_y_hp Unexecuted instantiation: bru.c:get_subblk_offset_y_hp Unexecuted instantiation: obu_qm.c:get_subblk_offset_y_hp Unexecuted instantiation: optflow_refine_sse4.c:get_subblk_offset_y_hp Unexecuted instantiation: affine_optflow_refine_avx2.c:get_subblk_offset_y_hp Unexecuted instantiation: gdf_block_avx2.c:get_subblk_offset_y_hp |
208 | | |
209 | | // Convert a global motion vector into a motion vector at the centre of the |
210 | | // given block. |
211 | | // |
212 | | // The resulting motion vector will have three fractional bits of precision. If |
213 | | // precision < MV_SUBPEL_EIGHTH, the bottom bit will always be zero. If |
214 | | // CONFIG_AMVR and precision == MV_SUBPEL_NONE, the bottom three bits will be |
215 | | // zero (so the motion vector represents an integer) |
216 | | static INLINE int_mv get_warp_motion_vector(const MACROBLOCKD *xd, |
217 | | const WarpedMotionParams *model, |
218 | | MvSubpelPrecision precision, |
219 | | BLOCK_SIZE bsize, int mi_col, |
220 | 0 | int mi_row) { |
221 | 0 | int_mv res; |
222 | |
|
223 | 0 | const int32_t *mat = model->wmmat; |
224 | 0 | int x, y, tx, ty; |
225 | |
|
226 | 0 | if (model->wmtype == IDENTITY || model->wmtype == TRANSLATION) { |
227 | 0 | tx = convert_to_trans_prec(precision, model->wmmat[0]); |
228 | 0 | ty = convert_to_trans_prec(precision, model->wmmat[1]); |
229 | |
|
230 | 0 | res.as_mv.row = clamp(ty, MV_LOW + 1, MV_UPP - 1); |
231 | 0 | res.as_mv.col = clamp(tx, MV_LOW + 1, MV_UPP - 1); |
232 | |
|
233 | 0 | clamp_mv_ref(&res.as_mv, xd->width << MI_SIZE_LOG2, |
234 | 0 | xd->height << MI_SIZE_LOG2, xd); |
235 | | |
236 | | // When subblock warp mv is enabled. The precision is kept as higherst |
237 | | // regardless the frame level mv during search |
238 | 0 | if (precision < MV_PRECISION_HALF_PEL) |
239 | 0 | lower_mv_precision(&res.as_mv, precision); |
240 | 0 | return res; |
241 | 0 | } |
242 | | |
243 | 0 | x = block_center_x(mi_col, bsize); |
244 | 0 | y = block_center_y(mi_row, bsize); |
245 | |
|
246 | 0 | if (model->wmtype == ROTZOOM) { |
247 | 0 | assert(model->wmmat[5] == model->wmmat[2]); |
248 | 0 | assert(model->wmmat[4] == -model->wmmat[3]); |
249 | 0 | } |
250 | |
|
251 | 0 | const int xc = get_subblk_offset_x_hp(mat, x, y, 1 << WARPEDMODEL_PREC_BITS); |
252 | 0 | const int yc = get_subblk_offset_y_hp(mat, x, y, 1 << WARPEDMODEL_PREC_BITS); |
253 | |
|
254 | 0 | tx = convert_to_trans_prec(precision, xc); |
255 | 0 | ty = convert_to_trans_prec(precision, yc); |
256 | |
|
257 | 0 | res.as_mv.row = clamp(ty, MV_LOW + 1, MV_UPP - 1); |
258 | 0 | res.as_mv.col = clamp(tx, MV_LOW + 1, MV_UPP - 1); |
259 | |
|
260 | 0 | clamp_mv_ref(&res.as_mv, xd->width << MI_SIZE_LOG2, |
261 | 0 | xd->height << MI_SIZE_LOG2, xd); |
262 | |
|
263 | 0 | if (precision < MV_PRECISION_HALF_PEL) |
264 | 0 | lower_mv_precision(&res.as_mv, precision); |
265 | 0 | return res; |
266 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_warp_motion_vector Unexecuted instantiation: annexF.c:get_warp_motion_vector Unexecuted instantiation: decodeframe.c:get_warp_motion_vector Unexecuted instantiation: decodemv.c:get_warp_motion_vector Unexecuted instantiation: decoder.c:get_warp_motion_vector Unexecuted instantiation: decodetxb.c:get_warp_motion_vector Unexecuted instantiation: detokenize.c:get_warp_motion_vector Unexecuted instantiation: obu_fgm.c:get_warp_motion_vector Unexecuted instantiation: obu.c:get_warp_motion_vector Unexecuted instantiation: obu_ci.c:get_warp_motion_vector Unexecuted instantiation: obu_atlas.c:get_warp_motion_vector Unexecuted instantiation: obu_lcr.c:get_warp_motion_vector Unexecuted instantiation: obu_ops.c:get_warp_motion_vector Unexecuted instantiation: obu_buf.c:get_warp_motion_vector Unexecuted instantiation: intrapred_avx2.c:get_warp_motion_vector Unexecuted instantiation: alloccommon.c:get_warp_motion_vector Unexecuted instantiation: av2_loopfilter.c:get_warp_motion_vector Unexecuted instantiation: cdef.c:get_warp_motion_vector Unexecuted instantiation: gdf.c:get_warp_motion_vector Unexecuted instantiation: gdf_block.c:get_warp_motion_vector Unexecuted instantiation: cfl.c:get_warp_motion_vector Unexecuted instantiation: entropymode.c:get_warp_motion_vector Unexecuted instantiation: level.c:get_warp_motion_vector Unexecuted instantiation: mvref_common.c:get_warp_motion_vector Unexecuted instantiation: pred_common.c:get_warp_motion_vector Unexecuted instantiation: reconinter.c:get_warp_motion_vector Unexecuted instantiation: reconintra.c:get_warp_motion_vector Unexecuted instantiation: restoration.c:get_warp_motion_vector Unexecuted instantiation: thread_common.c:get_warp_motion_vector Unexecuted instantiation: tip.c:get_warp_motion_vector Unexecuted instantiation: warped_motion.c:get_warp_motion_vector Unexecuted instantiation: ccso.c:get_warp_motion_vector Unexecuted instantiation: bru.c:get_warp_motion_vector Unexecuted instantiation: obu_qm.c:get_warp_motion_vector Unexecuted instantiation: optflow_refine_sse4.c:get_warp_motion_vector Unexecuted instantiation: affine_optflow_refine_avx2.c:get_warp_motion_vector Unexecuted instantiation: gdf_block_avx2.c:get_warp_motion_vector |
267 | | |
268 | | // compute the center motion vector from warp model, aligned funcitons within |
269 | | // warped_motion.c |
270 | | static INLINE int_mv get_int_warp_mv_for_fb(const MACROBLOCKD *xd, |
271 | | const WarpedMotionParams *model, |
272 | | int bw, int bh, int mi_col, |
273 | 0 | int mi_row) { |
274 | | // in term of luma for this function |
275 | 0 | int_mv res; |
276 | |
|
277 | 0 | const int32_t *mat = model->wmmat; |
278 | 0 | int x, y, tx, ty; |
279 | | |
280 | | // center without shift 1, matching with warp_motion.c |
281 | 0 | x = mi_col * MI_SIZE + (bw >> 1); |
282 | 0 | y = mi_row * MI_SIZE + (bh >> 1); |
283 | |
|
284 | 0 | if (model->wmtype == ROTZOOM) { |
285 | 0 | assert(model->wmmat[5] == model->wmmat[2]); |
286 | 0 | assert(model->wmmat[4] == -model->wmmat[3]); |
287 | 0 | } |
288 | | |
289 | | // here is mv |
290 | 0 | const int xc = |
291 | 0 | get_subblk_offset_x_hp(mat, x, y, (1 << WARPEDMODEL_PREC_BITS)); |
292 | 0 | const int yc = |
293 | 0 | get_subblk_offset_y_hp(mat, x, y, (1 << WARPEDMODEL_PREC_BITS)); |
294 | | |
295 | | // down shift to 1/8th pel, match with warped_motion.c |
296 | 0 | tx = xc >> (WARPEDMODEL_PREC_BITS - 3); |
297 | 0 | ty = yc >> (WARPEDMODEL_PREC_BITS - 3); |
298 | |
|
299 | 0 | res.as_mv.row = clamp(ty, MV_LOW + 1, MV_UPP - 1); |
300 | 0 | res.as_mv.col = clamp(tx, MV_LOW + 1, MV_UPP - 1); |
301 | |
|
302 | 0 | clamp_mv_ref(&res.as_mv, xd->width << MI_SIZE_LOG2, |
303 | 0 | xd->height << MI_SIZE_LOG2, xd); |
304 | 0 | return res; |
305 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_int_warp_mv_for_fb Unexecuted instantiation: annexF.c:get_int_warp_mv_for_fb Unexecuted instantiation: decodeframe.c:get_int_warp_mv_for_fb Unexecuted instantiation: decodemv.c:get_int_warp_mv_for_fb Unexecuted instantiation: decoder.c:get_int_warp_mv_for_fb Unexecuted instantiation: decodetxb.c:get_int_warp_mv_for_fb Unexecuted instantiation: detokenize.c:get_int_warp_mv_for_fb Unexecuted instantiation: obu_fgm.c:get_int_warp_mv_for_fb Unexecuted instantiation: obu.c:get_int_warp_mv_for_fb Unexecuted instantiation: obu_ci.c:get_int_warp_mv_for_fb Unexecuted instantiation: obu_atlas.c:get_int_warp_mv_for_fb Unexecuted instantiation: obu_lcr.c:get_int_warp_mv_for_fb Unexecuted instantiation: obu_ops.c:get_int_warp_mv_for_fb Unexecuted instantiation: obu_buf.c:get_int_warp_mv_for_fb Unexecuted instantiation: intrapred_avx2.c:get_int_warp_mv_for_fb Unexecuted instantiation: alloccommon.c:get_int_warp_mv_for_fb Unexecuted instantiation: av2_loopfilter.c:get_int_warp_mv_for_fb Unexecuted instantiation: cdef.c:get_int_warp_mv_for_fb Unexecuted instantiation: gdf.c:get_int_warp_mv_for_fb Unexecuted instantiation: gdf_block.c:get_int_warp_mv_for_fb Unexecuted instantiation: cfl.c:get_int_warp_mv_for_fb Unexecuted instantiation: entropymode.c:get_int_warp_mv_for_fb Unexecuted instantiation: level.c:get_int_warp_mv_for_fb Unexecuted instantiation: mvref_common.c:get_int_warp_mv_for_fb Unexecuted instantiation: pred_common.c:get_int_warp_mv_for_fb Unexecuted instantiation: reconinter.c:get_int_warp_mv_for_fb Unexecuted instantiation: reconintra.c:get_int_warp_mv_for_fb Unexecuted instantiation: restoration.c:get_int_warp_mv_for_fb Unexecuted instantiation: thread_common.c:get_int_warp_mv_for_fb Unexecuted instantiation: tip.c:get_int_warp_mv_for_fb Unexecuted instantiation: warped_motion.c:get_int_warp_mv_for_fb Unexecuted instantiation: ccso.c:get_int_warp_mv_for_fb Unexecuted instantiation: bru.c:get_int_warp_mv_for_fb Unexecuted instantiation: obu_qm.c:get_int_warp_mv_for_fb Unexecuted instantiation: optflow_refine_sse4.c:get_int_warp_mv_for_fb Unexecuted instantiation: affine_optflow_refine_avx2.c:get_int_warp_mv_for_fb Unexecuted instantiation: gdf_block_avx2.c:get_int_warp_mv_for_fb |
306 | | |
307 | | static INLINE int_mv get_block_mv(const MB_MODE_INFO *candidate, |
308 | 323k | const SUBMB_INFO *submi, int which_mv) { |
309 | 323k | return is_warp_mode(candidate->motion_mode) ? submi->mv[which_mv] |
310 | 323k | : candidate->mv[which_mv]; |
311 | 323k | } Unexecuted instantiation: av2_dx_iface.c:get_block_mv Unexecuted instantiation: annexF.c:get_block_mv Unexecuted instantiation: decodeframe.c:get_block_mv Unexecuted instantiation: decodemv.c:get_block_mv Unexecuted instantiation: decoder.c:get_block_mv Unexecuted instantiation: decodetxb.c:get_block_mv Unexecuted instantiation: detokenize.c:get_block_mv Unexecuted instantiation: obu_fgm.c:get_block_mv Unexecuted instantiation: obu.c:get_block_mv Unexecuted instantiation: obu_ci.c:get_block_mv Unexecuted instantiation: obu_atlas.c:get_block_mv Unexecuted instantiation: obu_lcr.c:get_block_mv Unexecuted instantiation: obu_ops.c:get_block_mv Unexecuted instantiation: obu_buf.c:get_block_mv Unexecuted instantiation: intrapred_avx2.c:get_block_mv Unexecuted instantiation: alloccommon.c:get_block_mv Unexecuted instantiation: av2_loopfilter.c:get_block_mv Unexecuted instantiation: cdef.c:get_block_mv Unexecuted instantiation: gdf.c:get_block_mv Unexecuted instantiation: gdf_block.c:get_block_mv Unexecuted instantiation: cfl.c:get_block_mv Unexecuted instantiation: entropymode.c:get_block_mv Unexecuted instantiation: level.c:get_block_mv mvref_common.c:get_block_mv Line | Count | Source | 308 | 323k | const SUBMB_INFO *submi, int which_mv) { | 309 | 323k | return is_warp_mode(candidate->motion_mode) ? submi->mv[which_mv] | 310 | 323k | : candidate->mv[which_mv]; | 311 | 323k | } |
Unexecuted instantiation: pred_common.c:get_block_mv Unexecuted instantiation: reconinter.c:get_block_mv Unexecuted instantiation: reconintra.c:get_block_mv Unexecuted instantiation: restoration.c:get_block_mv Unexecuted instantiation: thread_common.c:get_block_mv Unexecuted instantiation: tip.c:get_block_mv Unexecuted instantiation: warped_motion.c:get_block_mv Unexecuted instantiation: ccso.c:get_block_mv Unexecuted instantiation: bru.c:get_block_mv Unexecuted instantiation: obu_qm.c:get_block_mv Unexecuted instantiation: optflow_refine_sse4.c:get_block_mv Unexecuted instantiation: affine_optflow_refine_avx2.c:get_block_mv Unexecuted instantiation: gdf_block_avx2.c:get_block_mv |
312 | | // return derive MV from the ref_warp_model |
313 | | // ref_warp_model is extracted from the WRL listb before calling this function |
314 | | static INLINE int_mv get_mv_from_wrl(const MACROBLOCKD *xd, |
315 | | const WarpedMotionParams *ref_warp_model, |
316 | | MvSubpelPrecision pb_mv_precision, |
317 | 0 | BLOCK_SIZE bsize, int mi_col, int mi_row) { |
318 | 0 | int_mv mv; |
319 | 0 | assert(ref_warp_model); |
320 | 0 | mv = get_warp_motion_vector(xd, ref_warp_model, pb_mv_precision, bsize, |
321 | 0 | mi_col, mi_row); |
322 | 0 | return mv; |
323 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_mv_from_wrl Unexecuted instantiation: annexF.c:get_mv_from_wrl Unexecuted instantiation: decodeframe.c:get_mv_from_wrl Unexecuted instantiation: decodemv.c:get_mv_from_wrl Unexecuted instantiation: decoder.c:get_mv_from_wrl Unexecuted instantiation: decodetxb.c:get_mv_from_wrl Unexecuted instantiation: detokenize.c:get_mv_from_wrl Unexecuted instantiation: obu_fgm.c:get_mv_from_wrl Unexecuted instantiation: obu.c:get_mv_from_wrl Unexecuted instantiation: obu_ci.c:get_mv_from_wrl Unexecuted instantiation: obu_atlas.c:get_mv_from_wrl Unexecuted instantiation: obu_lcr.c:get_mv_from_wrl Unexecuted instantiation: obu_ops.c:get_mv_from_wrl Unexecuted instantiation: obu_buf.c:get_mv_from_wrl Unexecuted instantiation: intrapred_avx2.c:get_mv_from_wrl Unexecuted instantiation: alloccommon.c:get_mv_from_wrl Unexecuted instantiation: av2_loopfilter.c:get_mv_from_wrl Unexecuted instantiation: cdef.c:get_mv_from_wrl Unexecuted instantiation: gdf.c:get_mv_from_wrl Unexecuted instantiation: gdf_block.c:get_mv_from_wrl Unexecuted instantiation: cfl.c:get_mv_from_wrl Unexecuted instantiation: entropymode.c:get_mv_from_wrl Unexecuted instantiation: level.c:get_mv_from_wrl Unexecuted instantiation: mvref_common.c:get_mv_from_wrl Unexecuted instantiation: pred_common.c:get_mv_from_wrl Unexecuted instantiation: reconinter.c:get_mv_from_wrl Unexecuted instantiation: reconintra.c:get_mv_from_wrl Unexecuted instantiation: restoration.c:get_mv_from_wrl Unexecuted instantiation: thread_common.c:get_mv_from_wrl Unexecuted instantiation: tip.c:get_mv_from_wrl Unexecuted instantiation: warped_motion.c:get_mv_from_wrl Unexecuted instantiation: ccso.c:get_mv_from_wrl Unexecuted instantiation: bru.c:get_mv_from_wrl Unexecuted instantiation: obu_qm.c:get_mv_from_wrl Unexecuted instantiation: optflow_refine_sse4.c:get_mv_from_wrl Unexecuted instantiation: affine_optflow_refine_avx2.c:get_mv_from_wrl Unexecuted instantiation: gdf_block_avx2.c:get_mv_from_wrl |
324 | | |
325 | | // Checks that the given mi_row, mi_col and search point |
326 | | // are inside the borders of the tile. |
327 | | static INLINE int is_inside(const TileInfo *const tile, int mi_col, int mi_row, |
328 | 491k | const POSITION *mi_pos) { |
329 | 491k | return !(mi_row + mi_pos->row < tile->mi_row_start || |
330 | 491k | mi_col + mi_pos->col < tile->mi_col_start || |
331 | 490k | mi_row + mi_pos->row >= tile->mi_row_end || |
332 | 489k | mi_col + mi_pos->col >= tile->mi_col_end); |
333 | 491k | } Unexecuted instantiation: av2_dx_iface.c:is_inside Unexecuted instantiation: annexF.c:is_inside Unexecuted instantiation: decodeframe.c:is_inside Unexecuted instantiation: decodemv.c:is_inside Unexecuted instantiation: decoder.c:is_inside Unexecuted instantiation: decodetxb.c:is_inside Unexecuted instantiation: detokenize.c:is_inside Unexecuted instantiation: obu_fgm.c:is_inside Unexecuted instantiation: obu.c:is_inside Unexecuted instantiation: obu_ci.c:is_inside Unexecuted instantiation: obu_atlas.c:is_inside Unexecuted instantiation: obu_lcr.c:is_inside Unexecuted instantiation: obu_ops.c:is_inside Unexecuted instantiation: obu_buf.c:is_inside Unexecuted instantiation: intrapred_avx2.c:is_inside Unexecuted instantiation: alloccommon.c:is_inside Unexecuted instantiation: av2_loopfilter.c:is_inside Unexecuted instantiation: cdef.c:is_inside Unexecuted instantiation: gdf.c:is_inside Unexecuted instantiation: gdf_block.c:is_inside Unexecuted instantiation: cfl.c:is_inside Unexecuted instantiation: entropymode.c:is_inside Unexecuted instantiation: level.c:is_inside Line | Count | Source | 328 | 491k | const POSITION *mi_pos) { | 329 | 491k | return !(mi_row + mi_pos->row < tile->mi_row_start || | 330 | 491k | mi_col + mi_pos->col < tile->mi_col_start || | 331 | 490k | mi_row + mi_pos->row >= tile->mi_row_end || | 332 | 489k | mi_col + mi_pos->col >= tile->mi_col_end); | 333 | 491k | } |
Unexecuted instantiation: pred_common.c:is_inside Unexecuted instantiation: reconinter.c:is_inside Unexecuted instantiation: reconintra.c:is_inside Unexecuted instantiation: restoration.c:is_inside Unexecuted instantiation: thread_common.c:is_inside Unexecuted instantiation: tip.c:is_inside Unexecuted instantiation: warped_motion.c:is_inside Unexecuted instantiation: ccso.c:is_inside Unexecuted instantiation: bru.c:is_inside Unexecuted instantiation: obu_qm.c:is_inside Unexecuted instantiation: optflow_refine_sse4.c:is_inside Unexecuted instantiation: affine_optflow_refine_avx2.c:is_inside Unexecuted instantiation: gdf_block_avx2.c:is_inside |
334 | | |
335 | | static INLINE int find_valid_col_offset(const TileInfo *const tile, int mi_col, |
336 | 65.7k | int col_offset) { |
337 | 65.7k | return clamp(col_offset, tile->mi_col_start - mi_col, |
338 | 65.7k | tile->mi_col_end - mi_col - 1); |
339 | 65.7k | } Unexecuted instantiation: av2_dx_iface.c:find_valid_col_offset Unexecuted instantiation: annexF.c:find_valid_col_offset Unexecuted instantiation: decodeframe.c:find_valid_col_offset Unexecuted instantiation: decodemv.c:find_valid_col_offset Unexecuted instantiation: decoder.c:find_valid_col_offset Unexecuted instantiation: decodetxb.c:find_valid_col_offset Unexecuted instantiation: detokenize.c:find_valid_col_offset Unexecuted instantiation: obu_fgm.c:find_valid_col_offset Unexecuted instantiation: obu.c:find_valid_col_offset Unexecuted instantiation: obu_ci.c:find_valid_col_offset Unexecuted instantiation: obu_atlas.c:find_valid_col_offset Unexecuted instantiation: obu_lcr.c:find_valid_col_offset Unexecuted instantiation: obu_ops.c:find_valid_col_offset Unexecuted instantiation: obu_buf.c:find_valid_col_offset Unexecuted instantiation: intrapred_avx2.c:find_valid_col_offset Unexecuted instantiation: alloccommon.c:find_valid_col_offset Unexecuted instantiation: av2_loopfilter.c:find_valid_col_offset Unexecuted instantiation: cdef.c:find_valid_col_offset Unexecuted instantiation: gdf.c:find_valid_col_offset Unexecuted instantiation: gdf_block.c:find_valid_col_offset Unexecuted instantiation: cfl.c:find_valid_col_offset Unexecuted instantiation: entropymode.c:find_valid_col_offset Unexecuted instantiation: level.c:find_valid_col_offset mvref_common.c:find_valid_col_offset Line | Count | Source | 336 | 65.7k | int col_offset) { | 337 | 65.7k | return clamp(col_offset, tile->mi_col_start - mi_col, | 338 | 65.7k | tile->mi_col_end - mi_col - 1); | 339 | 65.7k | } |
Unexecuted instantiation: pred_common.c:find_valid_col_offset Unexecuted instantiation: reconinter.c:find_valid_col_offset Unexecuted instantiation: reconintra.c:find_valid_col_offset Unexecuted instantiation: restoration.c:find_valid_col_offset Unexecuted instantiation: thread_common.c:find_valid_col_offset Unexecuted instantiation: tip.c:find_valid_col_offset Unexecuted instantiation: warped_motion.c:find_valid_col_offset Unexecuted instantiation: ccso.c:find_valid_col_offset Unexecuted instantiation: bru.c:find_valid_col_offset Unexecuted instantiation: obu_qm.c:find_valid_col_offset Unexecuted instantiation: optflow_refine_sse4.c:find_valid_col_offset Unexecuted instantiation: affine_optflow_refine_avx2.c:find_valid_col_offset Unexecuted instantiation: gdf_block_avx2.c:find_valid_col_offset |
340 | | |
341 | | // Converts a pair of distinct indices (rf) each in [0, n-1], |
342 | | // to a combined index in [0, n*(n+1)/2]. |
343 | | // The order of the combined index is as follows: |
344 | | // (0, 0), (0, 1), (0, 2), (0, 3), ..., (0, n-1), |
345 | | // (1, 1), (1, 2), (1, 3), ..., (1, n-1), |
346 | | // (2, 2), (2, 3), ..., (2, n-1), |
347 | | // ... |
348 | | // (n-1, n-1) |
349 | 0 | static INLINE int8_t single2comb(int n, const int8_t *const rf) { |
350 | 0 | assert(rf[0] < n && rf[1] < n); |
351 | |
|
352 | 0 | int8_t rfr[2] = { rf[0], rf[1] }; |
353 | 0 | if (rf[1] < rf[0]) { |
354 | 0 | rfr[0] = rf[1]; |
355 | 0 | rfr[1] = rf[0]; |
356 | 0 | } |
357 | 0 | int off = (n + 1) * rfr[0] - rfr[0] * (rfr[0] + 1) / 2; |
358 | 0 | int combindex = off + rfr[1] - rfr[0]; |
359 | 0 | assert(combindex >= 0 && |
360 | 0 | combindex < (INTER_REFS_PER_FRAME * (INTER_REFS_PER_FRAME + 1) / 2)); |
361 | 0 | return combindex; |
362 | 0 | } Unexecuted instantiation: av2_dx_iface.c:single2comb Unexecuted instantiation: annexF.c:single2comb Unexecuted instantiation: decodeframe.c:single2comb Unexecuted instantiation: decodemv.c:single2comb Unexecuted instantiation: decoder.c:single2comb Unexecuted instantiation: decodetxb.c:single2comb Unexecuted instantiation: detokenize.c:single2comb Unexecuted instantiation: obu_fgm.c:single2comb Unexecuted instantiation: obu.c:single2comb Unexecuted instantiation: obu_ci.c:single2comb Unexecuted instantiation: obu_atlas.c:single2comb Unexecuted instantiation: obu_lcr.c:single2comb Unexecuted instantiation: obu_ops.c:single2comb Unexecuted instantiation: obu_buf.c:single2comb Unexecuted instantiation: intrapred_avx2.c:single2comb Unexecuted instantiation: alloccommon.c:single2comb Unexecuted instantiation: av2_loopfilter.c:single2comb Unexecuted instantiation: cdef.c:single2comb Unexecuted instantiation: gdf.c:single2comb Unexecuted instantiation: gdf_block.c:single2comb Unexecuted instantiation: cfl.c:single2comb Unexecuted instantiation: entropymode.c:single2comb Unexecuted instantiation: level.c:single2comb Unexecuted instantiation: mvref_common.c:single2comb Unexecuted instantiation: pred_common.c:single2comb Unexecuted instantiation: reconinter.c:single2comb Unexecuted instantiation: reconintra.c:single2comb Unexecuted instantiation: restoration.c:single2comb Unexecuted instantiation: thread_common.c:single2comb Unexecuted instantiation: tip.c:single2comb Unexecuted instantiation: warped_motion.c:single2comb Unexecuted instantiation: ccso.c:single2comb Unexecuted instantiation: bru.c:single2comb Unexecuted instantiation: obu_qm.c:single2comb Unexecuted instantiation: optflow_refine_sse4.c:single2comb Unexecuted instantiation: affine_optflow_refine_avx2.c:single2comb Unexecuted instantiation: gdf_block_avx2.c:single2comb |
363 | | |
364 | | // Converts a combined index in [0, n*(n+1)/2] to a pair of single |
365 | | // ref indices (rf) each in [0, n-1]. See comment above for order |
366 | | // of the combined indexing. |
367 | 0 | static INLINE void comb2single(int n, int8_t combindex, int8_t *rf) { |
368 | 0 | assert(combindex < n * (n + 1) / 2); |
369 | 0 | int i = n, j = n; |
370 | 0 | rf[0] = 0; |
371 | | // Starting form n-1, keep reducing the row length by 1 until |
372 | | // combindex < i |
373 | 0 | while (i <= combindex) { |
374 | 0 | rf[0]++; |
375 | 0 | j--; |
376 | 0 | i += j; |
377 | 0 | } |
378 | 0 | rf[1] = combindex - i + j + rf[0]; |
379 | 0 | assert(rf[0] >= 0); |
380 | 0 | assert(rf[1] >= rf[0]); |
381 | 0 | } Unexecuted instantiation: av2_dx_iface.c:comb2single Unexecuted instantiation: annexF.c:comb2single Unexecuted instantiation: decodeframe.c:comb2single Unexecuted instantiation: decodemv.c:comb2single Unexecuted instantiation: decoder.c:comb2single Unexecuted instantiation: decodetxb.c:comb2single Unexecuted instantiation: detokenize.c:comb2single Unexecuted instantiation: obu_fgm.c:comb2single Unexecuted instantiation: obu.c:comb2single Unexecuted instantiation: obu_ci.c:comb2single Unexecuted instantiation: obu_atlas.c:comb2single Unexecuted instantiation: obu_lcr.c:comb2single Unexecuted instantiation: obu_ops.c:comb2single Unexecuted instantiation: obu_buf.c:comb2single Unexecuted instantiation: intrapred_avx2.c:comb2single Unexecuted instantiation: alloccommon.c:comb2single Unexecuted instantiation: av2_loopfilter.c:comb2single Unexecuted instantiation: cdef.c:comb2single Unexecuted instantiation: gdf.c:comb2single Unexecuted instantiation: gdf_block.c:comb2single Unexecuted instantiation: cfl.c:comb2single Unexecuted instantiation: entropymode.c:comb2single Unexecuted instantiation: level.c:comb2single Unexecuted instantiation: mvref_common.c:comb2single Unexecuted instantiation: pred_common.c:comb2single Unexecuted instantiation: reconinter.c:comb2single Unexecuted instantiation: reconintra.c:comb2single Unexecuted instantiation: restoration.c:comb2single Unexecuted instantiation: thread_common.c:comb2single Unexecuted instantiation: tip.c:comb2single Unexecuted instantiation: warped_motion.c:comb2single Unexecuted instantiation: ccso.c:comb2single Unexecuted instantiation: bru.c:comb2single Unexecuted instantiation: obu_qm.c:comb2single Unexecuted instantiation: optflow_refine_sse4.c:comb2single Unexecuted instantiation: affine_optflow_refine_avx2.c:comb2single Unexecuted instantiation: gdf_block_avx2.c:comb2single |
382 | | |
383 | 31.7k | static INLINE int8_t av2_ref_frame_type(const MV_REFERENCE_FRAME *const rf) { |
384 | 31.7k | if (!is_inter_ref_frame(rf[0])) { |
385 | | // Intra or invalid |
386 | 31.7k | return rf[0]; |
387 | 31.7k | } else if (!is_inter_ref_frame(rf[1])) { |
388 | | // single ref |
389 | 0 | return rf[0]; |
390 | 0 | } else { |
391 | | // compound ref |
392 | 0 | assert(rf[0] < INTER_REFS_PER_FRAME); |
393 | 0 | assert(rf[1] < INTER_REFS_PER_FRAME); |
394 | 0 | return single2comb(INTER_REFS_PER_FRAME, rf) + INTER_REFS_PER_FRAME; |
395 | 0 | } |
396 | 31.7k | } Unexecuted instantiation: av2_dx_iface.c:av2_ref_frame_type Unexecuted instantiation: annexF.c:av2_ref_frame_type Unexecuted instantiation: decodeframe.c:av2_ref_frame_type Unexecuted instantiation: decodemv.c:av2_ref_frame_type Unexecuted instantiation: decoder.c:av2_ref_frame_type Unexecuted instantiation: decodetxb.c:av2_ref_frame_type Unexecuted instantiation: detokenize.c:av2_ref_frame_type Unexecuted instantiation: obu_fgm.c:av2_ref_frame_type Unexecuted instantiation: obu.c:av2_ref_frame_type Unexecuted instantiation: obu_ci.c:av2_ref_frame_type Unexecuted instantiation: obu_atlas.c:av2_ref_frame_type Unexecuted instantiation: obu_lcr.c:av2_ref_frame_type Unexecuted instantiation: obu_ops.c:av2_ref_frame_type Unexecuted instantiation: obu_buf.c:av2_ref_frame_type Unexecuted instantiation: intrapred_avx2.c:av2_ref_frame_type Unexecuted instantiation: alloccommon.c:av2_ref_frame_type Unexecuted instantiation: av2_loopfilter.c:av2_ref_frame_type Unexecuted instantiation: cdef.c:av2_ref_frame_type Unexecuted instantiation: gdf.c:av2_ref_frame_type Unexecuted instantiation: gdf_block.c:av2_ref_frame_type Unexecuted instantiation: cfl.c:av2_ref_frame_type Unexecuted instantiation: entropymode.c:av2_ref_frame_type Unexecuted instantiation: level.c:av2_ref_frame_type mvref_common.c:av2_ref_frame_type Line | Count | Source | 383 | 31.7k | static INLINE int8_t av2_ref_frame_type(const MV_REFERENCE_FRAME *const rf) { | 384 | 31.7k | if (!is_inter_ref_frame(rf[0])) { | 385 | | // Intra or invalid | 386 | 31.7k | return rf[0]; | 387 | 31.7k | } else if (!is_inter_ref_frame(rf[1])) { | 388 | | // single ref | 389 | 0 | return rf[0]; | 390 | 0 | } else { | 391 | | // compound ref | 392 | 0 | assert(rf[0] < INTER_REFS_PER_FRAME); | 393 | 0 | assert(rf[1] < INTER_REFS_PER_FRAME); | 394 | 0 | return single2comb(INTER_REFS_PER_FRAME, rf) + INTER_REFS_PER_FRAME; | 395 | 0 | } | 396 | 31.7k | } |
Unexecuted instantiation: pred_common.c:av2_ref_frame_type Unexecuted instantiation: reconinter.c:av2_ref_frame_type Unexecuted instantiation: reconintra.c:av2_ref_frame_type Unexecuted instantiation: restoration.c:av2_ref_frame_type Unexecuted instantiation: thread_common.c:av2_ref_frame_type Unexecuted instantiation: tip.c:av2_ref_frame_type Unexecuted instantiation: warped_motion.c:av2_ref_frame_type Unexecuted instantiation: ccso.c:av2_ref_frame_type Unexecuted instantiation: bru.c:av2_ref_frame_type Unexecuted instantiation: obu_qm.c:av2_ref_frame_type Unexecuted instantiation: optflow_refine_sse4.c:av2_ref_frame_type Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_ref_frame_type Unexecuted instantiation: gdf_block_avx2.c:av2_ref_frame_type |
397 | | |
398 | | /*!\brief Return ref_mv_idx_type of the current coding block |
399 | | * conversion of two ref_mv_idx(s) into one value when there are two DRLs */ |
400 | | static INLINE int av2_ref_mv_idx_type(const MB_MODE_INFO *mbmi, |
401 | 0 | const int *ref_mv_idx) { |
402 | 0 | assert(ref_mv_idx[0] < MAX_REF_MV_STACK_SIZE); |
403 | 0 | assert(ref_mv_idx[1] < MAX_REF_MV_STACK_SIZE); |
404 | 0 | if (has_second_drl(mbmi)) { |
405 | 0 | return ref_mv_idx[1] * MAX_REF_MV_STACK_SIZE + ref_mv_idx[0]; |
406 | 0 | } else { |
407 | 0 | assert(0 == ref_mv_idx[1]); |
408 | 0 | return ref_mv_idx[0]; |
409 | 0 | } |
410 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_ref_mv_idx_type Unexecuted instantiation: annexF.c:av2_ref_mv_idx_type Unexecuted instantiation: decodeframe.c:av2_ref_mv_idx_type Unexecuted instantiation: decodemv.c:av2_ref_mv_idx_type Unexecuted instantiation: decoder.c:av2_ref_mv_idx_type Unexecuted instantiation: decodetxb.c:av2_ref_mv_idx_type Unexecuted instantiation: detokenize.c:av2_ref_mv_idx_type Unexecuted instantiation: obu_fgm.c:av2_ref_mv_idx_type Unexecuted instantiation: obu.c:av2_ref_mv_idx_type Unexecuted instantiation: obu_ci.c:av2_ref_mv_idx_type Unexecuted instantiation: obu_atlas.c:av2_ref_mv_idx_type Unexecuted instantiation: obu_lcr.c:av2_ref_mv_idx_type Unexecuted instantiation: obu_ops.c:av2_ref_mv_idx_type Unexecuted instantiation: obu_buf.c:av2_ref_mv_idx_type Unexecuted instantiation: intrapred_avx2.c:av2_ref_mv_idx_type Unexecuted instantiation: alloccommon.c:av2_ref_mv_idx_type Unexecuted instantiation: av2_loopfilter.c:av2_ref_mv_idx_type Unexecuted instantiation: cdef.c:av2_ref_mv_idx_type Unexecuted instantiation: gdf.c:av2_ref_mv_idx_type Unexecuted instantiation: gdf_block.c:av2_ref_mv_idx_type Unexecuted instantiation: cfl.c:av2_ref_mv_idx_type Unexecuted instantiation: entropymode.c:av2_ref_mv_idx_type Unexecuted instantiation: level.c:av2_ref_mv_idx_type Unexecuted instantiation: mvref_common.c:av2_ref_mv_idx_type Unexecuted instantiation: pred_common.c:av2_ref_mv_idx_type Unexecuted instantiation: reconinter.c:av2_ref_mv_idx_type Unexecuted instantiation: reconintra.c:av2_ref_mv_idx_type Unexecuted instantiation: restoration.c:av2_ref_mv_idx_type Unexecuted instantiation: thread_common.c:av2_ref_mv_idx_type Unexecuted instantiation: tip.c:av2_ref_mv_idx_type Unexecuted instantiation: warped_motion.c:av2_ref_mv_idx_type Unexecuted instantiation: ccso.c:av2_ref_mv_idx_type Unexecuted instantiation: bru.c:av2_ref_mv_idx_type Unexecuted instantiation: obu_qm.c:av2_ref_mv_idx_type Unexecuted instantiation: optflow_refine_sse4.c:av2_ref_mv_idx_type Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_ref_mv_idx_type Unexecuted instantiation: gdf_block_avx2.c:av2_ref_mv_idx_type |
411 | | |
412 | | /*!\brief Reset ref_mv_idx(s) based on the ref_mv_idx_type value */ |
413 | 0 | static INLINE void av2_set_ref_mv_idx(int *ref_mv_idx, int ref_mv_idx_type) { |
414 | 0 | assert(ref_mv_idx_type >= 0 && |
415 | 0 | ref_mv_idx_type < MAX_REF_MV_STACK_SIZE * MAX_REF_MV_STACK_SIZE); |
416 | 0 | ref_mv_idx[1] = ref_mv_idx_type / MAX_REF_MV_STACK_SIZE; |
417 | 0 | ref_mv_idx[0] = ref_mv_idx_type - ref_mv_idx[1] * MAX_REF_MV_STACK_SIZE; |
418 | 0 | return; |
419 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_set_ref_mv_idx Unexecuted instantiation: annexF.c:av2_set_ref_mv_idx Unexecuted instantiation: decodeframe.c:av2_set_ref_mv_idx Unexecuted instantiation: decodemv.c:av2_set_ref_mv_idx Unexecuted instantiation: decoder.c:av2_set_ref_mv_idx Unexecuted instantiation: decodetxb.c:av2_set_ref_mv_idx Unexecuted instantiation: detokenize.c:av2_set_ref_mv_idx Unexecuted instantiation: obu_fgm.c:av2_set_ref_mv_idx Unexecuted instantiation: obu.c:av2_set_ref_mv_idx Unexecuted instantiation: obu_ci.c:av2_set_ref_mv_idx Unexecuted instantiation: obu_atlas.c:av2_set_ref_mv_idx Unexecuted instantiation: obu_lcr.c:av2_set_ref_mv_idx Unexecuted instantiation: obu_ops.c:av2_set_ref_mv_idx Unexecuted instantiation: obu_buf.c:av2_set_ref_mv_idx Unexecuted instantiation: intrapred_avx2.c:av2_set_ref_mv_idx Unexecuted instantiation: alloccommon.c:av2_set_ref_mv_idx Unexecuted instantiation: av2_loopfilter.c:av2_set_ref_mv_idx Unexecuted instantiation: cdef.c:av2_set_ref_mv_idx Unexecuted instantiation: gdf.c:av2_set_ref_mv_idx Unexecuted instantiation: gdf_block.c:av2_set_ref_mv_idx Unexecuted instantiation: cfl.c:av2_set_ref_mv_idx Unexecuted instantiation: entropymode.c:av2_set_ref_mv_idx Unexecuted instantiation: level.c:av2_set_ref_mv_idx Unexecuted instantiation: mvref_common.c:av2_set_ref_mv_idx Unexecuted instantiation: pred_common.c:av2_set_ref_mv_idx Unexecuted instantiation: reconinter.c:av2_set_ref_mv_idx Unexecuted instantiation: reconintra.c:av2_set_ref_mv_idx Unexecuted instantiation: restoration.c:av2_set_ref_mv_idx Unexecuted instantiation: thread_common.c:av2_set_ref_mv_idx Unexecuted instantiation: tip.c:av2_set_ref_mv_idx Unexecuted instantiation: warped_motion.c:av2_set_ref_mv_idx Unexecuted instantiation: ccso.c:av2_set_ref_mv_idx Unexecuted instantiation: bru.c:av2_set_ref_mv_idx Unexecuted instantiation: obu_qm.c:av2_set_ref_mv_idx Unexecuted instantiation: optflow_refine_sse4.c:av2_set_ref_mv_idx Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_set_ref_mv_idx Unexecuted instantiation: gdf_block_avx2.c:av2_set_ref_mv_idx |
420 | | |
421 | | static INLINE void av2_set_ref_frame(MV_REFERENCE_FRAME *rf, |
422 | 254k | MV_REFERENCE_FRAME ref_frame_type) { |
423 | 254k | if (ref_frame_type == INTRA_FRAME || is_tip_ref_frame(ref_frame_type) || |
424 | 254k | ref_frame_type < INTER_REFS_PER_FRAME) { |
425 | 254k | rf[0] = ref_frame_type; |
426 | 254k | rf[1] = NONE_FRAME; |
427 | 254k | } else { |
428 | 3 | comb2single(INTER_REFS_PER_FRAME, ref_frame_type - INTER_REFS_PER_FRAME, |
429 | 3 | rf); |
430 | 3 | } |
431 | 254k | return; |
432 | 254k | } Unexecuted instantiation: av2_dx_iface.c:av2_set_ref_frame Unexecuted instantiation: annexF.c:av2_set_ref_frame Unexecuted instantiation: decodeframe.c:av2_set_ref_frame Unexecuted instantiation: decodemv.c:av2_set_ref_frame Unexecuted instantiation: decoder.c:av2_set_ref_frame Unexecuted instantiation: decodetxb.c:av2_set_ref_frame Unexecuted instantiation: detokenize.c:av2_set_ref_frame Unexecuted instantiation: obu_fgm.c:av2_set_ref_frame Unexecuted instantiation: obu.c:av2_set_ref_frame Unexecuted instantiation: obu_ci.c:av2_set_ref_frame Unexecuted instantiation: obu_atlas.c:av2_set_ref_frame Unexecuted instantiation: obu_lcr.c:av2_set_ref_frame Unexecuted instantiation: obu_ops.c:av2_set_ref_frame Unexecuted instantiation: obu_buf.c:av2_set_ref_frame Unexecuted instantiation: intrapred_avx2.c:av2_set_ref_frame Unexecuted instantiation: alloccommon.c:av2_set_ref_frame Unexecuted instantiation: av2_loopfilter.c:av2_set_ref_frame Unexecuted instantiation: cdef.c:av2_set_ref_frame Unexecuted instantiation: gdf.c:av2_set_ref_frame Unexecuted instantiation: gdf_block.c:av2_set_ref_frame Unexecuted instantiation: cfl.c:av2_set_ref_frame Unexecuted instantiation: entropymode.c:av2_set_ref_frame Unexecuted instantiation: level.c:av2_set_ref_frame mvref_common.c:av2_set_ref_frame Line | Count | Source | 422 | 254k | MV_REFERENCE_FRAME ref_frame_type) { | 423 | 254k | if (ref_frame_type == INTRA_FRAME || is_tip_ref_frame(ref_frame_type) || | 424 | 254k | ref_frame_type < INTER_REFS_PER_FRAME) { | 425 | 254k | rf[0] = ref_frame_type; | 426 | 254k | rf[1] = NONE_FRAME; | 427 | 254k | } else { | 428 | 3 | comb2single(INTER_REFS_PER_FRAME, ref_frame_type - INTER_REFS_PER_FRAME, | 429 | 3 | rf); | 430 | 3 | } | 431 | 254k | return; | 432 | 254k | } |
Unexecuted instantiation: pred_common.c:av2_set_ref_frame Unexecuted instantiation: reconinter.c:av2_set_ref_frame Unexecuted instantiation: reconintra.c:av2_set_ref_frame Unexecuted instantiation: restoration.c:av2_set_ref_frame Unexecuted instantiation: thread_common.c:av2_set_ref_frame Unexecuted instantiation: tip.c:av2_set_ref_frame Unexecuted instantiation: warped_motion.c:av2_set_ref_frame Unexecuted instantiation: ccso.c:av2_set_ref_frame Unexecuted instantiation: bru.c:av2_set_ref_frame Unexecuted instantiation: obu_qm.c:av2_set_ref_frame Unexecuted instantiation: optflow_refine_sse4.c:av2_set_ref_frame Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_set_ref_frame Unexecuted instantiation: gdf_block_avx2.c:av2_set_ref_frame |
433 | | |
434 | | static INLINE int16_t av2_mode_context_pristine( |
435 | 0 | const int16_t *const mode_context, const MV_REFERENCE_FRAME *const rf) { |
436 | 0 | int8_t ref_frame = av2_ref_frame_type(rf); |
437 | 0 | if (ref_frame == NONE_FRAME) ref_frame = 0; |
438 | 0 | return mode_context[ref_frame]; |
439 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_mode_context_pristine Unexecuted instantiation: annexF.c:av2_mode_context_pristine Unexecuted instantiation: decodeframe.c:av2_mode_context_pristine Unexecuted instantiation: decodemv.c:av2_mode_context_pristine Unexecuted instantiation: decoder.c:av2_mode_context_pristine Unexecuted instantiation: decodetxb.c:av2_mode_context_pristine Unexecuted instantiation: detokenize.c:av2_mode_context_pristine Unexecuted instantiation: obu_fgm.c:av2_mode_context_pristine Unexecuted instantiation: obu.c:av2_mode_context_pristine Unexecuted instantiation: obu_ci.c:av2_mode_context_pristine Unexecuted instantiation: obu_atlas.c:av2_mode_context_pristine Unexecuted instantiation: obu_lcr.c:av2_mode_context_pristine Unexecuted instantiation: obu_ops.c:av2_mode_context_pristine Unexecuted instantiation: obu_buf.c:av2_mode_context_pristine Unexecuted instantiation: intrapred_avx2.c:av2_mode_context_pristine Unexecuted instantiation: alloccommon.c:av2_mode_context_pristine Unexecuted instantiation: av2_loopfilter.c:av2_mode_context_pristine Unexecuted instantiation: cdef.c:av2_mode_context_pristine Unexecuted instantiation: gdf.c:av2_mode_context_pristine Unexecuted instantiation: gdf_block.c:av2_mode_context_pristine Unexecuted instantiation: cfl.c:av2_mode_context_pristine Unexecuted instantiation: entropymode.c:av2_mode_context_pristine Unexecuted instantiation: level.c:av2_mode_context_pristine Unexecuted instantiation: mvref_common.c:av2_mode_context_pristine Unexecuted instantiation: pred_common.c:av2_mode_context_pristine Unexecuted instantiation: reconinter.c:av2_mode_context_pristine Unexecuted instantiation: reconintra.c:av2_mode_context_pristine Unexecuted instantiation: restoration.c:av2_mode_context_pristine Unexecuted instantiation: thread_common.c:av2_mode_context_pristine Unexecuted instantiation: tip.c:av2_mode_context_pristine Unexecuted instantiation: warped_motion.c:av2_mode_context_pristine Unexecuted instantiation: ccso.c:av2_mode_context_pristine Unexecuted instantiation: bru.c:av2_mode_context_pristine Unexecuted instantiation: obu_qm.c:av2_mode_context_pristine Unexecuted instantiation: optflow_refine_sse4.c:av2_mode_context_pristine Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_mode_context_pristine Unexecuted instantiation: gdf_block_avx2.c:av2_mode_context_pristine |
440 | | |
441 | | static INLINE int16_t av2_mode_context_analyzer( |
442 | 0 | const int16_t *const mode_context, const MV_REFERENCE_FRAME *const rf) { |
443 | 0 | int8_t ref_frame = av2_ref_frame_type(rf); |
444 | 0 | if (ref_frame == NONE_FRAME) ref_frame = 0; |
445 | 0 | return mode_context[ref_frame]; |
446 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_mode_context_analyzer Unexecuted instantiation: annexF.c:av2_mode_context_analyzer Unexecuted instantiation: decodeframe.c:av2_mode_context_analyzer Unexecuted instantiation: decodemv.c:av2_mode_context_analyzer Unexecuted instantiation: decoder.c:av2_mode_context_analyzer Unexecuted instantiation: decodetxb.c:av2_mode_context_analyzer Unexecuted instantiation: detokenize.c:av2_mode_context_analyzer Unexecuted instantiation: obu_fgm.c:av2_mode_context_analyzer Unexecuted instantiation: obu.c:av2_mode_context_analyzer Unexecuted instantiation: obu_ci.c:av2_mode_context_analyzer Unexecuted instantiation: obu_atlas.c:av2_mode_context_analyzer Unexecuted instantiation: obu_lcr.c:av2_mode_context_analyzer Unexecuted instantiation: obu_ops.c:av2_mode_context_analyzer Unexecuted instantiation: obu_buf.c:av2_mode_context_analyzer Unexecuted instantiation: intrapred_avx2.c:av2_mode_context_analyzer Unexecuted instantiation: alloccommon.c:av2_mode_context_analyzer Unexecuted instantiation: av2_loopfilter.c:av2_mode_context_analyzer Unexecuted instantiation: cdef.c:av2_mode_context_analyzer Unexecuted instantiation: gdf.c:av2_mode_context_analyzer Unexecuted instantiation: gdf_block.c:av2_mode_context_analyzer Unexecuted instantiation: cfl.c:av2_mode_context_analyzer Unexecuted instantiation: entropymode.c:av2_mode_context_analyzer Unexecuted instantiation: level.c:av2_mode_context_analyzer Unexecuted instantiation: mvref_common.c:av2_mode_context_analyzer Unexecuted instantiation: pred_common.c:av2_mode_context_analyzer Unexecuted instantiation: reconinter.c:av2_mode_context_analyzer Unexecuted instantiation: reconintra.c:av2_mode_context_analyzer Unexecuted instantiation: restoration.c:av2_mode_context_analyzer Unexecuted instantiation: thread_common.c:av2_mode_context_analyzer Unexecuted instantiation: tip.c:av2_mode_context_analyzer Unexecuted instantiation: warped_motion.c:av2_mode_context_analyzer Unexecuted instantiation: ccso.c:av2_mode_context_analyzer Unexecuted instantiation: bru.c:av2_mode_context_analyzer Unexecuted instantiation: obu_qm.c:av2_mode_context_analyzer Unexecuted instantiation: optflow_refine_sse4.c:av2_mode_context_analyzer Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_mode_context_analyzer Unexecuted instantiation: gdf_block_avx2.c:av2_mode_context_analyzer |
447 | | |
448 | 0 | static INLINE int get_optflow_context(const int mode) { |
449 | 0 | int opfl_ctx = mode; |
450 | 0 | opfl_ctx = opfl_ctx >= JOINT_NEWMV_OPTFLOW ? JOINT_NEWMV_OPTFLOW : opfl_ctx; |
451 | 0 | opfl_ctx -= NEAR_NEARMV_OPTFLOW; |
452 | 0 | opfl_ctx = (opfl_ctx > 0); |
453 | 0 | return opfl_ctx; |
454 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_optflow_context Unexecuted instantiation: annexF.c:get_optflow_context Unexecuted instantiation: decodeframe.c:get_optflow_context Unexecuted instantiation: decodemv.c:get_optflow_context Unexecuted instantiation: decoder.c:get_optflow_context Unexecuted instantiation: decodetxb.c:get_optflow_context Unexecuted instantiation: detokenize.c:get_optflow_context Unexecuted instantiation: obu_fgm.c:get_optflow_context Unexecuted instantiation: obu.c:get_optflow_context Unexecuted instantiation: obu_ci.c:get_optflow_context Unexecuted instantiation: obu_atlas.c:get_optflow_context Unexecuted instantiation: obu_lcr.c:get_optflow_context Unexecuted instantiation: obu_ops.c:get_optflow_context Unexecuted instantiation: obu_buf.c:get_optflow_context Unexecuted instantiation: intrapred_avx2.c:get_optflow_context Unexecuted instantiation: alloccommon.c:get_optflow_context Unexecuted instantiation: av2_loopfilter.c:get_optflow_context Unexecuted instantiation: cdef.c:get_optflow_context Unexecuted instantiation: gdf.c:get_optflow_context Unexecuted instantiation: gdf_block.c:get_optflow_context Unexecuted instantiation: cfl.c:get_optflow_context Unexecuted instantiation: entropymode.c:get_optflow_context Unexecuted instantiation: level.c:get_optflow_context Unexecuted instantiation: mvref_common.c:get_optflow_context Unexecuted instantiation: pred_common.c:get_optflow_context Unexecuted instantiation: reconinter.c:get_optflow_context Unexecuted instantiation: reconintra.c:get_optflow_context Unexecuted instantiation: restoration.c:get_optflow_context Unexecuted instantiation: thread_common.c:get_optflow_context Unexecuted instantiation: tip.c:get_optflow_context Unexecuted instantiation: warped_motion.c:get_optflow_context Unexecuted instantiation: ccso.c:get_optflow_context Unexecuted instantiation: bru.c:get_optflow_context Unexecuted instantiation: obu_qm.c:get_optflow_context Unexecuted instantiation: optflow_refine_sse4.c:get_optflow_context Unexecuted instantiation: affine_optflow_refine_avx2.c:get_optflow_context Unexecuted instantiation: gdf_block_avx2.c:get_optflow_context |
455 | | |
456 | | static INLINE avm_cdf_prob *av2_get_drl_cdf(const MB_MODE_INFO *const mbmi, |
457 | | FRAME_CONTEXT *ec_ctx, |
458 | 0 | const int16_t mode_ctx, int idx) { |
459 | 0 | if (is_tip_ref_frame(mbmi->ref_frame[0])) { |
460 | 0 | return ec_ctx->tip_drl_cdf[AVMMIN(idx, 2)]; |
461 | 0 | } |
462 | | |
463 | 0 | if (mbmi->skip_mode) { |
464 | 0 | return ec_ctx->skip_drl_cdf[AVMMIN(idx, 2)]; |
465 | 0 | } |
466 | | |
467 | 0 | const int ctx = av2_drl_ctx(mode_ctx); |
468 | 0 | return ec_ctx->drl_cdf[AVMMIN(idx, 2)][ctx]; |
469 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_get_drl_cdf Unexecuted instantiation: annexF.c:av2_get_drl_cdf Unexecuted instantiation: decodeframe.c:av2_get_drl_cdf Unexecuted instantiation: decodemv.c:av2_get_drl_cdf Unexecuted instantiation: decoder.c:av2_get_drl_cdf Unexecuted instantiation: decodetxb.c:av2_get_drl_cdf Unexecuted instantiation: detokenize.c:av2_get_drl_cdf Unexecuted instantiation: obu_fgm.c:av2_get_drl_cdf Unexecuted instantiation: obu.c:av2_get_drl_cdf Unexecuted instantiation: obu_ci.c:av2_get_drl_cdf Unexecuted instantiation: obu_atlas.c:av2_get_drl_cdf Unexecuted instantiation: obu_lcr.c:av2_get_drl_cdf Unexecuted instantiation: obu_ops.c:av2_get_drl_cdf Unexecuted instantiation: obu_buf.c:av2_get_drl_cdf Unexecuted instantiation: intrapred_avx2.c:av2_get_drl_cdf Unexecuted instantiation: alloccommon.c:av2_get_drl_cdf Unexecuted instantiation: av2_loopfilter.c:av2_get_drl_cdf Unexecuted instantiation: cdef.c:av2_get_drl_cdf Unexecuted instantiation: gdf.c:av2_get_drl_cdf Unexecuted instantiation: gdf_block.c:av2_get_drl_cdf Unexecuted instantiation: cfl.c:av2_get_drl_cdf Unexecuted instantiation: entropymode.c:av2_get_drl_cdf Unexecuted instantiation: level.c:av2_get_drl_cdf Unexecuted instantiation: mvref_common.c:av2_get_drl_cdf Unexecuted instantiation: pred_common.c:av2_get_drl_cdf Unexecuted instantiation: reconinter.c:av2_get_drl_cdf Unexecuted instantiation: reconintra.c:av2_get_drl_cdf Unexecuted instantiation: restoration.c:av2_get_drl_cdf Unexecuted instantiation: thread_common.c:av2_get_drl_cdf Unexecuted instantiation: tip.c:av2_get_drl_cdf Unexecuted instantiation: warped_motion.c:av2_get_drl_cdf Unexecuted instantiation: ccso.c:av2_get_drl_cdf Unexecuted instantiation: bru.c:av2_get_drl_cdf Unexecuted instantiation: obu_qm.c:av2_get_drl_cdf Unexecuted instantiation: optflow_refine_sse4.c:av2_get_drl_cdf Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_get_drl_cdf Unexecuted instantiation: gdf_block_avx2.c:av2_get_drl_cdf |
470 | | |
471 | | // Get the cdf of the warp_ref_idx |
472 | | static INLINE avm_cdf_prob *av2_get_warp_ref_idx_cdf(FRAME_CONTEXT *ec_ctx, |
473 | 0 | int bit_idx) { |
474 | 0 | const int ctx = 0; |
475 | 0 | return ec_ctx->warp_ref_idx_cdf[AVMMIN(bit_idx, 2)][ctx]; |
476 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: annexF.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: decodeframe.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: decodemv.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: decoder.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: decodetxb.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: detokenize.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: obu_fgm.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: obu.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: obu_ci.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: obu_atlas.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: obu_lcr.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: obu_ops.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: obu_buf.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: intrapred_avx2.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: alloccommon.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: av2_loopfilter.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: cdef.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: gdf.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: gdf_block.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: cfl.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: entropymode.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: level.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: mvref_common.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: pred_common.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: reconinter.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: reconintra.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: restoration.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: thread_common.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: tip.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: warped_motion.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: ccso.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: bru.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: obu_qm.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: optflow_refine_sse4.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_get_warp_ref_idx_cdf Unexecuted instantiation: gdf_block_avx2.c:av2_get_warp_ref_idx_cdf |
477 | | |
478 | | // TODO(jingning): Consider the use of lookup table for (num / den) |
479 | | // altogether. |
480 | | static int div_mult[32] = { 0, 16384, 8192, 5461, 4096, 3276, 2730, 2340, |
481 | | 2048, 1820, 1638, 1489, 1365, 1260, 1170, 1092, |
482 | | 1024, 963, 910, 862, 819, 780, 744, 712, |
483 | | 682, 655, 630, 606, 585, 564, 546, 528 }; |
484 | | |
485 | | static AVM_INLINE void get_mv_projection_clamp(MV *output, MV ref, int num, |
486 | | int den, int clamp_min, |
487 | 0 | int clamp_max) { |
488 | 0 | den = AVMMIN(den, MAX_FRAME_DISTANCE); |
489 | 0 | num = num > 0 ? AVMMIN(num, MAX_FRAME_DISTANCE) |
490 | 0 | : AVMMAX(num, -MAX_FRAME_DISTANCE); |
491 | 0 | const int64_t scale_mv_row = (int64_t)ref.row * num * div_mult[den]; |
492 | 0 | const int mv_row = (int)ROUND_POWER_OF_TWO_SIGNED_64(scale_mv_row, 14); |
493 | 0 | const int64_t scale_mv_col = (int64_t)ref.col * num * div_mult[den]; |
494 | 0 | const int mv_col = (int)ROUND_POWER_OF_TWO_SIGNED_64(scale_mv_col, 14); |
495 | 0 | output->row = (MV_COMP_DATA_TYPE)clamp(mv_row, clamp_min, clamp_max); |
496 | 0 | output->col = (MV_COMP_DATA_TYPE)clamp(mv_col, clamp_min, clamp_max); |
497 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_mv_projection_clamp Unexecuted instantiation: annexF.c:get_mv_projection_clamp Unexecuted instantiation: decodeframe.c:get_mv_projection_clamp Unexecuted instantiation: decodemv.c:get_mv_projection_clamp Unexecuted instantiation: decoder.c:get_mv_projection_clamp Unexecuted instantiation: decodetxb.c:get_mv_projection_clamp Unexecuted instantiation: detokenize.c:get_mv_projection_clamp Unexecuted instantiation: obu_fgm.c:get_mv_projection_clamp Unexecuted instantiation: obu.c:get_mv_projection_clamp Unexecuted instantiation: obu_ci.c:get_mv_projection_clamp Unexecuted instantiation: obu_atlas.c:get_mv_projection_clamp Unexecuted instantiation: obu_lcr.c:get_mv_projection_clamp Unexecuted instantiation: obu_ops.c:get_mv_projection_clamp Unexecuted instantiation: obu_buf.c:get_mv_projection_clamp Unexecuted instantiation: intrapred_avx2.c:get_mv_projection_clamp Unexecuted instantiation: alloccommon.c:get_mv_projection_clamp Unexecuted instantiation: av2_loopfilter.c:get_mv_projection_clamp Unexecuted instantiation: cdef.c:get_mv_projection_clamp Unexecuted instantiation: gdf.c:get_mv_projection_clamp Unexecuted instantiation: gdf_block.c:get_mv_projection_clamp Unexecuted instantiation: cfl.c:get_mv_projection_clamp Unexecuted instantiation: entropymode.c:get_mv_projection_clamp Unexecuted instantiation: level.c:get_mv_projection_clamp Unexecuted instantiation: mvref_common.c:get_mv_projection_clamp Unexecuted instantiation: pred_common.c:get_mv_projection_clamp Unexecuted instantiation: reconinter.c:get_mv_projection_clamp Unexecuted instantiation: reconintra.c:get_mv_projection_clamp Unexecuted instantiation: restoration.c:get_mv_projection_clamp Unexecuted instantiation: thread_common.c:get_mv_projection_clamp Unexecuted instantiation: tip.c:get_mv_projection_clamp Unexecuted instantiation: warped_motion.c:get_mv_projection_clamp Unexecuted instantiation: ccso.c:get_mv_projection_clamp Unexecuted instantiation: bru.c:get_mv_projection_clamp Unexecuted instantiation: obu_qm.c:get_mv_projection_clamp Unexecuted instantiation: optflow_refine_sse4.c:get_mv_projection_clamp Unexecuted instantiation: affine_optflow_refine_avx2.c:get_mv_projection_clamp Unexecuted instantiation: gdf_block_avx2.c:get_mv_projection_clamp |
498 | | |
499 | 0 | static AVM_INLINE void get_mv_projection(MV *output, MV ref, int num, int den) { |
500 | 0 | get_mv_projection_clamp(output, ref, num, den, MV_LOW + 1, MV_UPP - 1); |
501 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_mv_projection Unexecuted instantiation: annexF.c:get_mv_projection Unexecuted instantiation: decodeframe.c:get_mv_projection Unexecuted instantiation: decodemv.c:get_mv_projection Unexecuted instantiation: decoder.c:get_mv_projection Unexecuted instantiation: decodetxb.c:get_mv_projection Unexecuted instantiation: detokenize.c:get_mv_projection Unexecuted instantiation: obu_fgm.c:get_mv_projection Unexecuted instantiation: obu.c:get_mv_projection Unexecuted instantiation: obu_ci.c:get_mv_projection Unexecuted instantiation: obu_atlas.c:get_mv_projection Unexecuted instantiation: obu_lcr.c:get_mv_projection Unexecuted instantiation: obu_ops.c:get_mv_projection Unexecuted instantiation: obu_buf.c:get_mv_projection Unexecuted instantiation: intrapred_avx2.c:get_mv_projection Unexecuted instantiation: alloccommon.c:get_mv_projection Unexecuted instantiation: av2_loopfilter.c:get_mv_projection Unexecuted instantiation: cdef.c:get_mv_projection Unexecuted instantiation: gdf.c:get_mv_projection Unexecuted instantiation: gdf_block.c:get_mv_projection Unexecuted instantiation: cfl.c:get_mv_projection Unexecuted instantiation: entropymode.c:get_mv_projection Unexecuted instantiation: level.c:get_mv_projection Unexecuted instantiation: mvref_common.c:get_mv_projection Unexecuted instantiation: pred_common.c:get_mv_projection Unexecuted instantiation: reconinter.c:get_mv_projection Unexecuted instantiation: reconintra.c:get_mv_projection Unexecuted instantiation: restoration.c:get_mv_projection Unexecuted instantiation: thread_common.c:get_mv_projection Unexecuted instantiation: tip.c:get_mv_projection Unexecuted instantiation: warped_motion.c:get_mv_projection Unexecuted instantiation: ccso.c:get_mv_projection Unexecuted instantiation: bru.c:get_mv_projection Unexecuted instantiation: obu_qm.c:get_mv_projection Unexecuted instantiation: optflow_refine_sse4.c:get_mv_projection Unexecuted instantiation: affine_optflow_refine_avx2.c:get_mv_projection Unexecuted instantiation: gdf_block_avx2.c:get_mv_projection |
502 | | |
503 | | void av2_setup_frame_buf_refs(AV2_COMMON *cm); |
504 | | void av2_setup_skip_mode_allowed(AV2_COMMON *cm); |
505 | | void av2_setup_motion_field(AV2_COMMON *cm); |
506 | | void av2_setup_ref_frame_sides(AV2_COMMON *cm); |
507 | | |
508 | 0 | static INLINE void av2_collect_neighbors_ref_counts(MACROBLOCKD *const xd) { |
509 | 0 | av2_zero(xd->neighbors_ref_counts); |
510 | |
|
511 | 0 | uint8_t *const ref_counts = xd->neighbors_ref_counts; |
512 | 0 | for (int i = 0; i < MAX_NUM_NEIGHBORS; ++i) { |
513 | 0 | const MB_MODE_INFO *const neighbor = xd->neighbors_line_buffer[i]; |
514 | 0 | if (neighbor != NULL && !is_tip_ref_frame(neighbor->ref_frame[0]) && |
515 | 0 | is_inter_ref_frame(neighbor->ref_frame[0])) { |
516 | 0 | ref_counts[neighbor->ref_frame[0]]++; |
517 | 0 | if (has_second_ref(neighbor)) { |
518 | 0 | ref_counts[neighbor->ref_frame[1]]++; |
519 | 0 | } |
520 | 0 | } |
521 | 0 | } |
522 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: annexF.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: decodeframe.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: decodemv.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: decoder.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: decodetxb.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: detokenize.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: obu_fgm.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: obu.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: obu_ci.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: obu_atlas.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: obu_lcr.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: obu_ops.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: obu_buf.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: intrapred_avx2.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: alloccommon.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: av2_loopfilter.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: cdef.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: gdf.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: gdf_block.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: cfl.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: entropymode.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: level.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: mvref_common.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: pred_common.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: reconinter.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: reconintra.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: restoration.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: thread_common.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: tip.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: warped_motion.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: ccso.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: bru.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: obu_qm.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: optflow_refine_sse4.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_collect_neighbors_ref_counts Unexecuted instantiation: gdf_block_avx2.c:av2_collect_neighbors_ref_counts |
523 | | |
524 | 0 | static INLINE int allow_amvd_mode(PREDICTION_MODE mode) { |
525 | 0 | return (mode == NEAR_NEWMV || mode == NEW_NEARMV || |
526 | 0 | mode == NEAR_NEWMV_OPTFLOW || mode == NEW_NEARMV_OPTFLOW || |
527 | 0 | mode == NEWMV || mode == JOINT_NEWMV || mode == JOINT_NEWMV_OPTFLOW || |
528 | 0 | mode == NEW_NEWMV || mode == NEW_NEWMV_OPTFLOW); |
529 | 0 | } Unexecuted instantiation: av2_dx_iface.c:allow_amvd_mode Unexecuted instantiation: annexF.c:allow_amvd_mode Unexecuted instantiation: decodeframe.c:allow_amvd_mode Unexecuted instantiation: decodemv.c:allow_amvd_mode Unexecuted instantiation: decoder.c:allow_amvd_mode Unexecuted instantiation: decodetxb.c:allow_amvd_mode Unexecuted instantiation: detokenize.c:allow_amvd_mode Unexecuted instantiation: obu_fgm.c:allow_amvd_mode Unexecuted instantiation: obu.c:allow_amvd_mode Unexecuted instantiation: obu_ci.c:allow_amvd_mode Unexecuted instantiation: obu_atlas.c:allow_amvd_mode Unexecuted instantiation: obu_lcr.c:allow_amvd_mode Unexecuted instantiation: obu_ops.c:allow_amvd_mode Unexecuted instantiation: obu_buf.c:allow_amvd_mode Unexecuted instantiation: intrapred_avx2.c:allow_amvd_mode Unexecuted instantiation: alloccommon.c:allow_amvd_mode Unexecuted instantiation: av2_loopfilter.c:allow_amvd_mode Unexecuted instantiation: cdef.c:allow_amvd_mode Unexecuted instantiation: gdf.c:allow_amvd_mode Unexecuted instantiation: gdf_block.c:allow_amvd_mode Unexecuted instantiation: cfl.c:allow_amvd_mode Unexecuted instantiation: entropymode.c:allow_amvd_mode Unexecuted instantiation: level.c:allow_amvd_mode Unexecuted instantiation: mvref_common.c:allow_amvd_mode Unexecuted instantiation: pred_common.c:allow_amvd_mode Unexecuted instantiation: reconinter.c:allow_amvd_mode Unexecuted instantiation: reconintra.c:allow_amvd_mode Unexecuted instantiation: restoration.c:allow_amvd_mode Unexecuted instantiation: thread_common.c:allow_amvd_mode Unexecuted instantiation: tip.c:allow_amvd_mode Unexecuted instantiation: warped_motion.c:allow_amvd_mode Unexecuted instantiation: ccso.c:allow_amvd_mode Unexecuted instantiation: bru.c:allow_amvd_mode Unexecuted instantiation: obu_qm.c:allow_amvd_mode Unexecuted instantiation: optflow_refine_sse4.c:allow_amvd_mode Unexecuted instantiation: affine_optflow_refine_avx2.c:allow_amvd_mode Unexecuted instantiation: gdf_block_avx2.c:allow_amvd_mode |
530 | | |
531 | 0 | static INLINE int amvd_mode_to_index(PREDICTION_MODE mode) { |
532 | 0 | switch (mode) { |
533 | 0 | case NEAR_NEWMV: return 0; |
534 | 0 | case NEW_NEARMV: return 1; |
535 | 0 | case NEAR_NEWMV_OPTFLOW: return 2; |
536 | 0 | case NEW_NEARMV_OPTFLOW: return 3; |
537 | 0 | case NEWMV: return 4; |
538 | 0 | case JOINT_NEWMV: return 5; |
539 | 0 | case JOINT_NEWMV_OPTFLOW: return 6; |
540 | 0 | case NEW_NEWMV: return 7; |
541 | 0 | case NEW_NEWMV_OPTFLOW: return 8; |
542 | 0 | default: return -1; |
543 | 0 | } |
544 | 0 | } Unexecuted instantiation: av2_dx_iface.c:amvd_mode_to_index Unexecuted instantiation: annexF.c:amvd_mode_to_index Unexecuted instantiation: decodeframe.c:amvd_mode_to_index Unexecuted instantiation: decodemv.c:amvd_mode_to_index Unexecuted instantiation: decoder.c:amvd_mode_to_index Unexecuted instantiation: decodetxb.c:amvd_mode_to_index Unexecuted instantiation: detokenize.c:amvd_mode_to_index Unexecuted instantiation: obu_fgm.c:amvd_mode_to_index Unexecuted instantiation: obu.c:amvd_mode_to_index Unexecuted instantiation: obu_ci.c:amvd_mode_to_index Unexecuted instantiation: obu_atlas.c:amvd_mode_to_index Unexecuted instantiation: obu_lcr.c:amvd_mode_to_index Unexecuted instantiation: obu_ops.c:amvd_mode_to_index Unexecuted instantiation: obu_buf.c:amvd_mode_to_index Unexecuted instantiation: intrapred_avx2.c:amvd_mode_to_index Unexecuted instantiation: alloccommon.c:amvd_mode_to_index Unexecuted instantiation: av2_loopfilter.c:amvd_mode_to_index Unexecuted instantiation: cdef.c:amvd_mode_to_index Unexecuted instantiation: gdf.c:amvd_mode_to_index Unexecuted instantiation: gdf_block.c:amvd_mode_to_index Unexecuted instantiation: cfl.c:amvd_mode_to_index Unexecuted instantiation: entropymode.c:amvd_mode_to_index Unexecuted instantiation: level.c:amvd_mode_to_index Unexecuted instantiation: mvref_common.c:amvd_mode_to_index Unexecuted instantiation: pred_common.c:amvd_mode_to_index Unexecuted instantiation: reconinter.c:amvd_mode_to_index Unexecuted instantiation: reconintra.c:amvd_mode_to_index Unexecuted instantiation: restoration.c:amvd_mode_to_index Unexecuted instantiation: thread_common.c:amvd_mode_to_index Unexecuted instantiation: tip.c:amvd_mode_to_index Unexecuted instantiation: warped_motion.c:amvd_mode_to_index Unexecuted instantiation: ccso.c:amvd_mode_to_index Unexecuted instantiation: bru.c:amvd_mode_to_index Unexecuted instantiation: obu_qm.c:amvd_mode_to_index Unexecuted instantiation: optflow_refine_sse4.c:amvd_mode_to_index Unexecuted instantiation: affine_optflow_refine_avx2.c:amvd_mode_to_index Unexecuted instantiation: gdf_block_avx2.c:amvd_mode_to_index |
545 | | |
546 | 0 | static INLINE int get_amvd_context(const MACROBLOCKD *const xd) { |
547 | 0 | int ctx = 0; |
548 | |
|
549 | 0 | const MB_MODE_INFO *const mbmi = xd->mi[0]; |
550 | |
|
551 | 0 | for (int i = 0; i < MAX_NUM_NEIGHBORS; ++i) { |
552 | 0 | const MB_MODE_INFO *const neighbor = xd->neighbors_line_buffer[i]; |
553 | 0 | if (neighbor != NULL) { |
554 | 0 | if (allow_amvd_mode(neighbor->mode)) { |
555 | 0 | if (neighbor->ref_frame[0] == mbmi->ref_frame[0]) |
556 | 0 | ctx += !!neighbor->use_amvd; |
557 | 0 | } |
558 | 0 | } |
559 | 0 | } |
560 | 0 | return ctx; |
561 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_amvd_context Unexecuted instantiation: annexF.c:get_amvd_context Unexecuted instantiation: decodeframe.c:get_amvd_context Unexecuted instantiation: decodemv.c:get_amvd_context Unexecuted instantiation: decoder.c:get_amvd_context Unexecuted instantiation: decodetxb.c:get_amvd_context Unexecuted instantiation: detokenize.c:get_amvd_context Unexecuted instantiation: obu_fgm.c:get_amvd_context Unexecuted instantiation: obu.c:get_amvd_context Unexecuted instantiation: obu_ci.c:get_amvd_context Unexecuted instantiation: obu_atlas.c:get_amvd_context Unexecuted instantiation: obu_lcr.c:get_amvd_context Unexecuted instantiation: obu_ops.c:get_amvd_context Unexecuted instantiation: obu_buf.c:get_amvd_context Unexecuted instantiation: intrapred_avx2.c:get_amvd_context Unexecuted instantiation: alloccommon.c:get_amvd_context Unexecuted instantiation: av2_loopfilter.c:get_amvd_context Unexecuted instantiation: cdef.c:get_amvd_context Unexecuted instantiation: gdf.c:get_amvd_context Unexecuted instantiation: gdf_block.c:get_amvd_context Unexecuted instantiation: cfl.c:get_amvd_context Unexecuted instantiation: entropymode.c:get_amvd_context Unexecuted instantiation: level.c:get_amvd_context Unexecuted instantiation: mvref_common.c:get_amvd_context Unexecuted instantiation: pred_common.c:get_amvd_context Unexecuted instantiation: reconinter.c:get_amvd_context Unexecuted instantiation: reconintra.c:get_amvd_context Unexecuted instantiation: restoration.c:get_amvd_context Unexecuted instantiation: thread_common.c:get_amvd_context Unexecuted instantiation: tip.c:get_amvd_context Unexecuted instantiation: warped_motion.c:get_amvd_context Unexecuted instantiation: ccso.c:get_amvd_context Unexecuted instantiation: bru.c:get_amvd_context Unexecuted instantiation: obu_qm.c:get_amvd_context Unexecuted instantiation: optflow_refine_sse4.c:get_amvd_context Unexecuted instantiation: affine_optflow_refine_avx2.c:get_amvd_context Unexecuted instantiation: gdf_block_avx2.c:get_amvd_context |
562 | | |
563 | | void av2_copy_frame_refined_mvs(const AV2_COMMON *const cm, |
564 | | const MACROBLOCKD *xd, |
565 | | const MB_MODE_INFO *const mi, int mi_row, |
566 | | int mi_col, int x_inside_boundary, |
567 | | int y_inside_boundary); |
568 | | |
569 | | void bru_copy_sb_mvs(const AV2_COMMON *const cm, int src_ref_idx, |
570 | | int dst_ref_idx, int mi_row, int mi_col, |
571 | | int x_inside_boundary, int y_inside_boundary); |
572 | | void bru_zero_sb_mvs(const AV2_COMMON *const cm, int dst_ref_idx, int mi_row, |
573 | | int mi_col, int x_inside_boundary, int y_inside_boundary); |
574 | | void av2_copy_frame_mvs(const AV2_COMMON *const cm, const MACROBLOCKD *const xd, |
575 | | const MB_MODE_INFO *const mi, int mi_row, int mi_col, |
576 | | int x_inside_boundary, int y_inside_boundary); |
577 | | |
578 | | // Scans neighboring blocks for inter mode contexts |
579 | | void av2_find_mode_ctx(const AV2_COMMON *cm, const MACROBLOCKD *xd, |
580 | | int16_t *mode_context, MV_REFERENCE_FRAME ref_frame); |
581 | | |
582 | | // The global_mvs output parameter points to an array of REF_FRAMES elements. |
583 | | // The caller may pass a null global_mvs if it does not need the global_mvs |
584 | | // output. |
585 | | void av2_find_mv_refs( |
586 | | const AV2_COMMON *cm, const MACROBLOCKD *xd, MB_MODE_INFO *mi, |
587 | | MV_REFERENCE_FRAME ref_frame, uint8_t ref_mv_count[MODE_CTX_REF_FRAMES], |
588 | | CANDIDATE_MV ref_mv_stack[][MAX_REF_MV_STACK_SIZE], |
589 | | uint16_t ref_mv_weight[][MAX_REF_MV_STACK_SIZE], |
590 | | int_mv mv_ref_list[][MAX_MV_REF_CANDIDATES], int_mv *global_mvs, |
591 | | WARP_CANDIDATE warp_param_stack[][MAX_WARP_REF_CANDIDATES], |
592 | | int max_num_of_warp_candidates, |
593 | | uint8_t valid_num_warp_candidates[INTER_REFS_PER_FRAME]); |
594 | | |
595 | | void get_skip_mode_ref_offsets(const AV2_COMMON *cm, int ref_order_hint[2]); |
596 | | |
597 | | // Initialize the warp cadidate lists to invalid values |
598 | | void av2_initialize_warp_wrl_list( |
599 | | WARP_CANDIDATE warp_param_stack[][MAX_WARP_REF_CANDIDATES], |
600 | | uint8_t valid_num_warp_candidates[INTER_REFS_PER_FRAME]); |
601 | | |
602 | | uint8_t av2_findSamples(const AV2_COMMON *cm, MACROBLOCKD *xd, int *pts, |
603 | | int *pts_inref, int ref_idx); |
604 | | |
605 | | // num of buffers for intraBC: left 3x64x64 + current 64x64 + partial reuse |
606 | 20.1k | #define INTRABC_BUFFER_NUM 4 |
607 | | // intraBC reference buffer size: INTRABC_BUFFER_NUM*64x64 |
608 | 20.1k | #define INTRABC_BUFFER_SIZE_LOG2 6 |
609 | 362k | #define INTRABC_DELAY_PIXELS 256 // Delay of 256 pixels |
610 | 295k | #define INTRABC_DELAY_SB64 (INTRABC_DELAY_PIXELS / 64) |
611 | | |
612 | | static INLINE void av2_find_ref_dv(int_mv *ref_dv, const TileInfo *const tile, |
613 | 0 | int mib_size, int mi_row) { |
614 | 0 | if (mi_row - mib_size < tile->mi_row_start) { |
615 | 0 | ref_dv->as_fullmv.row = 0; |
616 | 0 | ref_dv->as_fullmv.col = -MI_SIZE * mib_size - INTRABC_DELAY_PIXELS; |
617 | 0 | } else { |
618 | 0 | ref_dv->as_fullmv.row = -MI_SIZE * mib_size; |
619 | 0 | ref_dv->as_fullmv.col = 0; |
620 | 0 | } |
621 | 0 | convert_fullmv_to_mv(ref_dv); |
622 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_find_ref_dv Unexecuted instantiation: annexF.c:av2_find_ref_dv Unexecuted instantiation: decodeframe.c:av2_find_ref_dv Unexecuted instantiation: decodemv.c:av2_find_ref_dv Unexecuted instantiation: decoder.c:av2_find_ref_dv Unexecuted instantiation: decodetxb.c:av2_find_ref_dv Unexecuted instantiation: detokenize.c:av2_find_ref_dv Unexecuted instantiation: obu_fgm.c:av2_find_ref_dv Unexecuted instantiation: obu.c:av2_find_ref_dv Unexecuted instantiation: obu_ci.c:av2_find_ref_dv Unexecuted instantiation: obu_atlas.c:av2_find_ref_dv Unexecuted instantiation: obu_lcr.c:av2_find_ref_dv Unexecuted instantiation: obu_ops.c:av2_find_ref_dv Unexecuted instantiation: obu_buf.c:av2_find_ref_dv Unexecuted instantiation: intrapred_avx2.c:av2_find_ref_dv Unexecuted instantiation: alloccommon.c:av2_find_ref_dv Unexecuted instantiation: av2_loopfilter.c:av2_find_ref_dv Unexecuted instantiation: cdef.c:av2_find_ref_dv Unexecuted instantiation: gdf.c:av2_find_ref_dv Unexecuted instantiation: gdf_block.c:av2_find_ref_dv Unexecuted instantiation: cfl.c:av2_find_ref_dv Unexecuted instantiation: entropymode.c:av2_find_ref_dv Unexecuted instantiation: level.c:av2_find_ref_dv Unexecuted instantiation: mvref_common.c:av2_find_ref_dv Unexecuted instantiation: pred_common.c:av2_find_ref_dv Unexecuted instantiation: reconinter.c:av2_find_ref_dv Unexecuted instantiation: reconintra.c:av2_find_ref_dv Unexecuted instantiation: restoration.c:av2_find_ref_dv Unexecuted instantiation: thread_common.c:av2_find_ref_dv Unexecuted instantiation: tip.c:av2_find_ref_dv Unexecuted instantiation: warped_motion.c:av2_find_ref_dv Unexecuted instantiation: ccso.c:av2_find_ref_dv Unexecuted instantiation: bru.c:av2_find_ref_dv Unexecuted instantiation: obu_qm.c:av2_find_ref_dv Unexecuted instantiation: optflow_refine_sse4.c:av2_find_ref_dv Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_find_ref_dv Unexecuted instantiation: gdf_block_avx2.c:av2_find_ref_dv |
623 | | |
624 | | static INLINE int is_two_blk_overlap(int blk1_x_left, int blk1_x_right, |
625 | | int blk1_y_top, int blk1_y_bottom, |
626 | | int blk2_x_left, int blk2_x_right, |
627 | 294 | int blk2_y_top, int blk2_y_bottom) { |
628 | 294 | if (blk2_x_left > blk1_x_right || blk2_x_right < blk1_x_left) return 0; |
629 | 18 | if (blk2_y_top > blk1_y_bottom || blk2_y_bottom < blk1_y_top) return 0; |
630 | 1 | return 1; |
631 | 18 | } Unexecuted instantiation: av2_dx_iface.c:is_two_blk_overlap Unexecuted instantiation: annexF.c:is_two_blk_overlap Unexecuted instantiation: decodeframe.c:is_two_blk_overlap decodemv.c:is_two_blk_overlap Line | Count | Source | 627 | 294 | int blk2_y_top, int blk2_y_bottom) { | 628 | 294 | if (blk2_x_left > blk1_x_right || blk2_x_right < blk1_x_left) return 0; | 629 | 18 | if (blk2_y_top > blk1_y_bottom || blk2_y_bottom < blk1_y_top) return 0; | 630 | 1 | return 1; | 631 | 18 | } |
Unexecuted instantiation: decoder.c:is_two_blk_overlap Unexecuted instantiation: decodetxb.c:is_two_blk_overlap Unexecuted instantiation: detokenize.c:is_two_blk_overlap Unexecuted instantiation: obu_fgm.c:is_two_blk_overlap Unexecuted instantiation: obu.c:is_two_blk_overlap Unexecuted instantiation: obu_ci.c:is_two_blk_overlap Unexecuted instantiation: obu_atlas.c:is_two_blk_overlap Unexecuted instantiation: obu_lcr.c:is_two_blk_overlap Unexecuted instantiation: obu_ops.c:is_two_blk_overlap Unexecuted instantiation: obu_buf.c:is_two_blk_overlap Unexecuted instantiation: intrapred_avx2.c:is_two_blk_overlap Unexecuted instantiation: alloccommon.c:is_two_blk_overlap Unexecuted instantiation: av2_loopfilter.c:is_two_blk_overlap Unexecuted instantiation: cdef.c:is_two_blk_overlap Unexecuted instantiation: gdf.c:is_two_blk_overlap Unexecuted instantiation: gdf_block.c:is_two_blk_overlap Unexecuted instantiation: cfl.c:is_two_blk_overlap Unexecuted instantiation: entropymode.c:is_two_blk_overlap Unexecuted instantiation: level.c:is_two_blk_overlap Unexecuted instantiation: mvref_common.c:is_two_blk_overlap Unexecuted instantiation: pred_common.c:is_two_blk_overlap Unexecuted instantiation: reconinter.c:is_two_blk_overlap Unexecuted instantiation: reconintra.c:is_two_blk_overlap Unexecuted instantiation: restoration.c:is_two_blk_overlap Unexecuted instantiation: thread_common.c:is_two_blk_overlap Unexecuted instantiation: tip.c:is_two_blk_overlap Unexecuted instantiation: warped_motion.c:is_two_blk_overlap Unexecuted instantiation: ccso.c:is_two_blk_overlap Unexecuted instantiation: bru.c:is_two_blk_overlap Unexecuted instantiation: obu_qm.c:is_two_blk_overlap Unexecuted instantiation: optflow_refine_sse4.c:is_two_blk_overlap Unexecuted instantiation: affine_optflow_refine_avx2.c:is_two_blk_overlap Unexecuted instantiation: gdf_block_avx2.c:is_two_blk_overlap |
632 | | |
633 | | static INLINE int av2_is_dv_in_local_range(const AV2_COMMON *cm, const MV dv, |
634 | | const MACROBLOCKD *xd, int mi_row, |
635 | | int mi_col, int bh, int bw, |
636 | 100k | int mib_size_log2) { |
637 | 100k | int sb_root_partition_info = INVALID_INTRABC_SB_PARTITION; |
638 | 100k | if (xd->mi && xd->mi[0]) { |
639 | 100k | sb_root_partition_info = xd->mi[0]->sb_root_partition_info; |
640 | 100k | } |
641 | 100k | assert(((sb_root_partition_info == SB_VERT_PARTITION || |
642 | 100k | sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION) && |
643 | 100k | mib_size_log2 > mi_size_wide_log2[BLOCK_64X64]) || |
644 | 100k | mib_size_log2 == mi_size_wide_log2[BLOCK_64X64]); |
645 | 100k | int has_col_offset = dv.col & 7; // sub-pel col |
646 | 100k | int has_row_offset = dv.row & 7; // sub-pel col |
647 | 100k | int left_interp_border = has_col_offset ? IBC_LEFT_INTERP_BORDER : 0; |
648 | 100k | int right_interp_border = has_col_offset ? IBC_RIGHT_INTERP_BORDER : 0; |
649 | 100k | int top_interp_border = has_row_offset ? IBC_TOP_INTERP_BORDER : 0; |
650 | 100k | int bottom_interp_border = has_row_offset ? IBC_BOTTOM_INTERP_BORDER : 0; |
651 | 100k | const int SCALE_PX_TO_MV = 8; |
652 | 100k | const int src_top_edge = (mi_row * MI_SIZE) * SCALE_PX_TO_MV + dv.row; |
653 | 100k | const int src_left_edge = (mi_col * MI_SIZE) * SCALE_PX_TO_MV + dv.col; |
654 | 100k | const int src_bottom_edge = (mi_row * MI_SIZE + bh) * SCALE_PX_TO_MV + dv.row; |
655 | 100k | const int src_right_edge = (mi_col * MI_SIZE + bw) * SCALE_PX_TO_MV + dv.col; |
656 | | |
657 | 100k | const int src_top_y = (src_top_edge >> 3) - top_interp_border; |
658 | 100k | const int src_left_x = (src_left_edge >> 3) - left_interp_border; |
659 | 100k | const int src_bottom_y = (src_bottom_edge >> 3) - 1 + bottom_interp_border; |
660 | 100k | const int src_right_x = (src_right_edge >> 3) - 1 + right_interp_border; |
661 | 100k | const int act_left_x = mi_col * MI_SIZE; // active(current) coding blk |
662 | 100k | const int act_top_y = mi_row * MI_SIZE; // active(current) coding blk |
663 | 100k | const int act_right_x = act_left_x + bw - 1; |
664 | 100k | const int act_bottom_y = act_top_y + bh - 1; |
665 | 100k | const int sb_size_log2 = mib_size_log2 + MI_SIZE_LOG2; |
666 | | // reference blk cannot be in bottom-right region of the top-left corner of |
667 | | // current block (uncoded region) |
668 | 100k | if (((dv.col >> 3) + bw + right_interp_border) > 0 && |
669 | 55.6k | ((dv.row >> 3) + bh + bottom_interp_border) > 0) |
670 | 278 | return 0; |
671 | | // reference blk must be in the same sb row |
672 | 100k | if ((src_top_y >> sb_size_log2) < (act_top_y >> sb_size_log2)) return 0; |
673 | 20.1k | if ((src_bottom_y >> sb_size_log2) > (act_top_y >> sb_size_log2)) return 0; |
674 | | // numLeftSB=round_up(num_samples_in_IBC_ref_buffer/num_samples_in_superblock) |
675 | 20.1k | const int numLeftSB = |
676 | 20.1k | (INTRABC_BUFFER_NUM * (1 << (2 * INTRABC_BUFFER_SIZE_LOG2)) + |
677 | 20.1k | (1 << 2 * sb_size_log2) - 1) >> |
678 | 20.1k | (2 * sb_size_log2); |
679 | 20.1k | int numLeftActiveSB = numLeftSB; |
680 | 20.1k | if (sb_size_log2 == (mi_size_wide_log2[BLOCK_64X64] + MI_SIZE_LOG2) && |
681 | 1.39k | cm->bru.enabled) { |
682 | 0 | numLeftActiveSB = 1; |
683 | 0 | const int sb_col = mi_col >> mib_size_log2; |
684 | 0 | const int sb_row = mi_row >> mib_size_log2; |
685 | 0 | while (numLeftActiveSB < numLeftSB) { |
686 | | // treat padding region as support |
687 | 0 | if (sb_col - numLeftActiveSB - 1 >= 0) { |
688 | 0 | SB_INFO *sbi = |
689 | 0 | av2_get_sb_info(cm, sb_row << mib_size_log2, |
690 | 0 | (sb_col - numLeftActiveSB - 1) << mib_size_log2); |
691 | 0 | if (sbi->sb_active_mode == BRU_INACTIVE_SB) { |
692 | 0 | break; |
693 | 0 | } |
694 | 0 | } |
695 | 0 | numLeftActiveSB++; |
696 | 0 | } |
697 | 0 | } |
698 | 20.1k | const int valid_SB = |
699 | 20.1k | ((src_right_x >> sb_size_log2) <= (act_left_x >> sb_size_log2)) && |
700 | 20.0k | ((src_left_x >> sb_size_log2) >= |
701 | 20.0k | ((act_left_x >> sb_size_log2) - numLeftActiveSB)); |
702 | | // reference blk must be in the current SB or left n SBs |
703 | 20.1k | if (!valid_SB) return 0; |
704 | | |
705 | 1.52k | int TL_same_ref = -1; |
706 | 1.52k | int BR_same_ref = -1; |
707 | | // 1: ref and curr blk in the same 128x128, no collocation shift required; |
708 | | // 0: ref and curr blk NOT in the same 128x128, shift required; |
709 | | //-1: no need to check, always valid |
710 | 1.52k | int src_colo_left_x = src_left_x; |
711 | 1.52k | int src_colo_top_y = src_top_y; |
712 | 1.52k | int src_colo_right_x = src_right_x; |
713 | 1.52k | int src_colo_bottom_y = src_bottom_y; |
714 | 1.52k | if (mib_size_log2 == mi_size_wide_log2[BLOCK_64X64] || |
715 | 1.52k | mib_size_log2 == mi_size_wide_log2[BLOCK_128X128]) { |
716 | 1.52k | const int sb_off = |
717 | 1.52k | (act_left_x >> sb_size_log2) - (src_left_x >> sb_size_log2); |
718 | 1.52k | if (sb_off == numLeftSB) { |
719 | 300 | TL_same_ref = 0; |
720 | 300 | BR_same_ref = |
721 | 300 | (src_right_x >> sb_size_log2) == (act_left_x >> sb_size_log2); |
722 | 300 | src_colo_left_x += sb_off * (1 << sb_size_log2); |
723 | 300 | src_colo_right_x += sb_off * (1 << sb_size_log2); |
724 | 1.22k | } else if (sb_off != 0) { |
725 | 201 | TL_same_ref = -1; |
726 | 201 | BR_same_ref = |
727 | 201 | (src_right_x >> sb_size_log2) == (act_left_x >> sb_size_log2); |
728 | 1.02k | } else { |
729 | 1.02k | assert(sb_off == 0); |
730 | 1.02k | TL_same_ref = 1; |
731 | 1.02k | BR_same_ref = |
732 | 1.02k | (src_right_x >> sb_size_log2) == (act_left_x >> sb_size_log2); |
733 | 1.02k | } |
734 | 1.52k | } else if (mib_size_log2 == mi_size_wide_log2[BLOCK_256X256]) { |
735 | 0 | const int ref_log2 = mi_size_wide_log2[BLOCK_128X128] + MI_SIZE_LOG2; |
736 | 0 | const int off_128_left = |
737 | 0 | (act_left_x >> ref_log2) - (src_left_x >> ref_log2); |
738 | 0 | const int off_128_right = |
739 | 0 | (act_left_x >> ref_log2) - (src_right_x >> ref_log2); |
740 | 0 | const int off_128_top = (act_top_y >> ref_log2) - (src_top_y >> ref_log2); |
741 | 0 | const int off_128_bottom = |
742 | 0 | (act_top_y >> ref_log2) - (src_bottom_y >> ref_log2); |
743 | 0 | src_colo_left_x += (1 << ref_log2) * off_128_left; |
744 | 0 | src_colo_right_x += (1 << ref_log2) * off_128_left; |
745 | 0 | src_colo_top_y += (1 << ref_log2) * off_128_top; |
746 | 0 | src_colo_bottom_y += (1 << ref_log2) * off_128_top; |
747 | | // |R|Q0|Q1| |
748 | | //------------ |
749 | | // |P|Q2|Q3| |
750 | 0 | if ((((act_left_x >> ref_log2) & 0x01) == 0) && |
751 | 0 | (((act_top_y >> ref_log2) & 0x01) == 0)) { // Q0 |
752 | 0 | if (off_128_left == 0 && off_128_right == 0 && off_128_top == 0 && |
753 | 0 | off_128_bottom == 0) { |
754 | | // refer to Q0 |
755 | 0 | TL_same_ref = 1; |
756 | 0 | BR_same_ref = 1; |
757 | 0 | } else if (off_128_left == 1 && off_128_right == 1 && off_128_top == -1 && |
758 | 0 | off_128_bottom == -1) { // refer to P |
759 | 0 | TL_same_ref = 0; |
760 | 0 | BR_same_ref = 0; |
761 | 0 | } else { |
762 | 0 | return 0; |
763 | 0 | } |
764 | 0 | } else if ((((act_left_x >> ref_log2) & 0x01) == 0) && |
765 | 0 | (((act_top_y >> ref_log2) & 0x01) == 1)) { // Q2 |
766 | 0 | if (off_128_left == 0 && off_128_right == 0 && off_128_top == 0 && |
767 | 0 | off_128_bottom == 0) { |
768 | | // refer to Q2 itself |
769 | 0 | TL_same_ref = 1; |
770 | 0 | BR_same_ref = 1; |
771 | 0 | } else if (sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION && |
772 | 0 | off_128_left == -1 && off_128_right == -1 && |
773 | 0 | off_128_top == 1 && off_128_bottom == 1) { // refer to Q1 |
774 | 0 | TL_same_ref = 0; |
775 | 0 | BR_same_ref = 0; |
776 | 0 | } else if (sb_root_partition_info == SB_VERT_PARTITION && |
777 | 0 | off_128_left == 0 && off_128_right == 0 && |
778 | 0 | off_128_top == 1) { // refer to Q0 due to vertical split of SB |
779 | 0 | TL_same_ref = 0; |
780 | 0 | BR_same_ref = (src_bottom_y >> ref_log2) == (act_top_y >> ref_log2); |
781 | 0 | } else { |
782 | 0 | return 0; |
783 | 0 | } |
784 | 0 | } else if ((((act_left_x >> ref_log2) & 0x01) == 1) && |
785 | 0 | (((act_top_y >> ref_log2) & 0x01) == 0)) { // Q1 |
786 | 0 | if (off_128_left == 0 && off_128_right == 0 && off_128_top == 0 && |
787 | 0 | off_128_bottom == 0) { |
788 | | // refer to Q1 itself |
789 | 0 | TL_same_ref = 1; |
790 | 0 | BR_same_ref = 1; |
791 | 0 | } else if (sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION && |
792 | 0 | off_128_left == 1 && off_128_top == 0 && |
793 | 0 | off_128_bottom == |
794 | 0 | 0) { // refer to Q0 due to quad/hor split of SB |
795 | 0 | TL_same_ref = 0; |
796 | 0 | BR_same_ref = (src_right_x >> ref_log2) == (act_left_x >> ref_log2); |
797 | 0 | } else if (sb_root_partition_info == SB_VERT_PARTITION && |
798 | 0 | off_128_left == 1 && off_128_right == 1 && off_128_top == -1 && |
799 | 0 | off_128_bottom == -1) { // refer to Q2 due to ver split of SB |
800 | 0 | TL_same_ref = 0; |
801 | 0 | BR_same_ref = 0; |
802 | 0 | } else { |
803 | 0 | return 0; |
804 | 0 | } |
805 | 0 | } else if ((((act_left_x >> ref_log2) & 0x01) == 1) && |
806 | 0 | (((act_top_y >> ref_log2) & 0x01) == 1)) { // Q3 |
807 | 0 | if (off_128_left == 0 && off_128_right == 0 && off_128_top == 0 && |
808 | 0 | off_128_bottom == 0) { |
809 | | // refer to Q3 itself |
810 | 0 | TL_same_ref = 1; |
811 | 0 | BR_same_ref = 1; |
812 | 0 | } else if (sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION && |
813 | 0 | off_128_left == 1 && off_128_top == 0 && |
814 | 0 | off_128_bottom == |
815 | 0 | 0) { // refer to Q2 due to quad/hor split of SB |
816 | 0 | TL_same_ref = 0; |
817 | 0 | BR_same_ref = (src_right_x >> ref_log2) == (act_left_x >> ref_log2); |
818 | 0 | } else if (sb_root_partition_info == SB_VERT_PARTITION && |
819 | 0 | off_128_left == 0 && off_128_right == 0 && |
820 | 0 | off_128_top == 1) { // refer to Q1 due to ver split of SB |
821 | 0 | TL_same_ref = 0; |
822 | 0 | BR_same_ref = (src_bottom_y >> ref_log2) == (act_top_y >> ref_log2); |
823 | 0 | } else { |
824 | 0 | return 0; |
825 | 0 | } |
826 | 0 | } |
827 | 0 | } else { |
828 | 0 | assert(0); // other SB_size not supported |
829 | 0 | } |
830 | 1.52k | const int sb_size = 1 << sb_size_log2; |
831 | 1.52k | const int sb_mi_size = sb_size >> MI_SIZE_LOG2; |
832 | 1.52k | const int is_chroma_tree = xd->tree_type == CHROMA_PART; |
833 | 1.52k | const unsigned char *is_mi_coded_map = xd->is_mi_coded[is_chroma_tree]; |
834 | 1.52k | const int LT_mi_col_offset = |
835 | 1.52k | (src_colo_left_x >> MI_SIZE_LOG2) & (sb_mi_size - 1); |
836 | 1.52k | const int LT_mi_row_offset = |
837 | 1.52k | (src_colo_top_y >> MI_SIZE_LOG2) & (sb_mi_size - 1); |
838 | 1.52k | const int LT_pos = |
839 | 1.52k | LT_mi_row_offset * xd->is_mi_coded_stride + LT_mi_col_offset; |
840 | 1.52k | if (TL_same_ref == 1) { |
841 | 1.02k | if (is_mi_coded_map[LT_pos] == 0) return 0; |
842 | 1.02k | } else if (TL_same_ref == 0) { |
843 | 300 | if (is_mi_coded_map[LT_pos] == 1 || is_mi_coded_map[LT_pos] == 2) return 0; |
844 | 294 | if (is_two_blk_overlap(src_colo_left_x, src_colo_right_x, src_colo_top_y, |
845 | 294 | src_colo_bottom_y, act_left_x, act_right_x, |
846 | 294 | act_top_y, act_bottom_y)) |
847 | 1 | return 0; |
848 | 294 | } |
849 | 1.51k | if (BR_same_ref == 1) { |
850 | 1.04k | const int BR_mi_col_offset = |
851 | 1.04k | (src_right_x >> MI_SIZE_LOG2) & (sb_mi_size - 1); |
852 | 1.04k | const int BR_mi_row_offset = |
853 | 1.04k | (src_bottom_y >> MI_SIZE_LOG2) & (sb_mi_size - 1); |
854 | 1.04k | const int BR_pos = |
855 | 1.04k | BR_mi_row_offset * xd->is_mi_coded_stride + BR_mi_col_offset; |
856 | 1.04k | if (is_mi_coded_map[BR_pos] == 0) return 0; |
857 | 1.04k | assert(src_right_x < act_left_x || src_bottom_y < act_top_y); |
858 | 989 | } |
859 | 1.45k | return 1; |
860 | 1.51k | } Unexecuted instantiation: av2_dx_iface.c:av2_is_dv_in_local_range Unexecuted instantiation: annexF.c:av2_is_dv_in_local_range Unexecuted instantiation: decodeframe.c:av2_is_dv_in_local_range decodemv.c:av2_is_dv_in_local_range Line | Count | Source | 636 | 100k | int mib_size_log2) { | 637 | 100k | int sb_root_partition_info = INVALID_INTRABC_SB_PARTITION; | 638 | 100k | if (xd->mi && xd->mi[0]) { | 639 | 100k | sb_root_partition_info = xd->mi[0]->sb_root_partition_info; | 640 | 100k | } | 641 | 100k | assert(((sb_root_partition_info == SB_VERT_PARTITION || | 642 | 100k | sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION) && | 643 | 100k | mib_size_log2 > mi_size_wide_log2[BLOCK_64X64]) || | 644 | 100k | mib_size_log2 == mi_size_wide_log2[BLOCK_64X64]); | 645 | 100k | int has_col_offset = dv.col & 7; // sub-pel col | 646 | 100k | int has_row_offset = dv.row & 7; // sub-pel col | 647 | 100k | int left_interp_border = has_col_offset ? IBC_LEFT_INTERP_BORDER : 0; | 648 | 100k | int right_interp_border = has_col_offset ? IBC_RIGHT_INTERP_BORDER : 0; | 649 | 100k | int top_interp_border = has_row_offset ? IBC_TOP_INTERP_BORDER : 0; | 650 | 100k | int bottom_interp_border = has_row_offset ? IBC_BOTTOM_INTERP_BORDER : 0; | 651 | 100k | const int SCALE_PX_TO_MV = 8; | 652 | 100k | const int src_top_edge = (mi_row * MI_SIZE) * SCALE_PX_TO_MV + dv.row; | 653 | 100k | const int src_left_edge = (mi_col * MI_SIZE) * SCALE_PX_TO_MV + dv.col; | 654 | 100k | const int src_bottom_edge = (mi_row * MI_SIZE + bh) * SCALE_PX_TO_MV + dv.row; | 655 | 100k | const int src_right_edge = (mi_col * MI_SIZE + bw) * SCALE_PX_TO_MV + dv.col; | 656 | | | 657 | 100k | const int src_top_y = (src_top_edge >> 3) - top_interp_border; | 658 | 100k | const int src_left_x = (src_left_edge >> 3) - left_interp_border; | 659 | 100k | const int src_bottom_y = (src_bottom_edge >> 3) - 1 + bottom_interp_border; | 660 | 100k | const int src_right_x = (src_right_edge >> 3) - 1 + right_interp_border; | 661 | 100k | const int act_left_x = mi_col * MI_SIZE; // active(current) coding blk | 662 | 100k | const int act_top_y = mi_row * MI_SIZE; // active(current) coding blk | 663 | 100k | const int act_right_x = act_left_x + bw - 1; | 664 | 100k | const int act_bottom_y = act_top_y + bh - 1; | 665 | 100k | const int sb_size_log2 = mib_size_log2 + MI_SIZE_LOG2; | 666 | | // reference blk cannot be in bottom-right region of the top-left corner of | 667 | | // current block (uncoded region) | 668 | 100k | if (((dv.col >> 3) + bw + right_interp_border) > 0 && | 669 | 55.6k | ((dv.row >> 3) + bh + bottom_interp_border) > 0) | 670 | 278 | return 0; | 671 | | // reference blk must be in the same sb row | 672 | 100k | if ((src_top_y >> sb_size_log2) < (act_top_y >> sb_size_log2)) return 0; | 673 | 20.1k | if ((src_bottom_y >> sb_size_log2) > (act_top_y >> sb_size_log2)) return 0; | 674 | | // numLeftSB=round_up(num_samples_in_IBC_ref_buffer/num_samples_in_superblock) | 675 | 20.1k | const int numLeftSB = | 676 | 20.1k | (INTRABC_BUFFER_NUM * (1 << (2 * INTRABC_BUFFER_SIZE_LOG2)) + | 677 | 20.1k | (1 << 2 * sb_size_log2) - 1) >> | 678 | 20.1k | (2 * sb_size_log2); | 679 | 20.1k | int numLeftActiveSB = numLeftSB; | 680 | 20.1k | if (sb_size_log2 == (mi_size_wide_log2[BLOCK_64X64] + MI_SIZE_LOG2) && | 681 | 1.39k | cm->bru.enabled) { | 682 | 0 | numLeftActiveSB = 1; | 683 | 0 | const int sb_col = mi_col >> mib_size_log2; | 684 | 0 | const int sb_row = mi_row >> mib_size_log2; | 685 | 0 | while (numLeftActiveSB < numLeftSB) { | 686 | | // treat padding region as support | 687 | 0 | if (sb_col - numLeftActiveSB - 1 >= 0) { | 688 | 0 | SB_INFO *sbi = | 689 | 0 | av2_get_sb_info(cm, sb_row << mib_size_log2, | 690 | 0 | (sb_col - numLeftActiveSB - 1) << mib_size_log2); | 691 | 0 | if (sbi->sb_active_mode == BRU_INACTIVE_SB) { | 692 | 0 | break; | 693 | 0 | } | 694 | 0 | } | 695 | 0 | numLeftActiveSB++; | 696 | 0 | } | 697 | 0 | } | 698 | 20.1k | const int valid_SB = | 699 | 20.1k | ((src_right_x >> sb_size_log2) <= (act_left_x >> sb_size_log2)) && | 700 | 20.0k | ((src_left_x >> sb_size_log2) >= | 701 | 20.0k | ((act_left_x >> sb_size_log2) - numLeftActiveSB)); | 702 | | // reference blk must be in the current SB or left n SBs | 703 | 20.1k | if (!valid_SB) return 0; | 704 | | | 705 | 1.52k | int TL_same_ref = -1; | 706 | 1.52k | int BR_same_ref = -1; | 707 | | // 1: ref and curr blk in the same 128x128, no collocation shift required; | 708 | | // 0: ref and curr blk NOT in the same 128x128, shift required; | 709 | | //-1: no need to check, always valid | 710 | 1.52k | int src_colo_left_x = src_left_x; | 711 | 1.52k | int src_colo_top_y = src_top_y; | 712 | 1.52k | int src_colo_right_x = src_right_x; | 713 | 1.52k | int src_colo_bottom_y = src_bottom_y; | 714 | 1.52k | if (mib_size_log2 == mi_size_wide_log2[BLOCK_64X64] || | 715 | 1.52k | mib_size_log2 == mi_size_wide_log2[BLOCK_128X128]) { | 716 | 1.52k | const int sb_off = | 717 | 1.52k | (act_left_x >> sb_size_log2) - (src_left_x >> sb_size_log2); | 718 | 1.52k | if (sb_off == numLeftSB) { | 719 | 300 | TL_same_ref = 0; | 720 | 300 | BR_same_ref = | 721 | 300 | (src_right_x >> sb_size_log2) == (act_left_x >> sb_size_log2); | 722 | 300 | src_colo_left_x += sb_off * (1 << sb_size_log2); | 723 | 300 | src_colo_right_x += sb_off * (1 << sb_size_log2); | 724 | 1.22k | } else if (sb_off != 0) { | 725 | 201 | TL_same_ref = -1; | 726 | 201 | BR_same_ref = | 727 | 201 | (src_right_x >> sb_size_log2) == (act_left_x >> sb_size_log2); | 728 | 1.02k | } else { | 729 | 1.02k | assert(sb_off == 0); | 730 | 1.02k | TL_same_ref = 1; | 731 | 1.02k | BR_same_ref = | 732 | 1.02k | (src_right_x >> sb_size_log2) == (act_left_x >> sb_size_log2); | 733 | 1.02k | } | 734 | 1.52k | } else if (mib_size_log2 == mi_size_wide_log2[BLOCK_256X256]) { | 735 | 0 | const int ref_log2 = mi_size_wide_log2[BLOCK_128X128] + MI_SIZE_LOG2; | 736 | 0 | const int off_128_left = | 737 | 0 | (act_left_x >> ref_log2) - (src_left_x >> ref_log2); | 738 | 0 | const int off_128_right = | 739 | 0 | (act_left_x >> ref_log2) - (src_right_x >> ref_log2); | 740 | 0 | const int off_128_top = (act_top_y >> ref_log2) - (src_top_y >> ref_log2); | 741 | 0 | const int off_128_bottom = | 742 | 0 | (act_top_y >> ref_log2) - (src_bottom_y >> ref_log2); | 743 | 0 | src_colo_left_x += (1 << ref_log2) * off_128_left; | 744 | 0 | src_colo_right_x += (1 << ref_log2) * off_128_left; | 745 | 0 | src_colo_top_y += (1 << ref_log2) * off_128_top; | 746 | 0 | src_colo_bottom_y += (1 << ref_log2) * off_128_top; | 747 | | // |R|Q0|Q1| | 748 | | //------------ | 749 | | // |P|Q2|Q3| | 750 | 0 | if ((((act_left_x >> ref_log2) & 0x01) == 0) && | 751 | 0 | (((act_top_y >> ref_log2) & 0x01) == 0)) { // Q0 | 752 | 0 | if (off_128_left == 0 && off_128_right == 0 && off_128_top == 0 && | 753 | 0 | off_128_bottom == 0) { | 754 | | // refer to Q0 | 755 | 0 | TL_same_ref = 1; | 756 | 0 | BR_same_ref = 1; | 757 | 0 | } else if (off_128_left == 1 && off_128_right == 1 && off_128_top == -1 && | 758 | 0 | off_128_bottom == -1) { // refer to P | 759 | 0 | TL_same_ref = 0; | 760 | 0 | BR_same_ref = 0; | 761 | 0 | } else { | 762 | 0 | return 0; | 763 | 0 | } | 764 | 0 | } else if ((((act_left_x >> ref_log2) & 0x01) == 0) && | 765 | 0 | (((act_top_y >> ref_log2) & 0x01) == 1)) { // Q2 | 766 | 0 | if (off_128_left == 0 && off_128_right == 0 && off_128_top == 0 && | 767 | 0 | off_128_bottom == 0) { | 768 | | // refer to Q2 itself | 769 | 0 | TL_same_ref = 1; | 770 | 0 | BR_same_ref = 1; | 771 | 0 | } else if (sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION && | 772 | 0 | off_128_left == -1 && off_128_right == -1 && | 773 | 0 | off_128_top == 1 && off_128_bottom == 1) { // refer to Q1 | 774 | 0 | TL_same_ref = 0; | 775 | 0 | BR_same_ref = 0; | 776 | 0 | } else if (sb_root_partition_info == SB_VERT_PARTITION && | 777 | 0 | off_128_left == 0 && off_128_right == 0 && | 778 | 0 | off_128_top == 1) { // refer to Q0 due to vertical split of SB | 779 | 0 | TL_same_ref = 0; | 780 | 0 | BR_same_ref = (src_bottom_y >> ref_log2) == (act_top_y >> ref_log2); | 781 | 0 | } else { | 782 | 0 | return 0; | 783 | 0 | } | 784 | 0 | } else if ((((act_left_x >> ref_log2) & 0x01) == 1) && | 785 | 0 | (((act_top_y >> ref_log2) & 0x01) == 0)) { // Q1 | 786 | 0 | if (off_128_left == 0 && off_128_right == 0 && off_128_top == 0 && | 787 | 0 | off_128_bottom == 0) { | 788 | | // refer to Q1 itself | 789 | 0 | TL_same_ref = 1; | 790 | 0 | BR_same_ref = 1; | 791 | 0 | } else if (sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION && | 792 | 0 | off_128_left == 1 && off_128_top == 0 && | 793 | 0 | off_128_bottom == | 794 | 0 | 0) { // refer to Q0 due to quad/hor split of SB | 795 | 0 | TL_same_ref = 0; | 796 | 0 | BR_same_ref = (src_right_x >> ref_log2) == (act_left_x >> ref_log2); | 797 | 0 | } else if (sb_root_partition_info == SB_VERT_PARTITION && | 798 | 0 | off_128_left == 1 && off_128_right == 1 && off_128_top == -1 && | 799 | 0 | off_128_bottom == -1) { // refer to Q2 due to ver split of SB | 800 | 0 | TL_same_ref = 0; | 801 | 0 | BR_same_ref = 0; | 802 | 0 | } else { | 803 | 0 | return 0; | 804 | 0 | } | 805 | 0 | } else if ((((act_left_x >> ref_log2) & 0x01) == 1) && | 806 | 0 | (((act_top_y >> ref_log2) & 0x01) == 1)) { // Q3 | 807 | 0 | if (off_128_left == 0 && off_128_right == 0 && off_128_top == 0 && | 808 | 0 | off_128_bottom == 0) { | 809 | | // refer to Q3 itself | 810 | 0 | TL_same_ref = 1; | 811 | 0 | BR_same_ref = 1; | 812 | 0 | } else if (sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION && | 813 | 0 | off_128_left == 1 && off_128_top == 0 && | 814 | 0 | off_128_bottom == | 815 | 0 | 0) { // refer to Q2 due to quad/hor split of SB | 816 | 0 | TL_same_ref = 0; | 817 | 0 | BR_same_ref = (src_right_x >> ref_log2) == (act_left_x >> ref_log2); | 818 | 0 | } else if (sb_root_partition_info == SB_VERT_PARTITION && | 819 | 0 | off_128_left == 0 && off_128_right == 0 && | 820 | 0 | off_128_top == 1) { // refer to Q1 due to ver split of SB | 821 | 0 | TL_same_ref = 0; | 822 | 0 | BR_same_ref = (src_bottom_y >> ref_log2) == (act_top_y >> ref_log2); | 823 | 0 | } else { | 824 | 0 | return 0; | 825 | 0 | } | 826 | 0 | } | 827 | 0 | } else { | 828 | 0 | assert(0); // other SB_size not supported | 829 | 0 | } | 830 | 1.52k | const int sb_size = 1 << sb_size_log2; | 831 | 1.52k | const int sb_mi_size = sb_size >> MI_SIZE_LOG2; | 832 | 1.52k | const int is_chroma_tree = xd->tree_type == CHROMA_PART; | 833 | 1.52k | const unsigned char *is_mi_coded_map = xd->is_mi_coded[is_chroma_tree]; | 834 | 1.52k | const int LT_mi_col_offset = | 835 | 1.52k | (src_colo_left_x >> MI_SIZE_LOG2) & (sb_mi_size - 1); | 836 | 1.52k | const int LT_mi_row_offset = | 837 | 1.52k | (src_colo_top_y >> MI_SIZE_LOG2) & (sb_mi_size - 1); | 838 | 1.52k | const int LT_pos = | 839 | 1.52k | LT_mi_row_offset * xd->is_mi_coded_stride + LT_mi_col_offset; | 840 | 1.52k | if (TL_same_ref == 1) { | 841 | 1.02k | if (is_mi_coded_map[LT_pos] == 0) return 0; | 842 | 1.02k | } else if (TL_same_ref == 0) { | 843 | 300 | if (is_mi_coded_map[LT_pos] == 1 || is_mi_coded_map[LT_pos] == 2) return 0; | 844 | 294 | if (is_two_blk_overlap(src_colo_left_x, src_colo_right_x, src_colo_top_y, | 845 | 294 | src_colo_bottom_y, act_left_x, act_right_x, | 846 | 294 | act_top_y, act_bottom_y)) | 847 | 1 | return 0; | 848 | 294 | } | 849 | 1.51k | if (BR_same_ref == 1) { | 850 | 1.04k | const int BR_mi_col_offset = | 851 | 1.04k | (src_right_x >> MI_SIZE_LOG2) & (sb_mi_size - 1); | 852 | 1.04k | const int BR_mi_row_offset = | 853 | 1.04k | (src_bottom_y >> MI_SIZE_LOG2) & (sb_mi_size - 1); | 854 | 1.04k | const int BR_pos = | 855 | 1.04k | BR_mi_row_offset * xd->is_mi_coded_stride + BR_mi_col_offset; | 856 | 1.04k | if (is_mi_coded_map[BR_pos] == 0) return 0; | 857 | 1.04k | assert(src_right_x < act_left_x || src_bottom_y < act_top_y); | 858 | 989 | } | 859 | 1.45k | return 1; | 860 | 1.51k | } |
Unexecuted instantiation: decoder.c:av2_is_dv_in_local_range Unexecuted instantiation: decodetxb.c:av2_is_dv_in_local_range Unexecuted instantiation: detokenize.c:av2_is_dv_in_local_range Unexecuted instantiation: obu_fgm.c:av2_is_dv_in_local_range Unexecuted instantiation: obu.c:av2_is_dv_in_local_range Unexecuted instantiation: obu_ci.c:av2_is_dv_in_local_range Unexecuted instantiation: obu_atlas.c:av2_is_dv_in_local_range Unexecuted instantiation: obu_lcr.c:av2_is_dv_in_local_range Unexecuted instantiation: obu_ops.c:av2_is_dv_in_local_range Unexecuted instantiation: obu_buf.c:av2_is_dv_in_local_range Unexecuted instantiation: intrapred_avx2.c:av2_is_dv_in_local_range Unexecuted instantiation: alloccommon.c:av2_is_dv_in_local_range Unexecuted instantiation: av2_loopfilter.c:av2_is_dv_in_local_range Unexecuted instantiation: cdef.c:av2_is_dv_in_local_range Unexecuted instantiation: gdf.c:av2_is_dv_in_local_range Unexecuted instantiation: gdf_block.c:av2_is_dv_in_local_range Unexecuted instantiation: cfl.c:av2_is_dv_in_local_range Unexecuted instantiation: entropymode.c:av2_is_dv_in_local_range Unexecuted instantiation: level.c:av2_is_dv_in_local_range Unexecuted instantiation: mvref_common.c:av2_is_dv_in_local_range Unexecuted instantiation: pred_common.c:av2_is_dv_in_local_range Unexecuted instantiation: reconinter.c:av2_is_dv_in_local_range Unexecuted instantiation: reconintra.c:av2_is_dv_in_local_range Unexecuted instantiation: restoration.c:av2_is_dv_in_local_range Unexecuted instantiation: thread_common.c:av2_is_dv_in_local_range Unexecuted instantiation: tip.c:av2_is_dv_in_local_range Unexecuted instantiation: warped_motion.c:av2_is_dv_in_local_range Unexecuted instantiation: ccso.c:av2_is_dv_in_local_range Unexecuted instantiation: bru.c:av2_is_dv_in_local_range Unexecuted instantiation: obu_qm.c:av2_is_dv_in_local_range Unexecuted instantiation: optflow_refine_sse4.c:av2_is_dv_in_local_range Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_is_dv_in_local_range Unexecuted instantiation: gdf_block_avx2.c:av2_is_dv_in_local_range |
861 | | |
862 | | static INLINE int av2_is_dv_valid(const MV dv, const AV2_COMMON *cm, |
863 | | const MACROBLOCKD *xd, int mi_row, int mi_col, |
864 | 102k | BLOCK_SIZE bsize, int mib_size_log2) { |
865 | 102k | const int bw = block_size_wide[bsize]; |
866 | 102k | const int bh = block_size_high[bsize]; |
867 | 102k | const int SCALE_PX_TO_MV = 8; |
868 | | |
869 | 102k | int has_col_offset = dv.col & 7; // sub-pel col |
870 | 102k | int has_row_offset = dv.row & 7; // sub-pel row |
871 | 102k | int left_interp_border = has_col_offset ? IBC_LEFT_INTERP_BORDER : 0; |
872 | 102k | int right_interp_border = has_col_offset ? IBC_RIGHT_INTERP_BORDER : 0; |
873 | 102k | int top_interp_border = has_row_offset ? IBC_TOP_INTERP_BORDER : 0; |
874 | 102k | int bottom_interp_border = has_row_offset ? IBC_BOTTOM_INTERP_BORDER : 0; |
875 | | |
876 | 102k | const TileInfo *const tile = &xd->tile; |
877 | | // Is the source top-left inside the current tile? |
878 | 102k | const int src_top_edge = |
879 | 102k | (mi_row * MI_SIZE - top_interp_border) * SCALE_PX_TO_MV + dv.row; |
880 | 102k | const int tile_top_edge = tile->mi_row_start * MI_SIZE * SCALE_PX_TO_MV; |
881 | 102k | if (src_top_edge < tile_top_edge) return 0; |
882 | 101k | const int src_left_edge = |
883 | 101k | (mi_col * MI_SIZE - left_interp_border) * SCALE_PX_TO_MV + dv.col; |
884 | 101k | const int tile_left_edge = tile->mi_col_start * MI_SIZE * SCALE_PX_TO_MV; |
885 | 101k | if (src_left_edge < tile_left_edge) return 0; |
886 | | // Is the bottom right inside the current tile? |
887 | 101k | const int src_bottom_edge = |
888 | 101k | (mi_row * MI_SIZE + bh + bottom_interp_border) * SCALE_PX_TO_MV + dv.row - |
889 | 101k | has_row_offset; |
890 | 101k | const int tile_bottom_edge = tile->mi_row_end * MI_SIZE * SCALE_PX_TO_MV; |
891 | 101k | if (src_bottom_edge > tile_bottom_edge) return 0; |
892 | 101k | const int src_right_edge = |
893 | 101k | (mi_col * MI_SIZE + bw + right_interp_border) * SCALE_PX_TO_MV + dv.col - |
894 | 101k | has_col_offset; |
895 | 101k | const int tile_right_edge = tile->mi_col_end * MI_SIZE * SCALE_PX_TO_MV; |
896 | 101k | if (src_right_edge > tile_right_edge) return 0; |
897 | | |
898 | | // Special case for sub 8x8 chroma cases, to prevent referring to chroma |
899 | | // pixels outside current tile. |
900 | 100k | if (!cm->seq_params.enable_sdp || !frame_is_intra_only(cm)) { |
901 | 92.2k | if (xd->is_chroma_ref && av2_num_planes(cm) > 1) { |
902 | 47.9k | const struct macroblockd_plane *const pd = &xd->plane[1]; |
903 | 47.9k | if (xd->mi && xd->mi[0]) { |
904 | 47.9k | const CHROMA_REF_INFO *chroma_ref_info = &xd->mi[0]->chroma_ref_info; |
905 | 47.9k | const int src_left_edge_chroma = |
906 | 47.9k | (chroma_ref_info->mi_col_chroma_base * MI_SIZE - |
907 | 47.9k | left_interp_border) * |
908 | 47.9k | SCALE_PX_TO_MV + |
909 | 47.9k | dv.col; |
910 | 47.9k | const int src_top_edge_chroma = |
911 | 47.9k | (chroma_ref_info->mi_row_chroma_base * MI_SIZE - |
912 | 47.9k | top_interp_border) * |
913 | 47.9k | SCALE_PX_TO_MV + |
914 | 47.9k | dv.row; |
915 | 47.9k | if (src_left_edge_chroma < tile_left_edge) return 0; |
916 | 47.9k | if (src_top_edge_chroma < tile_top_edge) return 0; |
917 | 47.9k | } else { |
918 | 1 | if (bw < 8 && pd->subsampling_x) |
919 | 0 | if (src_left_edge < tile_left_edge + 4 * SCALE_PX_TO_MV) return 0; |
920 | 1 | if (bh < 8 && pd->subsampling_y) |
921 | 0 | if (src_top_edge < tile_top_edge + 4 * SCALE_PX_TO_MV) return 0; |
922 | 1 | } |
923 | 47.9k | } |
924 | 92.2k | } |
925 | | |
926 | 100k | if (cm->features.allow_local_intrabc) { |
927 | 100k | if (bw <= 64 || bh <= 64) { |
928 | 100k | int valid = 0; |
929 | 100k | int tmp_row = mi_row; |
930 | 100k | int tmp_col = mi_col; |
931 | 100k | int tmp_bh = bh; |
932 | 100k | int tmp_bw = bw; |
933 | 100k | if (!cm->seq_params.enable_sdp || !frame_is_intra_only(cm)) { |
934 | 92.0k | if (xd->is_chroma_ref && av2_num_planes(cm) > 1) { |
935 | 47.8k | if (xd->mi && xd->mi[0]) { |
936 | 47.8k | const CHROMA_REF_INFO *chroma_ref_info = |
937 | 47.8k | &xd->mi[0]->chroma_ref_info; |
938 | 47.8k | const BLOCK_SIZE bsize_base = chroma_ref_info->bsize_base; |
939 | 47.8k | tmp_row = chroma_ref_info->mi_row_chroma_base; |
940 | 47.8k | tmp_col = chroma_ref_info->mi_col_chroma_base; |
941 | 47.8k | tmp_bh = block_size_high[bsize_base]; |
942 | 47.8k | tmp_bw = block_size_wide[bsize_base]; |
943 | 47.8k | } |
944 | 47.8k | } |
945 | 92.0k | } |
946 | 100k | valid = av2_is_dv_in_local_range(cm, dv, xd, tmp_row, tmp_col, tmp_bh, |
947 | 100k | tmp_bw, mib_size_log2); |
948 | 100k | if (valid) return 1; |
949 | 100k | } |
950 | 100k | } |
951 | 99.2k | if (!frame_is_intra_only(cm)) return 0; |
952 | | |
953 | 99.2k | if (!cm->features.allow_global_intrabc) return 0; |
954 | | |
955 | | // Is the bottom right within an already coded SB? Also consider additional |
956 | | // constraints to facilitate HW decoder. |
957 | 99.1k | const int max_mib_size = 1 << mib_size_log2; |
958 | 99.1k | const int active_sb_row = mi_row >> mib_size_log2; |
959 | 99.1k | const int active_sb64_col = mi_col >> mi_size_wide_log2[BLOCK_64X64]; |
960 | 99.1k | const int sb_size = max_mib_size * MI_SIZE; |
961 | 99.1k | const int src_sb_row = |
962 | 99.1k | ((src_bottom_edge >> 3) - 1) >> (mib_size_log2 + MI_SIZE_LOG2); |
963 | 99.1k | const int src_sb64_col = ((src_right_edge >> 3) - 1) >> |
964 | 99.1k | (mi_size_wide_log2[BLOCK_64X64] + MI_SIZE_LOG2); |
965 | | |
966 | | // Special case for 128x128 superblock with hor/quad split. |
967 | 99.1k | const int active_sb64_row = |
968 | 99.1k | (mi_row * MI_SIZE) >> (mi_size_high_log2[BLOCK_64X64] + MI_SIZE_LOG2); |
969 | 99.1k | const int is_bottom_left = |
970 | 99.1k | ((active_sb64_col & 0x01) == 0 && (active_sb64_row & 0x01) == 1); |
971 | 99.1k | const int sb_64_residual = |
972 | 99.1k | (sb_size == block_size_wide[BLOCK_128X128] && xd->mi && xd->mi[0] && |
973 | 95.5k | xd->mi[0]->sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION) |
974 | 99.1k | ? (-1) * is_bottom_left |
975 | 99.1k | : 0; |
976 | 99.1k | const int total_sb64_per_row = |
977 | 99.1k | (((tile->mi_col_end - tile->mi_col_start - 1) >> |
978 | 99.1k | mi_size_high_log2[BLOCK_64X64]) + |
979 | 99.1k | 1); |
980 | 99.1k | const int active_sb64 = active_sb_row * total_sb64_per_row + active_sb64_col; |
981 | 99.1k | const int src_sb64 = src_sb_row * total_sb64_per_row + src_sb64_col; |
982 | 99.1k | if (src_sb64 >= active_sb64 - INTRABC_DELAY_SB64 - sb_64_residual) return 0; |
983 | | |
984 | | // Wavefront constraint: use only top left area of frame for reference. |
985 | 98.1k | const int gradient = 1 + INTRABC_DELAY_SB64 + |
986 | 98.1k | (sb_size > block_size_wide[BLOCK_64X64]) + |
987 | 98.1k | 2 * (sb_size > block_size_wide[BLOCK_128X128]); |
988 | 98.1k | const int wf_offset = gradient * (active_sb_row - src_sb_row); |
989 | 98.1k | if (src_sb_row > active_sb_row || |
990 | 98.1k | src_sb64_col >= |
991 | 98.1k | active_sb64_col - INTRABC_DELAY_SB64 - sb_64_residual + wf_offset) |
992 | 10 | return 0; |
993 | 98.1k | return 1; |
994 | 98.1k | } Unexecuted instantiation: av2_dx_iface.c:av2_is_dv_valid Unexecuted instantiation: annexF.c:av2_is_dv_valid Unexecuted instantiation: decodeframe.c:av2_is_dv_valid decodemv.c:av2_is_dv_valid Line | Count | Source | 864 | 102k | BLOCK_SIZE bsize, int mib_size_log2) { | 865 | 102k | const int bw = block_size_wide[bsize]; | 866 | 102k | const int bh = block_size_high[bsize]; | 867 | 102k | const int SCALE_PX_TO_MV = 8; | 868 | | | 869 | 102k | int has_col_offset = dv.col & 7; // sub-pel col | 870 | 102k | int has_row_offset = dv.row & 7; // sub-pel row | 871 | 102k | int left_interp_border = has_col_offset ? IBC_LEFT_INTERP_BORDER : 0; | 872 | 102k | int right_interp_border = has_col_offset ? IBC_RIGHT_INTERP_BORDER : 0; | 873 | 102k | int top_interp_border = has_row_offset ? IBC_TOP_INTERP_BORDER : 0; | 874 | 102k | int bottom_interp_border = has_row_offset ? IBC_BOTTOM_INTERP_BORDER : 0; | 875 | | | 876 | 102k | const TileInfo *const tile = &xd->tile; | 877 | | // Is the source top-left inside the current tile? | 878 | 102k | const int src_top_edge = | 879 | 102k | (mi_row * MI_SIZE - top_interp_border) * SCALE_PX_TO_MV + dv.row; | 880 | 102k | const int tile_top_edge = tile->mi_row_start * MI_SIZE * SCALE_PX_TO_MV; | 881 | 102k | if (src_top_edge < tile_top_edge) return 0; | 882 | 101k | const int src_left_edge = | 883 | 101k | (mi_col * MI_SIZE - left_interp_border) * SCALE_PX_TO_MV + dv.col; | 884 | 101k | const int tile_left_edge = tile->mi_col_start * MI_SIZE * SCALE_PX_TO_MV; | 885 | 101k | if (src_left_edge < tile_left_edge) return 0; | 886 | | // Is the bottom right inside the current tile? | 887 | 101k | const int src_bottom_edge = | 888 | 101k | (mi_row * MI_SIZE + bh + bottom_interp_border) * SCALE_PX_TO_MV + dv.row - | 889 | 101k | has_row_offset; | 890 | 101k | const int tile_bottom_edge = tile->mi_row_end * MI_SIZE * SCALE_PX_TO_MV; | 891 | 101k | if (src_bottom_edge > tile_bottom_edge) return 0; | 892 | 101k | const int src_right_edge = | 893 | 101k | (mi_col * MI_SIZE + bw + right_interp_border) * SCALE_PX_TO_MV + dv.col - | 894 | 101k | has_col_offset; | 895 | 101k | const int tile_right_edge = tile->mi_col_end * MI_SIZE * SCALE_PX_TO_MV; | 896 | 101k | if (src_right_edge > tile_right_edge) return 0; | 897 | | | 898 | | // Special case for sub 8x8 chroma cases, to prevent referring to chroma | 899 | | // pixels outside current tile. | 900 | 100k | if (!cm->seq_params.enable_sdp || !frame_is_intra_only(cm)) { | 901 | 92.2k | if (xd->is_chroma_ref && av2_num_planes(cm) > 1) { | 902 | 47.9k | const struct macroblockd_plane *const pd = &xd->plane[1]; | 903 | 47.9k | if (xd->mi && xd->mi[0]) { | 904 | 47.9k | const CHROMA_REF_INFO *chroma_ref_info = &xd->mi[0]->chroma_ref_info; | 905 | 47.9k | const int src_left_edge_chroma = | 906 | 47.9k | (chroma_ref_info->mi_col_chroma_base * MI_SIZE - | 907 | 47.9k | left_interp_border) * | 908 | 47.9k | SCALE_PX_TO_MV + | 909 | 47.9k | dv.col; | 910 | 47.9k | const int src_top_edge_chroma = | 911 | 47.9k | (chroma_ref_info->mi_row_chroma_base * MI_SIZE - | 912 | 47.9k | top_interp_border) * | 913 | 47.9k | SCALE_PX_TO_MV + | 914 | 47.9k | dv.row; | 915 | 47.9k | if (src_left_edge_chroma < tile_left_edge) return 0; | 916 | 47.9k | if (src_top_edge_chroma < tile_top_edge) return 0; | 917 | 47.9k | } else { | 918 | 1 | if (bw < 8 && pd->subsampling_x) | 919 | 0 | if (src_left_edge < tile_left_edge + 4 * SCALE_PX_TO_MV) return 0; | 920 | 1 | if (bh < 8 && pd->subsampling_y) | 921 | 0 | if (src_top_edge < tile_top_edge + 4 * SCALE_PX_TO_MV) return 0; | 922 | 1 | } | 923 | 47.9k | } | 924 | 92.2k | } | 925 | | | 926 | 100k | if (cm->features.allow_local_intrabc) { | 927 | 100k | if (bw <= 64 || bh <= 64) { | 928 | 100k | int valid = 0; | 929 | 100k | int tmp_row = mi_row; | 930 | 100k | int tmp_col = mi_col; | 931 | 100k | int tmp_bh = bh; | 932 | 100k | int tmp_bw = bw; | 933 | 100k | if (!cm->seq_params.enable_sdp || !frame_is_intra_only(cm)) { | 934 | 92.0k | if (xd->is_chroma_ref && av2_num_planes(cm) > 1) { | 935 | 47.8k | if (xd->mi && xd->mi[0]) { | 936 | 47.8k | const CHROMA_REF_INFO *chroma_ref_info = | 937 | 47.8k | &xd->mi[0]->chroma_ref_info; | 938 | 47.8k | const BLOCK_SIZE bsize_base = chroma_ref_info->bsize_base; | 939 | 47.8k | tmp_row = chroma_ref_info->mi_row_chroma_base; | 940 | 47.8k | tmp_col = chroma_ref_info->mi_col_chroma_base; | 941 | 47.8k | tmp_bh = block_size_high[bsize_base]; | 942 | 47.8k | tmp_bw = block_size_wide[bsize_base]; | 943 | 47.8k | } | 944 | 47.8k | } | 945 | 92.0k | } | 946 | 100k | valid = av2_is_dv_in_local_range(cm, dv, xd, tmp_row, tmp_col, tmp_bh, | 947 | 100k | tmp_bw, mib_size_log2); | 948 | 100k | if (valid) return 1; | 949 | 100k | } | 950 | 100k | } | 951 | 99.2k | if (!frame_is_intra_only(cm)) return 0; | 952 | | | 953 | 99.2k | if (!cm->features.allow_global_intrabc) return 0; | 954 | | | 955 | | // Is the bottom right within an already coded SB? Also consider additional | 956 | | // constraints to facilitate HW decoder. | 957 | 99.1k | const int max_mib_size = 1 << mib_size_log2; | 958 | 99.1k | const int active_sb_row = mi_row >> mib_size_log2; | 959 | 99.1k | const int active_sb64_col = mi_col >> mi_size_wide_log2[BLOCK_64X64]; | 960 | 99.1k | const int sb_size = max_mib_size * MI_SIZE; | 961 | 99.1k | const int src_sb_row = | 962 | 99.1k | ((src_bottom_edge >> 3) - 1) >> (mib_size_log2 + MI_SIZE_LOG2); | 963 | 99.1k | const int src_sb64_col = ((src_right_edge >> 3) - 1) >> | 964 | 99.1k | (mi_size_wide_log2[BLOCK_64X64] + MI_SIZE_LOG2); | 965 | | | 966 | | // Special case for 128x128 superblock with hor/quad split. | 967 | 99.1k | const int active_sb64_row = | 968 | 99.1k | (mi_row * MI_SIZE) >> (mi_size_high_log2[BLOCK_64X64] + MI_SIZE_LOG2); | 969 | 99.1k | const int is_bottom_left = | 970 | 99.1k | ((active_sb64_col & 0x01) == 0 && (active_sb64_row & 0x01) == 1); | 971 | 99.1k | const int sb_64_residual = | 972 | 99.1k | (sb_size == block_size_wide[BLOCK_128X128] && xd->mi && xd->mi[0] && | 973 | 95.5k | xd->mi[0]->sb_root_partition_info == SB_HORZ_OR_QUAD_PARTITION) | 974 | 99.1k | ? (-1) * is_bottom_left | 975 | 99.1k | : 0; | 976 | 99.1k | const int total_sb64_per_row = | 977 | 99.1k | (((tile->mi_col_end - tile->mi_col_start - 1) >> | 978 | 99.1k | mi_size_high_log2[BLOCK_64X64]) + | 979 | 99.1k | 1); | 980 | 99.1k | const int active_sb64 = active_sb_row * total_sb64_per_row + active_sb64_col; | 981 | 99.1k | const int src_sb64 = src_sb_row * total_sb64_per_row + src_sb64_col; | 982 | 99.1k | if (src_sb64 >= active_sb64 - INTRABC_DELAY_SB64 - sb_64_residual) return 0; | 983 | | | 984 | | // Wavefront constraint: use only top left area of frame for reference. | 985 | 98.1k | const int gradient = 1 + INTRABC_DELAY_SB64 + | 986 | 98.1k | (sb_size > block_size_wide[BLOCK_64X64]) + | 987 | 98.1k | 2 * (sb_size > block_size_wide[BLOCK_128X128]); | 988 | 98.1k | const int wf_offset = gradient * (active_sb_row - src_sb_row); | 989 | 98.1k | if (src_sb_row > active_sb_row || | 990 | 98.1k | src_sb64_col >= | 991 | 98.1k | active_sb64_col - INTRABC_DELAY_SB64 - sb_64_residual + wf_offset) | 992 | 10 | return 0; | 993 | 98.1k | return 1; | 994 | 98.1k | } |
Unexecuted instantiation: decoder.c:av2_is_dv_valid Unexecuted instantiation: decodetxb.c:av2_is_dv_valid Unexecuted instantiation: detokenize.c:av2_is_dv_valid Unexecuted instantiation: obu_fgm.c:av2_is_dv_valid Unexecuted instantiation: obu.c:av2_is_dv_valid Unexecuted instantiation: obu_ci.c:av2_is_dv_valid Unexecuted instantiation: obu_atlas.c:av2_is_dv_valid Unexecuted instantiation: obu_lcr.c:av2_is_dv_valid Unexecuted instantiation: obu_ops.c:av2_is_dv_valid Unexecuted instantiation: obu_buf.c:av2_is_dv_valid Unexecuted instantiation: intrapred_avx2.c:av2_is_dv_valid Unexecuted instantiation: alloccommon.c:av2_is_dv_valid Unexecuted instantiation: av2_loopfilter.c:av2_is_dv_valid Unexecuted instantiation: cdef.c:av2_is_dv_valid Unexecuted instantiation: gdf.c:av2_is_dv_valid Unexecuted instantiation: gdf_block.c:av2_is_dv_valid Unexecuted instantiation: cfl.c:av2_is_dv_valid Unexecuted instantiation: entropymode.c:av2_is_dv_valid Unexecuted instantiation: level.c:av2_is_dv_valid Unexecuted instantiation: mvref_common.c:av2_is_dv_valid Unexecuted instantiation: pred_common.c:av2_is_dv_valid Unexecuted instantiation: reconinter.c:av2_is_dv_valid Unexecuted instantiation: reconintra.c:av2_is_dv_valid Unexecuted instantiation: restoration.c:av2_is_dv_valid Unexecuted instantiation: thread_common.c:av2_is_dv_valid Unexecuted instantiation: tip.c:av2_is_dv_valid Unexecuted instantiation: warped_motion.c:av2_is_dv_valid Unexecuted instantiation: ccso.c:av2_is_dv_valid Unexecuted instantiation: bru.c:av2_is_dv_valid Unexecuted instantiation: obu_qm.c:av2_is_dv_valid Unexecuted instantiation: optflow_refine_sse4.c:av2_is_dv_valid Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_is_dv_valid Unexecuted instantiation: gdf_block_avx2.c:av2_is_dv_valid |
995 | | |
996 | | static INLINE int is_bv_valid_for_morph(const MV sub_pel_dv, |
997 | | const AV2_COMMON *cm, |
998 | | const MACROBLOCKD *xd, int mi_row, |
999 | 35.5k | int mi_col, BLOCK_SIZE bsize) { |
1000 | | // Assumes the input sub_pel_dv is a valid bv for global (or local) intraBC |
1001 | 35.5k | const MV bv_to_tl_template = { sub_pel_dv.row - GET_MV_SUBPEL(BAWP_REF_LINES), |
1002 | 35.5k | sub_pel_dv.col - |
1003 | 35.5k | GET_MV_SUBPEL(BAWP_REF_LINES) }; |
1004 | 35.5k | assert(BAWP_REF_LINES < 4); |
1005 | 35.5k | if (!av2_is_dv_valid(bv_to_tl_template, cm, xd, mi_row, mi_col, bsize, |
1006 | 35.5k | cm->mib_size_log2)) { |
1007 | 19 | return false; |
1008 | 19 | } |
1009 | 35.5k | return true; |
1010 | 35.5k | } Unexecuted instantiation: av2_dx_iface.c:is_bv_valid_for_morph Unexecuted instantiation: annexF.c:is_bv_valid_for_morph Unexecuted instantiation: decodeframe.c:is_bv_valid_for_morph decodemv.c:is_bv_valid_for_morph Line | Count | Source | 999 | 35.5k | int mi_col, BLOCK_SIZE bsize) { | 1000 | | // Assumes the input sub_pel_dv is a valid bv for global (or local) intraBC | 1001 | 35.5k | const MV bv_to_tl_template = { sub_pel_dv.row - GET_MV_SUBPEL(BAWP_REF_LINES), | 1002 | 35.5k | sub_pel_dv.col - | 1003 | 35.5k | GET_MV_SUBPEL(BAWP_REF_LINES) }; | 1004 | 35.5k | assert(BAWP_REF_LINES < 4); | 1005 | 35.5k | if (!av2_is_dv_valid(bv_to_tl_template, cm, xd, mi_row, mi_col, bsize, | 1006 | 35.5k | cm->mib_size_log2)) { | 1007 | 19 | return false; | 1008 | 19 | } | 1009 | 35.5k | return true; | 1010 | 35.5k | } |
Unexecuted instantiation: decoder.c:is_bv_valid_for_morph Unexecuted instantiation: decodetxb.c:is_bv_valid_for_morph Unexecuted instantiation: detokenize.c:is_bv_valid_for_morph Unexecuted instantiation: obu_fgm.c:is_bv_valid_for_morph Unexecuted instantiation: obu.c:is_bv_valid_for_morph Unexecuted instantiation: obu_ci.c:is_bv_valid_for_morph Unexecuted instantiation: obu_atlas.c:is_bv_valid_for_morph Unexecuted instantiation: obu_lcr.c:is_bv_valid_for_morph Unexecuted instantiation: obu_ops.c:is_bv_valid_for_morph Unexecuted instantiation: obu_buf.c:is_bv_valid_for_morph Unexecuted instantiation: intrapred_avx2.c:is_bv_valid_for_morph Unexecuted instantiation: alloccommon.c:is_bv_valid_for_morph Unexecuted instantiation: av2_loopfilter.c:is_bv_valid_for_morph Unexecuted instantiation: cdef.c:is_bv_valid_for_morph Unexecuted instantiation: gdf.c:is_bv_valid_for_morph Unexecuted instantiation: gdf_block.c:is_bv_valid_for_morph Unexecuted instantiation: cfl.c:is_bv_valid_for_morph Unexecuted instantiation: entropymode.c:is_bv_valid_for_morph Unexecuted instantiation: level.c:is_bv_valid_for_morph Unexecuted instantiation: mvref_common.c:is_bv_valid_for_morph Unexecuted instantiation: pred_common.c:is_bv_valid_for_morph Unexecuted instantiation: reconinter.c:is_bv_valid_for_morph Unexecuted instantiation: reconintra.c:is_bv_valid_for_morph Unexecuted instantiation: restoration.c:is_bv_valid_for_morph Unexecuted instantiation: thread_common.c:is_bv_valid_for_morph Unexecuted instantiation: tip.c:is_bv_valid_for_morph Unexecuted instantiation: warped_motion.c:is_bv_valid_for_morph Unexecuted instantiation: ccso.c:is_bv_valid_for_morph Unexecuted instantiation: bru.c:is_bv_valid_for_morph Unexecuted instantiation: obu_qm.c:is_bv_valid_for_morph Unexecuted instantiation: optflow_refine_sse4.c:is_bv_valid_for_morph Unexecuted instantiation: affine_optflow_refine_avx2.c:is_bv_valid_for_morph Unexecuted instantiation: gdf_block_avx2.c:is_bv_valid_for_morph |
1011 | | |
1012 | | // assign subblock mv from warp into submi |
1013 | | void assign_warpmv(const AV2_COMMON *cm, SUBMB_INFO **submi, BLOCK_SIZE bsize, |
1014 | | WarpedMotionParams *wm_params, int mi_row, int mi_col, |
1015 | | int ref); |
1016 | | |
1017 | | // span the first subblock info into all the rest subblocks in the same block |
1018 | | void span_submv(const AV2_COMMON *cm, SUBMB_INFO **submi, int mi_row, |
1019 | | int mi_col, BLOCK_SIZE bsize, int ref); |
1020 | | |
1021 | | // Decide what the base warp model should be when using WARP_DELTA. |
1022 | | // The warp model to use is signalled as a delta from this. |
1023 | | // The base model is stored into `params`, and can be modified further |
1024 | | // from there |
1025 | | // |
1026 | | // The MV which should be used at the center of this block is stored in |
1027 | | // `center_mv`. Once the non-translational parameters have been set, |
1028 | | // the translational part of the model can be set correctly using: |
1029 | | // av2_set_warp_translation(mi_row, mi_col, bsize, mv, params); |
1030 | | // |
1031 | | // If `center_mv` is not needed, the pointer can be set to NULL. |
1032 | | // |
1033 | | // The logic behind doing this is as follows: |
1034 | | // * If the current block is GLOBALMV, then we want to use the motion vector |
1035 | | // inferred from the global model. Conveniently, in this case that is already |
1036 | | // stored in mbmi->mv[0] |
1037 | | // |
1038 | | // * If the current block is NEWMV, then we want to use the signaled |
1039 | | // motion vector at the center of the block, regardless of the source |
1040 | | // of the base warp model. |
1041 | | // |
1042 | | // * If the mode is NEARMV, then we need to consider the source of the |
1043 | | // base params and the motion vector carefully: |
1044 | | // |
1045 | | // * If we're extending from a neighboring block, then the predicted |
1046 | | // motion vector (in mbmi->mv[0]) does *not* match the prediction |
1047 | | // from the base warp model. This because the predicted MV is |
1048 | | // set to the MV at the center of the *neighboring* block, to avoid |
1049 | | // having motion vector prediction depend on the construction of the |
1050 | | // neighbor's warp model. |
1051 | | // So in this case, we want to re-calculate the motion vector at |
1052 | | // the center of this block from the neighbor's warp model. This is |
1053 | | // okay, and does not introduce a similar parsing dependency, because |
1054 | | // this only affects the resulting warp parameters, not any of the syntax. |
1055 | | // |
1056 | | // * However, if we're not extending from a neighboring block, then we |
1057 | | // use the global warp as a base. In this case, taking the predicted |
1058 | | // MV from whatever ref block we used, is probably better than using the |
1059 | | // predicted MV from the global model, because if we wanted the latter |
1060 | | // then we would have used the GLOBALMV mode. |
1061 | | static INLINE void av2_get_warp_base_params( |
1062 | | const AV2_COMMON *cm, const MB_MODE_INFO *mbmi, WarpedMotionParams *params, |
1063 | 0 | int_mv *center_mv, const WARP_CANDIDATE *warp_param_stack) { |
1064 | 0 | (void)cm; |
1065 | |
|
1066 | 0 | assert(mbmi->warp_ref_idx < mbmi->max_num_warp_candidates); |
1067 | 0 | *params = warp_param_stack[mbmi->warp_ref_idx].wm_params; |
1068 | |
|
1069 | 0 | if (center_mv != NULL) { |
1070 | 0 | *center_mv = mbmi->mv[0]; |
1071 | 0 | } |
1072 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_get_warp_base_params Unexecuted instantiation: annexF.c:av2_get_warp_base_params Unexecuted instantiation: decodeframe.c:av2_get_warp_base_params Unexecuted instantiation: decodemv.c:av2_get_warp_base_params Unexecuted instantiation: decoder.c:av2_get_warp_base_params Unexecuted instantiation: decodetxb.c:av2_get_warp_base_params Unexecuted instantiation: detokenize.c:av2_get_warp_base_params Unexecuted instantiation: obu_fgm.c:av2_get_warp_base_params Unexecuted instantiation: obu.c:av2_get_warp_base_params Unexecuted instantiation: obu_ci.c:av2_get_warp_base_params Unexecuted instantiation: obu_atlas.c:av2_get_warp_base_params Unexecuted instantiation: obu_lcr.c:av2_get_warp_base_params Unexecuted instantiation: obu_ops.c:av2_get_warp_base_params Unexecuted instantiation: obu_buf.c:av2_get_warp_base_params Unexecuted instantiation: intrapred_avx2.c:av2_get_warp_base_params Unexecuted instantiation: alloccommon.c:av2_get_warp_base_params Unexecuted instantiation: av2_loopfilter.c:av2_get_warp_base_params Unexecuted instantiation: cdef.c:av2_get_warp_base_params Unexecuted instantiation: gdf.c:av2_get_warp_base_params Unexecuted instantiation: gdf_block.c:av2_get_warp_base_params Unexecuted instantiation: cfl.c:av2_get_warp_base_params Unexecuted instantiation: entropymode.c:av2_get_warp_base_params Unexecuted instantiation: level.c:av2_get_warp_base_params Unexecuted instantiation: mvref_common.c:av2_get_warp_base_params Unexecuted instantiation: pred_common.c:av2_get_warp_base_params Unexecuted instantiation: reconinter.c:av2_get_warp_base_params Unexecuted instantiation: reconintra.c:av2_get_warp_base_params Unexecuted instantiation: restoration.c:av2_get_warp_base_params Unexecuted instantiation: thread_common.c:av2_get_warp_base_params Unexecuted instantiation: tip.c:av2_get_warp_base_params Unexecuted instantiation: warped_motion.c:av2_get_warp_base_params Unexecuted instantiation: ccso.c:av2_get_warp_base_params Unexecuted instantiation: bru.c:av2_get_warp_base_params Unexecuted instantiation: obu_qm.c:av2_get_warp_base_params Unexecuted instantiation: optflow_refine_sse4.c:av2_get_warp_base_params Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_get_warp_base_params Unexecuted instantiation: gdf_block_avx2.c:av2_get_warp_base_params |
1073 | | |
1074 | | // Try to get the neighbor's warp model |
1075 | | static INLINE void av2_get_neighbor_warp_model(const AV2_COMMON *cm, |
1076 | | const MACROBLOCKD *xd, |
1077 | | const MB_MODE_INFO *neighbor_mi, |
1078 | 0 | WarpedMotionParams *wm_params) { |
1079 | 0 | const int ref_frame = xd->mi[0]->ref_frame[0]; |
1080 | 0 | const int neighbor_ref = neighbor_mi->ref_frame[0] == ref_frame ? 0 : 1; |
1081 | 0 | const WarpedMotionParams *gm_params = |
1082 | 0 | &cm->global_motion[neighbor_mi->ref_frame[neighbor_ref]]; |
1083 | |
|
1084 | 0 | if (is_warp_mode(neighbor_mi->motion_mode)) { |
1085 | 0 | if (neighbor_mi->wm_params[0].invalid) |
1086 | 0 | *wm_params = default_warp_params; |
1087 | 0 | else |
1088 | 0 | *wm_params = neighbor_mi->wm_params[0]; |
1089 | 0 | } else if (is_global_mv_block(neighbor_mi, gm_params->wmtype)) { |
1090 | 0 | *wm_params = *gm_params; |
1091 | 0 | } else { |
1092 | | // Neighbor block is translation-only, so doesn't have |
1093 | | // a warp model. So we need to synthesize one. |
1094 | | // Note that, in this case, the neighbor might be compound, but the |
1095 | | // current block will always be single ref. So we have to figure out |
1096 | | // which of the neighbor's ref frames matches ours, and take that MV. |
1097 | 0 | *wm_params = default_warp_params; |
1098 | 0 | wm_params->wmtype = TRANSLATION; |
1099 | |
|
1100 | 0 | if (neighbor_mi->ref_frame[0] == ref_frame) { |
1101 | 0 | wm_params->wmmat[0] = |
1102 | 0 | neighbor_mi->mv[0].as_mv.col * (1 << (WARPEDMODEL_PREC_BITS - 3)); |
1103 | 0 | wm_params->wmmat[1] = |
1104 | 0 | neighbor_mi->mv[0].as_mv.row * (1 << (WARPEDMODEL_PREC_BITS - 3)); |
1105 | 0 | } else { |
1106 | 0 | assert(neighbor_mi->ref_frame[1] == ref_frame); |
1107 | 0 | wm_params->wmmat[0] = |
1108 | 0 | neighbor_mi->mv[1].as_mv.col * (1 << (WARPEDMODEL_PREC_BITS - 3)); |
1109 | 0 | wm_params->wmmat[1] = |
1110 | 0 | neighbor_mi->mv[1].as_mv.row * (1 << (WARPEDMODEL_PREC_BITS - 3)); |
1111 | 0 | } |
1112 | 0 | } |
1113 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_get_neighbor_warp_model Unexecuted instantiation: annexF.c:av2_get_neighbor_warp_model Unexecuted instantiation: decodeframe.c:av2_get_neighbor_warp_model Unexecuted instantiation: decodemv.c:av2_get_neighbor_warp_model Unexecuted instantiation: decoder.c:av2_get_neighbor_warp_model Unexecuted instantiation: decodetxb.c:av2_get_neighbor_warp_model Unexecuted instantiation: detokenize.c:av2_get_neighbor_warp_model Unexecuted instantiation: obu_fgm.c:av2_get_neighbor_warp_model Unexecuted instantiation: obu.c:av2_get_neighbor_warp_model Unexecuted instantiation: obu_ci.c:av2_get_neighbor_warp_model Unexecuted instantiation: obu_atlas.c:av2_get_neighbor_warp_model Unexecuted instantiation: obu_lcr.c:av2_get_neighbor_warp_model Unexecuted instantiation: obu_ops.c:av2_get_neighbor_warp_model Unexecuted instantiation: obu_buf.c:av2_get_neighbor_warp_model Unexecuted instantiation: intrapred_avx2.c:av2_get_neighbor_warp_model Unexecuted instantiation: alloccommon.c:av2_get_neighbor_warp_model Unexecuted instantiation: av2_loopfilter.c:av2_get_neighbor_warp_model Unexecuted instantiation: cdef.c:av2_get_neighbor_warp_model Unexecuted instantiation: gdf.c:av2_get_neighbor_warp_model Unexecuted instantiation: gdf_block.c:av2_get_neighbor_warp_model Unexecuted instantiation: cfl.c:av2_get_neighbor_warp_model Unexecuted instantiation: entropymode.c:av2_get_neighbor_warp_model Unexecuted instantiation: level.c:av2_get_neighbor_warp_model Unexecuted instantiation: mvref_common.c:av2_get_neighbor_warp_model Unexecuted instantiation: pred_common.c:av2_get_neighbor_warp_model Unexecuted instantiation: reconinter.c:av2_get_neighbor_warp_model Unexecuted instantiation: reconintra.c:av2_get_neighbor_warp_model Unexecuted instantiation: restoration.c:av2_get_neighbor_warp_model Unexecuted instantiation: thread_common.c:av2_get_neighbor_warp_model Unexecuted instantiation: tip.c:av2_get_neighbor_warp_model Unexecuted instantiation: warped_motion.c:av2_get_neighbor_warp_model Unexecuted instantiation: ccso.c:av2_get_neighbor_warp_model Unexecuted instantiation: bru.c:av2_get_neighbor_warp_model Unexecuted instantiation: obu_qm.c:av2_get_neighbor_warp_model Unexecuted instantiation: optflow_refine_sse4.c:av2_get_neighbor_warp_model Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_get_neighbor_warp_model Unexecuted instantiation: gdf_block_avx2.c:av2_get_neighbor_warp_model |
1114 | | |
1115 | 0 | static INLINE int av2_get_warp_causal_ctx(const MACROBLOCKD *xd) { |
1116 | 0 | int ctx = 0; |
1117 | 0 | int has_warp_neighbor = 0; |
1118 | 0 | for (int i = 0; i < MAX_NUM_NEIGHBORS; ++i) { |
1119 | 0 | const MB_MODE_INFO *const neighbor = xd->neighbors[i]; |
1120 | 0 | if (neighbor != NULL && is_warp_mode(neighbor->motion_mode)) { |
1121 | 0 | has_warp_neighbor = 1; |
1122 | 0 | ctx += (neighbor->motion_mode == WARP_CAUSAL); |
1123 | 0 | } |
1124 | 0 | } |
1125 | |
|
1126 | 0 | return (ctx + has_warp_neighbor); |
1127 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_get_warp_causal_ctx Unexecuted instantiation: annexF.c:av2_get_warp_causal_ctx Unexecuted instantiation: decodeframe.c:av2_get_warp_causal_ctx Unexecuted instantiation: decodemv.c:av2_get_warp_causal_ctx Unexecuted instantiation: decoder.c:av2_get_warp_causal_ctx Unexecuted instantiation: decodetxb.c:av2_get_warp_causal_ctx Unexecuted instantiation: detokenize.c:av2_get_warp_causal_ctx Unexecuted instantiation: obu_fgm.c:av2_get_warp_causal_ctx Unexecuted instantiation: obu.c:av2_get_warp_causal_ctx Unexecuted instantiation: obu_ci.c:av2_get_warp_causal_ctx Unexecuted instantiation: obu_atlas.c:av2_get_warp_causal_ctx Unexecuted instantiation: obu_lcr.c:av2_get_warp_causal_ctx Unexecuted instantiation: obu_ops.c:av2_get_warp_causal_ctx Unexecuted instantiation: obu_buf.c:av2_get_warp_causal_ctx Unexecuted instantiation: intrapred_avx2.c:av2_get_warp_causal_ctx Unexecuted instantiation: alloccommon.c:av2_get_warp_causal_ctx Unexecuted instantiation: av2_loopfilter.c:av2_get_warp_causal_ctx Unexecuted instantiation: cdef.c:av2_get_warp_causal_ctx Unexecuted instantiation: gdf.c:av2_get_warp_causal_ctx Unexecuted instantiation: gdf_block.c:av2_get_warp_causal_ctx Unexecuted instantiation: cfl.c:av2_get_warp_causal_ctx Unexecuted instantiation: entropymode.c:av2_get_warp_causal_ctx Unexecuted instantiation: level.c:av2_get_warp_causal_ctx Unexecuted instantiation: mvref_common.c:av2_get_warp_causal_ctx Unexecuted instantiation: pred_common.c:av2_get_warp_causal_ctx Unexecuted instantiation: reconinter.c:av2_get_warp_causal_ctx Unexecuted instantiation: reconintra.c:av2_get_warp_causal_ctx Unexecuted instantiation: restoration.c:av2_get_warp_causal_ctx Unexecuted instantiation: thread_common.c:av2_get_warp_causal_ctx Unexecuted instantiation: tip.c:av2_get_warp_causal_ctx Unexecuted instantiation: warped_motion.c:av2_get_warp_causal_ctx Unexecuted instantiation: ccso.c:av2_get_warp_causal_ctx Unexecuted instantiation: bru.c:av2_get_warp_causal_ctx Unexecuted instantiation: obu_qm.c:av2_get_warp_causal_ctx Unexecuted instantiation: optflow_refine_sse4.c:av2_get_warp_causal_ctx Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_get_warp_causal_ctx Unexecuted instantiation: gdf_block_avx2.c:av2_get_warp_causal_ctx |
1128 | | |
1129 | 0 | static INLINE int av2_get_warp_extend_ctx(const MACROBLOCKD *xd) { |
1130 | 0 | int ctx = 0; |
1131 | 0 | for (int i = 0; i < MAX_NUM_NEIGHBORS; ++i) { |
1132 | 0 | const MB_MODE_INFO *const neighbor = xd->neighbors[i]; |
1133 | 0 | if (neighbor != NULL) { |
1134 | 0 | ctx += is_warp_mode(neighbor->motion_mode); |
1135 | 0 | } |
1136 | 0 | } |
1137 | |
|
1138 | 0 | return ctx; |
1139 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_get_warp_extend_ctx Unexecuted instantiation: annexF.c:av2_get_warp_extend_ctx Unexecuted instantiation: decodeframe.c:av2_get_warp_extend_ctx Unexecuted instantiation: decodemv.c:av2_get_warp_extend_ctx Unexecuted instantiation: decoder.c:av2_get_warp_extend_ctx Unexecuted instantiation: decodetxb.c:av2_get_warp_extend_ctx Unexecuted instantiation: detokenize.c:av2_get_warp_extend_ctx Unexecuted instantiation: obu_fgm.c:av2_get_warp_extend_ctx Unexecuted instantiation: obu.c:av2_get_warp_extend_ctx Unexecuted instantiation: obu_ci.c:av2_get_warp_extend_ctx Unexecuted instantiation: obu_atlas.c:av2_get_warp_extend_ctx Unexecuted instantiation: obu_lcr.c:av2_get_warp_extend_ctx Unexecuted instantiation: obu_ops.c:av2_get_warp_extend_ctx Unexecuted instantiation: obu_buf.c:av2_get_warp_extend_ctx Unexecuted instantiation: intrapred_avx2.c:av2_get_warp_extend_ctx Unexecuted instantiation: alloccommon.c:av2_get_warp_extend_ctx Unexecuted instantiation: av2_loopfilter.c:av2_get_warp_extend_ctx Unexecuted instantiation: cdef.c:av2_get_warp_extend_ctx Unexecuted instantiation: gdf.c:av2_get_warp_extend_ctx Unexecuted instantiation: gdf_block.c:av2_get_warp_extend_ctx Unexecuted instantiation: cfl.c:av2_get_warp_extend_ctx Unexecuted instantiation: entropymode.c:av2_get_warp_extend_ctx Unexecuted instantiation: level.c:av2_get_warp_extend_ctx Unexecuted instantiation: mvref_common.c:av2_get_warp_extend_ctx Unexecuted instantiation: pred_common.c:av2_get_warp_extend_ctx Unexecuted instantiation: reconinter.c:av2_get_warp_extend_ctx Unexecuted instantiation: reconintra.c:av2_get_warp_extend_ctx Unexecuted instantiation: restoration.c:av2_get_warp_extend_ctx Unexecuted instantiation: thread_common.c:av2_get_warp_extend_ctx Unexecuted instantiation: tip.c:av2_get_warp_extend_ctx Unexecuted instantiation: warped_motion.c:av2_get_warp_extend_ctx Unexecuted instantiation: ccso.c:av2_get_warp_extend_ctx Unexecuted instantiation: bru.c:av2_get_warp_extend_ctx Unexecuted instantiation: obu_qm.c:av2_get_warp_extend_ctx Unexecuted instantiation: optflow_refine_sse4.c:av2_get_warp_extend_ctx Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_get_warp_extend_ctx Unexecuted instantiation: gdf_block_avx2.c:av2_get_warp_extend_ctx |
1140 | | |
1141 | | // Get the position of back-up WARP_EXTED mode base. |
1142 | | int get_extend_base_pos(const AV2_COMMON *cm, const MACROBLOCKD *xd, |
1143 | | const MB_MODE_INFO *mbmi, int mvp_row_offset, |
1144 | | int mvp_col_offset, POSITION *base_pos); |
1145 | | |
1146 | | void av2_find_warp_delta_base_candidates( |
1147 | | const MACROBLOCKD *xd, const MB_MODE_INFO *mbmi, |
1148 | | WARP_CANDIDATE warp_param_stack[MAX_WARP_REF_CANDIDATES], |
1149 | | WARP_CANDIDATE spatial_candidates[MAX_WARP_REF_CANDIDATES], |
1150 | | uint8_t num_wrl_cand, uint8_t *p_valid_num_candidates); |
1151 | | |
1152 | | bool is_warp_candidate_inside_of_frame(const AV2_COMMON *cm, |
1153 | | const MACROBLOCKD *xd, int_mv cand_mv); |
1154 | | int16_t inter_warpmv_mode_ctx(const AV2_COMMON *cm, const MACROBLOCKD *xd, |
1155 | | const MB_MODE_INFO *mbmi); |
1156 | | |
1157 | | void av2_fill_tpl_mvs_sample_gap(AV2_COMMON *cm); |
1158 | | |
1159 | | // Check if motion field is eligible based on reference frame type. |
1160 | | static INLINE int is_ref_motion_field_eligible_by_frame_type( |
1161 | 0 | const RefCntBuffer *const start_frame_buf) { |
1162 | 0 | if (start_frame_buf == NULL) return 0; |
1163 | | |
1164 | 0 | if (start_frame_buf->frame_type == KEY_FRAME || |
1165 | 0 | start_frame_buf->frame_type == INTRA_ONLY_FRAME) |
1166 | 0 | return 0; |
1167 | | |
1168 | 0 | return 1; |
1169 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: annexF.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: decodeframe.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: decodemv.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: decoder.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: decodetxb.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: detokenize.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: obu_fgm.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: obu.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: obu_ci.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: obu_atlas.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: obu_lcr.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: obu_ops.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: obu_buf.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: intrapred_avx2.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: alloccommon.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: av2_loopfilter.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: cdef.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: gdf.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: gdf_block.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: cfl.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: entropymode.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: level.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: mvref_common.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: pred_common.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: reconinter.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: reconintra.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: restoration.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: thread_common.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: tip.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: warped_motion.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: ccso.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: bru.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: obu_qm.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: optflow_refine_sse4.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: affine_optflow_refine_avx2.c:is_ref_motion_field_eligible_by_frame_type Unexecuted instantiation: gdf_block_avx2.c:is_ref_motion_field_eligible_by_frame_type |
1170 | | |
1171 | | // Check if motion field is eligible based on reference frame size and current |
1172 | | // frame size. |
1173 | | static INLINE int is_ref_motion_field_eligible_by_frame_size( |
1174 | 0 | const AV2_COMMON *const cm, const RefCntBuffer *const start_frame_buf) { |
1175 | 0 | if (start_frame_buf == NULL) return 0; |
1176 | | |
1177 | 0 | if (start_frame_buf->mi_rows != cm->mi_params.mi_rows || |
1178 | 0 | start_frame_buf->mi_cols != cm->mi_params.mi_cols) |
1179 | 0 | return 0; |
1180 | | |
1181 | 0 | if (start_frame_buf->width != cm->width || |
1182 | 0 | start_frame_buf->height != cm->height) |
1183 | 0 | return 0; |
1184 | | |
1185 | 0 | return 1; |
1186 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: annexF.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: decodeframe.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: decodemv.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: decoder.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: decodetxb.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: detokenize.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: obu_fgm.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: obu.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: obu_ci.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: obu_atlas.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: obu_lcr.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: obu_ops.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: obu_buf.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: intrapred_avx2.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: alloccommon.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: av2_loopfilter.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: cdef.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: gdf.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: gdf_block.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: cfl.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: entropymode.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: level.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: mvref_common.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: pred_common.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: reconinter.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: reconintra.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: restoration.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: thread_common.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: tip.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: warped_motion.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: ccso.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: bru.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: obu_qm.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: optflow_refine_sse4.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: affine_optflow_refine_avx2.c:is_ref_motion_field_eligible_by_frame_size Unexecuted instantiation: gdf_block_avx2.c:is_ref_motion_field_eligible_by_frame_size |
1187 | | |
1188 | | // Check if motion field is eligible based on frame type and frame size |
1189 | | // information. |
1190 | | static INLINE int is_ref_motion_field_eligible( |
1191 | 0 | const AV2_COMMON *const cm, const RefCntBuffer *const start_frame_buf) { |
1192 | 0 | return is_ref_motion_field_eligible_by_frame_type(start_frame_buf) && |
1193 | 0 | is_ref_motion_field_eligible_by_frame_size(cm, start_frame_buf); |
1194 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_ref_motion_field_eligible Unexecuted instantiation: annexF.c:is_ref_motion_field_eligible Unexecuted instantiation: decodeframe.c:is_ref_motion_field_eligible Unexecuted instantiation: decodemv.c:is_ref_motion_field_eligible Unexecuted instantiation: decoder.c:is_ref_motion_field_eligible Unexecuted instantiation: decodetxb.c:is_ref_motion_field_eligible Unexecuted instantiation: detokenize.c:is_ref_motion_field_eligible Unexecuted instantiation: obu_fgm.c:is_ref_motion_field_eligible Unexecuted instantiation: obu.c:is_ref_motion_field_eligible Unexecuted instantiation: obu_ci.c:is_ref_motion_field_eligible Unexecuted instantiation: obu_atlas.c:is_ref_motion_field_eligible Unexecuted instantiation: obu_lcr.c:is_ref_motion_field_eligible Unexecuted instantiation: obu_ops.c:is_ref_motion_field_eligible Unexecuted instantiation: obu_buf.c:is_ref_motion_field_eligible Unexecuted instantiation: intrapred_avx2.c:is_ref_motion_field_eligible Unexecuted instantiation: alloccommon.c:is_ref_motion_field_eligible Unexecuted instantiation: av2_loopfilter.c:is_ref_motion_field_eligible Unexecuted instantiation: cdef.c:is_ref_motion_field_eligible Unexecuted instantiation: gdf.c:is_ref_motion_field_eligible Unexecuted instantiation: gdf_block.c:is_ref_motion_field_eligible Unexecuted instantiation: cfl.c:is_ref_motion_field_eligible Unexecuted instantiation: entropymode.c:is_ref_motion_field_eligible Unexecuted instantiation: level.c:is_ref_motion_field_eligible Unexecuted instantiation: mvref_common.c:is_ref_motion_field_eligible Unexecuted instantiation: pred_common.c:is_ref_motion_field_eligible Unexecuted instantiation: reconinter.c:is_ref_motion_field_eligible Unexecuted instantiation: reconintra.c:is_ref_motion_field_eligible Unexecuted instantiation: restoration.c:is_ref_motion_field_eligible Unexecuted instantiation: thread_common.c:is_ref_motion_field_eligible Unexecuted instantiation: tip.c:is_ref_motion_field_eligible Unexecuted instantiation: warped_motion.c:is_ref_motion_field_eligible Unexecuted instantiation: ccso.c:is_ref_motion_field_eligible Unexecuted instantiation: bru.c:is_ref_motion_field_eligible Unexecuted instantiation: obu_qm.c:is_ref_motion_field_eligible Unexecuted instantiation: optflow_refine_sse4.c:is_ref_motion_field_eligible Unexecuted instantiation: affine_optflow_refine_avx2.c:is_ref_motion_field_eligible Unexecuted instantiation: gdf_block_avx2.c:is_ref_motion_field_eligible |
1195 | | |
1196 | | // Temporal scaling the motion vector |
1197 | | static AVM_INLINE void tip_get_mv_projection(MV *output, MV ref, |
1198 | 0 | int scale_factor) { |
1199 | 0 | const int64_t scale_mv_row = (int64_t)ref.row * scale_factor; |
1200 | 0 | const int mv_row = (int)ROUND_POWER_OF_TWO_SIGNED_64(scale_mv_row, 14); |
1201 | 0 | const int64_t scale_mv_col = (int64_t)ref.col * scale_factor; |
1202 | 0 | const int mv_col = (int)ROUND_POWER_OF_TWO_SIGNED_64(scale_mv_col, 14); |
1203 | 0 | const int clamp_max = MV_UPP - 1; |
1204 | 0 | const int clamp_min = MV_LOW + 1; |
1205 | 0 | output->row = (MV_COMP_DATA_TYPE)clamp(mv_row, clamp_min, clamp_max); |
1206 | 0 | output->col = (MV_COMP_DATA_TYPE)clamp(mv_col, clamp_min, clamp_max); |
1207 | 0 | } Unexecuted instantiation: av2_dx_iface.c:tip_get_mv_projection Unexecuted instantiation: annexF.c:tip_get_mv_projection Unexecuted instantiation: decodeframe.c:tip_get_mv_projection Unexecuted instantiation: decodemv.c:tip_get_mv_projection Unexecuted instantiation: decoder.c:tip_get_mv_projection Unexecuted instantiation: decodetxb.c:tip_get_mv_projection Unexecuted instantiation: detokenize.c:tip_get_mv_projection Unexecuted instantiation: obu_fgm.c:tip_get_mv_projection Unexecuted instantiation: obu.c:tip_get_mv_projection Unexecuted instantiation: obu_ci.c:tip_get_mv_projection Unexecuted instantiation: obu_atlas.c:tip_get_mv_projection Unexecuted instantiation: obu_lcr.c:tip_get_mv_projection Unexecuted instantiation: obu_ops.c:tip_get_mv_projection Unexecuted instantiation: obu_buf.c:tip_get_mv_projection Unexecuted instantiation: intrapred_avx2.c:tip_get_mv_projection Unexecuted instantiation: alloccommon.c:tip_get_mv_projection Unexecuted instantiation: av2_loopfilter.c:tip_get_mv_projection Unexecuted instantiation: cdef.c:tip_get_mv_projection Unexecuted instantiation: gdf.c:tip_get_mv_projection Unexecuted instantiation: gdf_block.c:tip_get_mv_projection Unexecuted instantiation: cfl.c:tip_get_mv_projection Unexecuted instantiation: entropymode.c:tip_get_mv_projection Unexecuted instantiation: level.c:tip_get_mv_projection Unexecuted instantiation: mvref_common.c:tip_get_mv_projection Unexecuted instantiation: pred_common.c:tip_get_mv_projection Unexecuted instantiation: reconinter.c:tip_get_mv_projection Unexecuted instantiation: reconintra.c:tip_get_mv_projection Unexecuted instantiation: restoration.c:tip_get_mv_projection Unexecuted instantiation: thread_common.c:tip_get_mv_projection Unexecuted instantiation: tip.c:tip_get_mv_projection Unexecuted instantiation: warped_motion.c:tip_get_mv_projection Unexecuted instantiation: ccso.c:tip_get_mv_projection Unexecuted instantiation: bru.c:tip_get_mv_projection Unexecuted instantiation: obu_qm.c:tip_get_mv_projection Unexecuted instantiation: optflow_refine_sse4.c:tip_get_mv_projection Unexecuted instantiation: affine_optflow_refine_avx2.c:tip_get_mv_projection Unexecuted instantiation: gdf_block_avx2.c:tip_get_mv_projection |
1208 | | |
1209 | | // Compute TMVP col offset related to block mv |
1210 | | static AVM_INLINE int derive_col_mv_tpl_offset(const AV2_COMMON *const cm, |
1211 | 0 | int blk_tpl_col) { |
1212 | 0 | const int frame_mvs_tpl_cols = |
1213 | 0 | ROUND_POWER_OF_TWO(cm->mi_params.mi_cols, TMVP_SHIFT_BITS); |
1214 | |
|
1215 | 0 | int tpl_col_offset = 0; |
1216 | 0 | if (blk_tpl_col + tpl_col_offset >= frame_mvs_tpl_cols) { |
1217 | 0 | tpl_col_offset = frame_mvs_tpl_cols - 1 - blk_tpl_col; |
1218 | 0 | } else if (blk_tpl_col + tpl_col_offset < 0) { |
1219 | 0 | tpl_col_offset = -blk_tpl_col; |
1220 | 0 | } |
1221 | |
|
1222 | 0 | return tpl_col_offset; |
1223 | 0 | } Unexecuted instantiation: av2_dx_iface.c:derive_col_mv_tpl_offset Unexecuted instantiation: annexF.c:derive_col_mv_tpl_offset Unexecuted instantiation: decodeframe.c:derive_col_mv_tpl_offset Unexecuted instantiation: decodemv.c:derive_col_mv_tpl_offset Unexecuted instantiation: decoder.c:derive_col_mv_tpl_offset Unexecuted instantiation: decodetxb.c:derive_col_mv_tpl_offset Unexecuted instantiation: detokenize.c:derive_col_mv_tpl_offset Unexecuted instantiation: obu_fgm.c:derive_col_mv_tpl_offset Unexecuted instantiation: obu.c:derive_col_mv_tpl_offset Unexecuted instantiation: obu_ci.c:derive_col_mv_tpl_offset Unexecuted instantiation: obu_atlas.c:derive_col_mv_tpl_offset Unexecuted instantiation: obu_lcr.c:derive_col_mv_tpl_offset Unexecuted instantiation: obu_ops.c:derive_col_mv_tpl_offset Unexecuted instantiation: obu_buf.c:derive_col_mv_tpl_offset Unexecuted instantiation: intrapred_avx2.c:derive_col_mv_tpl_offset Unexecuted instantiation: alloccommon.c:derive_col_mv_tpl_offset Unexecuted instantiation: av2_loopfilter.c:derive_col_mv_tpl_offset Unexecuted instantiation: cdef.c:derive_col_mv_tpl_offset Unexecuted instantiation: gdf.c:derive_col_mv_tpl_offset Unexecuted instantiation: gdf_block.c:derive_col_mv_tpl_offset Unexecuted instantiation: cfl.c:derive_col_mv_tpl_offset Unexecuted instantiation: entropymode.c:derive_col_mv_tpl_offset Unexecuted instantiation: level.c:derive_col_mv_tpl_offset Unexecuted instantiation: mvref_common.c:derive_col_mv_tpl_offset Unexecuted instantiation: pred_common.c:derive_col_mv_tpl_offset Unexecuted instantiation: reconinter.c:derive_col_mv_tpl_offset Unexecuted instantiation: reconintra.c:derive_col_mv_tpl_offset Unexecuted instantiation: restoration.c:derive_col_mv_tpl_offset Unexecuted instantiation: thread_common.c:derive_col_mv_tpl_offset Unexecuted instantiation: tip.c:derive_col_mv_tpl_offset Unexecuted instantiation: warped_motion.c:derive_col_mv_tpl_offset Unexecuted instantiation: ccso.c:derive_col_mv_tpl_offset Unexecuted instantiation: bru.c:derive_col_mv_tpl_offset Unexecuted instantiation: obu_qm.c:derive_col_mv_tpl_offset Unexecuted instantiation: optflow_refine_sse4.c:derive_col_mv_tpl_offset Unexecuted instantiation: affine_optflow_refine_avx2.c:derive_col_mv_tpl_offset Unexecuted instantiation: gdf_block_avx2.c:derive_col_mv_tpl_offset |
1224 | | |
1225 | | // Compute TMVP row offset related to block mv |
1226 | | static AVM_INLINE int derive_row_mv_tpl_offset(const AV2_COMMON *const cm, |
1227 | 0 | int blk_tpl_row) { |
1228 | 0 | const int frame_mvs_tpl_cols = |
1229 | 0 | ROUND_POWER_OF_TWO(cm->mi_params.mi_cols, TMVP_SHIFT_BITS); |
1230 | 0 | const int frame_mvs_tpl_rows = |
1231 | 0 | ROUND_POWER_OF_TWO(cm->mi_params.mi_rows, TMVP_SHIFT_BITS); |
1232 | |
|
1233 | 0 | int tpl_row_offset = 0; |
1234 | 0 | if (blk_tpl_row + tpl_row_offset >= frame_mvs_tpl_rows) { |
1235 | 0 | tpl_row_offset = frame_mvs_tpl_rows - 1 - blk_tpl_row; |
1236 | 0 | } else if (blk_tpl_row + tpl_row_offset < 0) { |
1237 | 0 | tpl_row_offset = -blk_tpl_row; |
1238 | 0 | } |
1239 | |
|
1240 | 0 | const int tpl_offset = tpl_row_offset * frame_mvs_tpl_cols; |
1241 | 0 | return tpl_offset; |
1242 | 0 | } Unexecuted instantiation: av2_dx_iface.c:derive_row_mv_tpl_offset Unexecuted instantiation: annexF.c:derive_row_mv_tpl_offset Unexecuted instantiation: decodeframe.c:derive_row_mv_tpl_offset Unexecuted instantiation: decodemv.c:derive_row_mv_tpl_offset Unexecuted instantiation: decoder.c:derive_row_mv_tpl_offset Unexecuted instantiation: decodetxb.c:derive_row_mv_tpl_offset Unexecuted instantiation: detokenize.c:derive_row_mv_tpl_offset Unexecuted instantiation: obu_fgm.c:derive_row_mv_tpl_offset Unexecuted instantiation: obu.c:derive_row_mv_tpl_offset Unexecuted instantiation: obu_ci.c:derive_row_mv_tpl_offset Unexecuted instantiation: obu_atlas.c:derive_row_mv_tpl_offset Unexecuted instantiation: obu_lcr.c:derive_row_mv_tpl_offset Unexecuted instantiation: obu_ops.c:derive_row_mv_tpl_offset Unexecuted instantiation: obu_buf.c:derive_row_mv_tpl_offset Unexecuted instantiation: intrapred_avx2.c:derive_row_mv_tpl_offset Unexecuted instantiation: alloccommon.c:derive_row_mv_tpl_offset Unexecuted instantiation: av2_loopfilter.c:derive_row_mv_tpl_offset Unexecuted instantiation: cdef.c:derive_row_mv_tpl_offset Unexecuted instantiation: gdf.c:derive_row_mv_tpl_offset Unexecuted instantiation: gdf_block.c:derive_row_mv_tpl_offset Unexecuted instantiation: cfl.c:derive_row_mv_tpl_offset Unexecuted instantiation: entropymode.c:derive_row_mv_tpl_offset Unexecuted instantiation: level.c:derive_row_mv_tpl_offset Unexecuted instantiation: mvref_common.c:derive_row_mv_tpl_offset Unexecuted instantiation: pred_common.c:derive_row_mv_tpl_offset Unexecuted instantiation: reconinter.c:derive_row_mv_tpl_offset Unexecuted instantiation: reconintra.c:derive_row_mv_tpl_offset Unexecuted instantiation: restoration.c:derive_row_mv_tpl_offset Unexecuted instantiation: thread_common.c:derive_row_mv_tpl_offset Unexecuted instantiation: tip.c:derive_row_mv_tpl_offset Unexecuted instantiation: warped_motion.c:derive_row_mv_tpl_offset Unexecuted instantiation: ccso.c:derive_row_mv_tpl_offset Unexecuted instantiation: bru.c:derive_row_mv_tpl_offset Unexecuted instantiation: obu_qm.c:derive_row_mv_tpl_offset Unexecuted instantiation: optflow_refine_sse4.c:derive_row_mv_tpl_offset Unexecuted instantiation: affine_optflow_refine_avx2.c:derive_row_mv_tpl_offset Unexecuted instantiation: gdf_block_avx2.c:derive_row_mv_tpl_offset |
1243 | | |
1244 | | // Compute TMVP unit offset related to block mv |
1245 | | static AVM_INLINE int derive_block_mv_tpl_offset(const AV2_COMMON *const cm, |
1246 | | const int blk_tpl_row, |
1247 | 0 | const int blk_tpl_col) { |
1248 | 0 | const int row_offset_to_within_frame = |
1249 | 0 | derive_row_mv_tpl_offset(cm, blk_tpl_row); |
1250 | 0 | const int col_offset_to_within_frame = |
1251 | 0 | derive_col_mv_tpl_offset(cm, blk_tpl_col); |
1252 | 0 | return row_offset_to_within_frame + col_offset_to_within_frame; |
1253 | 0 | } Unexecuted instantiation: av2_dx_iface.c:derive_block_mv_tpl_offset Unexecuted instantiation: annexF.c:derive_block_mv_tpl_offset Unexecuted instantiation: decodeframe.c:derive_block_mv_tpl_offset Unexecuted instantiation: decodemv.c:derive_block_mv_tpl_offset Unexecuted instantiation: decoder.c:derive_block_mv_tpl_offset Unexecuted instantiation: decodetxb.c:derive_block_mv_tpl_offset Unexecuted instantiation: detokenize.c:derive_block_mv_tpl_offset Unexecuted instantiation: obu_fgm.c:derive_block_mv_tpl_offset Unexecuted instantiation: obu.c:derive_block_mv_tpl_offset Unexecuted instantiation: obu_ci.c:derive_block_mv_tpl_offset Unexecuted instantiation: obu_atlas.c:derive_block_mv_tpl_offset Unexecuted instantiation: obu_lcr.c:derive_block_mv_tpl_offset Unexecuted instantiation: obu_ops.c:derive_block_mv_tpl_offset Unexecuted instantiation: obu_buf.c:derive_block_mv_tpl_offset Unexecuted instantiation: intrapred_avx2.c:derive_block_mv_tpl_offset Unexecuted instantiation: alloccommon.c:derive_block_mv_tpl_offset Unexecuted instantiation: av2_loopfilter.c:derive_block_mv_tpl_offset Unexecuted instantiation: cdef.c:derive_block_mv_tpl_offset Unexecuted instantiation: gdf.c:derive_block_mv_tpl_offset Unexecuted instantiation: gdf_block.c:derive_block_mv_tpl_offset Unexecuted instantiation: cfl.c:derive_block_mv_tpl_offset Unexecuted instantiation: entropymode.c:derive_block_mv_tpl_offset Unexecuted instantiation: level.c:derive_block_mv_tpl_offset Unexecuted instantiation: mvref_common.c:derive_block_mv_tpl_offset Unexecuted instantiation: pred_common.c:derive_block_mv_tpl_offset Unexecuted instantiation: reconinter.c:derive_block_mv_tpl_offset Unexecuted instantiation: reconintra.c:derive_block_mv_tpl_offset Unexecuted instantiation: restoration.c:derive_block_mv_tpl_offset Unexecuted instantiation: thread_common.c:derive_block_mv_tpl_offset Unexecuted instantiation: tip.c:derive_block_mv_tpl_offset Unexecuted instantiation: warped_motion.c:derive_block_mv_tpl_offset Unexecuted instantiation: ccso.c:derive_block_mv_tpl_offset Unexecuted instantiation: bru.c:derive_block_mv_tpl_offset Unexecuted instantiation: obu_qm.c:derive_block_mv_tpl_offset Unexecuted instantiation: optflow_refine_sse4.c:derive_block_mv_tpl_offset Unexecuted instantiation: affine_optflow_refine_avx2.c:derive_block_mv_tpl_offset Unexecuted instantiation: gdf_block_avx2.c:derive_block_mv_tpl_offset |
1254 | | |
1255 | | static AVM_INLINE void get_tip_mv(const AV2_COMMON *cm, const MV *block_mv, |
1256 | 0 | int blk_col, int blk_row, int_mv tip_mv[2]) { |
1257 | 0 | const int mvs_stride = |
1258 | 0 | ROUND_POWER_OF_TWO(cm->mi_params.mi_cols, TMVP_SHIFT_BITS); |
1259 | |
|
1260 | 0 | const int offset_to_within_frame = |
1261 | 0 | derive_block_mv_tpl_offset(cm, blk_row, blk_col); |
1262 | 0 | const int tpl_offset = |
1263 | 0 | blk_row * mvs_stride + blk_col + offset_to_within_frame; |
1264 | 0 | const TPL_MV_REF *tpl_mvs = cm->tpl_mvs + tpl_offset; |
1265 | |
|
1266 | 0 | if (tpl_mvs->mfmv0.as_int != 0 && tpl_mvs->mfmv0.as_int != INVALID_MV) { |
1267 | 0 | tip_get_mv_projection(&tip_mv[0].as_mv, tpl_mvs->mfmv0.as_mv, |
1268 | 0 | cm->tip_ref.ref_frames_offset_sf[0]); |
1269 | 0 | tip_get_mv_projection(&tip_mv[1].as_mv, tpl_mvs->mfmv0.as_mv, |
1270 | 0 | cm->tip_ref.ref_frames_offset_sf[1]); |
1271 | 0 | } else { |
1272 | 0 | tip_mv[0].as_int = 0; |
1273 | 0 | tip_mv[1].as_int = 0; |
1274 | 0 | } |
1275 | 0 | tip_mv[0].as_mv.row = (MV_COMP_DATA_TYPE)clamp( |
1276 | 0 | tip_mv[0].as_mv.row + block_mv->row, MV_LOW + 1, MV_UPP - 1); |
1277 | 0 | tip_mv[0].as_mv.col = (MV_COMP_DATA_TYPE)clamp( |
1278 | 0 | tip_mv[0].as_mv.col + block_mv->col, MV_LOW + 1, MV_UPP - 1); |
1279 | 0 | tip_mv[1].as_mv.row = (MV_COMP_DATA_TYPE)clamp( |
1280 | 0 | tip_mv[1].as_mv.row + block_mv->row, MV_LOW + 1, MV_UPP - 1); |
1281 | 0 | tip_mv[1].as_mv.col = (MV_COMP_DATA_TYPE)clamp( |
1282 | 0 | tip_mv[1].as_mv.col + block_mv->col, MV_LOW + 1, MV_UPP - 1); |
1283 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_tip_mv Unexecuted instantiation: annexF.c:get_tip_mv Unexecuted instantiation: decodeframe.c:get_tip_mv Unexecuted instantiation: decodemv.c:get_tip_mv Unexecuted instantiation: decoder.c:get_tip_mv Unexecuted instantiation: decodetxb.c:get_tip_mv Unexecuted instantiation: detokenize.c:get_tip_mv Unexecuted instantiation: obu_fgm.c:get_tip_mv Unexecuted instantiation: obu.c:get_tip_mv Unexecuted instantiation: obu_ci.c:get_tip_mv Unexecuted instantiation: obu_atlas.c:get_tip_mv Unexecuted instantiation: obu_lcr.c:get_tip_mv Unexecuted instantiation: obu_ops.c:get_tip_mv Unexecuted instantiation: obu_buf.c:get_tip_mv Unexecuted instantiation: intrapred_avx2.c:get_tip_mv Unexecuted instantiation: alloccommon.c:get_tip_mv Unexecuted instantiation: av2_loopfilter.c:get_tip_mv Unexecuted instantiation: cdef.c:get_tip_mv Unexecuted instantiation: gdf.c:get_tip_mv Unexecuted instantiation: gdf_block.c:get_tip_mv Unexecuted instantiation: cfl.c:get_tip_mv Unexecuted instantiation: entropymode.c:get_tip_mv Unexecuted instantiation: level.c:get_tip_mv Unexecuted instantiation: mvref_common.c:get_tip_mv Unexecuted instantiation: pred_common.c:get_tip_mv Unexecuted instantiation: reconinter.c:get_tip_mv Unexecuted instantiation: reconintra.c:get_tip_mv Unexecuted instantiation: restoration.c:get_tip_mv Unexecuted instantiation: thread_common.c:get_tip_mv Unexecuted instantiation: tip.c:get_tip_mv Unexecuted instantiation: warped_motion.c:get_tip_mv Unexecuted instantiation: ccso.c:get_tip_mv Unexecuted instantiation: bru.c:get_tip_mv Unexecuted instantiation: obu_qm.c:get_tip_mv Unexecuted instantiation: optflow_refine_sse4.c:get_tip_mv Unexecuted instantiation: affine_optflow_refine_avx2.c:get_tip_mv Unexecuted instantiation: gdf_block_avx2.c:get_tip_mv |
1284 | | |
1285 | | static AVM_INLINE void derive_non_tip_mode_smvp_from_tip(const AV2_COMMON *cm, |
1286 | | const MB_MODE_INFO *mi, |
1287 | | int mi_row, int mi_col, |
1288 | | int is_tip_16_16, |
1289 | 0 | int_mv ref_mv[2]) { |
1290 | 0 | const int tpl_row_start = (mi->mi_row_start >> TMVP_SHIFT_BITS); |
1291 | 0 | const int tpl_col_start = (mi->mi_col_start >> TMVP_SHIFT_BITS); |
1292 | |
|
1293 | 0 | const int tpl_row_offset = |
1294 | 0 | (((mi_row - mi->mi_row_start) >> TMVP_SHIFT_BITS) >> is_tip_16_16) |
1295 | 0 | << is_tip_16_16; |
1296 | 0 | const int tpl_col_offset = |
1297 | 0 | (((mi_col - mi->mi_col_start) >> TMVP_SHIFT_BITS) >> is_tip_16_16) |
1298 | 0 | << is_tip_16_16; |
1299 | |
|
1300 | 0 | const int tpl_row = tpl_row_start + tpl_row_offset; |
1301 | 0 | const int tpl_col = tpl_col_start + tpl_col_offset; |
1302 | 0 | int_mv mv = mi->mv[0]; |
1303 | |
|
1304 | 0 | get_tip_mv(cm, &mv.as_mv, tpl_col, tpl_row, ref_mv); |
1305 | 0 | } Unexecuted instantiation: av2_dx_iface.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: annexF.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: decodeframe.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: decodemv.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: decoder.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: decodetxb.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: detokenize.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: obu_fgm.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: obu.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: obu_ci.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: obu_atlas.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: obu_lcr.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: obu_ops.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: obu_buf.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: intrapred_avx2.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: alloccommon.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: av2_loopfilter.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: cdef.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: gdf.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: gdf_block.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: cfl.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: entropymode.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: level.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: mvref_common.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: pred_common.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: reconinter.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: reconintra.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: restoration.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: thread_common.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: tip.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: warped_motion.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: ccso.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: bru.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: obu_qm.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: optflow_refine_sse4.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: affine_optflow_refine_avx2.c:derive_non_tip_mode_smvp_from_tip Unexecuted instantiation: gdf_block_avx2.c:derive_non_tip_mode_smvp_from_tip |
1306 | | |
1307 | | #ifdef __cplusplus |
1308 | | } // extern "C" |
1309 | | #endif |
1310 | | |
1311 | | #endif // AVM_AV2_COMMON_MVREF_COMMON_H_ |