/src/avm/av2/common/reconinter.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 | | |
13 | | #ifndef AVM_AV2_COMMON_RECONINTER_H_ |
14 | | #define AVM_AV2_COMMON_RECONINTER_H_ |
15 | | |
16 | | #include "av2/common/av2_common_int.h" |
17 | | #include "av2/common/convolve.h" |
18 | | #include "av2/common/filter.h" |
19 | | #include "av2/common/warped_motion.h" |
20 | | #include "avm/avm_integer.h" |
21 | | #include "av2/encoder/block.h" |
22 | | |
23 | | // Work out how many pixels off the edge of a reference frame we're allowed |
24 | | // to go when forming an inter prediction. |
25 | | // The outermost row/col of each referernce frame is extended by |
26 | | // (AVM_BORDER_IN_PIXELS >> subsampling) pixels, but we need to keep |
27 | | // at least AVM_INTERP_EXTEND pixels within that to account for filtering. |
28 | | // |
29 | | // We have to break this up into two macros to keep both clang-format and |
30 | | // tools/lint-hunks.py happy. |
31 | | #define AVM_LEFT_TOP_MARGIN_PX(subsampling) \ |
32 | 0 | ((AVM_BORDER_IN_PIXELS >> subsampling) - AVM_INTERP_EXTEND) |
33 | | #define AVM_LEFT_TOP_MARGIN_SCALED(subsampling) \ |
34 | 0 | (AVM_LEFT_TOP_MARGIN_PX(subsampling) << SCALE_SUBPEL_BITS) |
35 | | |
36 | | #ifdef __cplusplus |
37 | | extern "C" { |
38 | | #endif |
39 | | |
40 | 0 | #define MAX_WEDGE_SIZE_LOG2 6 // 64x64 |
41 | 0 | #define MAX_WEDGE_SIZE (1 << MAX_WEDGE_SIZE_LOG2) |
42 | | #define MAX_WEDGE_SQUARE (MAX_WEDGE_SIZE * MAX_WEDGE_SIZE) |
43 | | |
44 | 0 | #define MAX_WEDGE_BOUNDARY_TYPES 2 |
45 | | |
46 | | #define WEDGE_WEIGHT_BITS 6 |
47 | | |
48 | | static const int wedge_angle_dist_2_index[WEDGE_ANGLES][NUM_WEDGE_DIST] = { |
49 | | { -1, 0, 1, 2 }, // WEDGE_0 |
50 | | { 3, 4, 5, 6 }, // WEDGE_14 |
51 | | { 7, 8, 9, 10 }, // WEDGE_27 |
52 | | { 11, 12, 13, 14 }, // WEDGE_45 |
53 | | { 15, 16, 17, 18 }, // WEDGE_63 |
54 | | { -1, 19, 20, 21 }, // WEDGE_90 |
55 | | { 22, 23, 24, 25 }, // WEDGE_117 |
56 | | { 26, 27, 28, 29 }, // WEDGE_135 |
57 | | { 30, 31, 32, 33 }, // WEDGE_153 |
58 | | { 34, 35, 36, 37 }, // WEDGE_166 |
59 | | { -1, 38, 39, 40 }, // WEDGE_180 |
60 | | { -1, 41, 42, 43 }, // WEDGE_194 |
61 | | { -1, 44, 45, 46 }, // WEDGE_207 |
62 | | { -1, 47, 48, 49 }, // WEDGE_225 |
63 | | { -1, 50, 51, 52 }, // WEDGE_243 |
64 | | { -1, 53, 54, 55 }, // WEDGE_270 |
65 | | { -1, 56, 57, 58 }, // WEDGE_297 |
66 | | { -1, 59, 60, 61 }, // WEDGE_315 |
67 | | { -1, 62, 63, 64 }, // WEDGE_333 |
68 | | { -1, 65, 66, 67 }, // WEDGE_346 |
69 | | }; |
70 | | |
71 | | static const int wedge_index_2_angle[MAX_WEDGE_TYPES] = { |
72 | | WEDGE_0, WEDGE_0, WEDGE_0, // WEDGE_0 |
73 | | WEDGE_14, WEDGE_14, WEDGE_14, WEDGE_14, // WEDGE_14 |
74 | | WEDGE_27, WEDGE_27, WEDGE_27, WEDGE_27, // WEDGE_27 |
75 | | WEDGE_45, WEDGE_45, WEDGE_45, WEDGE_45, // WEDGE_45 |
76 | | WEDGE_63, WEDGE_63, WEDGE_63, WEDGE_63, // WEDGE_63 |
77 | | WEDGE_90, WEDGE_90, WEDGE_90, // WEDGE_90 |
78 | | WEDGE_117, WEDGE_117, WEDGE_117, WEDGE_117, // WEDGE_117 |
79 | | WEDGE_135, WEDGE_135, WEDGE_135, WEDGE_135, // WEDGE_135 |
80 | | WEDGE_153, WEDGE_153, WEDGE_153, WEDGE_153, // WEDGE_153 |
81 | | WEDGE_166, WEDGE_166, WEDGE_166, WEDGE_166, // WEDGE_166 |
82 | | WEDGE_180, WEDGE_180, WEDGE_180, // WEDGE_180 |
83 | | WEDGE_194, WEDGE_194, WEDGE_194, // WEDGE_194 |
84 | | WEDGE_207, WEDGE_207, WEDGE_207, // WEDGE_207 |
85 | | WEDGE_225, WEDGE_225, WEDGE_225, // WEDGE_225 |
86 | | WEDGE_243, WEDGE_243, WEDGE_243, // WEDGE_243 |
87 | | WEDGE_270, WEDGE_270, WEDGE_270, // WEDGE_270 |
88 | | WEDGE_297, WEDGE_297, WEDGE_297, // WEDGE_297 |
89 | | WEDGE_315, WEDGE_315, WEDGE_315, // WEDGE_315 |
90 | | WEDGE_333, WEDGE_333, WEDGE_333, // WEDGE_333 |
91 | | WEDGE_346, WEDGE_346, WEDGE_346 // WEDGE_346 |
92 | | }; |
93 | | |
94 | | static const int wedge_index_2_dist[MAX_WEDGE_TYPES] = { |
95 | | 1, 2, 3, // WEDGE_0 |
96 | | 0, 1, 2, 3, // WEDGE_14 |
97 | | 0, 1, 2, 3, // WEDGE_27 |
98 | | 0, 1, 2, 3, // WEDGE_45 |
99 | | 0, 1, 2, 3, // WEDGE_63 |
100 | | 1, 2, 3, // WEDGE_90 |
101 | | 0, 1, 2, 3, // WEDGE_117 |
102 | | 0, 1, 2, 3, // WEDGE_135 |
103 | | 0, 1, 2, 3, // WEDGE_153 |
104 | | 0, 1, 2, 3, // WEDGE_166 |
105 | | 1, 2, 3, // WEDGE_180 |
106 | | 1, 2, 3, // WEDGE_194 |
107 | | 1, 2, 3, // WEDGE_207 |
108 | | 1, 2, 3, // WEDGE_225 |
109 | | 1, 2, 3, // WEDGE_243 |
110 | | 1, 2, 3, // WEDGE_270 |
111 | | 1, 2, 3, // WEDGE_297 |
112 | | 1, 2, 3, // WEDGE_315 |
113 | | 1, 2, 3, // WEDGE_333 |
114 | | 1, 2, 3, // WEDGE_346 |
115 | | }; |
116 | | |
117 | | // 3-tuple: {direction, x_offset, y_offset} |
118 | | typedef struct { |
119 | | WedgeDirectionType direction; |
120 | | int x_offset; |
121 | | int y_offset; |
122 | | } wedge_code_type; |
123 | | typedef uint8_t |
124 | | *all_wedge_masks_type[MAX_WEDGE_TYPES][MAX_WEDGE_BOUNDARY_TYPES]; |
125 | | typedef uint8_t |
126 | | *wedge_decisions_type[MAX_WEDGE_TYPES][MAX_WEDGE_BOUNDARY_TYPES]; |
127 | | |
128 | | typedef struct { |
129 | | int wedge_types; |
130 | | const wedge_code_type *codebook; |
131 | | uint8_t *signflip; |
132 | | all_wedge_masks_type *all_masks; |
133 | | wedge_decisions_type *tmvp_mv_decisions; |
134 | | } wedge_params_type; |
135 | | |
136 | | extern const wedge_params_type av2_wedge_params_lookup[BLOCK_SIZES_ALL]; |
137 | | |
138 | | typedef struct SubpelParams { |
139 | | int xs; |
140 | | int ys; |
141 | | int subpel_x; |
142 | | int subpel_y; |
143 | | int x0; // top left sample horizontal cood. |
144 | | int y0; // top left sample vertical cood. |
145 | | int x1; // x0 + bw |
146 | | int y1; // y0 + bh |
147 | | } SubpelParams; |
148 | | |
149 | 0 | #define REFINE_MV_MAX_OFFSET 0 |
150 | | |
151 | 0 | #define EIGHT_TAPS_REF_TOP_BORDER (AVM_INTERP_EXTEND - 1 + REFINE_MV_MAX_OFFSET) |
152 | | #define EIGHT_TAPS_REF_LEFT_BORDER \ |
153 | 0 | (AVM_INTERP_EXTEND - 1 + REFINE_MV_MAX_OFFSET) |
154 | 0 | #define EIGHT_TAPS_REF_RIGHT_BORDER (AVM_INTERP_EXTEND + REFINE_MV_MAX_OFFSET) |
155 | 0 | #define EIGHT_TAPS_REF_BOTTOM_BORDER (AVM_INTERP_EXTEND + REFINE_MV_MAX_OFFSET) |
156 | | |
157 | 0 | #define AVM_4TAPS_INTERP_EXTEND 2 |
158 | | #define FOUR_TAPS_REF_TOP_BORDER \ |
159 | 0 | (AVM_4TAPS_INTERP_EXTEND - 1 + REFINE_MV_MAX_OFFSET) |
160 | | #define FOUR_TAPS_REF_LEFT_BORDER \ |
161 | 0 | (AVM_4TAPS_INTERP_EXTEND - 1 + REFINE_MV_MAX_OFFSET) |
162 | | #define FOUR_TAPS_REF_RIGHT_BORDER \ |
163 | 0 | (AVM_4TAPS_INTERP_EXTEND + REFINE_MV_MAX_OFFSET) |
164 | | #define FOUR_TAPS_REF_BOTTOM_BORDER \ |
165 | 0 | (AVM_4TAPS_INTERP_EXTEND + REFINE_MV_MAX_OFFSET) |
166 | | |
167 | 0 | #define REF_TOP_BORDER_WARP (AVM_INTERP_EXTEND - 1) |
168 | 0 | #define REF_LEFT_BORDER_WARP (AVM_INTERP_EXTEND - 1) |
169 | 0 | #define REF_RIGHT_BORDER_WARP (AVM_INTERP_EXTEND) |
170 | 0 | #define REF_BOTTOM_BORDER_WARP (AVM_INTERP_EXTEND) |
171 | | |
172 | | typedef enum InterPredMode { |
173 | | TRANSLATION_PRED, |
174 | | WARP_PRED, |
175 | | } InterPredMode; |
176 | | |
177 | | typedef enum InterCompMode { |
178 | | UNIFORM_SINGLE, |
179 | | UNIFORM_COMP, |
180 | | MASK_COMP, |
181 | | } InterCompMode; |
182 | | |
183 | | typedef struct InterPredParams { |
184 | | InterPredMode mode; |
185 | | InterCompMode comp_mode; |
186 | | WarpedMotionParams warp_params; |
187 | | ConvolveParams conv_params; |
188 | | const InterpFilterParams *interp_filter_params[2]; |
189 | | int block_width; |
190 | | int block_height; |
191 | | // In optical flow refinement, block_width and block_height will pass the |
192 | | // subblock size into av2_make_inter_predictor, while orig_block_width and |
193 | | // orig_block_height keep the original block size that is needed by |
194 | | // calc_subpel_params_func |
195 | | int orig_block_width; |
196 | | int orig_block_height; |
197 | | |
198 | | // In refinemV, the prediction is generated maximum 16x16 sub-block basis |
199 | | // original_pu_width and original_pu_height represents the width and height |
200 | | // of the original block. |
201 | | int original_pu_width; |
202 | | int original_pu_height; |
203 | | |
204 | | int pix_row; |
205 | | int pix_col; |
206 | | struct buf_2d ref_frame_buf; |
207 | | int subsampling_x; |
208 | | int subsampling_y; |
209 | | const struct scale_factors *scale_factors; |
210 | | int bit_depth; |
211 | | INTERINTER_COMPOUND_DATA mask_comp; |
212 | | BLOCK_SIZE sb_type; |
213 | | int is_intrabc; |
214 | | int use_ref_padding; |
215 | | ReferenceArea *ref_area; |
216 | | |
217 | | int use_warp_bd_box; |
218 | | PadBlock *warp_bd_box; |
219 | | |
220 | | INTERINTER_COMPOUND_BORDER_DATA border_data; |
221 | | } InterPredParams; |
222 | | |
223 | | // Apply bilinear and bicubic interpolation for subpel gradient to avoid |
224 | | // calls of build_one_inter_predictor function. Bicubic interpolation |
225 | | // brings better quality but the speed results are neutral. As such, bilinear |
226 | | // interpolation is used by default for a better trade-off between quality |
227 | | // and complexity. |
228 | | #define OPFL_BILINEAR_GRAD 0 |
229 | | #define OPFL_BICUBIC_GRAD 1 |
230 | | |
231 | | // Delta to use for computing gradients in bits, with 0 referring to |
232 | | // integer-pel. The actual delta value used from the 1/8-pel original MVs |
233 | | // is 2^(3 - SUBPEL_GRAD_DELTA_BITS). The max value of this macro is 3. |
234 | 0 | #define SUBPEL_GRAD_DELTA_BITS 2 |
235 | | |
236 | | // Bilinear and bicubic coefficients. Note that, at boundary, we apply |
237 | | // coefficients that are doubled because spatial distance between the two |
238 | | // interpolated pixels is halved. In other words, instead of computing |
239 | | // coeff * (v[delta] - v[-delta]) / (2 * delta), |
240 | | // we are practically computing |
241 | | // coeff * (v[delta] - v[0]) / (2 * delta). |
242 | | // Thus, coeff is doubled to get a better gradient quality. |
243 | | #if OPFL_BILINEAR_GRAD |
244 | | static const int bilinear_bits = 3; |
245 | | static const int32_t coeffs_bilinear[4][2] = { |
246 | | { 8, 16 }, // delta = 1 (SUBPEL_GRAD_DELTA_BITS = 0) |
247 | | { 4, 8 }, // delta = 0.5 (SUBPEL_GRAD_DELTA_BITS = 1) |
248 | | { 2, 4 }, // delta = 0.25 (SUBPEL_GRAD_DELTA_BITS = 2) |
249 | | { 1, 2 }, // delta = 0.125 (SUBPEL_GRAD_DELTA_BITS = 3) |
250 | | }; |
251 | | #endif |
252 | | |
253 | | #if OPFL_BICUBIC_GRAD |
254 | | static const int bicubic_bits = 7; |
255 | | static const int32_t coeffs_bicubic[4][2][2] = { |
256 | | { { 128, 256 }, { 0, 0 } }, // delta = 1 (SUBPEL_GRAD_DELTA_BITS = 0) |
257 | | { { 80, 160 }, { -8, -16 } }, // delta = 0.5 (SUBPEL_GRAD_DELTA_BITS = 1) |
258 | | { { 42, 84 }, { -5, -10 } }, // delta = 0.25 (SUBPEL_GRAD_DELTA_BITS = 2) |
259 | | { { 21, 42 }, { -3, -6 } }, // delta = 0.125 (SUBPEL_GRAD_DELTA_BITS = 3) |
260 | | }; |
261 | | #endif |
262 | | |
263 | | void av2_init_inter_params(InterPredParams *inter_pred_params, int block_width, |
264 | | int block_height, int pix_row, int pix_col, |
265 | | int subsampling_x, int subsampling_y, int bit_depth, |
266 | | int is_intrabc, const struct scale_factors *sf, |
267 | | const struct buf_2d *ref_buf, |
268 | | InterpFilter interp_filter); |
269 | | |
270 | | // Get the step size and maximum coded index of the warp block |
271 | | static INLINE void get_warp_model_steps(const MB_MODE_INFO *mbmi, |
272 | 0 | int *step_size, int *max_coded_index) { |
273 | 0 | int step_size_log2 = mbmi->warp_precision_idx == 0 ? 11 : 10; |
274 | 0 | *step_size = 1 << step_size_log2; |
275 | 0 | *max_coded_index = mbmi->warp_precision_idx == 0 ? 7 : 14; |
276 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_warp_model_steps Unexecuted instantiation: annexF.c:get_warp_model_steps Unexecuted instantiation: decodeframe.c:get_warp_model_steps Unexecuted instantiation: decodemv.c:get_warp_model_steps Unexecuted instantiation: decoder.c:get_warp_model_steps Unexecuted instantiation: decodetxb.c:get_warp_model_steps Unexecuted instantiation: detokenize.c:get_warp_model_steps Unexecuted instantiation: obu_fgm.c:get_warp_model_steps Unexecuted instantiation: obu.c:get_warp_model_steps Unexecuted instantiation: obu_ci.c:get_warp_model_steps Unexecuted instantiation: obu_atlas.c:get_warp_model_steps Unexecuted instantiation: obu_lcr.c:get_warp_model_steps Unexecuted instantiation: obu_ops.c:get_warp_model_steps Unexecuted instantiation: obu_buf.c:get_warp_model_steps Unexecuted instantiation: alloccommon.c:get_warp_model_steps Unexecuted instantiation: av2_loopfilter.c:get_warp_model_steps Unexecuted instantiation: cdef.c:get_warp_model_steps Unexecuted instantiation: cfl.c:get_warp_model_steps Unexecuted instantiation: entropymode.c:get_warp_model_steps Unexecuted instantiation: level.c:get_warp_model_steps Unexecuted instantiation: mvref_common.c:get_warp_model_steps Unexecuted instantiation: pred_common.c:get_warp_model_steps Unexecuted instantiation: reconinter.c:get_warp_model_steps Unexecuted instantiation: thread_common.c:get_warp_model_steps Unexecuted instantiation: tip.c:get_warp_model_steps Unexecuted instantiation: ccso.c:get_warp_model_steps Unexecuted instantiation: bru.c:get_warp_model_steps Unexecuted instantiation: obu_qm.c:get_warp_model_steps Unexecuted instantiation: optflow_refine_sse4.c:get_warp_model_steps Unexecuted instantiation: affine_optflow_refine_avx2.c:get_warp_model_steps |
277 | | |
278 | | // Get the default value of the six_param_flag |
279 | | static INLINE int get_default_six_param_flag(const AV2_COMMON *const cm, |
280 | 0 | const MB_MODE_INFO *mbmi) { |
281 | 0 | return (cm->seq_params.enable_six_param_warp_delta && |
282 | | |
283 | 0 | mbmi->warp_ref_idx == 1) |
284 | 0 | ? 1 |
285 | 0 | : 0; |
286 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_default_six_param_flag Unexecuted instantiation: annexF.c:get_default_six_param_flag Unexecuted instantiation: decodeframe.c:get_default_six_param_flag Unexecuted instantiation: decodemv.c:get_default_six_param_flag Unexecuted instantiation: decoder.c:get_default_six_param_flag Unexecuted instantiation: decodetxb.c:get_default_six_param_flag Unexecuted instantiation: detokenize.c:get_default_six_param_flag Unexecuted instantiation: obu_fgm.c:get_default_six_param_flag Unexecuted instantiation: obu.c:get_default_six_param_flag Unexecuted instantiation: obu_ci.c:get_default_six_param_flag Unexecuted instantiation: obu_atlas.c:get_default_six_param_flag Unexecuted instantiation: obu_lcr.c:get_default_six_param_flag Unexecuted instantiation: obu_ops.c:get_default_six_param_flag Unexecuted instantiation: obu_buf.c:get_default_six_param_flag Unexecuted instantiation: alloccommon.c:get_default_six_param_flag Unexecuted instantiation: av2_loopfilter.c:get_default_six_param_flag Unexecuted instantiation: cdef.c:get_default_six_param_flag Unexecuted instantiation: cfl.c:get_default_six_param_flag Unexecuted instantiation: entropymode.c:get_default_six_param_flag Unexecuted instantiation: level.c:get_default_six_param_flag Unexecuted instantiation: mvref_common.c:get_default_six_param_flag Unexecuted instantiation: pred_common.c:get_default_six_param_flag Unexecuted instantiation: reconinter.c:get_default_six_param_flag Unexecuted instantiation: thread_common.c:get_default_six_param_flag Unexecuted instantiation: tip.c:get_default_six_param_flag Unexecuted instantiation: ccso.c:get_default_six_param_flag Unexecuted instantiation: bru.c:get_default_six_param_flag Unexecuted instantiation: obu_qm.c:get_default_six_param_flag Unexecuted instantiation: optflow_refine_sse4.c:get_default_six_param_flag Unexecuted instantiation: affine_optflow_refine_avx2.c:get_default_six_param_flag |
287 | | |
288 | 0 | static INLINE int allow_warp_inter_intra(const MB_MODE_INFO *mbmi) { |
289 | 0 | return mbmi->mode == WARPMV && |
290 | 0 | is_interintra_allowed_bsize(mbmi->sb_type[PLANE_TYPE_Y]) && |
291 | 0 | is_interintra_allowed_ref(mbmi->ref_frame) && mbmi->bawp_flag[0] == 0; |
292 | 0 | } Unexecuted instantiation: av2_dx_iface.c:allow_warp_inter_intra Unexecuted instantiation: annexF.c:allow_warp_inter_intra Unexecuted instantiation: decodeframe.c:allow_warp_inter_intra Unexecuted instantiation: decodemv.c:allow_warp_inter_intra Unexecuted instantiation: decoder.c:allow_warp_inter_intra Unexecuted instantiation: decodetxb.c:allow_warp_inter_intra Unexecuted instantiation: detokenize.c:allow_warp_inter_intra Unexecuted instantiation: obu_fgm.c:allow_warp_inter_intra Unexecuted instantiation: obu.c:allow_warp_inter_intra Unexecuted instantiation: obu_ci.c:allow_warp_inter_intra Unexecuted instantiation: obu_atlas.c:allow_warp_inter_intra Unexecuted instantiation: obu_lcr.c:allow_warp_inter_intra Unexecuted instantiation: obu_ops.c:allow_warp_inter_intra Unexecuted instantiation: obu_buf.c:allow_warp_inter_intra Unexecuted instantiation: alloccommon.c:allow_warp_inter_intra Unexecuted instantiation: av2_loopfilter.c:allow_warp_inter_intra Unexecuted instantiation: cdef.c:allow_warp_inter_intra Unexecuted instantiation: cfl.c:allow_warp_inter_intra Unexecuted instantiation: entropymode.c:allow_warp_inter_intra Unexecuted instantiation: level.c:allow_warp_inter_intra Unexecuted instantiation: mvref_common.c:allow_warp_inter_intra Unexecuted instantiation: pred_common.c:allow_warp_inter_intra Unexecuted instantiation: reconinter.c:allow_warp_inter_intra Unexecuted instantiation: thread_common.c:allow_warp_inter_intra Unexecuted instantiation: tip.c:allow_warp_inter_intra Unexecuted instantiation: ccso.c:allow_warp_inter_intra Unexecuted instantiation: bru.c:allow_warp_inter_intra Unexecuted instantiation: obu_qm.c:allow_warp_inter_intra Unexecuted instantiation: optflow_refine_sse4.c:allow_warp_inter_intra Unexecuted instantiation: affine_optflow_refine_avx2.c:allow_warp_inter_intra |
293 | | |
294 | | // Check if the signaling of the warp delta parameters are allowed |
295 | | static INLINE int allow_warp_parameter_signaling(const AV2_COMMON *const cm, |
296 | 0 | const MB_MODE_INFO *mbmi) { |
297 | | // Warp delta parameters are signalled in following two cases |
298 | | // Case0: sequence level enable_six_param_warp_delta is enabled AND |
299 | | // (mbmi->warp_ref_idx == 0), in this case 6-parameter delta is signaled. |
300 | | // Case1: (mbmi->warp_ref_idx == 1), in this case 4-parameter delta is |
301 | | // signaled. |
302 | |
|
303 | 0 | int allow_delta_for_this_warp_ref_idx = |
304 | 0 | get_default_six_param_flag(cm, mbmi) || // 6-parameter |
305 | 0 | (mbmi->warp_ref_idx == 0); // 4-parameter |
306 | |
|
307 | 0 | return (mbmi->mode == WARP_NEWMV && cm->features.allow_warpmv_mode && |
308 | 0 | mbmi->motion_mode == WARP_DELTA && allow_delta_for_this_warp_ref_idx); |
309 | 0 | } Unexecuted instantiation: av2_dx_iface.c:allow_warp_parameter_signaling Unexecuted instantiation: annexF.c:allow_warp_parameter_signaling Unexecuted instantiation: decodeframe.c:allow_warp_parameter_signaling Unexecuted instantiation: decodemv.c:allow_warp_parameter_signaling Unexecuted instantiation: decoder.c:allow_warp_parameter_signaling Unexecuted instantiation: decodetxb.c:allow_warp_parameter_signaling Unexecuted instantiation: detokenize.c:allow_warp_parameter_signaling Unexecuted instantiation: obu_fgm.c:allow_warp_parameter_signaling Unexecuted instantiation: obu.c:allow_warp_parameter_signaling Unexecuted instantiation: obu_ci.c:allow_warp_parameter_signaling Unexecuted instantiation: obu_atlas.c:allow_warp_parameter_signaling Unexecuted instantiation: obu_lcr.c:allow_warp_parameter_signaling Unexecuted instantiation: obu_ops.c:allow_warp_parameter_signaling Unexecuted instantiation: obu_buf.c:allow_warp_parameter_signaling Unexecuted instantiation: alloccommon.c:allow_warp_parameter_signaling Unexecuted instantiation: av2_loopfilter.c:allow_warp_parameter_signaling Unexecuted instantiation: cdef.c:allow_warp_parameter_signaling Unexecuted instantiation: cfl.c:allow_warp_parameter_signaling Unexecuted instantiation: entropymode.c:allow_warp_parameter_signaling Unexecuted instantiation: level.c:allow_warp_parameter_signaling Unexecuted instantiation: mvref_common.c:allow_warp_parameter_signaling Unexecuted instantiation: pred_common.c:allow_warp_parameter_signaling Unexecuted instantiation: reconinter.c:allow_warp_parameter_signaling Unexecuted instantiation: thread_common.c:allow_warp_parameter_signaling Unexecuted instantiation: tip.c:allow_warp_parameter_signaling Unexecuted instantiation: ccso.c:allow_warp_parameter_signaling Unexecuted instantiation: bru.c:allow_warp_parameter_signaling Unexecuted instantiation: obu_qm.c:allow_warp_parameter_signaling Unexecuted instantiation: optflow_refine_sse4.c:allow_warp_parameter_signaling Unexecuted instantiation: affine_optflow_refine_avx2.c:allow_warp_parameter_signaling |
310 | | |
311 | | // Map the index to weighting factor for compound weighted prediction |
312 | | static INLINE int get_cwp_coding_idx(int val, int encode, |
313 | | const AV2_COMMON *const cm, |
314 | 0 | const MB_MODE_INFO *const mbmi) { |
315 | 0 | int is_same_side = 0; |
316 | 0 | int cur_ref_side = 0; |
317 | 0 | int other_ref_side = 0; |
318 | 0 | if (has_second_ref(mbmi)) { |
319 | 0 | cur_ref_side = cm->ref_frame_side[mbmi->ref_frame[0]]; |
320 | 0 | other_ref_side = cm->ref_frame_side[mbmi->ref_frame[1]]; |
321 | |
|
322 | 0 | is_same_side = (cur_ref_side > 0 && other_ref_side > 0) || |
323 | 0 | (cur_ref_side == 0 && other_ref_side == 0); |
324 | 0 | } |
325 | |
|
326 | 0 | if (encode) { |
327 | 0 | for (int i = 0; i < MAX_CWP_NUM; i++) { |
328 | 0 | if (cwp_weighting_factor[is_same_side][i] == val) return i; |
329 | 0 | } |
330 | 0 | return 0; |
331 | 0 | } else { |
332 | 0 | return cwp_weighting_factor[is_same_side][val]; |
333 | 0 | } |
334 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_cwp_coding_idx Unexecuted instantiation: annexF.c:get_cwp_coding_idx Unexecuted instantiation: decodeframe.c:get_cwp_coding_idx Unexecuted instantiation: decodemv.c:get_cwp_coding_idx Unexecuted instantiation: decoder.c:get_cwp_coding_idx Unexecuted instantiation: decodetxb.c:get_cwp_coding_idx Unexecuted instantiation: detokenize.c:get_cwp_coding_idx Unexecuted instantiation: obu_fgm.c:get_cwp_coding_idx Unexecuted instantiation: obu.c:get_cwp_coding_idx Unexecuted instantiation: obu_ci.c:get_cwp_coding_idx Unexecuted instantiation: obu_atlas.c:get_cwp_coding_idx Unexecuted instantiation: obu_lcr.c:get_cwp_coding_idx Unexecuted instantiation: obu_ops.c:get_cwp_coding_idx Unexecuted instantiation: obu_buf.c:get_cwp_coding_idx Unexecuted instantiation: alloccommon.c:get_cwp_coding_idx Unexecuted instantiation: av2_loopfilter.c:get_cwp_coding_idx Unexecuted instantiation: cdef.c:get_cwp_coding_idx Unexecuted instantiation: cfl.c:get_cwp_coding_idx Unexecuted instantiation: entropymode.c:get_cwp_coding_idx Unexecuted instantiation: level.c:get_cwp_coding_idx Unexecuted instantiation: mvref_common.c:get_cwp_coding_idx Unexecuted instantiation: pred_common.c:get_cwp_coding_idx Unexecuted instantiation: reconinter.c:get_cwp_coding_idx Unexecuted instantiation: thread_common.c:get_cwp_coding_idx Unexecuted instantiation: tip.c:get_cwp_coding_idx Unexecuted instantiation: ccso.c:get_cwp_coding_idx Unexecuted instantiation: bru.c:get_cwp_coding_idx Unexecuted instantiation: obu_qm.c:get_cwp_coding_idx Unexecuted instantiation: optflow_refine_sse4.c:get_cwp_coding_idx Unexecuted instantiation: affine_optflow_refine_avx2.c:get_cwp_coding_idx |
335 | | |
336 | | static INLINE int enable_adaptive_mvd_resolution(const AV2_COMMON *const cm, |
337 | 0 | const MB_MODE_INFO *mbmi) { |
338 | 0 | const int mode = mbmi->mode; |
339 | 0 | if (allow_amvd_mode(mode) == 0) return 0; |
340 | 0 | if (cm->seq_params.enable_adaptive_mvd == 0) return 0; |
341 | | |
342 | 0 | return mbmi->use_amvd; |
343 | 0 | } Unexecuted instantiation: av2_dx_iface.c:enable_adaptive_mvd_resolution Unexecuted instantiation: annexF.c:enable_adaptive_mvd_resolution Unexecuted instantiation: decodeframe.c:enable_adaptive_mvd_resolution Unexecuted instantiation: decodemv.c:enable_adaptive_mvd_resolution Unexecuted instantiation: decoder.c:enable_adaptive_mvd_resolution Unexecuted instantiation: decodetxb.c:enable_adaptive_mvd_resolution Unexecuted instantiation: detokenize.c:enable_adaptive_mvd_resolution Unexecuted instantiation: obu_fgm.c:enable_adaptive_mvd_resolution Unexecuted instantiation: obu.c:enable_adaptive_mvd_resolution Unexecuted instantiation: obu_ci.c:enable_adaptive_mvd_resolution Unexecuted instantiation: obu_atlas.c:enable_adaptive_mvd_resolution Unexecuted instantiation: obu_lcr.c:enable_adaptive_mvd_resolution Unexecuted instantiation: obu_ops.c:enable_adaptive_mvd_resolution Unexecuted instantiation: obu_buf.c:enable_adaptive_mvd_resolution Unexecuted instantiation: alloccommon.c:enable_adaptive_mvd_resolution Unexecuted instantiation: av2_loopfilter.c:enable_adaptive_mvd_resolution Unexecuted instantiation: cdef.c:enable_adaptive_mvd_resolution Unexecuted instantiation: cfl.c:enable_adaptive_mvd_resolution Unexecuted instantiation: entropymode.c:enable_adaptive_mvd_resolution Unexecuted instantiation: level.c:enable_adaptive_mvd_resolution Unexecuted instantiation: mvref_common.c:enable_adaptive_mvd_resolution Unexecuted instantiation: pred_common.c:enable_adaptive_mvd_resolution Unexecuted instantiation: reconinter.c:enable_adaptive_mvd_resolution Unexecuted instantiation: thread_common.c:enable_adaptive_mvd_resolution Unexecuted instantiation: tip.c:enable_adaptive_mvd_resolution Unexecuted instantiation: ccso.c:enable_adaptive_mvd_resolution Unexecuted instantiation: bru.c:enable_adaptive_mvd_resolution Unexecuted instantiation: obu_qm.c:enable_adaptive_mvd_resolution Unexecuted instantiation: optflow_refine_sse4.c:enable_adaptive_mvd_resolution Unexecuted instantiation: affine_optflow_refine_avx2.c:enable_adaptive_mvd_resolution |
344 | | |
345 | | // get the base reference frame list for joint MVD coding, the MVD for base |
346 | | // reference frame is the same as the joint MVD, the MVD for the other reference |
347 | | // frame is scaled from the joint MVD. |
348 | | static INLINE int get_joint_mvd_base_ref_list(const AV2_COMMON *const cm, |
349 | 0 | const MB_MODE_INFO *mbmi) { |
350 | 0 | int base_ref_list = 0; |
351 | 0 | int first_ref_dist = 0; |
352 | 0 | int sec_ref_dist = 0; |
353 | 0 | if (has_second_ref(mbmi)) { |
354 | 0 | first_ref_dist = cm->ref_frame_relative_dist[mbmi->ref_frame[0]]; |
355 | 0 | sec_ref_dist = cm->ref_frame_relative_dist[mbmi->ref_frame[1]]; |
356 | |
|
357 | 0 | if (first_ref_dist >= sec_ref_dist) { |
358 | 0 | base_ref_list = 0; |
359 | 0 | } else { |
360 | 0 | base_ref_list = 1; |
361 | 0 | } |
362 | 0 | } |
363 | 0 | return base_ref_list; |
364 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_joint_mvd_base_ref_list Unexecuted instantiation: annexF.c:get_joint_mvd_base_ref_list Unexecuted instantiation: decodeframe.c:get_joint_mvd_base_ref_list Unexecuted instantiation: decodemv.c:get_joint_mvd_base_ref_list Unexecuted instantiation: decoder.c:get_joint_mvd_base_ref_list Unexecuted instantiation: decodetxb.c:get_joint_mvd_base_ref_list Unexecuted instantiation: detokenize.c:get_joint_mvd_base_ref_list Unexecuted instantiation: obu_fgm.c:get_joint_mvd_base_ref_list Unexecuted instantiation: obu.c:get_joint_mvd_base_ref_list Unexecuted instantiation: obu_ci.c:get_joint_mvd_base_ref_list Unexecuted instantiation: obu_atlas.c:get_joint_mvd_base_ref_list Unexecuted instantiation: obu_lcr.c:get_joint_mvd_base_ref_list Unexecuted instantiation: obu_ops.c:get_joint_mvd_base_ref_list Unexecuted instantiation: obu_buf.c:get_joint_mvd_base_ref_list Unexecuted instantiation: alloccommon.c:get_joint_mvd_base_ref_list Unexecuted instantiation: av2_loopfilter.c:get_joint_mvd_base_ref_list Unexecuted instantiation: cdef.c:get_joint_mvd_base_ref_list Unexecuted instantiation: cfl.c:get_joint_mvd_base_ref_list Unexecuted instantiation: entropymode.c:get_joint_mvd_base_ref_list Unexecuted instantiation: level.c:get_joint_mvd_base_ref_list Unexecuted instantiation: mvref_common.c:get_joint_mvd_base_ref_list Unexecuted instantiation: pred_common.c:get_joint_mvd_base_ref_list Unexecuted instantiation: reconinter.c:get_joint_mvd_base_ref_list Unexecuted instantiation: thread_common.c:get_joint_mvd_base_ref_list Unexecuted instantiation: tip.c:get_joint_mvd_base_ref_list Unexecuted instantiation: ccso.c:get_joint_mvd_base_ref_list Unexecuted instantiation: bru.c:get_joint_mvd_base_ref_list Unexecuted instantiation: obu_qm.c:get_joint_mvd_base_ref_list Unexecuted instantiation: optflow_refine_sse4.c:get_joint_mvd_base_ref_list Unexecuted instantiation: affine_optflow_refine_avx2.c:get_joint_mvd_base_ref_list |
365 | | // check whether the direction of two reference frames are from same side |
366 | | static INLINE int is_ref_frame_same_side(const AV2_COMMON *const cm, |
367 | 0 | const MB_MODE_INFO *mbmi) { |
368 | 0 | int is_same_side = 0; |
369 | 0 | int cur_ref_side = 0; |
370 | 0 | int other_ref_side = 0; |
371 | 0 | if (has_second_ref(mbmi)) { |
372 | 0 | cur_ref_side = cm->ref_frame_side[mbmi->ref_frame[0]]; |
373 | 0 | other_ref_side = cm->ref_frame_side[mbmi->ref_frame[1]]; |
374 | |
|
375 | 0 | is_same_side = (cur_ref_side > 0 && other_ref_side > 0) || |
376 | 0 | (cur_ref_side == 0 && other_ref_side == 0); |
377 | 0 | } |
378 | 0 | return is_same_side; |
379 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_ref_frame_same_side Unexecuted instantiation: annexF.c:is_ref_frame_same_side Unexecuted instantiation: decodeframe.c:is_ref_frame_same_side Unexecuted instantiation: decodemv.c:is_ref_frame_same_side Unexecuted instantiation: decoder.c:is_ref_frame_same_side Unexecuted instantiation: decodetxb.c:is_ref_frame_same_side Unexecuted instantiation: detokenize.c:is_ref_frame_same_side Unexecuted instantiation: obu_fgm.c:is_ref_frame_same_side Unexecuted instantiation: obu.c:is_ref_frame_same_side Unexecuted instantiation: obu_ci.c:is_ref_frame_same_side Unexecuted instantiation: obu_atlas.c:is_ref_frame_same_side Unexecuted instantiation: obu_lcr.c:is_ref_frame_same_side Unexecuted instantiation: obu_ops.c:is_ref_frame_same_side Unexecuted instantiation: obu_buf.c:is_ref_frame_same_side Unexecuted instantiation: alloccommon.c:is_ref_frame_same_side Unexecuted instantiation: av2_loopfilter.c:is_ref_frame_same_side Unexecuted instantiation: cdef.c:is_ref_frame_same_side Unexecuted instantiation: cfl.c:is_ref_frame_same_side Unexecuted instantiation: entropymode.c:is_ref_frame_same_side Unexecuted instantiation: level.c:is_ref_frame_same_side Unexecuted instantiation: mvref_common.c:is_ref_frame_same_side Unexecuted instantiation: pred_common.c:is_ref_frame_same_side Unexecuted instantiation: reconinter.c:is_ref_frame_same_side Unexecuted instantiation: thread_common.c:is_ref_frame_same_side Unexecuted instantiation: tip.c:is_ref_frame_same_side Unexecuted instantiation: ccso.c:is_ref_frame_same_side Unexecuted instantiation: bru.c:is_ref_frame_same_side Unexecuted instantiation: obu_qm.c:is_ref_frame_same_side Unexecuted instantiation: optflow_refine_sse4.c:is_ref_frame_same_side Unexecuted instantiation: affine_optflow_refine_avx2.c:is_ref_frame_same_side |
380 | | |
381 | | // check whether the distance of to the two reference frames are the same |
382 | | static INLINE int is_ref_frame_same_dist(const AV2_COMMON *const cm, |
383 | 0 | const MB_MODE_INFO *mbmi) { |
384 | 0 | int is_same_dist = 0; |
385 | |
|
386 | 0 | if (has_second_ref(mbmi)) { |
387 | 0 | const int first_ref_dist = cm->ref_frame_relative_dist[mbmi->ref_frame[0]]; |
388 | 0 | const int sec_ref_dist = cm->ref_frame_relative_dist[mbmi->ref_frame[1]]; |
389 | |
|
390 | 0 | is_same_dist = (first_ref_dist == sec_ref_dist); |
391 | 0 | } |
392 | |
|
393 | 0 | return is_same_dist; |
394 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_ref_frame_same_dist Unexecuted instantiation: annexF.c:is_ref_frame_same_dist Unexecuted instantiation: decodeframe.c:is_ref_frame_same_dist Unexecuted instantiation: decodemv.c:is_ref_frame_same_dist Unexecuted instantiation: decoder.c:is_ref_frame_same_dist Unexecuted instantiation: decodetxb.c:is_ref_frame_same_dist Unexecuted instantiation: detokenize.c:is_ref_frame_same_dist Unexecuted instantiation: obu_fgm.c:is_ref_frame_same_dist Unexecuted instantiation: obu.c:is_ref_frame_same_dist Unexecuted instantiation: obu_ci.c:is_ref_frame_same_dist Unexecuted instantiation: obu_atlas.c:is_ref_frame_same_dist Unexecuted instantiation: obu_lcr.c:is_ref_frame_same_dist Unexecuted instantiation: obu_ops.c:is_ref_frame_same_dist Unexecuted instantiation: obu_buf.c:is_ref_frame_same_dist Unexecuted instantiation: alloccommon.c:is_ref_frame_same_dist Unexecuted instantiation: av2_loopfilter.c:is_ref_frame_same_dist Unexecuted instantiation: cdef.c:is_ref_frame_same_dist Unexecuted instantiation: cfl.c:is_ref_frame_same_dist Unexecuted instantiation: entropymode.c:is_ref_frame_same_dist Unexecuted instantiation: level.c:is_ref_frame_same_dist Unexecuted instantiation: mvref_common.c:is_ref_frame_same_dist Unexecuted instantiation: pred_common.c:is_ref_frame_same_dist Unexecuted instantiation: reconinter.c:is_ref_frame_same_dist Unexecuted instantiation: thread_common.c:is_ref_frame_same_dist Unexecuted instantiation: tip.c:is_ref_frame_same_dist Unexecuted instantiation: ccso.c:is_ref_frame_same_dist Unexecuted instantiation: bru.c:is_ref_frame_same_dist Unexecuted instantiation: obu_qm.c:is_ref_frame_same_dist Unexecuted instantiation: optflow_refine_sse4.c:is_ref_frame_same_dist Unexecuted instantiation: affine_optflow_refine_avx2.c:is_ref_frame_same_dist |
395 | | |
396 | | // obtain context for inter_compound_mode_is_joint |
397 | | static INLINE int get_inter_compound_mode_is_joint_context( |
398 | 0 | const AV2_COMMON *const cm, const MB_MODE_INFO *mbmi) { |
399 | 0 | return (is_ref_frame_same_side(cm, mbmi) || |
400 | 0 | (!is_ref_frame_same_dist(cm, mbmi))); |
401 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: annexF.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: decodeframe.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: decodemv.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: decoder.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: decodetxb.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: detokenize.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: obu_fgm.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: obu.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: obu_ci.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: obu_atlas.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: obu_lcr.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: obu_ops.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: obu_buf.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: alloccommon.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: av2_loopfilter.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: cdef.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: cfl.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: entropymode.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: level.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: mvref_common.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: pred_common.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: reconinter.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: thread_common.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: tip.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: ccso.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: bru.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: obu_qm.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: optflow_refine_sse4.c:get_inter_compound_mode_is_joint_context Unexecuted instantiation: affine_optflow_refine_avx2.c:get_inter_compound_mode_is_joint_context |
402 | | |
403 | | void av2_init_comp_mode(InterPredParams *inter_pred_params); |
404 | | |
405 | | void av2_init_warp_params(InterPredParams *inter_pred_params, |
406 | | const WarpTypesAllowed *warp_types, int ref, |
407 | | const MACROBLOCKD *xd, const MB_MODE_INFO *mi); |
408 | | |
409 | 3.41k | static INLINE int has_scale(int xs, int ys) { |
410 | 3.41k | return xs != SCALE_SUBPEL_SHIFTS || ys != SCALE_SUBPEL_SHIFTS; |
411 | 3.41k | } Unexecuted instantiation: av2_dx_iface.c:has_scale Unexecuted instantiation: annexF.c:has_scale Unexecuted instantiation: decodeframe.c:has_scale Unexecuted instantiation: decodemv.c:has_scale Unexecuted instantiation: decoder.c:has_scale Unexecuted instantiation: decodetxb.c:has_scale Unexecuted instantiation: detokenize.c:has_scale Unexecuted instantiation: obu_fgm.c:has_scale Unexecuted instantiation: obu.c:has_scale Unexecuted instantiation: obu_ci.c:has_scale Unexecuted instantiation: obu_atlas.c:has_scale Unexecuted instantiation: obu_lcr.c:has_scale Unexecuted instantiation: obu_ops.c:has_scale Unexecuted instantiation: obu_buf.c:has_scale Unexecuted instantiation: alloccommon.c:has_scale Unexecuted instantiation: av2_loopfilter.c:has_scale Unexecuted instantiation: cdef.c:has_scale Unexecuted instantiation: cfl.c:has_scale Unexecuted instantiation: entropymode.c:has_scale Unexecuted instantiation: level.c:has_scale Unexecuted instantiation: mvref_common.c:has_scale Unexecuted instantiation: pred_common.c:has_scale Line | Count | Source | 409 | 3.41k | static INLINE int has_scale(int xs, int ys) { | 410 | 3.41k | return xs != SCALE_SUBPEL_SHIFTS || ys != SCALE_SUBPEL_SHIFTS; | 411 | 3.41k | } |
Unexecuted instantiation: thread_common.c:has_scale Unexecuted instantiation: tip.c:has_scale Unexecuted instantiation: ccso.c:has_scale Unexecuted instantiation: bru.c:has_scale Unexecuted instantiation: obu_qm.c:has_scale Unexecuted instantiation: optflow_refine_sse4.c:has_scale Unexecuted instantiation: affine_optflow_refine_avx2.c:has_scale |
412 | | |
413 | 3.41k | static INLINE void revert_scale_extra_bits(SubpelParams *sp) { |
414 | 3.41k | sp->subpel_x >>= SCALE_EXTRA_BITS; |
415 | 3.41k | sp->subpel_y >>= SCALE_EXTRA_BITS; |
416 | 3.41k | sp->xs >>= SCALE_EXTRA_BITS; |
417 | 3.41k | sp->ys >>= SCALE_EXTRA_BITS; |
418 | 3.41k | assert(sp->subpel_x < SUBPEL_SHIFTS); |
419 | 3.41k | assert(sp->subpel_y < SUBPEL_SHIFTS); |
420 | 3.41k | assert(sp->xs <= SUBPEL_SHIFTS); |
421 | 3.41k | assert(sp->ys <= SUBPEL_SHIFTS); |
422 | 3.41k | } Unexecuted instantiation: av2_dx_iface.c:revert_scale_extra_bits Unexecuted instantiation: annexF.c:revert_scale_extra_bits Unexecuted instantiation: decodeframe.c:revert_scale_extra_bits Unexecuted instantiation: decodemv.c:revert_scale_extra_bits Unexecuted instantiation: decoder.c:revert_scale_extra_bits Unexecuted instantiation: decodetxb.c:revert_scale_extra_bits Unexecuted instantiation: detokenize.c:revert_scale_extra_bits Unexecuted instantiation: obu_fgm.c:revert_scale_extra_bits Unexecuted instantiation: obu.c:revert_scale_extra_bits Unexecuted instantiation: obu_ci.c:revert_scale_extra_bits Unexecuted instantiation: obu_atlas.c:revert_scale_extra_bits Unexecuted instantiation: obu_lcr.c:revert_scale_extra_bits Unexecuted instantiation: obu_ops.c:revert_scale_extra_bits Unexecuted instantiation: obu_buf.c:revert_scale_extra_bits Unexecuted instantiation: alloccommon.c:revert_scale_extra_bits Unexecuted instantiation: av2_loopfilter.c:revert_scale_extra_bits Unexecuted instantiation: cdef.c:revert_scale_extra_bits Unexecuted instantiation: cfl.c:revert_scale_extra_bits Unexecuted instantiation: entropymode.c:revert_scale_extra_bits Unexecuted instantiation: level.c:revert_scale_extra_bits Unexecuted instantiation: mvref_common.c:revert_scale_extra_bits Unexecuted instantiation: pred_common.c:revert_scale_extra_bits reconinter.c:revert_scale_extra_bits Line | Count | Source | 413 | 3.41k | static INLINE void revert_scale_extra_bits(SubpelParams *sp) { | 414 | 3.41k | sp->subpel_x >>= SCALE_EXTRA_BITS; | 415 | 3.41k | sp->subpel_y >>= SCALE_EXTRA_BITS; | 416 | 3.41k | sp->xs >>= SCALE_EXTRA_BITS; | 417 | 3.41k | sp->ys >>= SCALE_EXTRA_BITS; | 418 | 3.41k | assert(sp->subpel_x < SUBPEL_SHIFTS); | 419 | 3.41k | assert(sp->subpel_y < SUBPEL_SHIFTS); | 420 | 3.41k | assert(sp->xs <= SUBPEL_SHIFTS); | 421 | | assert(sp->ys <= SUBPEL_SHIFTS); | 422 | 3.41k | } |
Unexecuted instantiation: thread_common.c:revert_scale_extra_bits Unexecuted instantiation: tip.c:revert_scale_extra_bits Unexecuted instantiation: ccso.c:revert_scale_extra_bits Unexecuted instantiation: bru.c:revert_scale_extra_bits Unexecuted instantiation: obu_qm.c:revert_scale_extra_bits Unexecuted instantiation: optflow_refine_sse4.c:revert_scale_extra_bits Unexecuted instantiation: affine_optflow_refine_avx2.c:revert_scale_extra_bits |
423 | | |
424 | | static INLINE void highbd_inter_predictor( |
425 | | const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, |
426 | | const SubpelParams *subpel_params, int w, int h, |
427 | | ConvolveParams *conv_params, const InterpFilterParams *interp_filters[2], |
428 | 3.41k | int bd, int is_intrabc) { |
429 | 3.41k | assert(conv_params->do_average == 0 || conv_params->do_average == 1); |
430 | 3.41k | const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys); |
431 | 3.41k | if (is_scaled) { |
432 | 0 | assert(is_intrabc == 0); |
433 | 0 | av2_highbd_convolve_2d_facade( |
434 | 0 | src, src_stride, dst, dst_stride, w, h, interp_filters, |
435 | 0 | subpel_params->subpel_x, subpel_params->xs, subpel_params->subpel_y, |
436 | 0 | subpel_params->ys, 1, conv_params, bd, is_intrabc); |
437 | 3.41k | } else { |
438 | 3.41k | SubpelParams sp = *subpel_params; |
439 | 3.41k | revert_scale_extra_bits(&sp); |
440 | 3.41k | av2_highbd_convolve_2d_facade( |
441 | 3.41k | src, src_stride, dst, dst_stride, w, h, interp_filters, sp.subpel_x, |
442 | 3.41k | sp.xs, sp.subpel_y, sp.ys, 0, conv_params, bd, is_intrabc); |
443 | 3.41k | } |
444 | 3.41k | } Unexecuted instantiation: av2_dx_iface.c:highbd_inter_predictor Unexecuted instantiation: annexF.c:highbd_inter_predictor Unexecuted instantiation: decodeframe.c:highbd_inter_predictor Unexecuted instantiation: decodemv.c:highbd_inter_predictor Unexecuted instantiation: decoder.c:highbd_inter_predictor Unexecuted instantiation: decodetxb.c:highbd_inter_predictor Unexecuted instantiation: detokenize.c:highbd_inter_predictor Unexecuted instantiation: obu_fgm.c:highbd_inter_predictor Unexecuted instantiation: obu.c:highbd_inter_predictor Unexecuted instantiation: obu_ci.c:highbd_inter_predictor Unexecuted instantiation: obu_atlas.c:highbd_inter_predictor Unexecuted instantiation: obu_lcr.c:highbd_inter_predictor Unexecuted instantiation: obu_ops.c:highbd_inter_predictor Unexecuted instantiation: obu_buf.c:highbd_inter_predictor Unexecuted instantiation: alloccommon.c:highbd_inter_predictor Unexecuted instantiation: av2_loopfilter.c:highbd_inter_predictor Unexecuted instantiation: cdef.c:highbd_inter_predictor Unexecuted instantiation: cfl.c:highbd_inter_predictor Unexecuted instantiation: entropymode.c:highbd_inter_predictor Unexecuted instantiation: level.c:highbd_inter_predictor Unexecuted instantiation: mvref_common.c:highbd_inter_predictor Unexecuted instantiation: pred_common.c:highbd_inter_predictor reconinter.c:highbd_inter_predictor Line | Count | Source | 428 | 3.41k | int bd, int is_intrabc) { | 429 | 3.41k | assert(conv_params->do_average == 0 || conv_params->do_average == 1); | 430 | 3.41k | const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys); | 431 | 3.41k | if (is_scaled) { | 432 | 0 | assert(is_intrabc == 0); | 433 | 0 | av2_highbd_convolve_2d_facade( | 434 | 0 | src, src_stride, dst, dst_stride, w, h, interp_filters, | 435 | 0 | subpel_params->subpel_x, subpel_params->xs, subpel_params->subpel_y, | 436 | 0 | subpel_params->ys, 1, conv_params, bd, is_intrabc); | 437 | 3.41k | } else { | 438 | 3.41k | SubpelParams sp = *subpel_params; | 439 | 3.41k | revert_scale_extra_bits(&sp); | 440 | 3.41k | av2_highbd_convolve_2d_facade( | 441 | 3.41k | src, src_stride, dst, dst_stride, w, h, interp_filters, sp.subpel_x, | 442 | 3.41k | sp.xs, sp.subpel_y, sp.ys, 0, conv_params, bd, is_intrabc); | 443 | 3.41k | } | 444 | 3.41k | } |
Unexecuted instantiation: thread_common.c:highbd_inter_predictor Unexecuted instantiation: tip.c:highbd_inter_predictor Unexecuted instantiation: ccso.c:highbd_inter_predictor Unexecuted instantiation: bru.c:highbd_inter_predictor Unexecuted instantiation: obu_qm.c:highbd_inter_predictor Unexecuted instantiation: optflow_refine_sse4.c:highbd_inter_predictor Unexecuted instantiation: affine_optflow_refine_avx2.c:highbd_inter_predictor |
445 | | |
446 | | static INLINE int is_interinter_compound_used(COMPOUND_TYPE type, |
447 | 0 | BLOCK_SIZE sb_type) { |
448 | 0 | const int comp_allowed = is_comp_ref_allowed(sb_type); |
449 | 0 | switch (type) { |
450 | 0 | case COMPOUND_AVERAGE: return comp_allowed; |
451 | 0 | case COMPOUND_DIFFWTD: |
452 | 0 | return comp_allowed && !is_thin_4xn_nx4_block(sb_type); |
453 | 0 | case COMPOUND_WEDGE: |
454 | 0 | return comp_allowed && av2_wedge_params_lookup[sb_type].wedge_types > 0; |
455 | 0 | default: assert(0); return 0; |
456 | 0 | } |
457 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_interinter_compound_used Unexecuted instantiation: annexF.c:is_interinter_compound_used Unexecuted instantiation: decodeframe.c:is_interinter_compound_used Unexecuted instantiation: decodemv.c:is_interinter_compound_used Unexecuted instantiation: decoder.c:is_interinter_compound_used Unexecuted instantiation: decodetxb.c:is_interinter_compound_used Unexecuted instantiation: detokenize.c:is_interinter_compound_used Unexecuted instantiation: obu_fgm.c:is_interinter_compound_used Unexecuted instantiation: obu.c:is_interinter_compound_used Unexecuted instantiation: obu_ci.c:is_interinter_compound_used Unexecuted instantiation: obu_atlas.c:is_interinter_compound_used Unexecuted instantiation: obu_lcr.c:is_interinter_compound_used Unexecuted instantiation: obu_ops.c:is_interinter_compound_used Unexecuted instantiation: obu_buf.c:is_interinter_compound_used Unexecuted instantiation: alloccommon.c:is_interinter_compound_used Unexecuted instantiation: av2_loopfilter.c:is_interinter_compound_used Unexecuted instantiation: cdef.c:is_interinter_compound_used Unexecuted instantiation: cfl.c:is_interinter_compound_used Unexecuted instantiation: entropymode.c:is_interinter_compound_used Unexecuted instantiation: level.c:is_interinter_compound_used Unexecuted instantiation: mvref_common.c:is_interinter_compound_used Unexecuted instantiation: pred_common.c:is_interinter_compound_used Unexecuted instantiation: reconinter.c:is_interinter_compound_used Unexecuted instantiation: thread_common.c:is_interinter_compound_used Unexecuted instantiation: tip.c:is_interinter_compound_used Unexecuted instantiation: ccso.c:is_interinter_compound_used Unexecuted instantiation: bru.c:is_interinter_compound_used Unexecuted instantiation: obu_qm.c:is_interinter_compound_used Unexecuted instantiation: optflow_refine_sse4.c:is_interinter_compound_used Unexecuted instantiation: affine_optflow_refine_avx2.c:is_interinter_compound_used |
458 | | |
459 | 0 | static INLINE int is_any_masked_compound_used(BLOCK_SIZE sb_type) { |
460 | 0 | COMPOUND_TYPE comp_type; |
461 | 0 | int i; |
462 | 0 | if (!is_comp_ref_allowed(sb_type)) return 0; |
463 | 0 | for (i = 0; i < COMPOUND_TYPES; i++) { |
464 | 0 | comp_type = (COMPOUND_TYPE)i; |
465 | 0 | if (is_masked_compound_type(comp_type) && |
466 | 0 | is_interinter_compound_used(comp_type, sb_type)) |
467 | 0 | return 1; |
468 | 0 | } |
469 | 0 | return 0; |
470 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_any_masked_compound_used Unexecuted instantiation: annexF.c:is_any_masked_compound_used Unexecuted instantiation: decodeframe.c:is_any_masked_compound_used Unexecuted instantiation: decodemv.c:is_any_masked_compound_used Unexecuted instantiation: decoder.c:is_any_masked_compound_used Unexecuted instantiation: decodetxb.c:is_any_masked_compound_used Unexecuted instantiation: detokenize.c:is_any_masked_compound_used Unexecuted instantiation: obu_fgm.c:is_any_masked_compound_used Unexecuted instantiation: obu.c:is_any_masked_compound_used Unexecuted instantiation: obu_ci.c:is_any_masked_compound_used Unexecuted instantiation: obu_atlas.c:is_any_masked_compound_used Unexecuted instantiation: obu_lcr.c:is_any_masked_compound_used Unexecuted instantiation: obu_ops.c:is_any_masked_compound_used Unexecuted instantiation: obu_buf.c:is_any_masked_compound_used Unexecuted instantiation: alloccommon.c:is_any_masked_compound_used Unexecuted instantiation: av2_loopfilter.c:is_any_masked_compound_used Unexecuted instantiation: cdef.c:is_any_masked_compound_used Unexecuted instantiation: cfl.c:is_any_masked_compound_used Unexecuted instantiation: entropymode.c:is_any_masked_compound_used Unexecuted instantiation: level.c:is_any_masked_compound_used Unexecuted instantiation: mvref_common.c:is_any_masked_compound_used Unexecuted instantiation: pred_common.c:is_any_masked_compound_used Unexecuted instantiation: reconinter.c:is_any_masked_compound_used Unexecuted instantiation: thread_common.c:is_any_masked_compound_used Unexecuted instantiation: tip.c:is_any_masked_compound_used Unexecuted instantiation: ccso.c:is_any_masked_compound_used Unexecuted instantiation: bru.c:is_any_masked_compound_used Unexecuted instantiation: obu_qm.c:is_any_masked_compound_used Unexecuted instantiation: optflow_refine_sse4.c:is_any_masked_compound_used Unexecuted instantiation: affine_optflow_refine_avx2.c:is_any_masked_compound_used |
471 | | |
472 | 0 | static INLINE int get_wedge_types_lookup(BLOCK_SIZE sb_type) { |
473 | 0 | return av2_wedge_params_lookup[sb_type].wedge_types; |
474 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_wedge_types_lookup Unexecuted instantiation: annexF.c:get_wedge_types_lookup Unexecuted instantiation: decodeframe.c:get_wedge_types_lookup Unexecuted instantiation: decodemv.c:get_wedge_types_lookup Unexecuted instantiation: decoder.c:get_wedge_types_lookup Unexecuted instantiation: decodetxb.c:get_wedge_types_lookup Unexecuted instantiation: detokenize.c:get_wedge_types_lookup Unexecuted instantiation: obu_fgm.c:get_wedge_types_lookup Unexecuted instantiation: obu.c:get_wedge_types_lookup Unexecuted instantiation: obu_ci.c:get_wedge_types_lookup Unexecuted instantiation: obu_atlas.c:get_wedge_types_lookup Unexecuted instantiation: obu_lcr.c:get_wedge_types_lookup Unexecuted instantiation: obu_ops.c:get_wedge_types_lookup Unexecuted instantiation: obu_buf.c:get_wedge_types_lookup Unexecuted instantiation: alloccommon.c:get_wedge_types_lookup Unexecuted instantiation: av2_loopfilter.c:get_wedge_types_lookup Unexecuted instantiation: cdef.c:get_wedge_types_lookup Unexecuted instantiation: cfl.c:get_wedge_types_lookup Unexecuted instantiation: entropymode.c:get_wedge_types_lookup Unexecuted instantiation: level.c:get_wedge_types_lookup Unexecuted instantiation: mvref_common.c:get_wedge_types_lookup Unexecuted instantiation: pred_common.c:get_wedge_types_lookup Unexecuted instantiation: reconinter.c:get_wedge_types_lookup Unexecuted instantiation: thread_common.c:get_wedge_types_lookup Unexecuted instantiation: tip.c:get_wedge_types_lookup Unexecuted instantiation: ccso.c:get_wedge_types_lookup Unexecuted instantiation: bru.c:get_wedge_types_lookup Unexecuted instantiation: obu_qm.c:get_wedge_types_lookup Unexecuted instantiation: optflow_refine_sse4.c:get_wedge_types_lookup Unexecuted instantiation: affine_optflow_refine_avx2.c:get_wedge_types_lookup |
475 | | |
476 | 0 | static INLINE int av2_is_wedge_used(BLOCK_SIZE sb_type) { |
477 | 0 | return av2_wedge_params_lookup[sb_type].wedge_types > 0; |
478 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_is_wedge_used Unexecuted instantiation: annexF.c:av2_is_wedge_used Unexecuted instantiation: decodeframe.c:av2_is_wedge_used Unexecuted instantiation: decodemv.c:av2_is_wedge_used Unexecuted instantiation: decoder.c:av2_is_wedge_used Unexecuted instantiation: decodetxb.c:av2_is_wedge_used Unexecuted instantiation: detokenize.c:av2_is_wedge_used Unexecuted instantiation: obu_fgm.c:av2_is_wedge_used Unexecuted instantiation: obu.c:av2_is_wedge_used Unexecuted instantiation: obu_ci.c:av2_is_wedge_used Unexecuted instantiation: obu_atlas.c:av2_is_wedge_used Unexecuted instantiation: obu_lcr.c:av2_is_wedge_used Unexecuted instantiation: obu_ops.c:av2_is_wedge_used Unexecuted instantiation: obu_buf.c:av2_is_wedge_used Unexecuted instantiation: alloccommon.c:av2_is_wedge_used Unexecuted instantiation: av2_loopfilter.c:av2_is_wedge_used Unexecuted instantiation: cdef.c:av2_is_wedge_used Unexecuted instantiation: cfl.c:av2_is_wedge_used Unexecuted instantiation: entropymode.c:av2_is_wedge_used Unexecuted instantiation: level.c:av2_is_wedge_used Unexecuted instantiation: mvref_common.c:av2_is_wedge_used Unexecuted instantiation: pred_common.c:av2_is_wedge_used Unexecuted instantiation: reconinter.c:av2_is_wedge_used Unexecuted instantiation: thread_common.c:av2_is_wedge_used Unexecuted instantiation: tip.c:av2_is_wedge_used Unexecuted instantiation: ccso.c:av2_is_wedge_used Unexecuted instantiation: bru.c:av2_is_wedge_used Unexecuted instantiation: obu_qm.c:av2_is_wedge_used Unexecuted instantiation: optflow_refine_sse4.c:av2_is_wedge_used Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_is_wedge_used |
479 | | |
480 | | void av2_make_inter_predictor(const uint16_t *src, int src_stride, |
481 | | uint16_t *dst, int dst_stride, |
482 | | InterPredParams *inter_pred_params, |
483 | | const SubpelParams *subpel_params); |
484 | | |
485 | | typedef void (*CalcSubpelParamsFunc)(const MV *const src_mv, |
486 | | InterPredParams *const inter_pred_params, |
487 | | MACROBLOCKD *xd, int mi_x, int mi_y, |
488 | | int ref, int use_optflow_refinement, |
489 | | uint16_t **mc_buf, uint16_t **pre, |
490 | | SubpelParams *subpel_params, |
491 | | int *src_stride); |
492 | | |
493 | | void av2_build_one_inter_predictor( |
494 | | uint16_t *dst, int dst_stride, const MV *const src_mv, |
495 | | InterPredParams *inter_pred_params, MACROBLOCKD *xd, int mi_x, int mi_y, |
496 | | int ref, uint16_t **mc_buf, CalcSubpelParamsFunc calc_subpel_params_func); |
497 | | |
498 | | void av2_build_inter_predictors(const AV2_COMMON *cm, MACROBLOCKD *xd, |
499 | | int plane, MB_MODE_INFO *mi, |
500 | | const BUFFER_SET *dst_orig, |
501 | | int build_for_refine_mv_only, |
502 | | int build_for_decode, int bw, int bh, int mi_x, |
503 | | int mi_y, uint16_t **mc_buf, |
504 | | CalcSubpelParamsFunc calc_subpel_params_func); |
505 | | |
506 | | // Precision of refined MV returned, 0 being integer pel. For now, only 1/8 or |
507 | | // 1/16-pel can be used. |
508 | 0 | #define MV_REFINE_PREC_BITS 4 // (1/16-pel) |
509 | | |
510 | 0 | #define OPFL_PRED_MAX ((1 << 10) - 1) |
511 | | |
512 | | // Apply regularized least squares (RLS). The RLS parameter is bw * bh * 2^(b-4) |
513 | | // where b = OPFL_RLS_PARAM. |
514 | | #define OPFL_REGULARIZED_LS 1 |
515 | 0 | #define OPFL_RLS_PARAM 16 |
516 | | |
517 | | // Number of bits allowed for all intermediate results of covariance matrix |
518 | | // filling |
519 | 0 | #define MAX_OPFL_AUTOCORR_BITS 24 |
520 | | // Clamp range for u/v/w. If it uses h unsigned bits, then u2/v2 uses 2h |
521 | | // unsigned bits. Every sum of 8 u2/v2 use at most 2h+3 unsigned bits, and |
522 | | // must not exceed max bd of su2/sv2 minus 2. Thus, 2h+3 <= H-2 |
523 | 0 | #define OPFL_GRAD_CLAMP_VAL ((1 << ((MAX_OPFL_AUTOCORR_BITS - 6) >> 1)) - 1) |
524 | | |
525 | | void reduce_temporal_dist(int *d0, int *d1); |
526 | | |
527 | | void av2_opfl_build_inter_predictor( |
528 | | const AV2_COMMON *cm, MACROBLOCKD *xd, int plane, const MB_MODE_INFO *mi, |
529 | | int bw, int bh, int mi_x, int mi_y, uint16_t **mc_buf, |
530 | | InterPredParams *inter_pred_params, |
531 | | CalcSubpelParamsFunc calc_subpel_params_func, int ref, uint16_t *pred_dst, |
532 | | const MV *const src_mv, int pu_width, int pu_height); |
533 | | |
534 | | // Generate refined MVs using optflow refinement |
535 | | void av2_get_optflow_based_mv(const AV2_COMMON *cm, MACROBLOCKD *xd, int plane, |
536 | | const MB_MODE_INFO *mbmi, int_mv *mv_refined, |
537 | | int bw, int bh, int mi_x, int mi_y, |
538 | | int build_for_decode, uint16_t **mc_buf, |
539 | | CalcSubpelParamsFunc calc_subpel_params_func, |
540 | | int16_t *gx0, int16_t *gy0, int16_t *gx1, |
541 | | int16_t *gy1, int *vx0, int *vy0, int *vx1, |
542 | | int *vy1, uint16_t *dst0, uint16_t *dst1, |
543 | | int dst_stride, int do_pred, int use_4x4, |
544 | | MV *best_mv_ref, int pu_width, int pu_height); |
545 | | |
546 | | // With the refined MVs, generate the inter prediction for the block. |
547 | | void av2_opfl_rebuild_inter_predictor( |
548 | | uint16_t *dst, int dst_stride, int plane, int_mv *const mv_refined, |
549 | | InterPredParams *inter_pred_params, MACROBLOCKD *xd, int mi_x, int mi_y, |
550 | | int build_for_decode, const AV2_COMMON *cm, int pu_width, int ref, |
551 | | uint16_t **mc_buf, CalcSubpelParamsFunc calc_subpel_params_func, |
552 | | int use_4x4, MB_MODE_INFO *mi, int pu_height, const MV mi_mv[2], |
553 | | int use_sub_pad); |
554 | | |
555 | | // We consider this tunable number K=MAX_LS_BITS-1 (sign bit excluded) |
556 | | // as the target maximum bit depth of all intermediate results for LS problem. |
557 | | #define MAX_LS_BITS 26 |
558 | | |
559 | | // Divide all elements of a vector by a common factor, and apply shifts. |
560 | | // The integer division is based on lookup table. |
561 | | // sol: numerator (will be updated to the solution) |
562 | | // den: denominator |
563 | | // out: output result (sol / den) |
564 | | static INLINE void divide_and_round_array(int32_t *sol, int32_t den, |
565 | 0 | const int dim, int *shifts) { |
566 | 0 | assert(den != 0); |
567 | 0 | if (den < 0) { |
568 | 0 | for (int i = 0; i < dim; i++) sol[i] = -sol[i]; |
569 | 0 | divide_and_round_array(sol, -den, dim, shifts); |
570 | 0 | return; |
571 | 0 | } |
572 | 0 | int16_t den_shift = 0; |
573 | 0 | int16_t inv_den = |
574 | 0 | (den == 1) ? 1 : resolve_divisor_32((uint32_t)den, &den_shift); |
575 | 0 | int inv_den_msb = get_msb_signed(inv_den); |
576 | | |
577 | | // Apply shifts to sol[i] and den to keep both bit depths within K. |
578 | 0 | for (int i = 0; i < dim; i++) { |
579 | 0 | if (sol[i] == 0) continue; |
580 | 0 | int sign = sol[i] > 0; |
581 | 0 | sol[i] = sign ? sol[i] : -sol[i]; |
582 | 0 | int num_red_bits = |
583 | 0 | AVMMAX(0, get_msb_signed(sol[i]) + inv_den_msb + 4 - MAX_LS_BITS); |
584 | 0 | if (num_red_bits > 0) sol[i] = ROUND_POWER_OF_TWO(sol[i], num_red_bits); |
585 | |
|
586 | 0 | int inc_bits = shifts[i] + num_red_bits - den_shift; |
587 | 0 | if (inc_bits >= 0) |
588 | 0 | sol[i] = sol[i] * inv_den * (1 << inc_bits); |
589 | 0 | else if (-inc_bits >= 31) // ROUND_POWER_OF_TWO can only handle n<=30 |
590 | 0 | sol[i] = ROUND_POWER_OF_TWO( |
591 | 0 | ROUND_POWER_OF_TWO(sol[i], -inc_bits - 30) * inv_den, 30); |
592 | 0 | else |
593 | 0 | sol[i] = ROUND_POWER_OF_TWO(sol[i] * inv_den, -inc_bits); |
594 | 0 | sol[i] = sign ? sol[i] : -sol[i]; |
595 | 0 | } |
596 | 0 | } Unexecuted instantiation: av2_dx_iface.c:divide_and_round_array Unexecuted instantiation: annexF.c:divide_and_round_array Unexecuted instantiation: decodeframe.c:divide_and_round_array Unexecuted instantiation: decodemv.c:divide_and_round_array Unexecuted instantiation: decoder.c:divide_and_round_array Unexecuted instantiation: decodetxb.c:divide_and_round_array Unexecuted instantiation: detokenize.c:divide_and_round_array Unexecuted instantiation: obu_fgm.c:divide_and_round_array Unexecuted instantiation: obu.c:divide_and_round_array Unexecuted instantiation: obu_ci.c:divide_and_round_array Unexecuted instantiation: obu_atlas.c:divide_and_round_array Unexecuted instantiation: obu_lcr.c:divide_and_round_array Unexecuted instantiation: obu_ops.c:divide_and_round_array Unexecuted instantiation: obu_buf.c:divide_and_round_array Unexecuted instantiation: alloccommon.c:divide_and_round_array Unexecuted instantiation: av2_loopfilter.c:divide_and_round_array Unexecuted instantiation: cdef.c:divide_and_round_array Unexecuted instantiation: cfl.c:divide_and_round_array Unexecuted instantiation: entropymode.c:divide_and_round_array Unexecuted instantiation: level.c:divide_and_round_array Unexecuted instantiation: mvref_common.c:divide_and_round_array Unexecuted instantiation: pred_common.c:divide_and_round_array Unexecuted instantiation: reconinter.c:divide_and_round_array Unexecuted instantiation: thread_common.c:divide_and_round_array Unexecuted instantiation: tip.c:divide_and_round_array Unexecuted instantiation: ccso.c:divide_and_round_array Unexecuted instantiation: bru.c:divide_and_round_array Unexecuted instantiation: obu_qm.c:divide_and_round_array Unexecuted instantiation: optflow_refine_sse4.c:divide_and_round_array Unexecuted instantiation: affine_optflow_refine_avx2.c:divide_and_round_array |
597 | | |
598 | | static INLINE int is_translational_refinement_allowed(const AV2_COMMON *cm, |
599 | | BLOCK_SIZE bsize, |
600 | | const MACROBLOCKD *xd, |
601 | 0 | const int mode) { |
602 | 0 | assert(cm->seq_params.enable_opfl_refine); |
603 | 0 | (void)cm; |
604 | 0 | if (mode < NEAR_NEARMV_OPTFLOW) return 0; |
605 | 0 | if (is_thin_4xn_nx4_block(bsize)) return 0; |
606 | 0 | (void)xd; |
607 | 0 | return 1; |
608 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_translational_refinement_allowed Unexecuted instantiation: annexF.c:is_translational_refinement_allowed Unexecuted instantiation: decodeframe.c:is_translational_refinement_allowed Unexecuted instantiation: decodemv.c:is_translational_refinement_allowed Unexecuted instantiation: decoder.c:is_translational_refinement_allowed Unexecuted instantiation: decodetxb.c:is_translational_refinement_allowed Unexecuted instantiation: detokenize.c:is_translational_refinement_allowed Unexecuted instantiation: obu_fgm.c:is_translational_refinement_allowed Unexecuted instantiation: obu.c:is_translational_refinement_allowed Unexecuted instantiation: obu_ci.c:is_translational_refinement_allowed Unexecuted instantiation: obu_atlas.c:is_translational_refinement_allowed Unexecuted instantiation: obu_lcr.c:is_translational_refinement_allowed Unexecuted instantiation: obu_ops.c:is_translational_refinement_allowed Unexecuted instantiation: obu_buf.c:is_translational_refinement_allowed Unexecuted instantiation: alloccommon.c:is_translational_refinement_allowed Unexecuted instantiation: av2_loopfilter.c:is_translational_refinement_allowed Unexecuted instantiation: cdef.c:is_translational_refinement_allowed Unexecuted instantiation: cfl.c:is_translational_refinement_allowed Unexecuted instantiation: entropymode.c:is_translational_refinement_allowed Unexecuted instantiation: level.c:is_translational_refinement_allowed Unexecuted instantiation: mvref_common.c:is_translational_refinement_allowed Unexecuted instantiation: pred_common.c:is_translational_refinement_allowed Unexecuted instantiation: reconinter.c:is_translational_refinement_allowed Unexecuted instantiation: thread_common.c:is_translational_refinement_allowed Unexecuted instantiation: tip.c:is_translational_refinement_allowed Unexecuted instantiation: ccso.c:is_translational_refinement_allowed Unexecuted instantiation: bru.c:is_translational_refinement_allowed Unexecuted instantiation: obu_qm.c:is_translational_refinement_allowed Unexecuted instantiation: optflow_refine_sse4.c:is_translational_refinement_allowed Unexecuted instantiation: affine_optflow_refine_avx2.c:is_translational_refinement_allowed |
609 | | |
610 | | void highbd_build_mc_border(const uint16_t *src, int src_stride, uint16_t *dst, |
611 | | int dst_stride, int x, int y, int b_w, int b_h, |
612 | | int w, int h); |
613 | | |
614 | | // Compute the SAD between the two predictors when refinemv is ON |
615 | | int get_refinemv_sad(uint16_t *src1, uint16_t *src2, int stride, int width, |
616 | | int height, int bd); |
617 | | // Generate two prediction signals of a given mv0 and mv1 |
618 | | void av2_refinemv_build_predictors(MACROBLOCKD *xd, int mi_x, int mi_y, |
619 | | uint16_t **mc_buf, |
620 | | CalcSubpelParamsFunc calc_subpel_params_func, |
621 | | uint16_t *dst_ref0, uint16_t *dst_ref1, |
622 | | int dst_stride, MV mv0, MV mv1, |
623 | | InterPredParams *inter_pred_params); |
624 | | |
625 | | // Get the context index to code refinemv flag |
626 | | int av2_get_refinemv_context(const AV2_COMMON *cm, const MACROBLOCKD *xd, |
627 | | BLOCK_SIZE bsize); |
628 | | |
629 | | // Full blocks refine MVs are stored in 4x4 grid so that the MVs can be reused |
630 | | // for chroma |
631 | | void fill_subblock_refine_mv(REFINEMV_SUBMB_INFO *refinemv_subinfo, int bw, |
632 | | int bh, MV mv0, MV mv1); |
633 | | |
634 | | void av2_get_reference_area_with_padding_single( |
635 | | const AV2_COMMON *cm, MACROBLOCKD *xd, int plane, const MB_MODE_INFO *mi, |
636 | | const MV mv, int bw, int bh, int mi_x, int mi_y, PadBlock *ref_area, |
637 | | int pu_width, int pu_height, int ref, int is_warp); |
638 | | |
639 | | // Generate the reference area (bounding box) based on the signaled MV |
640 | | void av2_get_reference_area_with_padding(const AV2_COMMON *cm, MACROBLOCKD *xd, |
641 | | int plane, MB_MODE_INFO *mi, |
642 | | const MV mv[2], int bw, int bh, |
643 | | int mi_x, int mi_y, |
644 | | ReferenceArea ref_area[2], |
645 | | int pu_width, int pu_height); |
646 | | |
647 | | // Derive the sub-pixel related parameters of non-TIP blocks |
648 | | // Sub-pel related parameters are stored in the structures pointed by |
649 | | // "subpel_params" and "block" |
650 | | void dec_calc_subpel_params(const MV *const src_mv, |
651 | | InterPredParams *const inter_pred_params, |
652 | | const MACROBLOCKD *const xd, int mi_x, int mi_y, |
653 | | uint16_t **pre, SubpelParams *subpel_params, |
654 | | int *src_stride, PadBlock *block, |
655 | | int use_optflow_refinement, MV32 *scaled_mv, |
656 | | int *subpel_x_mv, int *subpel_y_mv); |
657 | | |
658 | | // check if the refinemv mode is allwed for a given blocksize |
659 | 0 | static INLINE int is_refinemv_allowed_bsize(BLOCK_SIZE bsize) { |
660 | 0 | assert(bsize < BLOCK_SIZES_ALL); |
661 | 0 | if (AVMMIN(block_size_wide[bsize], block_size_high[bsize]) < 8) return 0; |
662 | | |
663 | 0 | return (block_size_wide[bsize] >= 16 || block_size_high[bsize] >= 16); |
664 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_refinemv_allowed_bsize Unexecuted instantiation: annexF.c:is_refinemv_allowed_bsize Unexecuted instantiation: decodeframe.c:is_refinemv_allowed_bsize Unexecuted instantiation: decodemv.c:is_refinemv_allowed_bsize Unexecuted instantiation: decoder.c:is_refinemv_allowed_bsize Unexecuted instantiation: decodetxb.c:is_refinemv_allowed_bsize Unexecuted instantiation: detokenize.c:is_refinemv_allowed_bsize Unexecuted instantiation: obu_fgm.c:is_refinemv_allowed_bsize Unexecuted instantiation: obu.c:is_refinemv_allowed_bsize Unexecuted instantiation: obu_ci.c:is_refinemv_allowed_bsize Unexecuted instantiation: obu_atlas.c:is_refinemv_allowed_bsize Unexecuted instantiation: obu_lcr.c:is_refinemv_allowed_bsize Unexecuted instantiation: obu_ops.c:is_refinemv_allowed_bsize Unexecuted instantiation: obu_buf.c:is_refinemv_allowed_bsize Unexecuted instantiation: alloccommon.c:is_refinemv_allowed_bsize Unexecuted instantiation: av2_loopfilter.c:is_refinemv_allowed_bsize Unexecuted instantiation: cdef.c:is_refinemv_allowed_bsize Unexecuted instantiation: cfl.c:is_refinemv_allowed_bsize Unexecuted instantiation: entropymode.c:is_refinemv_allowed_bsize Unexecuted instantiation: level.c:is_refinemv_allowed_bsize Unexecuted instantiation: mvref_common.c:is_refinemv_allowed_bsize Unexecuted instantiation: pred_common.c:is_refinemv_allowed_bsize Unexecuted instantiation: reconinter.c:is_refinemv_allowed_bsize Unexecuted instantiation: thread_common.c:is_refinemv_allowed_bsize Unexecuted instantiation: tip.c:is_refinemv_allowed_bsize Unexecuted instantiation: ccso.c:is_refinemv_allowed_bsize Unexecuted instantiation: bru.c:is_refinemv_allowed_bsize Unexecuted instantiation: obu_qm.c:is_refinemv_allowed_bsize Unexecuted instantiation: optflow_refine_sse4.c:is_refinemv_allowed_bsize Unexecuted instantiation: affine_optflow_refine_avx2.c:is_refinemv_allowed_bsize |
665 | | |
666 | | // check if the refinemv mode is allwed for a given mode and precision |
667 | | static INLINE int is_refinemv_allowed_mode_precision( |
668 | | PREDICTION_MODE mode, MvSubpelPrecision precision, |
669 | 0 | const AV2_COMMON *const cm) { |
670 | 0 | (void)precision; |
671 | 0 | if (mode == GLOBAL_GLOBALMV) return 0; |
672 | | |
673 | 0 | if (cm->features.opfl_refine_type == REFINE_SWITCHABLE && |
674 | 0 | (mode == JOINT_NEWMV || mode == NEAR_NEWMV || mode == NEW_NEARMV || |
675 | 0 | mode == NEW_NEWMV)) |
676 | 0 | return 0; |
677 | | |
678 | 0 | return (mode >= NEAR_NEARMV); |
679 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: annexF.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: decodeframe.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: decodemv.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: decoder.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: decodetxb.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: detokenize.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: obu_fgm.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: obu.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: obu_ci.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: obu_atlas.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: obu_lcr.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: obu_ops.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: obu_buf.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: alloccommon.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: av2_loopfilter.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: cdef.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: cfl.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: entropymode.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: level.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: mvref_common.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: pred_common.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: reconinter.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: thread_common.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: tip.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: ccso.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: bru.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: obu_qm.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: optflow_refine_sse4.c:is_refinemv_allowed_mode_precision Unexecuted instantiation: affine_optflow_refine_avx2.c:is_refinemv_allowed_mode_precision |
680 | | |
681 | | // check if the prediction mode infered to refimemv to always 1. |
682 | 0 | static INLINE int default_refinemv_modes(const MB_MODE_INFO *mbmi) { |
683 | 0 | return (mbmi->mode == NEAR_NEARMV || mbmi->mode == NEAR_NEARMV_OPTFLOW || |
684 | 0 | mbmi->mode == JOINT_NEWMV_OPTFLOW); |
685 | 0 | } Unexecuted instantiation: av2_dx_iface.c:default_refinemv_modes Unexecuted instantiation: annexF.c:default_refinemv_modes Unexecuted instantiation: decodeframe.c:default_refinemv_modes Unexecuted instantiation: decodemv.c:default_refinemv_modes Unexecuted instantiation: decoder.c:default_refinemv_modes Unexecuted instantiation: decodetxb.c:default_refinemv_modes Unexecuted instantiation: detokenize.c:default_refinemv_modes Unexecuted instantiation: obu_fgm.c:default_refinemv_modes Unexecuted instantiation: obu.c:default_refinemv_modes Unexecuted instantiation: obu_ci.c:default_refinemv_modes Unexecuted instantiation: obu_atlas.c:default_refinemv_modes Unexecuted instantiation: obu_lcr.c:default_refinemv_modes Unexecuted instantiation: obu_ops.c:default_refinemv_modes Unexecuted instantiation: obu_buf.c:default_refinemv_modes Unexecuted instantiation: alloccommon.c:default_refinemv_modes Unexecuted instantiation: av2_loopfilter.c:default_refinemv_modes Unexecuted instantiation: cdef.c:default_refinemv_modes Unexecuted instantiation: cfl.c:default_refinemv_modes Unexecuted instantiation: entropymode.c:default_refinemv_modes Unexecuted instantiation: level.c:default_refinemv_modes Unexecuted instantiation: mvref_common.c:default_refinemv_modes Unexecuted instantiation: pred_common.c:default_refinemv_modes Unexecuted instantiation: reconinter.c:default_refinemv_modes Unexecuted instantiation: thread_common.c:default_refinemv_modes Unexecuted instantiation: tip.c:default_refinemv_modes Unexecuted instantiation: ccso.c:default_refinemv_modes Unexecuted instantiation: bru.c:default_refinemv_modes Unexecuted instantiation: obu_qm.c:default_refinemv_modes Unexecuted instantiation: optflow_refine_sse4.c:default_refinemv_modes Unexecuted instantiation: affine_optflow_refine_avx2.c:default_refinemv_modes |
686 | | // Check if the compound and equal distance references |
687 | | static INLINE int is_refinemv_allowed_reference(const AV2_COMMON *cm, |
688 | 0 | const MB_MODE_INFO *mbmi) { |
689 | 0 | if (!cm->seq_params.enable_refinemv) return 0; |
690 | 0 | const unsigned int cur_index = cm->cur_frame->display_order_hint; |
691 | 0 | int d0, d1; |
692 | 0 | int is_tip = (mbmi->ref_frame[0] == TIP_FRAME); |
693 | | // In error resilient mode, whether a frame is scaled may be unknown, and the |
694 | | // following logic for parsing is not reliable, so SMVR is disabled. |
695 | 0 | if (frame_is_sframe(cm)) return 0; |
696 | | |
697 | 0 | if ((get_ref_frame_buf(cm, mbmi->ref_frame[0]) != NULL && |
698 | 0 | get_ref_frame_buf(cm, mbmi->ref_frame[0])->is_restricted) || |
699 | 0 | (get_ref_frame_buf(cm, mbmi->ref_frame[1]) != NULL && |
700 | 0 | get_ref_frame_buf(cm, mbmi->ref_frame[1])->is_restricted)) |
701 | 0 | return 0; |
702 | | |
703 | | // If one of the reference frame is different resolution than the current |
704 | | // frame, refinemv is disabled. |
705 | 0 | const struct scale_factors *const sf0 = |
706 | 0 | is_tip ? cm->tip_ref.ref_scale_factor[0] |
707 | 0 | : get_ref_scale_factors_const(cm, mbmi->ref_frame[0]); |
708 | 0 | const struct scale_factors *const sf1 = |
709 | 0 | is_tip ? cm->tip_ref.ref_scale_factor[1] |
710 | 0 | : get_ref_scale_factors_const(cm, mbmi->ref_frame[1]); |
711 | 0 | if (av2_is_scaled(sf0) || av2_is_scaled(sf1)) { |
712 | 0 | return 0; |
713 | 0 | } |
714 | | |
715 | 0 | if (is_tip) { |
716 | 0 | d0 = cm->tip_ref.ref_offset[0]; |
717 | 0 | d1 = cm->tip_ref.ref_offset[1]; |
718 | 0 | } else { |
719 | 0 | if (!has_second_ref(mbmi)) return 0; |
720 | 0 | const RefCntBuffer *const ref0 = get_ref_frame_buf(cm, mbmi->ref_frame[0]); |
721 | 0 | const RefCntBuffer *const ref1 = get_ref_frame_buf(cm, mbmi->ref_frame[1]); |
722 | 0 | d0 = get_relative_dist(&cm->seq_params.order_hint_info, cur_index, |
723 | 0 | ref0->display_order_hint); |
724 | 0 | d1 = get_relative_dist(&cm->seq_params.order_hint_info, cur_index, |
725 | 0 | ref1->display_order_hint); |
726 | 0 | } |
727 | | |
728 | | // reference frame has to be both sides to apply refinemv |
729 | 0 | if (!((d0 <= 0) ^ (d1 <= 0))) return 0; |
730 | | |
731 | | // Current implementation only supports when both has the same distance |
732 | 0 | if (abs(d0) != abs(d1)) return 0; |
733 | | |
734 | 0 | return 1; |
735 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_refinemv_allowed_reference Unexecuted instantiation: annexF.c:is_refinemv_allowed_reference Unexecuted instantiation: decodeframe.c:is_refinemv_allowed_reference Unexecuted instantiation: decodemv.c:is_refinemv_allowed_reference Unexecuted instantiation: decoder.c:is_refinemv_allowed_reference Unexecuted instantiation: decodetxb.c:is_refinemv_allowed_reference Unexecuted instantiation: detokenize.c:is_refinemv_allowed_reference Unexecuted instantiation: obu_fgm.c:is_refinemv_allowed_reference Unexecuted instantiation: obu.c:is_refinemv_allowed_reference Unexecuted instantiation: obu_ci.c:is_refinemv_allowed_reference Unexecuted instantiation: obu_atlas.c:is_refinemv_allowed_reference Unexecuted instantiation: obu_lcr.c:is_refinemv_allowed_reference Unexecuted instantiation: obu_ops.c:is_refinemv_allowed_reference Unexecuted instantiation: obu_buf.c:is_refinemv_allowed_reference Unexecuted instantiation: alloccommon.c:is_refinemv_allowed_reference Unexecuted instantiation: av2_loopfilter.c:is_refinemv_allowed_reference Unexecuted instantiation: cdef.c:is_refinemv_allowed_reference Unexecuted instantiation: cfl.c:is_refinemv_allowed_reference Unexecuted instantiation: entropymode.c:is_refinemv_allowed_reference Unexecuted instantiation: level.c:is_refinemv_allowed_reference Unexecuted instantiation: mvref_common.c:is_refinemv_allowed_reference Unexecuted instantiation: pred_common.c:is_refinemv_allowed_reference Unexecuted instantiation: reconinter.c:is_refinemv_allowed_reference Unexecuted instantiation: thread_common.c:is_refinemv_allowed_reference Unexecuted instantiation: tip.c:is_refinemv_allowed_reference Unexecuted instantiation: ccso.c:is_refinemv_allowed_reference Unexecuted instantiation: bru.c:is_refinemv_allowed_reference Unexecuted instantiation: obu_qm.c:is_refinemv_allowed_reference Unexecuted instantiation: optflow_refine_sse4.c:is_refinemv_allowed_reference Unexecuted instantiation: affine_optflow_refine_avx2.c:is_refinemv_allowed_reference |
736 | | |
737 | | // check if the refinemv mode is allowed for a given block |
738 | | static INLINE int is_refinemv_allowed(const AV2_COMMON *const cm, |
739 | | const MB_MODE_INFO *mbmi, |
740 | 0 | BLOCK_SIZE bsize) { |
741 | 0 | if (!cm->seq_params.enable_refinemv) return 0; |
742 | 0 | int is_tip = is_tip_ref_frame(mbmi->ref_frame[0]); |
743 | 0 | if (is_tip) return 0; |
744 | 0 | assert(!mbmi->skip_mode); |
745 | 0 | int is_compound = has_second_ref(mbmi); |
746 | 0 | return mbmi->motion_mode == SIMPLE_TRANSLATION && is_compound && |
747 | 0 | is_refinemv_allowed_bsize(bsize) && |
748 | 0 | is_refinemv_allowed_mode_precision(mbmi->mode, mbmi->pb_mv_precision, |
749 | 0 | cm) && |
750 | 0 | is_refinemv_allowed_reference(cm, mbmi); |
751 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_refinemv_allowed Unexecuted instantiation: annexF.c:is_refinemv_allowed Unexecuted instantiation: decodeframe.c:is_refinemv_allowed Unexecuted instantiation: decodemv.c:is_refinemv_allowed Unexecuted instantiation: decoder.c:is_refinemv_allowed Unexecuted instantiation: decodetxb.c:is_refinemv_allowed Unexecuted instantiation: detokenize.c:is_refinemv_allowed Unexecuted instantiation: obu_fgm.c:is_refinemv_allowed Unexecuted instantiation: obu.c:is_refinemv_allowed Unexecuted instantiation: obu_ci.c:is_refinemv_allowed Unexecuted instantiation: obu_atlas.c:is_refinemv_allowed Unexecuted instantiation: obu_lcr.c:is_refinemv_allowed Unexecuted instantiation: obu_ops.c:is_refinemv_allowed Unexecuted instantiation: obu_buf.c:is_refinemv_allowed Unexecuted instantiation: alloccommon.c:is_refinemv_allowed Unexecuted instantiation: av2_loopfilter.c:is_refinemv_allowed Unexecuted instantiation: cdef.c:is_refinemv_allowed Unexecuted instantiation: cfl.c:is_refinemv_allowed Unexecuted instantiation: entropymode.c:is_refinemv_allowed Unexecuted instantiation: level.c:is_refinemv_allowed Unexecuted instantiation: mvref_common.c:is_refinemv_allowed Unexecuted instantiation: pred_common.c:is_refinemv_allowed Unexecuted instantiation: reconinter.c:is_refinemv_allowed Unexecuted instantiation: thread_common.c:is_refinemv_allowed Unexecuted instantiation: tip.c:is_refinemv_allowed Unexecuted instantiation: ccso.c:is_refinemv_allowed Unexecuted instantiation: bru.c:is_refinemv_allowed Unexecuted instantiation: obu_qm.c:is_refinemv_allowed Unexecuted instantiation: optflow_refine_sse4.c:is_refinemv_allowed Unexecuted instantiation: affine_optflow_refine_avx2.c:is_refinemv_allowed |
752 | | |
753 | | // check if any mv refinement mode is allowed in TIP at frame level |
754 | | static INLINE int is_any_mv_refinement_allowed_in_tip( |
755 | 0 | const AV2_COMMON *const cm) { |
756 | 0 | if (!cm->has_both_sides_refs) return 0; |
757 | | |
758 | 0 | if (cm->features.opfl_refine_type == REFINE_NONE && |
759 | 0 | !cm->seq_params.enable_refinemv) |
760 | 0 | return 0; |
761 | | |
762 | 0 | if (!cm->seq_params.enable_tip_refinemv) return 0; |
763 | | |
764 | 0 | const int tip_wtd_index = cm->tip_global_wtd_index; |
765 | 0 | const int8_t tip_weight = tip_weighting_factors[tip_wtd_index]; |
766 | 0 | if (tip_weight != TIP_EQUAL_WTD) return 0; |
767 | | |
768 | 0 | return 1; |
769 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: annexF.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: decodeframe.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: decodemv.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: decoder.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: decodetxb.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: detokenize.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: obu_fgm.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: obu.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: obu_ci.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: obu_atlas.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: obu_lcr.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: obu_ops.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: obu_buf.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: alloccommon.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: av2_loopfilter.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: cdef.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: cfl.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: entropymode.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: level.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: mvref_common.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: pred_common.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: reconinter.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: thread_common.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: tip.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: ccso.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: bru.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: obu_qm.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: optflow_refine_sse4.c:is_any_mv_refinement_allowed_in_tip Unexecuted instantiation: affine_optflow_refine_avx2.c:is_any_mv_refinement_allowed_in_tip |
770 | | |
771 | | // check if any refinement algorithm is applied in TIP at block level |
772 | | static INLINE int is_tip_block_with_mv_refinement(const AV2_COMMON *const cm, |
773 | 0 | const MACROBLOCKD *xd) { |
774 | 0 | if (!is_any_mv_refinement_allowed_in_tip(cm)) return 0; |
775 | | |
776 | 0 | if (cm->features.tip_frame_mode == TIP_FRAME_AS_OUTPUT) { |
777 | | // No OPFL and subblock MV refinement on TIP direct output mode when |
778 | | // the interpolation filter is not MULTITAP_SHARP |
779 | 0 | if (cm->tip_interp_filter != MULTITAP_SHARP) return 0; |
780 | | |
781 | | // No subblock MV refinement on TIP direct output mode when the |
782 | | // interpolation filter is MULTITAP_SHARP |
783 | 0 | if (cm->seq_params.enable_opfl_refine == AVM_OPFL_REFINE_NONE) return 0; |
784 | 0 | } |
785 | | |
786 | 0 | if (cm->features.tip_frame_mode == TIP_FRAME_AS_REF) { |
787 | | // No OPFL MV refinement on TIP reference mode when the coding block |
788 | | // is 256x256 |
789 | 0 | const MB_MODE_INFO *mi = xd->mi[0]; |
790 | |
|
791 | 0 | const int bw = block_size_wide[mi->sb_type[xd->tree_type == CHROMA_PART]]; |
792 | 0 | const int bh = block_size_high[mi->sb_type[xd->tree_type == CHROMA_PART]]; |
793 | 0 | if (bw >= 256 && bh >= 256 && !cm->seq_params.enable_refinemv) return 0; |
794 | 0 | } |
795 | | |
796 | 0 | return 1; |
797 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_tip_block_with_mv_refinement Unexecuted instantiation: annexF.c:is_tip_block_with_mv_refinement Unexecuted instantiation: decodeframe.c:is_tip_block_with_mv_refinement Unexecuted instantiation: decodemv.c:is_tip_block_with_mv_refinement Unexecuted instantiation: decoder.c:is_tip_block_with_mv_refinement Unexecuted instantiation: decodetxb.c:is_tip_block_with_mv_refinement Unexecuted instantiation: detokenize.c:is_tip_block_with_mv_refinement Unexecuted instantiation: obu_fgm.c:is_tip_block_with_mv_refinement Unexecuted instantiation: obu.c:is_tip_block_with_mv_refinement Unexecuted instantiation: obu_ci.c:is_tip_block_with_mv_refinement Unexecuted instantiation: obu_atlas.c:is_tip_block_with_mv_refinement Unexecuted instantiation: obu_lcr.c:is_tip_block_with_mv_refinement Unexecuted instantiation: obu_ops.c:is_tip_block_with_mv_refinement Unexecuted instantiation: obu_buf.c:is_tip_block_with_mv_refinement Unexecuted instantiation: alloccommon.c:is_tip_block_with_mv_refinement Unexecuted instantiation: av2_loopfilter.c:is_tip_block_with_mv_refinement Unexecuted instantiation: cdef.c:is_tip_block_with_mv_refinement Unexecuted instantiation: cfl.c:is_tip_block_with_mv_refinement Unexecuted instantiation: entropymode.c:is_tip_block_with_mv_refinement Unexecuted instantiation: level.c:is_tip_block_with_mv_refinement Unexecuted instantiation: mvref_common.c:is_tip_block_with_mv_refinement Unexecuted instantiation: pred_common.c:is_tip_block_with_mv_refinement Unexecuted instantiation: reconinter.c:is_tip_block_with_mv_refinement Unexecuted instantiation: thread_common.c:is_tip_block_with_mv_refinement Unexecuted instantiation: tip.c:is_tip_block_with_mv_refinement Unexecuted instantiation: ccso.c:is_tip_block_with_mv_refinement Unexecuted instantiation: bru.c:is_tip_block_with_mv_refinement Unexecuted instantiation: obu_qm.c:is_tip_block_with_mv_refinement Unexecuted instantiation: optflow_refine_sse4.c:is_tip_block_with_mv_refinement Unexecuted instantiation: affine_optflow_refine_avx2.c:is_tip_block_with_mv_refinement |
798 | | |
799 | | // Is the coding block a TIP 16x16 coding block. |
800 | | static AVM_INLINE bool is_tip_coded_as_16x16_block(const AV2_COMMON *cm, |
801 | 0 | const MB_MODE_INFO *mi) { |
802 | 0 | if (!is_tip_ref_frame(mi->ref_frame[0])) return false; |
803 | | |
804 | 0 | const int bw = block_size_wide[mi->sb_type[0]]; |
805 | 0 | const int bh = block_size_high[mi->sb_type[0]]; |
806 | |
|
807 | 0 | bool is_tip_16_16 = disable_opfl_for_16x16_tip_ref( |
808 | 0 | cm->features.tip_frame_mode, bw, bh, cm->seq_params.enable_tip_refinemv); |
809 | 0 | is_tip_16_16 |= disable_opfl_for_tip_direct( |
810 | 0 | cm->features.tip_frame_mode, cm->tip_interp_filter, |
811 | 0 | cm->seq_params.enable_tip_refinemv); |
812 | 0 | return is_tip_16_16; |
813 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_tip_coded_as_16x16_block Unexecuted instantiation: annexF.c:is_tip_coded_as_16x16_block Unexecuted instantiation: decodeframe.c:is_tip_coded_as_16x16_block Unexecuted instantiation: decodemv.c:is_tip_coded_as_16x16_block Unexecuted instantiation: decoder.c:is_tip_coded_as_16x16_block Unexecuted instantiation: decodetxb.c:is_tip_coded_as_16x16_block Unexecuted instantiation: detokenize.c:is_tip_coded_as_16x16_block Unexecuted instantiation: obu_fgm.c:is_tip_coded_as_16x16_block Unexecuted instantiation: obu.c:is_tip_coded_as_16x16_block Unexecuted instantiation: obu_ci.c:is_tip_coded_as_16x16_block Unexecuted instantiation: obu_atlas.c:is_tip_coded_as_16x16_block Unexecuted instantiation: obu_lcr.c:is_tip_coded_as_16x16_block Unexecuted instantiation: obu_ops.c:is_tip_coded_as_16x16_block Unexecuted instantiation: obu_buf.c:is_tip_coded_as_16x16_block Unexecuted instantiation: alloccommon.c:is_tip_coded_as_16x16_block Unexecuted instantiation: av2_loopfilter.c:is_tip_coded_as_16x16_block Unexecuted instantiation: cdef.c:is_tip_coded_as_16x16_block Unexecuted instantiation: cfl.c:is_tip_coded_as_16x16_block Unexecuted instantiation: entropymode.c:is_tip_coded_as_16x16_block Unexecuted instantiation: level.c:is_tip_coded_as_16x16_block Unexecuted instantiation: mvref_common.c:is_tip_coded_as_16x16_block Unexecuted instantiation: pred_common.c:is_tip_coded_as_16x16_block Unexecuted instantiation: reconinter.c:is_tip_coded_as_16x16_block Unexecuted instantiation: thread_common.c:is_tip_coded_as_16x16_block Unexecuted instantiation: tip.c:is_tip_coded_as_16x16_block Unexecuted instantiation: ccso.c:is_tip_coded_as_16x16_block Unexecuted instantiation: bru.c:is_tip_coded_as_16x16_block Unexecuted instantiation: obu_qm.c:is_tip_coded_as_16x16_block Unexecuted instantiation: optflow_refine_sse4.c:is_tip_coded_as_16x16_block Unexecuted instantiation: affine_optflow_refine_avx2.c:is_tip_coded_as_16x16_block |
814 | | |
815 | | // check if unequal weight is allowed for TIP at frame level |
816 | 0 | static INLINE int is_unequal_weighted_tip_allowed(const AV2_COMMON *const cm) { |
817 | 0 | if (!cm->has_both_sides_refs) return 1; |
818 | | |
819 | 0 | if (!cm->seq_params.enable_tip_refinemv) return 1; |
820 | | |
821 | 0 | if (cm->features.opfl_refine_type == REFINE_NONE && |
822 | 0 | !cm->seq_params.enable_refinemv) |
823 | 0 | return 1; |
824 | | |
825 | 0 | return 0; |
826 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: annexF.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: decodeframe.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: decodemv.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: decoder.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: decodetxb.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: detokenize.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: obu_fgm.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: obu.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: obu_ci.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: obu_atlas.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: obu_lcr.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: obu_ops.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: obu_buf.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: alloccommon.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: av2_loopfilter.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: cdef.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: cfl.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: entropymode.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: level.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: mvref_common.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: pred_common.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: reconinter.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: thread_common.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: tip.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: ccso.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: bru.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: obu_qm.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: optflow_refine_sse4.c:is_unequal_weighted_tip_allowed Unexecuted instantiation: affine_optflow_refine_avx2.c:is_unequal_weighted_tip_allowed |
827 | | |
828 | | // set the weighting factor of TIP frame |
829 | | static INLINE void set_tip_interp_weight_factor( |
830 | | const AV2_COMMON *const cm, const int ref_index, |
831 | 0 | InterPredParams *const inter_pred_params) { |
832 | 0 | if (ref_index == 1 && inter_pred_params->conv_params.do_average == 1 && |
833 | 0 | !is_any_mv_refinement_allowed_in_tip(cm)) { |
834 | 0 | const int tip_wtd_index = cm->tip_global_wtd_index; |
835 | 0 | const int8_t tip_weight = tip_weighting_factors[tip_wtd_index]; |
836 | 0 | assert(tip_wtd_index >= 0 && tip_wtd_index < MAX_TIP_WTD_NUM); |
837 | 0 | inter_pred_params->conv_params.fwd_offset = tip_weight; |
838 | 0 | inter_pred_params->conv_params.bck_offset = |
839 | 0 | (1 << DIST_PRECISION_BITS) - tip_weight; |
840 | 0 | } |
841 | 0 | } Unexecuted instantiation: av2_dx_iface.c:set_tip_interp_weight_factor Unexecuted instantiation: annexF.c:set_tip_interp_weight_factor Unexecuted instantiation: decodeframe.c:set_tip_interp_weight_factor Unexecuted instantiation: decodemv.c:set_tip_interp_weight_factor Unexecuted instantiation: decoder.c:set_tip_interp_weight_factor Unexecuted instantiation: decodetxb.c:set_tip_interp_weight_factor Unexecuted instantiation: detokenize.c:set_tip_interp_weight_factor Unexecuted instantiation: obu_fgm.c:set_tip_interp_weight_factor Unexecuted instantiation: obu.c:set_tip_interp_weight_factor Unexecuted instantiation: obu_ci.c:set_tip_interp_weight_factor Unexecuted instantiation: obu_atlas.c:set_tip_interp_weight_factor Unexecuted instantiation: obu_lcr.c:set_tip_interp_weight_factor Unexecuted instantiation: obu_ops.c:set_tip_interp_weight_factor Unexecuted instantiation: obu_buf.c:set_tip_interp_weight_factor Unexecuted instantiation: alloccommon.c:set_tip_interp_weight_factor Unexecuted instantiation: av2_loopfilter.c:set_tip_interp_weight_factor Unexecuted instantiation: cdef.c:set_tip_interp_weight_factor Unexecuted instantiation: cfl.c:set_tip_interp_weight_factor Unexecuted instantiation: entropymode.c:set_tip_interp_weight_factor Unexecuted instantiation: level.c:set_tip_interp_weight_factor Unexecuted instantiation: mvref_common.c:set_tip_interp_weight_factor Unexecuted instantiation: pred_common.c:set_tip_interp_weight_factor Unexecuted instantiation: reconinter.c:set_tip_interp_weight_factor Unexecuted instantiation: thread_common.c:set_tip_interp_weight_factor Unexecuted instantiation: tip.c:set_tip_interp_weight_factor Unexecuted instantiation: ccso.c:set_tip_interp_weight_factor Unexecuted instantiation: bru.c:set_tip_interp_weight_factor Unexecuted instantiation: obu_qm.c:set_tip_interp_weight_factor Unexecuted instantiation: optflow_refine_sse4.c:set_tip_interp_weight_factor Unexecuted instantiation: affine_optflow_refine_avx2.c:set_tip_interp_weight_factor |
842 | | |
843 | | // check if the refinemv mode is allowed for a given block for TIP mode |
844 | | static INLINE int is_refinemv_allowed_tip_blocks(const AV2_COMMON *const cm, |
845 | 0 | const MB_MODE_INFO *mbmi) { |
846 | 0 | assert(is_tip_ref_frame(mbmi->ref_frame[0])); |
847 | 0 | return cm->seq_params.enable_refinemv && cm->seq_params.enable_tip_refinemv && |
848 | 0 | is_refinemv_allowed_reference(cm, mbmi) && |
849 | 0 | (cm->features.tip_frame_mode != TIP_FRAME_AS_OUTPUT); |
850 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: annexF.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: decodeframe.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: decodemv.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: decoder.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: decodetxb.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: detokenize.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: obu_fgm.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: obu.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: obu_ci.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: obu_atlas.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: obu_lcr.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: obu_ops.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: obu_buf.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: alloccommon.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: av2_loopfilter.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: cdef.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: cfl.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: entropymode.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: level.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: mvref_common.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: pred_common.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: reconinter.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: thread_common.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: tip.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: ccso.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: bru.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: obu_qm.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: optflow_refine_sse4.c:is_refinemv_allowed_tip_blocks Unexecuted instantiation: affine_optflow_refine_avx2.c:is_refinemv_allowed_tip_blocks |
851 | | |
852 | | // check if the refinemv mode is allowed for a given block for skip mode |
853 | | static INLINE int is_refinemv_allowed_skip_mode(const AV2_COMMON *const cm, |
854 | 0 | const MB_MODE_INFO *mbmi) { |
855 | 0 | (void)cm; |
856 | 0 | (void)mbmi; |
857 | 0 | return 0; |
858 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: annexF.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: decodeframe.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: decodemv.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: decoder.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: decodetxb.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: detokenize.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: obu_fgm.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: obu.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: obu_ci.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: obu_atlas.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: obu_lcr.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: obu_ops.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: obu_buf.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: alloccommon.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: av2_loopfilter.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: cdef.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: cfl.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: entropymode.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: level.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: mvref_common.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: pred_common.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: reconinter.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: thread_common.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: tip.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: ccso.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: bru.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: obu_qm.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: optflow_refine_sse4.c:is_refinemv_allowed_skip_mode Unexecuted instantiation: affine_optflow_refine_avx2.c:is_refinemv_allowed_skip_mode |
859 | | static INLINE int get_default_refinemv_flag(const AV2_COMMON *const cm, |
860 | 0 | const MB_MODE_INFO *mbmi) { |
861 | 0 | if (!cm->seq_params.enable_refinemv) return 0; |
862 | 0 | int is_refinemv = |
863 | 0 | (mbmi->skip_mode |
864 | 0 | ? is_refinemv_allowed_skip_mode(cm, mbmi) |
865 | 0 | : is_refinemv_allowed(cm, mbmi, mbmi->sb_type[PLANE_TYPE_Y])); |
866 | 0 | if (is_refinemv) { |
867 | 0 | if (default_refinemv_modes(mbmi)) return 1; |
868 | 0 | } |
869 | 0 | return 0; |
870 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_default_refinemv_flag Unexecuted instantiation: annexF.c:get_default_refinemv_flag Unexecuted instantiation: decodeframe.c:get_default_refinemv_flag Unexecuted instantiation: decodemv.c:get_default_refinemv_flag Unexecuted instantiation: decoder.c:get_default_refinemv_flag Unexecuted instantiation: decodetxb.c:get_default_refinemv_flag Unexecuted instantiation: detokenize.c:get_default_refinemv_flag Unexecuted instantiation: obu_fgm.c:get_default_refinemv_flag Unexecuted instantiation: obu.c:get_default_refinemv_flag Unexecuted instantiation: obu_ci.c:get_default_refinemv_flag Unexecuted instantiation: obu_atlas.c:get_default_refinemv_flag Unexecuted instantiation: obu_lcr.c:get_default_refinemv_flag Unexecuted instantiation: obu_ops.c:get_default_refinemv_flag Unexecuted instantiation: obu_buf.c:get_default_refinemv_flag Unexecuted instantiation: alloccommon.c:get_default_refinemv_flag Unexecuted instantiation: av2_loopfilter.c:get_default_refinemv_flag Unexecuted instantiation: cdef.c:get_default_refinemv_flag Unexecuted instantiation: cfl.c:get_default_refinemv_flag Unexecuted instantiation: entropymode.c:get_default_refinemv_flag Unexecuted instantiation: level.c:get_default_refinemv_flag Unexecuted instantiation: mvref_common.c:get_default_refinemv_flag Unexecuted instantiation: pred_common.c:get_default_refinemv_flag Unexecuted instantiation: reconinter.c:get_default_refinemv_flag Unexecuted instantiation: thread_common.c:get_default_refinemv_flag Unexecuted instantiation: tip.c:get_default_refinemv_flag Unexecuted instantiation: ccso.c:get_default_refinemv_flag Unexecuted instantiation: bru.c:get_default_refinemv_flag Unexecuted instantiation: obu_qm.c:get_default_refinemv_flag Unexecuted instantiation: optflow_refine_sse4.c:get_default_refinemv_flag Unexecuted instantiation: affine_optflow_refine_avx2.c:get_default_refinemv_flag |
871 | | |
872 | | // check if the refinemv mode is switchable for a given block |
873 | | static INLINE int switchable_refinemv_flag(const AV2_COMMON *const cm, |
874 | 0 | const MB_MODE_INFO *mbmi) { |
875 | 0 | if (!cm->seq_params.enable_refinemv) return 0; |
876 | 0 | int is_refinemv = |
877 | 0 | (mbmi->skip_mode |
878 | 0 | ? is_refinemv_allowed_skip_mode(cm, mbmi) |
879 | 0 | : is_refinemv_allowed(cm, mbmi, mbmi->sb_type[PLANE_TYPE_Y])); |
880 | 0 | if (is_refinemv && !is_tip_ref_frame(mbmi->ref_frame[0])) { |
881 | 0 | if (default_refinemv_modes(mbmi)) return 0; |
882 | 0 | return 1; |
883 | 0 | } |
884 | | |
885 | 0 | return 0; |
886 | 0 | } Unexecuted instantiation: av2_dx_iface.c:switchable_refinemv_flag Unexecuted instantiation: annexF.c:switchable_refinemv_flag Unexecuted instantiation: decodeframe.c:switchable_refinemv_flag Unexecuted instantiation: decodemv.c:switchable_refinemv_flag Unexecuted instantiation: decoder.c:switchable_refinemv_flag Unexecuted instantiation: decodetxb.c:switchable_refinemv_flag Unexecuted instantiation: detokenize.c:switchable_refinemv_flag Unexecuted instantiation: obu_fgm.c:switchable_refinemv_flag Unexecuted instantiation: obu.c:switchable_refinemv_flag Unexecuted instantiation: obu_ci.c:switchable_refinemv_flag Unexecuted instantiation: obu_atlas.c:switchable_refinemv_flag Unexecuted instantiation: obu_lcr.c:switchable_refinemv_flag Unexecuted instantiation: obu_ops.c:switchable_refinemv_flag Unexecuted instantiation: obu_buf.c:switchable_refinemv_flag Unexecuted instantiation: alloccommon.c:switchable_refinemv_flag Unexecuted instantiation: av2_loopfilter.c:switchable_refinemv_flag Unexecuted instantiation: cdef.c:switchable_refinemv_flag Unexecuted instantiation: cfl.c:switchable_refinemv_flag Unexecuted instantiation: entropymode.c:switchable_refinemv_flag Unexecuted instantiation: level.c:switchable_refinemv_flag Unexecuted instantiation: mvref_common.c:switchable_refinemv_flag Unexecuted instantiation: pred_common.c:switchable_refinemv_flag Unexecuted instantiation: reconinter.c:switchable_refinemv_flag Unexecuted instantiation: thread_common.c:switchable_refinemv_flag Unexecuted instantiation: tip.c:switchable_refinemv_flag Unexecuted instantiation: ccso.c:switchable_refinemv_flag Unexecuted instantiation: bru.c:switchable_refinemv_flag Unexecuted instantiation: obu_qm.c:switchable_refinemv_flag Unexecuted instantiation: optflow_refine_sse4.c:switchable_refinemv_flag Unexecuted instantiation: affine_optflow_refine_avx2.c:switchable_refinemv_flag |
887 | | |
888 | | // Check if refined MV needs to be stored in the TMVP list. |
889 | | static INLINE int enable_refined_mvs_in_tmvp(const AV2_COMMON *cm, |
890 | | const MACROBLOCKD *xd, |
891 | 0 | const MB_MODE_INFO *mbmi) { |
892 | 0 | return ( |
893 | 0 | opfl_allowed_cur_pred_mode(cm, xd, mbmi) || |
894 | 0 | (mbmi->refinemv_flag && mbmi->interinter_comp.type == COMPOUND_AVERAGE) || |
895 | 0 | (is_tip_ref_frame(mbmi->ref_frame[0]) && |
896 | 0 | is_tip_block_with_mv_refinement(cm, xd))); |
897 | 0 | } Unexecuted instantiation: av2_dx_iface.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: annexF.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: decodeframe.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: decodemv.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: decoder.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: decodetxb.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: detokenize.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: obu_fgm.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: obu.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: obu_ci.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: obu_atlas.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: obu_lcr.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: obu_ops.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: obu_buf.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: alloccommon.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: av2_loopfilter.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: cdef.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: cfl.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: entropymode.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: level.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: mvref_common.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: pred_common.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: reconinter.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: thread_common.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: tip.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: ccso.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: bru.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: obu_qm.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: optflow_refine_sse4.c:enable_refined_mvs_in_tmvp Unexecuted instantiation: affine_optflow_refine_avx2.c:enable_refined_mvs_in_tmvp |
898 | | |
899 | | // This function conduct the SAD search between two predictors and find the best |
900 | | // MVs |
901 | | void apply_mv_refinement(const AV2_COMMON *cm, MACROBLOCKD *xd, int plane, |
902 | | MB_MODE_INFO *mi, int bw, int bh, int mi_x, int mi_y, |
903 | | uint16_t **mc_buf, const MV mv[2], |
904 | | CalcSubpelParamsFunc calc_subpel_params_func, |
905 | | int pre_x, int pre_y, uint16_t *dst_ref0, |
906 | | uint16_t *dst_ref1, uint16_t **dst_ref0_ptr, |
907 | | uint16_t **dst_ref1_ptr, MV *best_mv_ref, int pu_width, |
908 | | int pu_height, ReferenceArea ref_area[2]); |
909 | | |
910 | | // check if padding is required during motion compensation |
911 | | // return 1 means reference pixel is outside of the reference range and padding |
912 | | // is required return 0 means no padding. |
913 | | int update_extend_mc_border_params(const struct scale_factors *const sf, |
914 | | struct buf_2d *const pre_buf, MV32 scaled_mv, |
915 | | PadBlock *block, int subpel_x_mv, |
916 | | int subpel_y_mv, int do_warp, int is_intrabc, |
917 | | int *x_pad, int *y_pad, |
918 | | const ReferenceArea *ref_area); |
919 | | |
920 | | // Derive the sub-pixel related parameters of refinemv non-TIP blocks |
921 | | // Sub-pel related parameters are stored in the structures pointed by |
922 | | // "subpel_params" Also do padding if required This function is used for |
923 | | // both encoder and decoder |
924 | | void common_calc_subpel_params_and_extend( |
925 | | const MV *const src_mv, InterPredParams *const inter_pred_params, |
926 | | MACROBLOCKD *const xd, int mi_x, int mi_y, int ref, |
927 | | int use_optflow_refinement, uint16_t **mc_buf, uint16_t **pre, |
928 | | SubpelParams *subpel_params, int *src_stride); |
929 | | |
930 | | #define MAKE_BFP_SAD_WRAPPER_COMMON(fnname) \ |
931 | | static unsigned int fnname##_8(const uint16_t *src_ptr, int source_stride, \ |
932 | 0 | const uint16_t *ref_ptr, int ref_stride) { \ |
933 | 0 | return fnname(src_ptr, source_stride, ref_ptr, ref_stride); \ |
934 | 0 | } \ Unexecuted instantiation: reconinter.c:avm_highbd_sad16x8_ds_8 Unexecuted instantiation: reconinter.c:avm_highbd_sad16x16_ds_8 Unexecuted instantiation: reconinter.c:avm_highbd_sad8x8_ds_8 Unexecuted instantiation: reconinter.c:avm_highbd_sad8x16_ds_8 Unexecuted instantiation: reconinter.c:avm_highbd_sad12x12_ds_8 Unexecuted instantiation: reconinter.c:avm_highbd_sad20x12_ds_8 Unexecuted instantiation: reconinter.c:avm_highbd_sad12x20_ds_8 Unexecuted instantiation: reconinter.c:avm_highbd_sad20x20_ds_8 Unexecuted instantiation: tip.c:avm_highbd_sad8x8_8 Unexecuted instantiation: tip.c:avm_highbd_sad16x8_8 Unexecuted instantiation: tip.c:avm_highbd_sad8x16_8 Unexecuted instantiation: tip.c:avm_highbd_sad16x16_8 |
935 | | static unsigned int fnname##_10(const uint16_t *src_ptr, int source_stride, \ |
936 | 0 | const uint16_t *ref_ptr, int ref_stride) { \ |
937 | 0 | return fnname(src_ptr, source_stride, ref_ptr, ref_stride) >> 2; \ |
938 | 0 | } \ Unexecuted instantiation: reconinter.c:avm_highbd_sad16x8_ds_10 Unexecuted instantiation: reconinter.c:avm_highbd_sad16x16_ds_10 Unexecuted instantiation: reconinter.c:avm_highbd_sad8x8_ds_10 Unexecuted instantiation: reconinter.c:avm_highbd_sad8x16_ds_10 Unexecuted instantiation: reconinter.c:avm_highbd_sad12x12_ds_10 Unexecuted instantiation: reconinter.c:avm_highbd_sad20x12_ds_10 Unexecuted instantiation: reconinter.c:avm_highbd_sad12x20_ds_10 Unexecuted instantiation: reconinter.c:avm_highbd_sad20x20_ds_10 Unexecuted instantiation: tip.c:avm_highbd_sad8x8_10 Unexecuted instantiation: tip.c:avm_highbd_sad16x8_10 Unexecuted instantiation: tip.c:avm_highbd_sad8x16_10 Unexecuted instantiation: tip.c:avm_highbd_sad16x16_10 |
939 | | static unsigned int fnname##_12(const uint16_t *src_ptr, int source_stride, \ |
940 | 0 | const uint16_t *ref_ptr, int ref_stride) { \ |
941 | 0 | return fnname(src_ptr, source_stride, ref_ptr, ref_stride) >> 4; \ |
942 | 0 | } Unexecuted instantiation: reconinter.c:avm_highbd_sad16x8_ds_12 Unexecuted instantiation: reconinter.c:avm_highbd_sad16x16_ds_12 Unexecuted instantiation: reconinter.c:avm_highbd_sad8x8_ds_12 Unexecuted instantiation: reconinter.c:avm_highbd_sad8x16_ds_12 Unexecuted instantiation: reconinter.c:avm_highbd_sad12x12_ds_12 Unexecuted instantiation: reconinter.c:avm_highbd_sad20x12_ds_12 Unexecuted instantiation: reconinter.c:avm_highbd_sad12x20_ds_12 Unexecuted instantiation: reconinter.c:avm_highbd_sad20x20_ds_12 Unexecuted instantiation: tip.c:avm_highbd_sad8x8_12 Unexecuted instantiation: tip.c:avm_highbd_sad16x8_12 Unexecuted instantiation: tip.c:avm_highbd_sad8x16_12 Unexecuted instantiation: tip.c:avm_highbd_sad16x16_12 |
943 | | |
944 | | unsigned int get_highbd_sad(const uint16_t *src_ptr, int source_stride, |
945 | | const uint16_t *ref_ptr, int ref_stride, int bd, |
946 | | int bw, int bh); |
947 | | |
948 | | unsigned int get_highbd_sad_ds(const uint16_t *src_ptr, int source_stride, |
949 | | const uint16_t *ref_ptr, int ref_stride, int bd, |
950 | | int bw, int bh); |
951 | | |
952 | | void calc_mv_process(int32_t su2, int32_t sv2, int32_t suv, int32_t suw, |
953 | | int32_t svw, const int d0, const int d1, const int bits, |
954 | | const int rls_alpha, int *vx0, int *vy0, int *vx1, |
955 | | int *vy1); |
956 | | void av2_opfl_mv_refinement(const int16_t *pdiff, int pstride0, |
957 | | const int16_t *gx, const int16_t *gy, int gstride, |
958 | | int bw, int bh, int d0, int d1, int grad_prec_bits, |
959 | | int mv_prec_bits, int *vx0, int *vy0, int *vx1, |
960 | | int *vy1); |
961 | | void av2_compute_subpel_gradients_interp(int16_t *pred_dst, int bw, int bh, |
962 | | int *grad_prec_bits, int16_t *x_grad, |
963 | | int16_t *y_grad); |
964 | | |
965 | | // TODO(jkoleszar): yet another mv clamping function :-( |
966 | | static INLINE MV clamp_mv_to_umv_border_sb(const MACROBLOCKD *xd, |
967 | | const MV *src_mv, int bw, int bh, |
968 | | int use_optflow_refinement, int ss_x, |
969 | 3.41k | int ss_y) { |
970 | | // If the MV points so far into the UMV border that no visible pixels |
971 | | // are used for reconstruction, the subpel part of the MV can be |
972 | | // discarded and the MV limited to 16 pixels with equivalent results. |
973 | 3.41k | const int spel_left = (AVM_INTERP_EXTEND + bw) << SUBPEL_BITS; |
974 | 3.41k | const int spel_right = spel_left - SUBPEL_SHIFTS; |
975 | 3.41k | const int spel_top = (AVM_INTERP_EXTEND + bh) << SUBPEL_BITS; |
976 | 3.41k | const int spel_bottom = spel_top - SUBPEL_SHIFTS; |
977 | 3.41k | MV clamped_mv; |
978 | 3.41k | if (use_optflow_refinement) { |
979 | | // optflow refinement always returns MVs with 1/16 precision so it is not |
980 | | // necessary to shift the MV before clamping |
981 | 3.41k | clamped_mv.row = (MV_COMP_DATA_TYPE)ROUND_POWER_OF_TWO_SIGNED( |
982 | 3.41k | src_mv->row * (1 << SUBPEL_BITS), MV_REFINE_PREC_BITS + ss_y); |
983 | 3.41k | clamped_mv.col = (MV_COMP_DATA_TYPE)ROUND_POWER_OF_TWO_SIGNED( |
984 | 3.41k | src_mv->col * (1 << SUBPEL_BITS), MV_REFINE_PREC_BITS + ss_x); |
985 | 3.41k | } else { |
986 | 0 | clamped_mv.row = (MV_COMP_DATA_TYPE)(src_mv->row * (1 << (1 - ss_y))); |
987 | 0 | clamped_mv.col = (MV_COMP_DATA_TYPE)(src_mv->col * (1 << (1 - ss_x))); |
988 | 0 | } |
989 | 3.41k | assert(ss_x <= 1); |
990 | 3.41k | assert(ss_y <= 1); |
991 | 3.41k | const SubpelMvLimits mv_limits = { |
992 | 3.41k | xd->mb_to_left_edge * (1 << (1 - ss_x)) - spel_left, |
993 | 3.41k | xd->mb_to_right_edge * (1 << (1 - ss_x)) + spel_right, |
994 | 3.41k | xd->mb_to_top_edge * (1 << (1 - ss_y)) - spel_top, |
995 | 3.41k | xd->mb_to_bottom_edge * (1 << (1 - ss_y)) + spel_bottom |
996 | 3.41k | }; |
997 | | |
998 | 3.41k | clamp_mv(&clamped_mv, &mv_limits); |
999 | | |
1000 | 3.41k | return clamped_mv; |
1001 | 3.41k | } Unexecuted instantiation: av2_dx_iface.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: annexF.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: decodeframe.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: decodemv.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: decoder.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: decodetxb.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: detokenize.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: obu_fgm.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: obu.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: obu_ci.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: obu_atlas.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: obu_lcr.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: obu_ops.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: obu_buf.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: alloccommon.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: av2_loopfilter.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: cdef.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: cfl.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: entropymode.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: level.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: mvref_common.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: pred_common.c:clamp_mv_to_umv_border_sb reconinter.c:clamp_mv_to_umv_border_sb Line | Count | Source | 969 | 3.41k | int ss_y) { | 970 | | // If the MV points so far into the UMV border that no visible pixels | 971 | | // are used for reconstruction, the subpel part of the MV can be | 972 | | // discarded and the MV limited to 16 pixels with equivalent results. | 973 | 3.41k | const int spel_left = (AVM_INTERP_EXTEND + bw) << SUBPEL_BITS; | 974 | 3.41k | const int spel_right = spel_left - SUBPEL_SHIFTS; | 975 | 3.41k | const int spel_top = (AVM_INTERP_EXTEND + bh) << SUBPEL_BITS; | 976 | 3.41k | const int spel_bottom = spel_top - SUBPEL_SHIFTS; | 977 | 3.41k | MV clamped_mv; | 978 | 3.41k | if (use_optflow_refinement) { | 979 | | // optflow refinement always returns MVs with 1/16 precision so it is not | 980 | | // necessary to shift the MV before clamping | 981 | 3.41k | clamped_mv.row = (MV_COMP_DATA_TYPE)ROUND_POWER_OF_TWO_SIGNED( | 982 | 3.41k | src_mv->row * (1 << SUBPEL_BITS), MV_REFINE_PREC_BITS + ss_y); | 983 | 3.41k | clamped_mv.col = (MV_COMP_DATA_TYPE)ROUND_POWER_OF_TWO_SIGNED( | 984 | 3.41k | src_mv->col * (1 << SUBPEL_BITS), MV_REFINE_PREC_BITS + ss_x); | 985 | 3.41k | } else { | 986 | 0 | clamped_mv.row = (MV_COMP_DATA_TYPE)(src_mv->row * (1 << (1 - ss_y))); | 987 | 0 | clamped_mv.col = (MV_COMP_DATA_TYPE)(src_mv->col * (1 << (1 - ss_x))); | 988 | 0 | } | 989 | 3.41k | assert(ss_x <= 1); | 990 | 3.41k | assert(ss_y <= 1); | 991 | 3.41k | const SubpelMvLimits mv_limits = { | 992 | 3.41k | xd->mb_to_left_edge * (1 << (1 - ss_x)) - spel_left, | 993 | 3.41k | xd->mb_to_right_edge * (1 << (1 - ss_x)) + spel_right, | 994 | 3.41k | xd->mb_to_top_edge * (1 << (1 - ss_y)) - spel_top, | 995 | 3.41k | xd->mb_to_bottom_edge * (1 << (1 - ss_y)) + spel_bottom | 996 | 3.41k | }; | 997 | | | 998 | 3.41k | clamp_mv(&clamped_mv, &mv_limits); | 999 | | | 1000 | 3.41k | return clamped_mv; | 1001 | 3.41k | } |
Unexecuted instantiation: thread_common.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: tip.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: ccso.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: bru.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: obu_qm.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: optflow_refine_sse4.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: affine_optflow_refine_avx2.c:clamp_mv_to_umv_border_sb |
1002 | | |
1003 | | void make_masked_inter_predictor(const uint16_t *pre, int pre_stride, |
1004 | | uint16_t *dst, int dst_stride, |
1005 | | InterPredParams *inter_pred_params, |
1006 | | const SubpelParams *subpel_params, |
1007 | | int use_bacp, int sub_block_id); |
1008 | | |
1009 | | static INLINE int use_border_aware_compound(const AV2_COMMON *cm, |
1010 | | MACROBLOCKD *xd, |
1011 | 3.41k | const MB_MODE_INFO *mbmi) { |
1012 | 3.41k | if (is_masked_compound_type(mbmi->interinter_comp.type) || |
1013 | 3.41k | mbmi->mode == GLOBAL_GLOBALMV) |
1014 | 0 | return 0; |
1015 | | |
1016 | 3.41k | if (mbmi->mode == NEW_NEWMV && mbmi->motion_mode == WARP_CAUSAL) return 0; |
1017 | | |
1018 | 3.41k | (void)cm; |
1019 | 3.41k | const struct scale_factors *const sf0 = xd->block_ref_scale_factors[0]; |
1020 | 3.41k | const struct scale_factors *const sf1 = xd->block_ref_scale_factors[1]; |
1021 | 3.41k | return has_second_ref(mbmi) && |
1022 | 0 | (mbmi->mode >= COMP_INTER_MODE_START && |
1023 | 0 | mbmi->mode < COMP_INTER_MODE_END) && |
1024 | 0 | !av2_is_scaled(sf0) && !av2_is_scaled(sf1) && |
1025 | 0 | (mbmi->interinter_comp.type == COMPOUND_DIFFWTD || |
1026 | 0 | mbmi->interinter_comp.type == COMPOUND_AVERAGE); |
1027 | 3.41k | } Unexecuted instantiation: av2_dx_iface.c:use_border_aware_compound Unexecuted instantiation: annexF.c:use_border_aware_compound Unexecuted instantiation: decodeframe.c:use_border_aware_compound Unexecuted instantiation: decodemv.c:use_border_aware_compound Unexecuted instantiation: decoder.c:use_border_aware_compound Unexecuted instantiation: decodetxb.c:use_border_aware_compound Unexecuted instantiation: detokenize.c:use_border_aware_compound Unexecuted instantiation: obu_fgm.c:use_border_aware_compound Unexecuted instantiation: obu.c:use_border_aware_compound Unexecuted instantiation: obu_ci.c:use_border_aware_compound Unexecuted instantiation: obu_atlas.c:use_border_aware_compound Unexecuted instantiation: obu_lcr.c:use_border_aware_compound Unexecuted instantiation: obu_ops.c:use_border_aware_compound Unexecuted instantiation: obu_buf.c:use_border_aware_compound Unexecuted instantiation: alloccommon.c:use_border_aware_compound Unexecuted instantiation: av2_loopfilter.c:use_border_aware_compound Unexecuted instantiation: cdef.c:use_border_aware_compound Unexecuted instantiation: cfl.c:use_border_aware_compound Unexecuted instantiation: entropymode.c:use_border_aware_compound Unexecuted instantiation: level.c:use_border_aware_compound Unexecuted instantiation: mvref_common.c:use_border_aware_compound Unexecuted instantiation: pred_common.c:use_border_aware_compound reconinter.c:use_border_aware_compound Line | Count | Source | 1011 | 3.41k | const MB_MODE_INFO *mbmi) { | 1012 | 3.41k | if (is_masked_compound_type(mbmi->interinter_comp.type) || | 1013 | 3.41k | mbmi->mode == GLOBAL_GLOBALMV) | 1014 | 0 | return 0; | 1015 | | | 1016 | 3.41k | if (mbmi->mode == NEW_NEWMV && mbmi->motion_mode == WARP_CAUSAL) return 0; | 1017 | | | 1018 | 3.41k | (void)cm; | 1019 | 3.41k | const struct scale_factors *const sf0 = xd->block_ref_scale_factors[0]; | 1020 | 3.41k | const struct scale_factors *const sf1 = xd->block_ref_scale_factors[1]; | 1021 | 3.41k | return has_second_ref(mbmi) && | 1022 | 0 | (mbmi->mode >= COMP_INTER_MODE_START && | 1023 | 0 | mbmi->mode < COMP_INTER_MODE_END) && | 1024 | 0 | !av2_is_scaled(sf0) && !av2_is_scaled(sf1) && | 1025 | 0 | (mbmi->interinter_comp.type == COMPOUND_DIFFWTD || | 1026 | 0 | mbmi->interinter_comp.type == COMPOUND_AVERAGE); | 1027 | 3.41k | } |
Unexecuted instantiation: thread_common.c:use_border_aware_compound Unexecuted instantiation: tip.c:use_border_aware_compound Unexecuted instantiation: ccso.c:use_border_aware_compound Unexecuted instantiation: bru.c:use_border_aware_compound Unexecuted instantiation: obu_qm.c:use_border_aware_compound Unexecuted instantiation: optflow_refine_sse4.c:use_border_aware_compound Unexecuted instantiation: affine_optflow_refine_avx2.c:use_border_aware_compound |
1028 | | int is_out_of_frame_block(InterPredParams const *inter_pred_params, |
1029 | | int frame_width, int frame_height, int sub_block_id); |
1030 | | |
1031 | | static INLINE int64_t scaled_buffer_offset(int x_offset, int y_offset, |
1032 | | int stride, |
1033 | 1.37M | const struct scale_factors *sf) { |
1034 | 1.37M | const int x = |
1035 | 1.37M | sf ? sf->scale_value_x(x_offset, sf) >> SCALE_EXTRA_BITS : x_offset; |
1036 | 1.37M | const int y = |
1037 | 1.37M | sf ? sf->scale_value_y(y_offset, sf) >> SCALE_EXTRA_BITS : y_offset; |
1038 | 1.37M | return (int64_t)y * stride + x; |
1039 | 1.37M | } Unexecuted instantiation: av2_dx_iface.c:scaled_buffer_offset Unexecuted instantiation: annexF.c:scaled_buffer_offset Unexecuted instantiation: decodeframe.c:scaled_buffer_offset Unexecuted instantiation: decodemv.c:scaled_buffer_offset Unexecuted instantiation: decoder.c:scaled_buffer_offset Unexecuted instantiation: decodetxb.c:scaled_buffer_offset Unexecuted instantiation: detokenize.c:scaled_buffer_offset Unexecuted instantiation: obu_fgm.c:scaled_buffer_offset Unexecuted instantiation: obu.c:scaled_buffer_offset Unexecuted instantiation: obu_ci.c:scaled_buffer_offset Unexecuted instantiation: obu_atlas.c:scaled_buffer_offset Unexecuted instantiation: obu_lcr.c:scaled_buffer_offset Unexecuted instantiation: obu_ops.c:scaled_buffer_offset Unexecuted instantiation: obu_buf.c:scaled_buffer_offset Unexecuted instantiation: alloccommon.c:scaled_buffer_offset Unexecuted instantiation: av2_loopfilter.c:scaled_buffer_offset Unexecuted instantiation: cdef.c:scaled_buffer_offset Unexecuted instantiation: cfl.c:scaled_buffer_offset Unexecuted instantiation: entropymode.c:scaled_buffer_offset Unexecuted instantiation: level.c:scaled_buffer_offset Unexecuted instantiation: mvref_common.c:scaled_buffer_offset Unexecuted instantiation: pred_common.c:scaled_buffer_offset reconinter.c:scaled_buffer_offset Line | Count | Source | 1033 | 1.37M | const struct scale_factors *sf) { | 1034 | 1.37M | const int x = | 1035 | 1.37M | sf ? sf->scale_value_x(x_offset, sf) >> SCALE_EXTRA_BITS : x_offset; | 1036 | 1.37M | const int y = | 1037 | 1.37M | sf ? sf->scale_value_y(y_offset, sf) >> SCALE_EXTRA_BITS : y_offset; | 1038 | 1.37M | return (int64_t)y * stride + x; | 1039 | 1.37M | } |
Unexecuted instantiation: thread_common.c:scaled_buffer_offset Unexecuted instantiation: tip.c:scaled_buffer_offset Unexecuted instantiation: ccso.c:scaled_buffer_offset Unexecuted instantiation: bru.c:scaled_buffer_offset Unexecuted instantiation: obu_qm.c:scaled_buffer_offset Unexecuted instantiation: optflow_refine_sse4.c:scaled_buffer_offset Unexecuted instantiation: affine_optflow_refine_avx2.c:scaled_buffer_offset |
1040 | | |
1041 | | static INLINE void setup_pred_plane(struct buf_2d *dst, uint16_t *src, |
1042 | | int width, int height, int crop_width, |
1043 | | int crop_height, int stride, int mi_row, |
1044 | | int mi_col, |
1045 | | const struct scale_factors *scale, |
1046 | | int subsampling_x, int subsampling_y, |
1047 | 1.37M | const CHROMA_REF_INFO *chroma_ref_info) { |
1048 | | // Offset the buffer pointer |
1049 | 1.37M | if (chroma_ref_info && (subsampling_x || subsampling_y)) { |
1050 | 910k | mi_row = chroma_ref_info->mi_row_chroma_base; |
1051 | 910k | mi_col = chroma_ref_info->mi_col_chroma_base; |
1052 | 910k | } |
1053 | | |
1054 | 1.37M | const int x = (MI_SIZE * mi_col) >> subsampling_x; |
1055 | 1.37M | const int y = (MI_SIZE * mi_row) >> subsampling_y; |
1056 | 1.37M | dst->buf = src + scaled_buffer_offset(x, y, stride, scale); |
1057 | 1.37M | dst->buf0 = src; |
1058 | 1.37M | dst->width = width; |
1059 | 1.37M | dst->height = height; |
1060 | 1.37M | dst->crop_width = crop_width; |
1061 | 1.37M | dst->crop_height = crop_height; |
1062 | 1.37M | dst->stride = stride; |
1063 | 1.37M | } Unexecuted instantiation: av2_dx_iface.c:setup_pred_plane Unexecuted instantiation: annexF.c:setup_pred_plane Unexecuted instantiation: decodeframe.c:setup_pred_plane Unexecuted instantiation: decodemv.c:setup_pred_plane Unexecuted instantiation: decoder.c:setup_pred_plane Unexecuted instantiation: decodetxb.c:setup_pred_plane Unexecuted instantiation: detokenize.c:setup_pred_plane Unexecuted instantiation: obu_fgm.c:setup_pred_plane Unexecuted instantiation: obu.c:setup_pred_plane Unexecuted instantiation: obu_ci.c:setup_pred_plane Unexecuted instantiation: obu_atlas.c:setup_pred_plane Unexecuted instantiation: obu_lcr.c:setup_pred_plane Unexecuted instantiation: obu_ops.c:setup_pred_plane Unexecuted instantiation: obu_buf.c:setup_pred_plane Unexecuted instantiation: alloccommon.c:setup_pred_plane Unexecuted instantiation: av2_loopfilter.c:setup_pred_plane Unexecuted instantiation: cdef.c:setup_pred_plane Unexecuted instantiation: cfl.c:setup_pred_plane Unexecuted instantiation: entropymode.c:setup_pred_plane Unexecuted instantiation: level.c:setup_pred_plane Unexecuted instantiation: mvref_common.c:setup_pred_plane Unexecuted instantiation: pred_common.c:setup_pred_plane reconinter.c:setup_pred_plane Line | Count | Source | 1047 | 1.37M | const CHROMA_REF_INFO *chroma_ref_info) { | 1048 | | // Offset the buffer pointer | 1049 | 1.37M | if (chroma_ref_info && (subsampling_x || subsampling_y)) { | 1050 | 910k | mi_row = chroma_ref_info->mi_row_chroma_base; | 1051 | 910k | mi_col = chroma_ref_info->mi_col_chroma_base; | 1052 | 910k | } | 1053 | | | 1054 | 1.37M | const int x = (MI_SIZE * mi_col) >> subsampling_x; | 1055 | 1.37M | const int y = (MI_SIZE * mi_row) >> subsampling_y; | 1056 | 1.37M | dst->buf = src + scaled_buffer_offset(x, y, stride, scale); | 1057 | 1.37M | dst->buf0 = src; | 1058 | 1.37M | dst->width = width; | 1059 | 1.37M | dst->height = height; | 1060 | 1.37M | dst->crop_width = crop_width; | 1061 | 1.37M | dst->crop_height = crop_height; | 1062 | 1.37M | dst->stride = stride; | 1063 | 1.37M | } |
Unexecuted instantiation: thread_common.c:setup_pred_plane Unexecuted instantiation: tip.c:setup_pred_plane Unexecuted instantiation: ccso.c:setup_pred_plane Unexecuted instantiation: bru.c:setup_pred_plane Unexecuted instantiation: obu_qm.c:setup_pred_plane Unexecuted instantiation: optflow_refine_sse4.c:setup_pred_plane Unexecuted instantiation: affine_optflow_refine_avx2.c:setup_pred_plane |
1064 | | |
1065 | | void av2_setup_dst_planes(struct macroblockd_plane *planes, |
1066 | | const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col, |
1067 | | const int plane_start, const int plane_end, |
1068 | | const CHROMA_REF_INFO *chroma_ref_info); |
1069 | | |
1070 | | void av2_setup_pre_planes(MACROBLOCKD *xd, int idx, |
1071 | | const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col, |
1072 | | const struct scale_factors *sf, const int num_planes, |
1073 | | const CHROMA_REF_INFO *chroma_ref_info); |
1074 | | |
1075 | | static AVM_INLINE void setup_pred_planes_for_tip(const TIP *tip_ref, |
1076 | | MACROBLOCKD *xd, |
1077 | | int plane_start, int plane_end, |
1078 | 0 | int mi_col, int mi_row) { |
1079 | 0 | for (int plane = plane_start; plane < AVMMIN(plane_end, MAX_MB_PLANE); |
1080 | 0 | ++plane) { |
1081 | 0 | struct macroblockd_plane *const pd = &xd->plane[plane]; |
1082 | 0 | int is_uv = plane > 0; |
1083 | |
|
1084 | 0 | for (int ref = 0; ref < 2; ++ref) { |
1085 | 0 | const YV12_BUFFER_CONFIG *ref_buf = &tip_ref->ref_frame_buffer[ref]->buf; |
1086 | 0 | setup_pred_plane(&pd->pre[ref], ref_buf->buffers[plane], |
1087 | 0 | ref_buf->widths[is_uv], ref_buf->heights[is_uv], |
1088 | 0 | ref_buf->crop_widths[is_uv], |
1089 | 0 | ref_buf->crop_heights[is_uv], ref_buf->strides[is_uv], |
1090 | 0 | mi_row, mi_col, tip_ref->ref_scale_factor[ref], |
1091 | 0 | pd->subsampling_x, pd->subsampling_y, NULL); |
1092 | 0 | } |
1093 | 0 | } |
1094 | 0 | } Unexecuted instantiation: av2_dx_iface.c:setup_pred_planes_for_tip Unexecuted instantiation: annexF.c:setup_pred_planes_for_tip Unexecuted instantiation: decodeframe.c:setup_pred_planes_for_tip Unexecuted instantiation: decodemv.c:setup_pred_planes_for_tip Unexecuted instantiation: decoder.c:setup_pred_planes_for_tip Unexecuted instantiation: decodetxb.c:setup_pred_planes_for_tip Unexecuted instantiation: detokenize.c:setup_pred_planes_for_tip Unexecuted instantiation: obu_fgm.c:setup_pred_planes_for_tip Unexecuted instantiation: obu.c:setup_pred_planes_for_tip Unexecuted instantiation: obu_ci.c:setup_pred_planes_for_tip Unexecuted instantiation: obu_atlas.c:setup_pred_planes_for_tip Unexecuted instantiation: obu_lcr.c:setup_pred_planes_for_tip Unexecuted instantiation: obu_ops.c:setup_pred_planes_for_tip Unexecuted instantiation: obu_buf.c:setup_pred_planes_for_tip Unexecuted instantiation: alloccommon.c:setup_pred_planes_for_tip Unexecuted instantiation: av2_loopfilter.c:setup_pred_planes_for_tip Unexecuted instantiation: cdef.c:setup_pred_planes_for_tip Unexecuted instantiation: cfl.c:setup_pred_planes_for_tip Unexecuted instantiation: entropymode.c:setup_pred_planes_for_tip Unexecuted instantiation: level.c:setup_pred_planes_for_tip Unexecuted instantiation: mvref_common.c:setup_pred_planes_for_tip Unexecuted instantiation: pred_common.c:setup_pred_planes_for_tip Unexecuted instantiation: reconinter.c:setup_pred_planes_for_tip Unexecuted instantiation: thread_common.c:setup_pred_planes_for_tip Unexecuted instantiation: tip.c:setup_pred_planes_for_tip Unexecuted instantiation: ccso.c:setup_pred_planes_for_tip Unexecuted instantiation: bru.c:setup_pred_planes_for_tip Unexecuted instantiation: obu_qm.c:setup_pred_planes_for_tip Unexecuted instantiation: optflow_refine_sse4.c:setup_pred_planes_for_tip Unexecuted instantiation: affine_optflow_refine_avx2.c:setup_pred_planes_for_tip |
1095 | | |
1096 | | static INLINE void set_default_interp_filters( |
1097 | | MB_MODE_INFO *const mbmi, const AV2_COMMON *cm, const MACROBLOCKD *xd, |
1098 | 0 | InterpFilter frame_interp_filter) { |
1099 | 0 | if (mbmi->skip_mode) { |
1100 | 0 | mbmi->interp_fltr = MULTITAP_SHARP; |
1101 | 0 | return; |
1102 | 0 | } |
1103 | 0 | mbmi->interp_fltr = |
1104 | 0 | (opfl_allowed_cur_pred_mode(cm, xd, mbmi) || mbmi->refinemv_flag || |
1105 | 0 | is_tip_ref_frame(mbmi->ref_frame[0])) |
1106 | 0 | ? MULTITAP_SHARP |
1107 | 0 | : av2_unswitchable_filter(frame_interp_filter); |
1108 | 0 | } Unexecuted instantiation: av2_dx_iface.c:set_default_interp_filters Unexecuted instantiation: annexF.c:set_default_interp_filters Unexecuted instantiation: decodeframe.c:set_default_interp_filters Unexecuted instantiation: decodemv.c:set_default_interp_filters Unexecuted instantiation: decoder.c:set_default_interp_filters Unexecuted instantiation: decodetxb.c:set_default_interp_filters Unexecuted instantiation: detokenize.c:set_default_interp_filters Unexecuted instantiation: obu_fgm.c:set_default_interp_filters Unexecuted instantiation: obu.c:set_default_interp_filters Unexecuted instantiation: obu_ci.c:set_default_interp_filters Unexecuted instantiation: obu_atlas.c:set_default_interp_filters Unexecuted instantiation: obu_lcr.c:set_default_interp_filters Unexecuted instantiation: obu_ops.c:set_default_interp_filters Unexecuted instantiation: obu_buf.c:set_default_interp_filters Unexecuted instantiation: alloccommon.c:set_default_interp_filters Unexecuted instantiation: av2_loopfilter.c:set_default_interp_filters Unexecuted instantiation: cdef.c:set_default_interp_filters Unexecuted instantiation: cfl.c:set_default_interp_filters Unexecuted instantiation: entropymode.c:set_default_interp_filters Unexecuted instantiation: level.c:set_default_interp_filters Unexecuted instantiation: mvref_common.c:set_default_interp_filters Unexecuted instantiation: pred_common.c:set_default_interp_filters Unexecuted instantiation: reconinter.c:set_default_interp_filters Unexecuted instantiation: thread_common.c:set_default_interp_filters Unexecuted instantiation: tip.c:set_default_interp_filters Unexecuted instantiation: ccso.c:set_default_interp_filters Unexecuted instantiation: bru.c:set_default_interp_filters Unexecuted instantiation: obu_qm.c:set_default_interp_filters Unexecuted instantiation: optflow_refine_sse4.c:set_default_interp_filters Unexecuted instantiation: affine_optflow_refine_avx2.c:set_default_interp_filters |
1109 | | |
1110 | | static INLINE int av2_is_interp_needed(const AV2_COMMON *const cm, |
1111 | 0 | const MACROBLOCKD *const xd) { |
1112 | 0 | (void)cm; |
1113 | 0 | const MB_MODE_INFO *const mbmi = xd->mi[0]; |
1114 | 0 | if (mbmi->skip_mode) return 0; |
1115 | | |
1116 | 0 | if (mbmi->mode == WARPMV) return 0; |
1117 | | // No interpolation filter search when optical flow MV refinement is used. |
1118 | 0 | if (opfl_allowed_cur_pred_mode(cm, xd, mbmi)) return 0; |
1119 | | |
1120 | | // No interpolation filter search when MV refinement is used. |
1121 | 0 | if (mbmi->refinemv_flag) return 0; |
1122 | 0 | if (is_warp_mode(mbmi->motion_mode)) return 0; |
1123 | 0 | if (is_nontrans_global_motion(xd, xd->mi[0])) return 0; |
1124 | 0 | if (is_tip_ref_frame(mbmi->ref_frame[0])) return 0; |
1125 | 0 | return 1; |
1126 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_is_interp_needed Unexecuted instantiation: annexF.c:av2_is_interp_needed Unexecuted instantiation: decodeframe.c:av2_is_interp_needed Unexecuted instantiation: decodemv.c:av2_is_interp_needed Unexecuted instantiation: decoder.c:av2_is_interp_needed Unexecuted instantiation: decodetxb.c:av2_is_interp_needed Unexecuted instantiation: detokenize.c:av2_is_interp_needed Unexecuted instantiation: obu_fgm.c:av2_is_interp_needed Unexecuted instantiation: obu.c:av2_is_interp_needed Unexecuted instantiation: obu_ci.c:av2_is_interp_needed Unexecuted instantiation: obu_atlas.c:av2_is_interp_needed Unexecuted instantiation: obu_lcr.c:av2_is_interp_needed Unexecuted instantiation: obu_ops.c:av2_is_interp_needed Unexecuted instantiation: obu_buf.c:av2_is_interp_needed Unexecuted instantiation: alloccommon.c:av2_is_interp_needed Unexecuted instantiation: av2_loopfilter.c:av2_is_interp_needed Unexecuted instantiation: cdef.c:av2_is_interp_needed Unexecuted instantiation: cfl.c:av2_is_interp_needed Unexecuted instantiation: entropymode.c:av2_is_interp_needed Unexecuted instantiation: level.c:av2_is_interp_needed Unexecuted instantiation: mvref_common.c:av2_is_interp_needed Unexecuted instantiation: pred_common.c:av2_is_interp_needed Unexecuted instantiation: reconinter.c:av2_is_interp_needed Unexecuted instantiation: thread_common.c:av2_is_interp_needed Unexecuted instantiation: tip.c:av2_is_interp_needed Unexecuted instantiation: ccso.c:av2_is_interp_needed Unexecuted instantiation: bru.c:av2_is_interp_needed Unexecuted instantiation: obu_qm.c:av2_is_interp_needed Unexecuted instantiation: optflow_refine_sse4.c:av2_is_interp_needed Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_is_interp_needed |
1127 | | |
1128 | 0 | #define MASK_MASTER_SIZE ((MAX_WEDGE_SIZE) << 1) |
1129 | 0 | #define MASK_MASTER_STRIDE (MASK_MASTER_SIZE) |
1130 | | |
1131 | | void av2_init_wedge_masks(); |
1132 | | |
1133 | | static INLINE const uint8_t *av2_get_all_contiguous_soft_mask( |
1134 | | int8_t wedge_index, int8_t wedge_sign, BLOCK_SIZE sb_type, |
1135 | 0 | int boundary_index) { |
1136 | 0 | return av2_wedge_params_lookup[sb_type] |
1137 | 0 | .all_masks[wedge_sign][wedge_index][boundary_index]; |
1138 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: annexF.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: decodeframe.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: decodemv.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: decoder.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: decodetxb.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: detokenize.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: obu_fgm.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: obu.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: obu_ci.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: obu_atlas.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: obu_lcr.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: obu_ops.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: obu_buf.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: alloccommon.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: av2_loopfilter.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: cdef.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: cfl.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: entropymode.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: level.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: mvref_common.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: pred_common.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: reconinter.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: thread_common.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: tip.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: ccso.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: bru.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: obu_qm.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: optflow_refine_sse4.c:av2_get_all_contiguous_soft_mask Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_get_all_contiguous_soft_mask |
1139 | | |
1140 | 0 | static INLINE int8_t get_wedge_boundary_type(BLOCK_SIZE bsize) { |
1141 | 0 | int8_t boundary_type = 1; // smooth mask |
1142 | 0 | if (bsize <= BLOCK_16X16) { |
1143 | 0 | boundary_type = 0; // sharp mask |
1144 | 0 | } |
1145 | 0 | return boundary_type; |
1146 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_wedge_boundary_type Unexecuted instantiation: annexF.c:get_wedge_boundary_type Unexecuted instantiation: decodeframe.c:get_wedge_boundary_type Unexecuted instantiation: decodemv.c:get_wedge_boundary_type Unexecuted instantiation: decoder.c:get_wedge_boundary_type Unexecuted instantiation: decodetxb.c:get_wedge_boundary_type Unexecuted instantiation: detokenize.c:get_wedge_boundary_type Unexecuted instantiation: obu_fgm.c:get_wedge_boundary_type Unexecuted instantiation: obu.c:get_wedge_boundary_type Unexecuted instantiation: obu_ci.c:get_wedge_boundary_type Unexecuted instantiation: obu_atlas.c:get_wedge_boundary_type Unexecuted instantiation: obu_lcr.c:get_wedge_boundary_type Unexecuted instantiation: obu_ops.c:get_wedge_boundary_type Unexecuted instantiation: obu_buf.c:get_wedge_boundary_type Unexecuted instantiation: alloccommon.c:get_wedge_boundary_type Unexecuted instantiation: av2_loopfilter.c:get_wedge_boundary_type Unexecuted instantiation: cdef.c:get_wedge_boundary_type Unexecuted instantiation: cfl.c:get_wedge_boundary_type Unexecuted instantiation: entropymode.c:get_wedge_boundary_type Unexecuted instantiation: level.c:get_wedge_boundary_type Unexecuted instantiation: mvref_common.c:get_wedge_boundary_type Unexecuted instantiation: pred_common.c:get_wedge_boundary_type Unexecuted instantiation: reconinter.c:get_wedge_boundary_type Unexecuted instantiation: thread_common.c:get_wedge_boundary_type Unexecuted instantiation: tip.c:get_wedge_boundary_type Unexecuted instantiation: ccso.c:get_wedge_boundary_type Unexecuted instantiation: bru.c:get_wedge_boundary_type Unexecuted instantiation: obu_qm.c:get_wedge_boundary_type Unexecuted instantiation: optflow_refine_sse4.c:get_wedge_boundary_type Unexecuted instantiation: affine_optflow_refine_avx2.c:get_wedge_boundary_type |
1147 | | |
1148 | | static INLINE const uint8_t *av2_get_contiguous_soft_mask_decision( |
1149 | | int8_t wedge_index, int8_t wedge_sign, int boundary_index, |
1150 | 0 | BLOCK_SIZE sb_type) { |
1151 | 0 | return av2_wedge_params_lookup[sb_type] |
1152 | 0 | .tmvp_mv_decisions[wedge_sign][wedge_index][boundary_index]; |
1153 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: annexF.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: decodeframe.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: decodemv.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: decoder.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: decodetxb.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: detokenize.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: obu_fgm.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: obu.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: obu_ci.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: obu_atlas.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: obu_lcr.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: obu_ops.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: obu_buf.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: alloccommon.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: av2_loopfilter.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: cdef.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: cfl.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: entropymode.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: level.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: mvref_common.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: pred_common.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: reconinter.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: thread_common.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: tip.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: ccso.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: bru.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: obu_qm.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: optflow_refine_sse4.c:av2_get_contiguous_soft_mask_decision Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_get_contiguous_soft_mask_decision |
1154 | | |
1155 | | const uint8_t *av2_get_compound_type_mask( |
1156 | | const INTERINTER_COMPOUND_DATA *const comp_data, BLOCK_SIZE sb_type); |
1157 | | |
1158 | | // Init the masks for compound weighted prediction |
1159 | | void init_cwp_masks(); |
1160 | | // Get the mask for compound weighted prediction |
1161 | | const int8_t *av2_get_cwp_mask(int list_idx, int idx); |
1162 | | |
1163 | | // build interintra_predictors for one plane |
1164 | | void av2_build_interintra_predictor(const AV2_COMMON *cm, MACROBLOCKD *xd, |
1165 | | uint16_t *pred, int stride, |
1166 | | const BUFFER_SET *ctx, int plane, |
1167 | | BLOCK_SIZE bsize); |
1168 | | |
1169 | | void av2_build_intra_predictors_for_interintra(const AV2_COMMON *cm, |
1170 | | MACROBLOCKD *xd, int plane, |
1171 | | const BUFFER_SET *ctx, |
1172 | | uint16_t *dst, int dst_stride); |
1173 | | |
1174 | | void av2_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane, |
1175 | | const uint16_t *inter_pred, int inter_stride, |
1176 | | const uint16_t *intra_pred, int intra_stride); |
1177 | | |
1178 | | int av2_allow_warp(const MB_MODE_INFO *const mbmi, |
1179 | | const WarpTypesAllowed *const warp_types, |
1180 | | const WarpedMotionParams *const gm_params, int ref, |
1181 | | const struct scale_factors *const sf, |
1182 | | WarpedMotionParams *final_warp_params); |
1183 | | |
1184 | | static INLINE int av2_allow_bawp(const AV2_COMMON *const cm, |
1185 | | const MB_MODE_INFO *mbmi, int mi_row, |
1186 | 0 | int mi_col) { |
1187 | 0 | if (mbmi->mode == WARPMV) return 0; |
1188 | 0 | if (mbmi->mode == GLOBALMV) return 0; |
1189 | | // In error resilient mode, whether a frame is scaled may be unknown, and the |
1190 | | // following logic for parsing is not reliable, so we disable BAWP. |
1191 | 0 | if (frame_is_sframe(cm)) return 0; |
1192 | | |
1193 | 0 | if ((get_ref_frame_buf(cm, mbmi->ref_frame[0]) != NULL && |
1194 | 0 | get_ref_frame_buf(cm, mbmi->ref_frame[0])->is_restricted) || |
1195 | 0 | (get_ref_frame_buf(cm, mbmi->ref_frame[1]) != NULL && |
1196 | 0 | get_ref_frame_buf(cm, mbmi->ref_frame[1])->is_restricted)) |
1197 | 0 | return 0; |
1198 | | |
1199 | | // If one of the reference frame is different resolution than the current |
1200 | | // frame, bawp is disabled. |
1201 | 0 | const struct scale_factors *const sf0 = |
1202 | 0 | get_ref_scale_factors_const(cm, mbmi->ref_frame[0]); |
1203 | 0 | const struct scale_factors *const sf1 = |
1204 | 0 | get_ref_scale_factors_const(cm, mbmi->ref_frame[1]); |
1205 | 0 | if ((sf0 != NULL && av2_is_scaled(sf0)) || |
1206 | 0 | (sf1 != NULL && av2_is_scaled(sf1))) { |
1207 | 0 | return 0; |
1208 | 0 | } |
1209 | 0 | if (mbmi->mode == WARP_NEWMV) return 0; |
1210 | 0 | if (is_tip_ref_frame(mbmi->ref_frame[0])) return 0; |
1211 | 0 | if (is_motion_variation_allowed_bsize(mbmi->sb_type[PLANE_TYPE_Y], mi_row, |
1212 | 0 | mi_col) && |
1213 | 0 | is_inter_singleref_mode(mbmi->mode)) |
1214 | 0 | return 1; |
1215 | 0 | else |
1216 | 0 | return 0; |
1217 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_allow_bawp Unexecuted instantiation: annexF.c:av2_allow_bawp Unexecuted instantiation: decodeframe.c:av2_allow_bawp Unexecuted instantiation: decodemv.c:av2_allow_bawp Unexecuted instantiation: decoder.c:av2_allow_bawp Unexecuted instantiation: decodetxb.c:av2_allow_bawp Unexecuted instantiation: detokenize.c:av2_allow_bawp Unexecuted instantiation: obu_fgm.c:av2_allow_bawp Unexecuted instantiation: obu.c:av2_allow_bawp Unexecuted instantiation: obu_ci.c:av2_allow_bawp Unexecuted instantiation: obu_atlas.c:av2_allow_bawp Unexecuted instantiation: obu_lcr.c:av2_allow_bawp Unexecuted instantiation: obu_ops.c:av2_allow_bawp Unexecuted instantiation: obu_buf.c:av2_allow_bawp Unexecuted instantiation: alloccommon.c:av2_allow_bawp Unexecuted instantiation: av2_loopfilter.c:av2_allow_bawp Unexecuted instantiation: cdef.c:av2_allow_bawp Unexecuted instantiation: cfl.c:av2_allow_bawp Unexecuted instantiation: entropymode.c:av2_allow_bawp Unexecuted instantiation: level.c:av2_allow_bawp Unexecuted instantiation: mvref_common.c:av2_allow_bawp Unexecuted instantiation: pred_common.c:av2_allow_bawp Unexecuted instantiation: reconinter.c:av2_allow_bawp Unexecuted instantiation: thread_common.c:av2_allow_bawp Unexecuted instantiation: tip.c:av2_allow_bawp Unexecuted instantiation: ccso.c:av2_allow_bawp Unexecuted instantiation: bru.c:av2_allow_bawp Unexecuted instantiation: obu_qm.c:av2_allow_bawp Unexecuted instantiation: optflow_refine_sse4.c:av2_allow_bawp Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_allow_bawp |
1218 | | |
1219 | 0 | static INLINE int av2_allow_explicit_bawp(const MB_MODE_INFO *mbmi) { |
1220 | 0 | return mbmi->mode == NEWMV || mbmi->mode == NEARMV; |
1221 | 0 | } Unexecuted instantiation: av2_dx_iface.c:av2_allow_explicit_bawp Unexecuted instantiation: annexF.c:av2_allow_explicit_bawp Unexecuted instantiation: decodeframe.c:av2_allow_explicit_bawp Unexecuted instantiation: decodemv.c:av2_allow_explicit_bawp Unexecuted instantiation: decoder.c:av2_allow_explicit_bawp Unexecuted instantiation: decodetxb.c:av2_allow_explicit_bawp Unexecuted instantiation: detokenize.c:av2_allow_explicit_bawp Unexecuted instantiation: obu_fgm.c:av2_allow_explicit_bawp Unexecuted instantiation: obu.c:av2_allow_explicit_bawp Unexecuted instantiation: obu_ci.c:av2_allow_explicit_bawp Unexecuted instantiation: obu_atlas.c:av2_allow_explicit_bawp Unexecuted instantiation: obu_lcr.c:av2_allow_explicit_bawp Unexecuted instantiation: obu_ops.c:av2_allow_explicit_bawp Unexecuted instantiation: obu_buf.c:av2_allow_explicit_bawp Unexecuted instantiation: alloccommon.c:av2_allow_explicit_bawp Unexecuted instantiation: av2_loopfilter.c:av2_allow_explicit_bawp Unexecuted instantiation: cdef.c:av2_allow_explicit_bawp Unexecuted instantiation: cfl.c:av2_allow_explicit_bawp Unexecuted instantiation: entropymode.c:av2_allow_explicit_bawp Unexecuted instantiation: level.c:av2_allow_explicit_bawp Unexecuted instantiation: mvref_common.c:av2_allow_explicit_bawp Unexecuted instantiation: pred_common.c:av2_allow_explicit_bawp Unexecuted instantiation: reconinter.c:av2_allow_explicit_bawp Unexecuted instantiation: thread_common.c:av2_allow_explicit_bawp Unexecuted instantiation: tip.c:av2_allow_explicit_bawp Unexecuted instantiation: ccso.c:av2_allow_explicit_bawp Unexecuted instantiation: bru.c:av2_allow_explicit_bawp Unexecuted instantiation: obu_qm.c:av2_allow_explicit_bawp Unexecuted instantiation: optflow_refine_sse4.c:av2_allow_explicit_bawp Unexecuted instantiation: affine_optflow_refine_avx2.c:av2_allow_explicit_bawp |
1222 | | |
1223 | | // derive the context of the mpp_flag |
1224 | | int av2_get_mpp_flag_context(const AV2_COMMON *cm, const MACROBLOCKD *xd); |
1225 | | |
1226 | | // derive the context of the precision signaling |
1227 | | int av2_get_pb_mv_precision_down_context(const AV2_COMMON *cm, |
1228 | | const MACROBLOCKD *xd); |
1229 | | |
1230 | | // set the precision of a block to the precision |
1231 | | void set_mv_precision(MB_MODE_INFO *mbmi, MvSubpelPrecision precision); |
1232 | | void set_amvd_mv_precision(MB_MODE_INFO *mbmi, MvSubpelPrecision precision); |
1233 | | |
1234 | | // Function to check if precision need to be signaled or not |
1235 | | int is_intraBC_bv_precision_active(const AV2_COMMON *const cm, |
1236 | | const int intrabc_mode); |
1237 | | // Set max value as default precision |
1238 | | void set_default_intraBC_bv_precision(const AV2_COMMON *const cm, |
1239 | | MB_MODE_INFO *mbmi); |
1240 | | |
1241 | | // set the most probable mv precision of the block |
1242 | | // Currently, the most probable MV precision is same as the maximum precision of |
1243 | | // the block. |
1244 | | void set_most_probable_mv_precision(const AV2_COMMON *const cm, |
1245 | | MB_MODE_INFO *mbmi, const BLOCK_SIZE bsize); |
1246 | | |
1247 | | // Set the default value fo the precision set. Currently the value is always 0. |
1248 | | void set_default_precision_set(const AV2_COMMON *const cm, MB_MODE_INFO *mbmi, |
1249 | | const BLOCK_SIZE bsize); |
1250 | | |
1251 | | // Set the precision set of the block. Currently, the value is 0. |
1252 | | void set_precision_set(const AV2_COMMON *const cm, MACROBLOCKD *const xd, |
1253 | | MB_MODE_INFO *mbmi, const BLOCK_SIZE bsize, |
1254 | | int *ref_mv_idx); |
1255 | | // Get the index of the precision |
1256 | | // this index is signalled when precision is not same as the most probable |
1257 | | // precision |
1258 | | int av2_get_pb_mv_precision_index(const MB_MODE_INFO *mbmi); |
1259 | | |
1260 | | // get the actual precision value from the signalled index |
1261 | | MvSubpelPrecision av2_get_precision_from_index(MB_MODE_INFO *mbmi, |
1262 | | int precision_idx_coded_value); |
1263 | | |
1264 | | // Set the maximum precision to the default value |
1265 | | void set_default_max_mv_precision(MB_MODE_INFO *mbmi, |
1266 | | MvSubpelPrecision precision); |
1267 | | |
1268 | | // get the maximum allowed precision value of the block |
1269 | | MvSubpelPrecision av2_get_mbmi_max_mv_precision(const AV2_COMMON *const cm, |
1270 | | const SB_INFO *sbi, |
1271 | | const MB_MODE_INFO *mbmi); |
1272 | | |
1273 | | // check if pb_mv_precision is allowed or not |
1274 | | int is_pb_mv_precision_active(const AV2_COMMON *const cm, |
1275 | | const MB_MODE_INFO *mbmi, const BLOCK_SIZE bsize); |
1276 | | |
1277 | | // check if the WARPMV mode is allwed for a given blocksize |
1278 | 0 | static INLINE int is_warpmv_allowed_bsize(BLOCK_SIZE bsize) { |
1279 | 0 | assert(bsize < BLOCK_SIZES_ALL); |
1280 | 0 | return AVMMIN(block_size_wide[bsize], block_size_high[bsize]) >= 8; |
1281 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_warpmv_allowed_bsize Unexecuted instantiation: annexF.c:is_warpmv_allowed_bsize Unexecuted instantiation: decodeframe.c:is_warpmv_allowed_bsize Unexecuted instantiation: decodemv.c:is_warpmv_allowed_bsize Unexecuted instantiation: decoder.c:is_warpmv_allowed_bsize Unexecuted instantiation: decodetxb.c:is_warpmv_allowed_bsize Unexecuted instantiation: detokenize.c:is_warpmv_allowed_bsize Unexecuted instantiation: obu_fgm.c:is_warpmv_allowed_bsize Unexecuted instantiation: obu.c:is_warpmv_allowed_bsize Unexecuted instantiation: obu_ci.c:is_warpmv_allowed_bsize Unexecuted instantiation: obu_atlas.c:is_warpmv_allowed_bsize Unexecuted instantiation: obu_lcr.c:is_warpmv_allowed_bsize Unexecuted instantiation: obu_ops.c:is_warpmv_allowed_bsize Unexecuted instantiation: obu_buf.c:is_warpmv_allowed_bsize Unexecuted instantiation: alloccommon.c:is_warpmv_allowed_bsize Unexecuted instantiation: av2_loopfilter.c:is_warpmv_allowed_bsize Unexecuted instantiation: cdef.c:is_warpmv_allowed_bsize Unexecuted instantiation: cfl.c:is_warpmv_allowed_bsize Unexecuted instantiation: entropymode.c:is_warpmv_allowed_bsize Unexecuted instantiation: level.c:is_warpmv_allowed_bsize Unexecuted instantiation: mvref_common.c:is_warpmv_allowed_bsize Unexecuted instantiation: pred_common.c:is_warpmv_allowed_bsize Unexecuted instantiation: reconinter.c:is_warpmv_allowed_bsize Unexecuted instantiation: thread_common.c:is_warpmv_allowed_bsize Unexecuted instantiation: tip.c:is_warpmv_allowed_bsize Unexecuted instantiation: ccso.c:is_warpmv_allowed_bsize Unexecuted instantiation: bru.c:is_warpmv_allowed_bsize Unexecuted instantiation: obu_qm.c:is_warpmv_allowed_bsize Unexecuted instantiation: optflow_refine_sse4.c:is_warpmv_allowed_bsize Unexecuted instantiation: affine_optflow_refine_avx2.c:is_warpmv_allowed_bsize |
1282 | | |
1283 | | // check if WARPMV mode is allowed |
1284 | | static INLINE int is_warpmv_mode_allowed(const AV2_COMMON *const cm, |
1285 | | const MB_MODE_INFO *mbmi, |
1286 | 0 | BLOCK_SIZE bsize) { |
1287 | 0 | int frame_warp_delta_allowed = |
1288 | 0 | (cm->features.enabled_motion_modes & (1 << WARP_DELTA)) != 0; |
1289 | |
|
1290 | 0 | if (has_second_ref(mbmi) || !frame_warp_delta_allowed || |
1291 | 0 | is_tip_ref_frame(mbmi->ref_frame[0]) || !cm->features.allow_warpmv_mode) |
1292 | 0 | return 0; |
1293 | | |
1294 | 0 | return frame_warp_delta_allowed && is_warpmv_allowed_bsize(bsize); |
1295 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_warpmv_mode_allowed Unexecuted instantiation: annexF.c:is_warpmv_mode_allowed Unexecuted instantiation: decodeframe.c:is_warpmv_mode_allowed Unexecuted instantiation: decodemv.c:is_warpmv_mode_allowed Unexecuted instantiation: decoder.c:is_warpmv_mode_allowed Unexecuted instantiation: decodetxb.c:is_warpmv_mode_allowed Unexecuted instantiation: detokenize.c:is_warpmv_mode_allowed Unexecuted instantiation: obu_fgm.c:is_warpmv_mode_allowed Unexecuted instantiation: obu.c:is_warpmv_mode_allowed Unexecuted instantiation: obu_ci.c:is_warpmv_mode_allowed Unexecuted instantiation: obu_atlas.c:is_warpmv_mode_allowed Unexecuted instantiation: obu_lcr.c:is_warpmv_mode_allowed Unexecuted instantiation: obu_ops.c:is_warpmv_mode_allowed Unexecuted instantiation: obu_buf.c:is_warpmv_mode_allowed Unexecuted instantiation: alloccommon.c:is_warpmv_mode_allowed Unexecuted instantiation: av2_loopfilter.c:is_warpmv_mode_allowed Unexecuted instantiation: cdef.c:is_warpmv_mode_allowed Unexecuted instantiation: cfl.c:is_warpmv_mode_allowed Unexecuted instantiation: entropymode.c:is_warpmv_mode_allowed Unexecuted instantiation: level.c:is_warpmv_mode_allowed Unexecuted instantiation: mvref_common.c:is_warpmv_mode_allowed Unexecuted instantiation: pred_common.c:is_warpmv_mode_allowed Unexecuted instantiation: reconinter.c:is_warpmv_mode_allowed Unexecuted instantiation: thread_common.c:is_warpmv_mode_allowed Unexecuted instantiation: tip.c:is_warpmv_mode_allowed Unexecuted instantiation: ccso.c:is_warpmv_mode_allowed Unexecuted instantiation: bru.c:is_warpmv_mode_allowed Unexecuted instantiation: obu_qm.c:is_warpmv_mode_allowed Unexecuted instantiation: optflow_refine_sse4.c:is_warpmv_mode_allowed Unexecuted instantiation: affine_optflow_refine_avx2.c:is_warpmv_mode_allowed |
1296 | | |
1297 | | // check if warpmv with mvd is allowed or not |
1298 | | static INLINE int allow_warpmv_with_mvd_coding(const AV2_COMMON *const cm, |
1299 | 0 | const MB_MODE_INFO *mbmi) { |
1300 | 0 | if (!cm->features.allow_warpmv_mode) return 0; |
1301 | 0 | return (mbmi->mode == WARPMV && mbmi->warp_ref_idx < 2); |
1302 | 0 | } Unexecuted instantiation: av2_dx_iface.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: annexF.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: decodeframe.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: decodemv.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: decoder.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: decodetxb.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: detokenize.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: obu_fgm.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: obu.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: obu_ci.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: obu_atlas.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: obu_lcr.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: obu_ops.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: obu_buf.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: alloccommon.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: av2_loopfilter.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: cdef.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: cfl.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: entropymode.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: level.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: mvref_common.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: pred_common.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: reconinter.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: thread_common.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: tip.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: ccso.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: bru.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: obu_qm.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: optflow_refine_sse4.c:allow_warpmv_with_mvd_coding Unexecuted instantiation: affine_optflow_refine_avx2.c:allow_warpmv_with_mvd_coding |
1303 | | |
1304 | | // Return the threshold value for number of non-zero componenets for sign |
1305 | | // derivation. |
1306 | 0 | static INLINE int get_derive_sign_nzero_th(const MB_MODE_INFO *mbmi) { |
1307 | 0 | return (mbmi->mode == NEW_NEWMV || mbmi->mode == NEW_NEWMV_OPTFLOW) ? 4 : 1; |
1308 | 0 | } Unexecuted instantiation: av2_dx_iface.c:get_derive_sign_nzero_th Unexecuted instantiation: annexF.c:get_derive_sign_nzero_th Unexecuted instantiation: decodeframe.c:get_derive_sign_nzero_th Unexecuted instantiation: decodemv.c:get_derive_sign_nzero_th Unexecuted instantiation: decoder.c:get_derive_sign_nzero_th Unexecuted instantiation: decodetxb.c:get_derive_sign_nzero_th Unexecuted instantiation: detokenize.c:get_derive_sign_nzero_th Unexecuted instantiation: obu_fgm.c:get_derive_sign_nzero_th Unexecuted instantiation: obu.c:get_derive_sign_nzero_th Unexecuted instantiation: obu_ci.c:get_derive_sign_nzero_th Unexecuted instantiation: obu_atlas.c:get_derive_sign_nzero_th Unexecuted instantiation: obu_lcr.c:get_derive_sign_nzero_th Unexecuted instantiation: obu_ops.c:get_derive_sign_nzero_th Unexecuted instantiation: obu_buf.c:get_derive_sign_nzero_th Unexecuted instantiation: alloccommon.c:get_derive_sign_nzero_th Unexecuted instantiation: av2_loopfilter.c:get_derive_sign_nzero_th Unexecuted instantiation: cdef.c:get_derive_sign_nzero_th Unexecuted instantiation: cfl.c:get_derive_sign_nzero_th Unexecuted instantiation: entropymode.c:get_derive_sign_nzero_th Unexecuted instantiation: level.c:get_derive_sign_nzero_th Unexecuted instantiation: mvref_common.c:get_derive_sign_nzero_th Unexecuted instantiation: pred_common.c:get_derive_sign_nzero_th Unexecuted instantiation: reconinter.c:get_derive_sign_nzero_th Unexecuted instantiation: thread_common.c:get_derive_sign_nzero_th Unexecuted instantiation: tip.c:get_derive_sign_nzero_th Unexecuted instantiation: ccso.c:get_derive_sign_nzero_th Unexecuted instantiation: bru.c:get_derive_sign_nzero_th Unexecuted instantiation: obu_qm.c:get_derive_sign_nzero_th Unexecuted instantiation: optflow_refine_sse4.c:get_derive_sign_nzero_th Unexecuted instantiation: affine_optflow_refine_avx2.c:get_derive_sign_nzero_th |
1309 | | // Check if the sign derivation method is allowed or not for current block |
1310 | | static INLINE int is_mvd_sign_derive_allowed(const AV2_COMMON *const cm, |
1311 | | const MACROBLOCKD *const xd, |
1312 | 0 | const MB_MODE_INFO *mbmi) { |
1313 | 0 | if (!cm->seq_params.enable_mvd_sign_derive || |
1314 | 0 | mbmi->motion_mode != SIMPLE_TRANSLATION || |
1315 | 0 | is_intrabc_block(mbmi, xd->tree_type) || |
1316 | 0 | enable_adaptive_mvd_resolution(cm, mbmi) || mbmi->skip_mode || |
1317 | 0 | cm->features.allow_screen_content_tools || |
1318 | 0 | cm->features.fr_mv_precision > MV_PRECISION_QTR_PEL || |
1319 | 0 | mbmi->pb_mv_precision >= MV_PRECISION_QTR_PEL) |
1320 | 0 | return 0; |
1321 | | |
1322 | 0 | if (has_second_ref(mbmi)) { |
1323 | 0 | int drl_idx = mbmi->ref_mv_idx[0]; |
1324 | 0 | if (has_second_drl(mbmi)) { |
1325 | 0 | drl_idx = AVMMAX(mbmi->ref_mv_idx[0], mbmi->ref_mv_idx[1]); |
1326 | 0 | } |
1327 | 0 | if (drl_idx > 0) return 0; |
1328 | 0 | } |
1329 | 0 | return (mbmi->mode == NEWMV || mbmi->mode == WARP_NEWMV || |
1330 | 0 | mbmi->mode == JOINT_NEWMV || mbmi->mode == JOINT_NEWMV_OPTFLOW || |
1331 | 0 | mbmi->mode == NEW_NEWMV || mbmi->mode == NEW_NEWMV_OPTFLOW); |
1332 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_mvd_sign_derive_allowed Unexecuted instantiation: annexF.c:is_mvd_sign_derive_allowed Unexecuted instantiation: decodeframe.c:is_mvd_sign_derive_allowed Unexecuted instantiation: decodemv.c:is_mvd_sign_derive_allowed Unexecuted instantiation: decoder.c:is_mvd_sign_derive_allowed Unexecuted instantiation: decodetxb.c:is_mvd_sign_derive_allowed Unexecuted instantiation: detokenize.c:is_mvd_sign_derive_allowed Unexecuted instantiation: obu_fgm.c:is_mvd_sign_derive_allowed Unexecuted instantiation: obu.c:is_mvd_sign_derive_allowed Unexecuted instantiation: obu_ci.c:is_mvd_sign_derive_allowed Unexecuted instantiation: obu_atlas.c:is_mvd_sign_derive_allowed Unexecuted instantiation: obu_lcr.c:is_mvd_sign_derive_allowed Unexecuted instantiation: obu_ops.c:is_mvd_sign_derive_allowed Unexecuted instantiation: obu_buf.c:is_mvd_sign_derive_allowed Unexecuted instantiation: alloccommon.c:is_mvd_sign_derive_allowed Unexecuted instantiation: av2_loopfilter.c:is_mvd_sign_derive_allowed Unexecuted instantiation: cdef.c:is_mvd_sign_derive_allowed Unexecuted instantiation: cfl.c:is_mvd_sign_derive_allowed Unexecuted instantiation: entropymode.c:is_mvd_sign_derive_allowed Unexecuted instantiation: level.c:is_mvd_sign_derive_allowed Unexecuted instantiation: mvref_common.c:is_mvd_sign_derive_allowed Unexecuted instantiation: pred_common.c:is_mvd_sign_derive_allowed Unexecuted instantiation: reconinter.c:is_mvd_sign_derive_allowed Unexecuted instantiation: thread_common.c:is_mvd_sign_derive_allowed Unexecuted instantiation: tip.c:is_mvd_sign_derive_allowed Unexecuted instantiation: ccso.c:is_mvd_sign_derive_allowed Unexecuted instantiation: bru.c:is_mvd_sign_derive_allowed Unexecuted instantiation: obu_qm.c:is_mvd_sign_derive_allowed Unexecuted instantiation: optflow_refine_sse4.c:is_mvd_sign_derive_allowed Unexecuted instantiation: affine_optflow_refine_avx2.c:is_mvd_sign_derive_allowed |
1333 | | |
1334 | | bool av2_build_morph_pred(const AV2_COMMON *const cm, MACROBLOCKD *const xd, |
1335 | | const BLOCK_SIZE bsize, const int mi_row, |
1336 | | const int mi_col); |
1337 | | |
1338 | | static AVM_INLINE bool is_subblock_outside(int x, int y, int mi_cols, |
1339 | 0 | int mi_rows, int build_for_decode) { |
1340 | 0 | if (!build_for_decode) return 0; |
1341 | 0 | return (x >= mi_cols * MI_SIZE || y >= mi_rows * MI_SIZE); |
1342 | 0 | } Unexecuted instantiation: av2_dx_iface.c:is_subblock_outside Unexecuted instantiation: annexF.c:is_subblock_outside Unexecuted instantiation: decodeframe.c:is_subblock_outside Unexecuted instantiation: decodemv.c:is_subblock_outside Unexecuted instantiation: decoder.c:is_subblock_outside Unexecuted instantiation: decodetxb.c:is_subblock_outside Unexecuted instantiation: detokenize.c:is_subblock_outside Unexecuted instantiation: obu_fgm.c:is_subblock_outside Unexecuted instantiation: obu.c:is_subblock_outside Unexecuted instantiation: obu_ci.c:is_subblock_outside Unexecuted instantiation: obu_atlas.c:is_subblock_outside Unexecuted instantiation: obu_lcr.c:is_subblock_outside Unexecuted instantiation: obu_ops.c:is_subblock_outside Unexecuted instantiation: obu_buf.c:is_subblock_outside Unexecuted instantiation: alloccommon.c:is_subblock_outside Unexecuted instantiation: av2_loopfilter.c:is_subblock_outside Unexecuted instantiation: cdef.c:is_subblock_outside Unexecuted instantiation: cfl.c:is_subblock_outside Unexecuted instantiation: entropymode.c:is_subblock_outside Unexecuted instantiation: level.c:is_subblock_outside Unexecuted instantiation: mvref_common.c:is_subblock_outside Unexecuted instantiation: pred_common.c:is_subblock_outside Unexecuted instantiation: reconinter.c:is_subblock_outside Unexecuted instantiation: thread_common.c:is_subblock_outside Unexecuted instantiation: tip.c:is_subblock_outside Unexecuted instantiation: ccso.c:is_subblock_outside Unexecuted instantiation: bru.c:is_subblock_outside Unexecuted instantiation: obu_qm.c:is_subblock_outside Unexecuted instantiation: optflow_refine_sse4.c:is_subblock_outside Unexecuted instantiation: affine_optflow_refine_avx2.c:is_subblock_outside |
1343 | | |
1344 | | #ifdef __cplusplus |
1345 | | } // extern "C" |
1346 | | #endif |
1347 | | |
1348 | | #endif // AVM_AV2_COMMON_RECONINTER_H_ |