/src/aom/av1/common/reconinter.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2016, Alliance for Open Media. All rights reserved. |
3 | | * |
4 | | * This source code is subject to the terms of the BSD 2 Clause License and |
5 | | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
6 | | * was not distributed with this source code in the LICENSE file, you can |
7 | | * obtain it at www.aomedia.org/license/software. If the Alliance for Open |
8 | | * Media Patent License 1.0 was not distributed with this source code in the |
9 | | * PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
10 | | */ |
11 | | |
12 | | #ifndef AOM_AV1_COMMON_RECONINTER_H_ |
13 | | #define AOM_AV1_COMMON_RECONINTER_H_ |
14 | | |
15 | | #include "av1/common/av1_common_int.h" |
16 | | #include "av1/common/convolve.h" |
17 | | #include "av1/common/filter.h" |
18 | | #include "av1/common/warped_motion.h" |
19 | | #include "aom/aom_integer.h" |
20 | | |
21 | | // Work out how many pixels off the edge of a reference frame we're allowed |
22 | | // to go when forming an inter prediction. |
23 | | // The outermost row/col of each referernce frame is extended by |
24 | | // (AOM_BORDER_IN_PIXELS >> subsampling) pixels, but we need to keep |
25 | | // at least AOM_INTERP_EXTEND pixels within that to account for filtering. |
26 | | // |
27 | | // We have to break this up into two macros to keep both clang-format and |
28 | | // tools/lint-hunks.py happy. |
29 | | #define AOM_LEFT_TOP_MARGIN_PX(subsampling) \ |
30 | 29.6M | ((AOM_BORDER_IN_PIXELS >> subsampling) - AOM_INTERP_EXTEND) |
31 | | #define AOM_LEFT_TOP_MARGIN_SCALED(subsampling) \ |
32 | 29.6M | (AOM_LEFT_TOP_MARGIN_PX(subsampling) << SCALE_SUBPEL_BITS) |
33 | | |
34 | | #ifdef __cplusplus |
35 | | extern "C" { |
36 | | #endif |
37 | | |
38 | | #define MAX_WEDGE_TYPES 16 |
39 | | |
40 | | #define MAX_WEDGE_SIZE_LOG2 5 // 32x32 |
41 | | #define MAX_WEDGE_SIZE (1 << MAX_WEDGE_SIZE_LOG2) |
42 | | #define MAX_WEDGE_SQUARE (MAX_WEDGE_SIZE * MAX_WEDGE_SIZE) |
43 | | |
44 | | #define WEDGE_WEIGHT_BITS 6 |
45 | | |
46 | | #define WEDGE_NONE -1 |
47 | | |
48 | | // Angles are with respect to horizontal anti-clockwise |
49 | | enum { |
50 | | WEDGE_HORIZONTAL = 0, |
51 | | WEDGE_VERTICAL = 1, |
52 | | WEDGE_OBLIQUE27 = 2, |
53 | | WEDGE_OBLIQUE63 = 3, |
54 | | WEDGE_OBLIQUE117 = 4, |
55 | | WEDGE_OBLIQUE153 = 5, |
56 | | WEDGE_DIRECTIONS |
57 | | } UENUM1BYTE(WedgeDirectionType); |
58 | | |
59 | | // 3-tuple: {direction, x_offset, y_offset} |
60 | | typedef struct { |
61 | | WedgeDirectionType direction; |
62 | | int x_offset; |
63 | | int y_offset; |
64 | | } wedge_code_type; |
65 | | |
66 | | // `wedge_masks` is a table of byte offsets into `wedge_mask_buf` (see |
67 | | // av1/common/wedge_masks_data.inc) so the lookup table can live in `.rdata` |
68 | | // without any load-time relocations. The largest offset emitted by the |
69 | | // generator currently exceeds 65 KiB, so `uint16_t` is not wide enough; |
70 | | // use `uint32_t`. |
71 | | typedef uint32_t wedge_masks_type[MAX_WEDGE_TYPES]; |
72 | | |
73 | | typedef struct { |
74 | | int wedge_types; |
75 | | const wedge_code_type *codebook; |
76 | | const uint8_t *signflip; |
77 | | const wedge_masks_type *masks; |
78 | | } wedge_params_type; |
79 | | |
80 | | extern const wedge_params_type av1_wedge_params_lookup[BLOCK_SIZES_ALL]; |
81 | | |
82 | | typedef struct SubpelParams { |
83 | | int xs; |
84 | | int ys; |
85 | | int subpel_x; |
86 | | int subpel_y; |
87 | | int pos_x; |
88 | | int pos_y; |
89 | | } SubpelParams; |
90 | | |
91 | | struct build_prediction_ctxt { |
92 | | const AV1_COMMON *cm; |
93 | | uint8_t **tmp_buf; |
94 | | int *tmp_width; |
95 | | int *tmp_height; |
96 | | int *tmp_stride; |
97 | | int mb_to_far_edge; |
98 | | void *dcb; // Decoder-only coding block. |
99 | | }; |
100 | | |
101 | | typedef enum InterPredMode { |
102 | | TRANSLATION_PRED, |
103 | | WARP_PRED, |
104 | | } InterPredMode; |
105 | | |
106 | | typedef enum InterCompMode { |
107 | | UNIFORM_SINGLE, |
108 | | UNIFORM_COMP, |
109 | | MASK_COMP, |
110 | | } InterCompMode; |
111 | | |
112 | | typedef struct InterPredParams { |
113 | | InterPredMode mode; |
114 | | InterCompMode comp_mode; |
115 | | WarpedMotionParams warp_params; |
116 | | ConvolveParams conv_params; |
117 | | const InterpFilterParams *interp_filter_params[2]; |
118 | | int block_width; |
119 | | int block_height; |
120 | | int pix_row; |
121 | | int pix_col; |
122 | | struct buf_2d ref_frame_buf; |
123 | | int subsampling_x; |
124 | | int subsampling_y; |
125 | | const struct scale_factors *scale_factors; |
126 | | int bit_depth; |
127 | | int use_hbd_buf; |
128 | | INTERINTER_COMPOUND_DATA mask_comp; |
129 | | BLOCK_SIZE sb_type; |
130 | | int is_intrabc; |
131 | | int top; |
132 | | int left; |
133 | | } InterPredParams; |
134 | | |
135 | | // Initialize sub-pel params required for inter prediction. |
136 | | static inline void init_subpel_params(const MV *const src_mv, |
137 | | InterPredParams *const inter_pred_params, |
138 | | SubpelParams *subpel_params, int width, |
139 | 0 | int height) { |
140 | 0 | const struct scale_factors *sf = inter_pred_params->scale_factors; |
141 | 0 | int ssx = inter_pred_params->subsampling_x; |
142 | 0 | int ssy = inter_pred_params->subsampling_y; |
143 | 0 | int orig_pos_y = inter_pred_params->pix_row << SUBPEL_BITS; |
144 | 0 | orig_pos_y += src_mv->row * (1 << (1 - ssy)); |
145 | 0 | int orig_pos_x = inter_pred_params->pix_col << SUBPEL_BITS; |
146 | 0 | orig_pos_x += src_mv->col * (1 << (1 - ssx)); |
147 | 0 | const int is_scaled = av1_is_scaled(sf); |
148 | 0 | int pos_x, pos_y; |
149 | 0 | if (LIKELY(!is_scaled)) { |
150 | 0 | pos_y = av1_unscaled_value(orig_pos_y, sf); |
151 | 0 | pos_x = av1_unscaled_value(orig_pos_x, sf); |
152 | 0 | } else { |
153 | 0 | pos_y = av1_scaled_y(orig_pos_y, sf); |
154 | 0 | pos_x = av1_scaled_x(orig_pos_x, sf); |
155 | 0 | } |
156 | 0 |
|
157 | 0 | pos_x += SCALE_EXTRA_OFF; |
158 | 0 | pos_y += SCALE_EXTRA_OFF; |
159 | 0 |
|
160 | 0 | const int bottom = (height + AOM_INTERP_EXTEND) << SCALE_SUBPEL_BITS; |
161 | 0 | const int right = (width + AOM_INTERP_EXTEND) << SCALE_SUBPEL_BITS; |
162 | 0 | pos_y = clamp(pos_y, inter_pred_params->top, bottom); |
163 | 0 | pos_x = clamp(pos_x, inter_pred_params->left, right); |
164 | 0 |
|
165 | 0 | subpel_params->pos_x = pos_x; |
166 | 0 | subpel_params->pos_y = pos_y; |
167 | 0 | subpel_params->subpel_x = pos_x & SCALE_SUBPEL_MASK; |
168 | 0 | subpel_params->subpel_y = pos_y & SCALE_SUBPEL_MASK; |
169 | 0 | subpel_params->xs = sf->x_step_q4; |
170 | 0 | subpel_params->ys = sf->y_step_q4; |
171 | 0 | } Unexecuted instantiation: decodeframe.c:init_subpel_params Unexecuted instantiation: decodemv.c:init_subpel_params Unexecuted instantiation: decoder.c:init_subpel_params Unexecuted instantiation: av1_loopfilter.c:init_subpel_params Unexecuted instantiation: cdef.c:init_subpel_params Unexecuted instantiation: entropymode.c:init_subpel_params Unexecuted instantiation: pred_common.c:init_subpel_params Unexecuted instantiation: reconinter.c:init_subpel_params Unexecuted instantiation: thread_common.c:init_subpel_params |
172 | | |
173 | | // Initialize interp filter required for inter prediction. |
174 | | static inline void init_interp_filter_params( |
175 | | const InterpFilterParams *interp_filter_params[2], |
176 | | const InterpFilters *filter, int block_width, int block_height, |
177 | 13.6M | int is_intrabc) { |
178 | 13.6M | if (UNLIKELY(is_intrabc)) { |
179 | 93.4k | interp_filter_params[0] = &av1_intrabc_filter_params; |
180 | 93.4k | interp_filter_params[1] = &av1_intrabc_filter_params; |
181 | 13.5M | } else { |
182 | 13.5M | interp_filter_params[0] = av1_get_interp_filter_params_with_block_size( |
183 | 13.5M | (InterpFilter)filter->x_filter, block_width); |
184 | 13.5M | interp_filter_params[1] = av1_get_interp_filter_params_with_block_size( |
185 | 13.5M | (InterpFilter)filter->y_filter, block_height); |
186 | 13.5M | } |
187 | 13.6M | } decodeframe.c:init_interp_filter_params Line | Count | Source | 177 | 13.6M | int is_intrabc) { | 178 | 13.6M | if (UNLIKELY(is_intrabc)) { | 179 | 93.4k | interp_filter_params[0] = &av1_intrabc_filter_params; | 180 | 93.4k | interp_filter_params[1] = &av1_intrabc_filter_params; | 181 | 13.5M | } else { | 182 | 13.5M | interp_filter_params[0] = av1_get_interp_filter_params_with_block_size( | 183 | 13.5M | (InterpFilter)filter->x_filter, block_width); | 184 | 13.5M | interp_filter_params[1] = av1_get_interp_filter_params_with_block_size( | 185 | 13.5M | (InterpFilter)filter->y_filter, block_height); | 186 | 13.5M | } | 187 | 13.6M | } |
Unexecuted instantiation: decodemv.c:init_interp_filter_params Unexecuted instantiation: decoder.c:init_interp_filter_params Unexecuted instantiation: av1_loopfilter.c:init_interp_filter_params Unexecuted instantiation: cdef.c:init_interp_filter_params Unexecuted instantiation: entropymode.c:init_interp_filter_params Unexecuted instantiation: pred_common.c:init_interp_filter_params Unexecuted instantiation: reconinter.c:init_interp_filter_params Unexecuted instantiation: thread_common.c:init_interp_filter_params |
188 | | |
189 | | // Initialize parameters required for inter prediction at mode level. |
190 | | static inline void init_inter_mode_params( |
191 | | const MV *const src_mv, InterPredParams *const inter_pred_params, |
192 | | SubpelParams *subpel_params, const struct scale_factors *sf, int width, |
193 | 0 | int height) { |
194 | 0 | inter_pred_params->scale_factors = sf; |
195 | 0 | init_subpel_params(src_mv, inter_pred_params, subpel_params, width, height); |
196 | 0 | } Unexecuted instantiation: decodeframe.c:init_inter_mode_params Unexecuted instantiation: decodemv.c:init_inter_mode_params Unexecuted instantiation: decoder.c:init_inter_mode_params Unexecuted instantiation: av1_loopfilter.c:init_inter_mode_params Unexecuted instantiation: cdef.c:init_inter_mode_params Unexecuted instantiation: entropymode.c:init_inter_mode_params Unexecuted instantiation: pred_common.c:init_inter_mode_params Unexecuted instantiation: reconinter.c:init_inter_mode_params Unexecuted instantiation: thread_common.c:init_inter_mode_params |
197 | | |
198 | | // Initialize parameters required for inter prediction at block level. |
199 | | static inline void init_inter_block_params(InterPredParams *inter_pred_params, |
200 | | int block_width, int block_height, |
201 | | int pix_row, int pix_col, |
202 | | int subsampling_x, int subsampling_y, |
203 | | int bit_depth, int use_hbd_buf, |
204 | 13.6M | int is_intrabc) { |
205 | 13.6M | inter_pred_params->block_width = block_width; |
206 | 13.6M | inter_pred_params->block_height = block_height; |
207 | 13.6M | inter_pred_params->pix_row = pix_row; |
208 | 13.6M | inter_pred_params->pix_col = pix_col; |
209 | 13.6M | inter_pred_params->subsampling_x = subsampling_x; |
210 | 13.6M | inter_pred_params->subsampling_y = subsampling_y; |
211 | 13.6M | inter_pred_params->bit_depth = bit_depth; |
212 | 13.6M | inter_pred_params->use_hbd_buf = use_hbd_buf; |
213 | 13.6M | inter_pred_params->is_intrabc = is_intrabc; |
214 | 13.6M | inter_pred_params->mode = TRANSLATION_PRED; |
215 | 13.6M | inter_pred_params->comp_mode = UNIFORM_SINGLE; |
216 | 13.6M | inter_pred_params->top = -AOM_LEFT_TOP_MARGIN_SCALED(subsampling_y); |
217 | 13.6M | inter_pred_params->left = -AOM_LEFT_TOP_MARGIN_SCALED(subsampling_x); |
218 | 13.6M | } decodeframe.c:init_inter_block_params Line | Count | Source | 204 | 13.6M | int is_intrabc) { | 205 | 13.6M | inter_pred_params->block_width = block_width; | 206 | 13.6M | inter_pred_params->block_height = block_height; | 207 | 13.6M | inter_pred_params->pix_row = pix_row; | 208 | 13.6M | inter_pred_params->pix_col = pix_col; | 209 | 13.6M | inter_pred_params->subsampling_x = subsampling_x; | 210 | 13.6M | inter_pred_params->subsampling_y = subsampling_y; | 211 | 13.6M | inter_pred_params->bit_depth = bit_depth; | 212 | 13.6M | inter_pred_params->use_hbd_buf = use_hbd_buf; | 213 | 13.6M | inter_pred_params->is_intrabc = is_intrabc; | 214 | 13.6M | inter_pred_params->mode = TRANSLATION_PRED; | 215 | 13.6M | inter_pred_params->comp_mode = UNIFORM_SINGLE; | 216 | 13.6M | inter_pred_params->top = -AOM_LEFT_TOP_MARGIN_SCALED(subsampling_y); | 217 | 13.6M | inter_pred_params->left = -AOM_LEFT_TOP_MARGIN_SCALED(subsampling_x); | 218 | 13.6M | } |
Unexecuted instantiation: decodemv.c:init_inter_block_params Unexecuted instantiation: decoder.c:init_inter_block_params Unexecuted instantiation: av1_loopfilter.c:init_inter_block_params Unexecuted instantiation: cdef.c:init_inter_block_params Unexecuted instantiation: entropymode.c:init_inter_block_params Unexecuted instantiation: pred_common.c:init_inter_block_params Unexecuted instantiation: reconinter.c:init_inter_block_params Unexecuted instantiation: thread_common.c:init_inter_block_params |
219 | | |
220 | | // Initialize params required for inter prediction. |
221 | | static inline void av1_init_inter_params( |
222 | | InterPredParams *inter_pred_params, int block_width, int block_height, |
223 | | int pix_row, int pix_col, int subsampling_x, int subsampling_y, |
224 | | int bit_depth, int use_hbd_buf, int is_intrabc, |
225 | | const struct scale_factors *sf, const struct buf_2d *ref_buf, |
226 | 13.6M | int_interpfilters interp_filters) { |
227 | 13.6M | init_inter_block_params(inter_pred_params, block_width, block_height, pix_row, |
228 | 13.6M | pix_col, subsampling_x, subsampling_y, bit_depth, |
229 | 13.6M | use_hbd_buf, is_intrabc); |
230 | 13.6M | init_interp_filter_params(inter_pred_params->interp_filter_params, |
231 | 13.6M | &interp_filters.as_filters, block_width, |
232 | 13.6M | block_height, is_intrabc); |
233 | 13.6M | inter_pred_params->scale_factors = sf; |
234 | 13.6M | inter_pred_params->ref_frame_buf = *ref_buf; |
235 | 13.6M | } decodeframe.c:av1_init_inter_params Line | Count | Source | 226 | 13.6M | int_interpfilters interp_filters) { | 227 | 13.6M | init_inter_block_params(inter_pred_params, block_width, block_height, pix_row, | 228 | 13.6M | pix_col, subsampling_x, subsampling_y, bit_depth, | 229 | 13.6M | use_hbd_buf, is_intrabc); | 230 | 13.6M | init_interp_filter_params(inter_pred_params->interp_filter_params, | 231 | 13.6M | &interp_filters.as_filters, block_width, | 232 | 13.6M | block_height, is_intrabc); | 233 | 13.6M | inter_pred_params->scale_factors = sf; | 234 | 13.6M | inter_pred_params->ref_frame_buf = *ref_buf; | 235 | 13.6M | } |
Unexecuted instantiation: decodemv.c:av1_init_inter_params Unexecuted instantiation: decoder.c:av1_init_inter_params Unexecuted instantiation: av1_loopfilter.c:av1_init_inter_params Unexecuted instantiation: cdef.c:av1_init_inter_params Unexecuted instantiation: entropymode.c:av1_init_inter_params Unexecuted instantiation: pred_common.c:av1_init_inter_params Unexecuted instantiation: reconinter.c:av1_init_inter_params Unexecuted instantiation: thread_common.c:av1_init_inter_params |
236 | | |
237 | 3.07M | static inline void av1_init_comp_mode(InterPredParams *inter_pred_params) { |
238 | 3.07M | inter_pred_params->comp_mode = UNIFORM_COMP; |
239 | 3.07M | } decodeframe.c:av1_init_comp_mode Line | Count | Source | 237 | 3.07M | static inline void av1_init_comp_mode(InterPredParams *inter_pred_params) { | 238 | 3.07M | inter_pred_params->comp_mode = UNIFORM_COMP; | 239 | 3.07M | } |
Unexecuted instantiation: decodemv.c:av1_init_comp_mode Unexecuted instantiation: decoder.c:av1_init_comp_mode Unexecuted instantiation: av1_loopfilter.c:av1_init_comp_mode Unexecuted instantiation: cdef.c:av1_init_comp_mode Unexecuted instantiation: entropymode.c:av1_init_comp_mode Unexecuted instantiation: pred_common.c:av1_init_comp_mode Unexecuted instantiation: reconinter.c:av1_init_comp_mode Unexecuted instantiation: thread_common.c:av1_init_comp_mode |
240 | | |
241 | | void av1_init_warp_params(InterPredParams *inter_pred_params, |
242 | | const WarpTypesAllowed *warp_types, int ref, |
243 | | const MACROBLOCKD *xd, const MB_MODE_INFO *mi); |
244 | | |
245 | 13.2M | static inline int has_scale(int xs, int ys) { |
246 | 13.2M | return xs != SCALE_SUBPEL_SHIFTS || ys != SCALE_SUBPEL_SHIFTS; |
247 | 13.2M | } Unexecuted instantiation: decodeframe.c:has_scale Unexecuted instantiation: decodemv.c:has_scale Unexecuted instantiation: decoder.c:has_scale Unexecuted instantiation: av1_loopfilter.c:has_scale Unexecuted instantiation: cdef.c:has_scale Unexecuted instantiation: entropymode.c:has_scale Unexecuted instantiation: pred_common.c:has_scale Line | Count | Source | 245 | 13.2M | static inline int has_scale(int xs, int ys) { | 246 | 13.2M | return xs != SCALE_SUBPEL_SHIFTS || ys != SCALE_SUBPEL_SHIFTS; | 247 | 13.2M | } |
Unexecuted instantiation: thread_common.c:has_scale |
248 | | |
249 | 12.0M | static inline void revert_scale_extra_bits(SubpelParams *sp) { |
250 | 12.0M | sp->subpel_x >>= SCALE_EXTRA_BITS; |
251 | 12.0M | sp->subpel_y >>= SCALE_EXTRA_BITS; |
252 | 12.0M | sp->xs >>= SCALE_EXTRA_BITS; |
253 | 12.0M | sp->ys >>= SCALE_EXTRA_BITS; |
254 | 12.0M | assert(sp->subpel_x < SUBPEL_SHIFTS); |
255 | 12.0M | assert(sp->subpel_y < SUBPEL_SHIFTS); |
256 | 12.0M | assert(sp->xs <= SUBPEL_SHIFTS); |
257 | 12.0M | assert(sp->ys <= SUBPEL_SHIFTS); |
258 | 12.0M | } 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: av1_loopfilter.c:revert_scale_extra_bits Unexecuted instantiation: cdef.c:revert_scale_extra_bits Unexecuted instantiation: entropymode.c:revert_scale_extra_bits Unexecuted instantiation: pred_common.c:revert_scale_extra_bits reconinter.c:revert_scale_extra_bits Line | Count | Source | 249 | 12.0M | static inline void revert_scale_extra_bits(SubpelParams *sp) { | 250 | 12.0M | sp->subpel_x >>= SCALE_EXTRA_BITS; | 251 | 12.0M | sp->subpel_y >>= SCALE_EXTRA_BITS; | 252 | 12.0M | sp->xs >>= SCALE_EXTRA_BITS; | 253 | 12.0M | sp->ys >>= SCALE_EXTRA_BITS; | 254 | 12.0M | assert(sp->subpel_x < SUBPEL_SHIFTS); | 255 | 12.0M | assert(sp->subpel_y < SUBPEL_SHIFTS); | 256 | 12.0M | assert(sp->xs <= SUBPEL_SHIFTS); | 257 | 12.0M | assert(sp->ys <= SUBPEL_SHIFTS); | 258 | 12.0M | } |
Unexecuted instantiation: thread_common.c:revert_scale_extra_bits |
259 | | |
260 | | static inline void inter_predictor( |
261 | | const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, |
262 | | const SubpelParams *subpel_params, int w, int h, |
263 | 5.95M | ConvolveParams *conv_params, const InterpFilterParams *interp_filters[2]) { |
264 | 5.95M | assert(conv_params->do_average == 0 || conv_params->do_average == 1); |
265 | 5.95M | const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys); |
266 | 5.95M | if (is_scaled) { |
267 | 558k | av1_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h, |
268 | 558k | interp_filters, subpel_params->subpel_x, |
269 | 558k | subpel_params->xs, subpel_params->subpel_y, |
270 | 558k | subpel_params->ys, 1, conv_params); |
271 | 5.39M | } else { |
272 | 5.39M | SubpelParams sp = *subpel_params; |
273 | 5.39M | revert_scale_extra_bits(&sp); |
274 | 5.39M | av1_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h, |
275 | 5.39M | interp_filters, sp.subpel_x, sp.xs, sp.subpel_y, |
276 | 5.39M | sp.ys, 0, conv_params); |
277 | 5.39M | } |
278 | 5.95M | } Unexecuted instantiation: decodeframe.c:inter_predictor Unexecuted instantiation: decodemv.c:inter_predictor Unexecuted instantiation: decoder.c:inter_predictor Unexecuted instantiation: av1_loopfilter.c:inter_predictor Unexecuted instantiation: cdef.c:inter_predictor Unexecuted instantiation: entropymode.c:inter_predictor Unexecuted instantiation: pred_common.c:inter_predictor reconinter.c:inter_predictor Line | Count | Source | 263 | 5.95M | ConvolveParams *conv_params, const InterpFilterParams *interp_filters[2]) { | 264 | 5.95M | assert(conv_params->do_average == 0 || conv_params->do_average == 1); | 265 | 5.95M | const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys); | 266 | 5.95M | if (is_scaled) { | 267 | 558k | av1_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h, | 268 | 558k | interp_filters, subpel_params->subpel_x, | 269 | 558k | subpel_params->xs, subpel_params->subpel_y, | 270 | 558k | subpel_params->ys, 1, conv_params); | 271 | 5.39M | } else { | 272 | 5.39M | SubpelParams sp = *subpel_params; | 273 | 5.39M | revert_scale_extra_bits(&sp); | 274 | 5.39M | av1_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h, | 275 | 5.39M | interp_filters, sp.subpel_x, sp.xs, sp.subpel_y, | 276 | 5.39M | sp.ys, 0, conv_params); | 277 | 5.39M | } | 278 | 5.95M | } |
Unexecuted instantiation: thread_common.c:inter_predictor |
279 | | |
280 | | static inline void highbd_inter_predictor( |
281 | | const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, |
282 | | const SubpelParams *subpel_params, int w, int h, |
283 | | ConvolveParams *conv_params, const InterpFilterParams *interp_filters[2], |
284 | 7.24M | int bd) { |
285 | 7.24M | assert(conv_params->do_average == 0 || conv_params->do_average == 1); |
286 | 7.24M | const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys); |
287 | 7.24M | if (is_scaled) { |
288 | 595k | av1_highbd_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h, |
289 | 595k | interp_filters, subpel_params->subpel_x, |
290 | 595k | subpel_params->xs, subpel_params->subpel_y, |
291 | 595k | subpel_params->ys, 1, conv_params, bd); |
292 | 6.64M | } else { |
293 | 6.64M | SubpelParams sp = *subpel_params; |
294 | 6.64M | revert_scale_extra_bits(&sp); |
295 | 6.64M | av1_highbd_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h, |
296 | 6.64M | interp_filters, sp.subpel_x, sp.xs, |
297 | 6.64M | sp.subpel_y, sp.ys, 0, conv_params, bd); |
298 | 6.64M | } |
299 | 7.24M | } Unexecuted instantiation: decodeframe.c:highbd_inter_predictor Unexecuted instantiation: decodemv.c:highbd_inter_predictor Unexecuted instantiation: decoder.c:highbd_inter_predictor Unexecuted instantiation: av1_loopfilter.c:highbd_inter_predictor Unexecuted instantiation: cdef.c:highbd_inter_predictor Unexecuted instantiation: entropymode.c:highbd_inter_predictor Unexecuted instantiation: pred_common.c:highbd_inter_predictor reconinter.c:highbd_inter_predictor Line | Count | Source | 284 | 7.24M | int bd) { | 285 | 7.24M | assert(conv_params->do_average == 0 || conv_params->do_average == 1); | 286 | 7.24M | const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys); | 287 | 7.24M | if (is_scaled) { | 288 | 595k | av1_highbd_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h, | 289 | 595k | interp_filters, subpel_params->subpel_x, | 290 | 595k | subpel_params->xs, subpel_params->subpel_y, | 291 | 595k | subpel_params->ys, 1, conv_params, bd); | 292 | 6.64M | } else { | 293 | 6.64M | SubpelParams sp = *subpel_params; | 294 | 6.64M | revert_scale_extra_bits(&sp); | 295 | 6.64M | av1_highbd_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h, | 296 | 6.64M | interp_filters, sp.subpel_x, sp.xs, | 297 | 6.64M | sp.subpel_y, sp.ys, 0, conv_params, bd); | 298 | 6.64M | } | 299 | 7.24M | } |
Unexecuted instantiation: thread_common.c:highbd_inter_predictor |
300 | | |
301 | | int av1_skip_u4x4_pred_in_obmc(BLOCK_SIZE bsize, |
302 | | const struct macroblockd_plane *pd, int dir); |
303 | | |
304 | | static inline int is_interinter_compound_used(COMPOUND_TYPE type, |
305 | 660k | BLOCK_SIZE sb_type) { |
306 | 660k | const int comp_allowed = is_comp_ref_allowed(sb_type); |
307 | 660k | switch (type) { |
308 | 0 | case COMPOUND_AVERAGE: |
309 | 0 | case COMPOUND_DISTWTD: |
310 | 46.7k | case COMPOUND_DIFFWTD: return comp_allowed; |
311 | 613k | case COMPOUND_WEDGE: |
312 | 613k | return comp_allowed && av1_wedge_params_lookup[sb_type].wedge_types > 0; |
313 | 0 | default: assert(0); return 0; |
314 | 660k | } |
315 | 660k | } Unexecuted instantiation: decodeframe.c:is_interinter_compound_used decodemv.c:is_interinter_compound_used Line | Count | Source | 305 | 660k | BLOCK_SIZE sb_type) { | 306 | 660k | const int comp_allowed = is_comp_ref_allowed(sb_type); | 307 | 660k | switch (type) { | 308 | 0 | case COMPOUND_AVERAGE: | 309 | 0 | case COMPOUND_DISTWTD: | 310 | 46.7k | case COMPOUND_DIFFWTD: return comp_allowed; | 311 | 613k | case COMPOUND_WEDGE: | 312 | 613k | return comp_allowed && av1_wedge_params_lookup[sb_type].wedge_types > 0; | 313 | 0 | default: assert(0); return 0; | 314 | 660k | } | 315 | 660k | } |
Unexecuted instantiation: decoder.c:is_interinter_compound_used Unexecuted instantiation: av1_loopfilter.c:is_interinter_compound_used Unexecuted instantiation: cdef.c:is_interinter_compound_used Unexecuted instantiation: entropymode.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 |
316 | | |
317 | 424k | static inline int is_any_masked_compound_used(BLOCK_SIZE sb_type) { |
318 | 424k | COMPOUND_TYPE comp_type; |
319 | 424k | int i; |
320 | 424k | if (!is_comp_ref_allowed(sb_type)) return 0; |
321 | 1.31M | for (i = 0; i < COMPOUND_TYPES; i++) { |
322 | 1.31M | comp_type = (COMPOUND_TYPE)i; |
323 | 1.31M | if (is_masked_compound_type(comp_type) && |
324 | 471k | is_interinter_compound_used(comp_type, sb_type)) |
325 | 423k | return 1; |
326 | 1.31M | } |
327 | 671 | return 0; |
328 | 424k | } Unexecuted instantiation: decodeframe.c:is_any_masked_compound_used decodemv.c:is_any_masked_compound_used Line | Count | Source | 317 | 424k | static inline int is_any_masked_compound_used(BLOCK_SIZE sb_type) { | 318 | 424k | COMPOUND_TYPE comp_type; | 319 | 424k | int i; | 320 | 424k | if (!is_comp_ref_allowed(sb_type)) return 0; | 321 | 1.31M | for (i = 0; i < COMPOUND_TYPES; i++) { | 322 | 1.31M | comp_type = (COMPOUND_TYPE)i; | 323 | 1.31M | if (is_masked_compound_type(comp_type) && | 324 | 471k | is_interinter_compound_used(comp_type, sb_type)) | 325 | 423k | return 1; | 326 | 1.31M | } | 327 | 671 | return 0; | 328 | 424k | } |
Unexecuted instantiation: decoder.c:is_any_masked_compound_used Unexecuted instantiation: av1_loopfilter.c:is_any_masked_compound_used Unexecuted instantiation: cdef.c:is_any_masked_compound_used Unexecuted instantiation: entropymode.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 |
329 | | |
330 | 0 | static inline int get_wedge_types_lookup(BLOCK_SIZE sb_type) { |
331 | 0 | return av1_wedge_params_lookup[sb_type].wedge_types; |
332 | 0 | } 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: av1_loopfilter.c:get_wedge_types_lookup Unexecuted instantiation: cdef.c:get_wedge_types_lookup Unexecuted instantiation: entropymode.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 |
333 | | |
334 | 483k | static inline int av1_is_wedge_used(BLOCK_SIZE sb_type) { |
335 | 483k | return av1_wedge_params_lookup[sb_type].wedge_types > 0; |
336 | 483k | } Unexecuted instantiation: decodeframe.c:av1_is_wedge_used decodemv.c:av1_is_wedge_used Line | Count | Source | 334 | 263k | static inline int av1_is_wedge_used(BLOCK_SIZE sb_type) { | 335 | 263k | return av1_wedge_params_lookup[sb_type].wedge_types > 0; | 336 | 263k | } |
Unexecuted instantiation: decoder.c:av1_is_wedge_used Unexecuted instantiation: av1_loopfilter.c:av1_is_wedge_used Unexecuted instantiation: cdef.c:av1_is_wedge_used Unexecuted instantiation: entropymode.c:av1_is_wedge_used Unexecuted instantiation: pred_common.c:av1_is_wedge_used reconinter.c:av1_is_wedge_used Line | Count | Source | 334 | 219k | static inline int av1_is_wedge_used(BLOCK_SIZE sb_type) { | 335 | 219k | return av1_wedge_params_lookup[sb_type].wedge_types > 0; | 336 | 219k | } |
Unexecuted instantiation: thread_common.c:av1_is_wedge_used |
337 | | |
338 | | void av1_make_inter_predictor(const uint8_t *src, int src_stride, uint8_t *dst, |
339 | | int dst_stride, |
340 | | InterPredParams *inter_pred_params, |
341 | | const SubpelParams *subpel_params); |
342 | | void av1_make_masked_inter_predictor(const uint8_t *pre, int pre_stride, |
343 | | uint8_t *dst, int dst_stride, |
344 | | InterPredParams *inter_pred_params, |
345 | | const SubpelParams *subpel_params); |
346 | | |
347 | | // TODO(jkoleszar): yet another mv clamping function :-( |
348 | | static inline MV clamp_mv_to_umv_border_sb(const MACROBLOCKD *xd, |
349 | | const MV *src_mv, int bw, int bh, |
350 | 13.6M | int ss_x, int ss_y) { |
351 | | // If the MV points so far into the UMV border that no visible pixels |
352 | | // are used for reconstruction, the subpel part of the MV can be |
353 | | // discarded and the MV limited to 16 pixels with equivalent results. |
354 | 13.6M | const int spel_left = (AOM_INTERP_EXTEND + bw) << SUBPEL_BITS; |
355 | 13.6M | const int spel_right = spel_left - SUBPEL_SHIFTS; |
356 | 13.6M | const int spel_top = (AOM_INTERP_EXTEND + bh) << SUBPEL_BITS; |
357 | 13.6M | const int spel_bottom = spel_top - SUBPEL_SHIFTS; |
358 | 13.6M | MV clamped_mv = { (int16_t)(src_mv->row * (1 << (1 - ss_y))), |
359 | 13.6M | (int16_t)(src_mv->col * (1 << (1 - ss_x))) }; |
360 | 13.6M | assert(ss_x <= 1); |
361 | 13.6M | assert(ss_y <= 1); |
362 | 13.6M | const SubpelMvLimits mv_limits = { |
363 | 13.6M | xd->mb_to_left_edge * (1 << (1 - ss_x)) - spel_left, |
364 | 13.6M | xd->mb_to_right_edge * (1 << (1 - ss_x)) + spel_right, |
365 | 13.6M | xd->mb_to_top_edge * (1 << (1 - ss_y)) - spel_top, |
366 | 13.6M | xd->mb_to_bottom_edge * (1 << (1 - ss_y)) + spel_bottom |
367 | 13.6M | }; |
368 | | |
369 | 13.6M | clamp_mv(&clamped_mv, &mv_limits); |
370 | | |
371 | 13.6M | return clamped_mv; |
372 | 13.6M | } decodeframe.c:clamp_mv_to_umv_border_sb Line | Count | Source | 350 | 13.6M | int ss_x, int ss_y) { | 351 | | // If the MV points so far into the UMV border that no visible pixels | 352 | | // are used for reconstruction, the subpel part of the MV can be | 353 | | // discarded and the MV limited to 16 pixels with equivalent results. | 354 | 13.6M | const int spel_left = (AOM_INTERP_EXTEND + bw) << SUBPEL_BITS; | 355 | 13.6M | const int spel_right = spel_left - SUBPEL_SHIFTS; | 356 | 13.6M | const int spel_top = (AOM_INTERP_EXTEND + bh) << SUBPEL_BITS; | 357 | 13.6M | const int spel_bottom = spel_top - SUBPEL_SHIFTS; | 358 | 13.6M | MV clamped_mv = { (int16_t)(src_mv->row * (1 << (1 - ss_y))), | 359 | 13.6M | (int16_t)(src_mv->col * (1 << (1 - ss_x))) }; | 360 | 13.6M | assert(ss_x <= 1); | 361 | 13.6M | assert(ss_y <= 1); | 362 | 13.6M | const SubpelMvLimits mv_limits = { | 363 | 13.6M | xd->mb_to_left_edge * (1 << (1 - ss_x)) - spel_left, | 364 | 13.6M | xd->mb_to_right_edge * (1 << (1 - ss_x)) + spel_right, | 365 | 13.6M | xd->mb_to_top_edge * (1 << (1 - ss_y)) - spel_top, | 366 | 13.6M | xd->mb_to_bottom_edge * (1 << (1 - ss_y)) + spel_bottom | 367 | 13.6M | }; | 368 | | | 369 | 13.6M | clamp_mv(&clamped_mv, &mv_limits); | 370 | | | 371 | 13.6M | return clamped_mv; | 372 | 13.6M | } |
Unexecuted instantiation: decodemv.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: decoder.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: av1_loopfilter.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: cdef.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: entropymode.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: pred_common.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: reconinter.c:clamp_mv_to_umv_border_sb Unexecuted instantiation: thread_common.c:clamp_mv_to_umv_border_sb |
373 | | |
374 | | static inline int64_t scaled_buffer_offset(int x_offset, int y_offset, |
375 | | int stride, |
376 | 76.9M | const struct scale_factors *sf) { |
377 | 76.9M | int x, y; |
378 | 76.9M | if (!sf) { |
379 | 62.7M | x = x_offset; |
380 | 62.7M | y = y_offset; |
381 | 62.7M | } else if (av1_is_scaled(sf)) { |
382 | 1.23M | x = av1_scaled_x(x_offset, sf) >> SCALE_EXTRA_BITS; |
383 | 1.23M | y = av1_scaled_y(y_offset, sf) >> SCALE_EXTRA_BITS; |
384 | 12.9M | } else { |
385 | 12.9M | x = av1_unscaled_value(x_offset, sf) >> SCALE_EXTRA_BITS; |
386 | 12.9M | y = av1_unscaled_value(y_offset, sf) >> SCALE_EXTRA_BITS; |
387 | 12.9M | } |
388 | 76.9M | return (int64_t)y * stride + x; |
389 | 76.9M | } Unexecuted instantiation: decodeframe.c:scaled_buffer_offset Unexecuted instantiation: decodemv.c:scaled_buffer_offset Unexecuted instantiation: decoder.c:scaled_buffer_offset Unexecuted instantiation: av1_loopfilter.c:scaled_buffer_offset Unexecuted instantiation: cdef.c:scaled_buffer_offset Unexecuted instantiation: entropymode.c:scaled_buffer_offset Unexecuted instantiation: pred_common.c:scaled_buffer_offset reconinter.c:scaled_buffer_offset Line | Count | Source | 376 | 76.9M | const struct scale_factors *sf) { | 377 | 76.9M | int x, y; | 378 | 76.9M | if (!sf) { | 379 | 62.7M | x = x_offset; | 380 | 62.7M | y = y_offset; | 381 | 62.7M | } else if (av1_is_scaled(sf)) { | 382 | 1.23M | x = av1_scaled_x(x_offset, sf) >> SCALE_EXTRA_BITS; | 383 | 1.23M | y = av1_scaled_y(y_offset, sf) >> SCALE_EXTRA_BITS; | 384 | 12.9M | } else { | 385 | 12.9M | x = av1_unscaled_value(x_offset, sf) >> SCALE_EXTRA_BITS; | 386 | 12.9M | y = av1_unscaled_value(y_offset, sf) >> SCALE_EXTRA_BITS; | 387 | 12.9M | } | 388 | 76.9M | return (int64_t)y * stride + x; | 389 | 76.9M | } |
Unexecuted instantiation: thread_common.c:scaled_buffer_offset |
390 | | |
391 | | static inline void setup_pred_plane(struct buf_2d *dst, BLOCK_SIZE bsize, |
392 | | uint8_t *src, int width, int height, |
393 | | int stride, int mi_row, int mi_col, |
394 | | const struct scale_factors *scale, |
395 | 76.9M | int subsampling_x, int subsampling_y) { |
396 | | // Offset the buffer pointer |
397 | 76.9M | if (subsampling_y && (mi_row & 0x01) && (mi_size_high[bsize] == 1)) |
398 | 3.09M | mi_row -= 1; |
399 | 76.9M | if (subsampling_x && (mi_col & 0x01) && (mi_size_wide[bsize] == 1)) |
400 | 2.54M | mi_col -= 1; |
401 | | |
402 | 76.9M | const int x = (MI_SIZE * mi_col) >> subsampling_x; |
403 | 76.9M | const int y = (MI_SIZE * mi_row) >> subsampling_y; |
404 | 76.9M | dst->buf = src + scaled_buffer_offset(x, y, stride, scale); |
405 | 76.9M | dst->buf0 = src; |
406 | 76.9M | dst->width = width; |
407 | 76.9M | dst->height = height; |
408 | 76.9M | dst->stride = stride; |
409 | 76.9M | } Unexecuted instantiation: decodeframe.c:setup_pred_plane Unexecuted instantiation: decodemv.c:setup_pred_plane Unexecuted instantiation: decoder.c:setup_pred_plane Unexecuted instantiation: av1_loopfilter.c:setup_pred_plane Unexecuted instantiation: cdef.c:setup_pred_plane Unexecuted instantiation: entropymode.c:setup_pred_plane Unexecuted instantiation: pred_common.c:setup_pred_plane reconinter.c:setup_pred_plane Line | Count | Source | 395 | 76.9M | int subsampling_x, int subsampling_y) { | 396 | | // Offset the buffer pointer | 397 | 76.9M | if (subsampling_y && (mi_row & 0x01) && (mi_size_high[bsize] == 1)) | 398 | 3.09M | mi_row -= 1; | 399 | 76.9M | if (subsampling_x && (mi_col & 0x01) && (mi_size_wide[bsize] == 1)) | 400 | 2.54M | mi_col -= 1; | 401 | | | 402 | 76.9M | const int x = (MI_SIZE * mi_col) >> subsampling_x; | 403 | 76.9M | const int y = (MI_SIZE * mi_row) >> subsampling_y; | 404 | 76.9M | dst->buf = src + scaled_buffer_offset(x, y, stride, scale); | 405 | 76.9M | dst->buf0 = src; | 406 | 76.9M | dst->width = width; | 407 | 76.9M | dst->height = height; | 408 | 76.9M | dst->stride = stride; | 409 | 76.9M | } |
Unexecuted instantiation: thread_common.c:setup_pred_plane |
410 | | |
411 | | void av1_setup_dst_planes(struct macroblockd_plane *planes, BLOCK_SIZE bsize, |
412 | | const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col, |
413 | | const int plane_start, const int plane_end); |
414 | | |
415 | | void av1_setup_pre_planes(MACROBLOCKD *xd, int idx, |
416 | | const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col, |
417 | | const struct scale_factors *sf, const int num_planes); |
418 | | |
419 | | static inline void set_default_interp_filters( |
420 | 791k | MB_MODE_INFO *const mbmi, InterpFilter frame_interp_filter) { |
421 | 791k | mbmi->interp_filters = |
422 | 791k | av1_broadcast_interp_filter(av1_unswitchable_filter(frame_interp_filter)); |
423 | 791k | } Unexecuted instantiation: decodeframe.c:set_default_interp_filters decodemv.c:set_default_interp_filters Line | Count | Source | 420 | 791k | MB_MODE_INFO *const mbmi, InterpFilter frame_interp_filter) { | 421 | 791k | mbmi->interp_filters = | 422 | 791k | av1_broadcast_interp_filter(av1_unswitchable_filter(frame_interp_filter)); | 423 | 791k | } |
Unexecuted instantiation: decoder.c:set_default_interp_filters Unexecuted instantiation: av1_loopfilter.c:set_default_interp_filters Unexecuted instantiation: cdef.c:set_default_interp_filters Unexecuted instantiation: entropymode.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 |
424 | | |
425 | 3.81M | static inline int av1_is_interp_needed(const MACROBLOCKD *const xd) { |
426 | 3.81M | const MB_MODE_INFO *const mbmi = xd->mi[0]; |
427 | 3.81M | if (mbmi->skip_mode) return 0; |
428 | 3.63M | if (mbmi->motion_mode == WARPED_CAUSAL) return 0; |
429 | 3.33M | if (is_nontrans_global_motion(xd, xd->mi[0])) return 0; |
430 | 3.02M | return 1; |
431 | 3.33M | } Unexecuted instantiation: decodeframe.c:av1_is_interp_needed decodemv.c:av1_is_interp_needed Line | Count | Source | 425 | 3.81M | static inline int av1_is_interp_needed(const MACROBLOCKD *const xd) { | 426 | 3.81M | const MB_MODE_INFO *const mbmi = xd->mi[0]; | 427 | 3.81M | if (mbmi->skip_mode) return 0; | 428 | 3.63M | if (mbmi->motion_mode == WARPED_CAUSAL) return 0; | 429 | 3.33M | if (is_nontrans_global_motion(xd, xd->mi[0])) return 0; | 430 | 3.02M | return 1; | 431 | 3.33M | } |
Unexecuted instantiation: decoder.c:av1_is_interp_needed Unexecuted instantiation: av1_loopfilter.c:av1_is_interp_needed Unexecuted instantiation: cdef.c:av1_is_interp_needed Unexecuted instantiation: entropymode.c:av1_is_interp_needed Unexecuted instantiation: pred_common.c:av1_is_interp_needed Unexecuted instantiation: reconinter.c:av1_is_interp_needed Unexecuted instantiation: thread_common.c:av1_is_interp_needed |
432 | | |
433 | | // Sets up buffers 'dst_buf1' and 'dst_buf2' from relevant buffers in 'xd' for |
434 | | // subsequent use in OBMC prediction. |
435 | | void av1_setup_obmc_dst_bufs(MACROBLOCKD *xd, uint8_t **dst_buf1, |
436 | | uint8_t **dst_buf2); |
437 | | |
438 | | void av1_setup_build_prediction_by_above_pred( |
439 | | MACROBLOCKD *xd, int rel_mi_col, uint8_t above_mi_width, |
440 | | MB_MODE_INFO *above_mbmi, struct build_prediction_ctxt *ctxt, |
441 | | const int num_planes); |
442 | | void av1_setup_build_prediction_by_left_pred(MACROBLOCKD *xd, int rel_mi_row, |
443 | | uint8_t left_mi_height, |
444 | | MB_MODE_INFO *left_mbmi, |
445 | | struct build_prediction_ctxt *ctxt, |
446 | | const int num_planes); |
447 | | void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd, |
448 | | uint8_t *above[MAX_MB_PLANE], |
449 | | int above_stride[MAX_MB_PLANE], |
450 | | uint8_t *left[MAX_MB_PLANE], |
451 | | int left_stride[MAX_MB_PLANE]); |
452 | | |
453 | | const uint8_t *av1_get_obmc_mask(int length); |
454 | | void av1_count_overlappable_neighbors(const AV1_COMMON *cm, MACROBLOCKD *xd); |
455 | | |
456 | | #define MASK_MASTER_SIZE ((MAX_WEDGE_SIZE) << 1) |
457 | | #define MASK_MASTER_STRIDE (MASK_MASTER_SIZE) |
458 | | |
459 | | void av1_init_wedge_masks(void); |
460 | | |
461 | | // Defined out-of-line in reconinter.c so that the underlying |
462 | | // `wedge_mask_buf` (defined in wedge_masks_data.inc) can stay |
463 | | // `static const` and live in `.rdata`. |
464 | | const uint8_t *av1_get_contiguous_soft_mask(int8_t wedge_index, |
465 | | int8_t wedge_sign, |
466 | | BLOCK_SIZE sb_type); |
467 | | |
468 | | void av1_dist_wtd_comp_weight_assign(const AV1_COMMON *cm, |
469 | | const MB_MODE_INFO *mbmi, int *fwd_offset, |
470 | | int *bck_offset, |
471 | | int *use_dist_wtd_comp_avg, |
472 | | int is_compound); |
473 | | |
474 | | const uint8_t *av1_get_compound_type_mask( |
475 | | const INTERINTER_COMPOUND_DATA *const comp_data, BLOCK_SIZE sb_type); |
476 | | |
477 | | // build interintra_predictors for one plane |
478 | | void av1_build_interintra_predictor(const AV1_COMMON *cm, MACROBLOCKD *xd, |
479 | | uint8_t *pred, int stride, |
480 | | const BUFFER_SET *ctx, int plane, |
481 | | BLOCK_SIZE bsize); |
482 | | |
483 | | void av1_build_intra_predictors_for_interintra(const AV1_COMMON *cm, |
484 | | MACROBLOCKD *xd, |
485 | | BLOCK_SIZE bsize, int plane, |
486 | | const BUFFER_SET *ctx, |
487 | | uint8_t *dst, int dst_stride); |
488 | | |
489 | | void av1_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane, |
490 | | const uint8_t *inter_pred, int inter_stride, |
491 | | const uint8_t *intra_pred, int intra_stride); |
492 | | |
493 | | #ifdef __cplusplus |
494 | | } // extern "C" |
495 | | #endif |
496 | | |
497 | | #endif // AOM_AV1_COMMON_RECONINTER_H_ |