blob: 0cf7ea33925c286099cfbc9eeb5f4560d05e33cf [file] [log] [blame]
Yaowu Xuc27fc142016-08-22 16:08:15 -07001/*
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Yaowu Xuc27fc142016-08-22 16:08:15 -07003 *
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07004 * 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.
Yaowu Xuc27fc142016-08-22 16:08:15 -070010 */
11
James Zerne1cbb132018-08-22 14:10:36 -070012#ifndef AOM_AV1_COMMON_RECONINTER_H_
13#define AOM_AV1_COMMON_RECONINTER_H_
Yaowu Xuc27fc142016-08-22 16:08:15 -070014
15#include "av1/common/filter.h"
16#include "av1/common/onyxc_int.h"
Yaowu Xu6557ea92016-10-31 16:33:36 -070017#include "av1/common/convolve.h"
Sarah Parkerc2d38712017-01-24 15:15:41 -080018#include "av1/common/warped_motion.h"
Yaowu Xuf883b422016-08-30 14:01:10 -070019#include "aom/aom_integer.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070020
David Barkerb3b53042017-11-23 13:13:30 +000021// 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 ((AOM_BORDER_IN_PIXELS >> subsampling) - AOM_INTERP_EXTEND)
31#define AOM_LEFT_TOP_MARGIN_SCALED(subsampling) \
32 (AOM_LEFT_TOP_MARGIN_PX(subsampling) << SCALE_SUBPEL_BITS)
Debargha Mukherjee5433fa42017-10-10 09:55:51 -070033
Yaowu Xuc27fc142016-08-22 16:08:15 -070034#ifdef __cplusplus
35extern "C" {
36#endif
37
Debargha Mukherjeec54594f2017-04-27 02:08:22 -070038// Set to (1 << 5) if the 32-ary codebooks are used for any bock size
Yaowu Xuc27fc142016-08-22 16:08:15 -070039#define MAX_WEDGE_TYPES (1 << 4)
Yaowu Xuc27fc142016-08-22 16:08:15 -070040
41#define MAX_WEDGE_SIZE_LOG2 5 // 32x32
42#define MAX_WEDGE_SIZE (1 << MAX_WEDGE_SIZE_LOG2)
43#define MAX_WEDGE_SQUARE (MAX_WEDGE_SIZE * MAX_WEDGE_SIZE)
44
45#define WEDGE_WEIGHT_BITS 6
46
47#define WEDGE_NONE -1
48
49// Angles are with respect to horizontal anti-clockwise
Satish Kumar Suman4667aa12018-12-14 18:28:19 +053050enum {
Yaowu Xuc27fc142016-08-22 16:08:15 -070051 WEDGE_HORIZONTAL = 0,
52 WEDGE_VERTICAL = 1,
53 WEDGE_OBLIQUE27 = 2,
54 WEDGE_OBLIQUE63 = 3,
55 WEDGE_OBLIQUE117 = 4,
56 WEDGE_OBLIQUE153 = 5,
57 WEDGE_DIRECTIONS
Satish Kumar Suman4667aa12018-12-14 18:28:19 +053058} UENUM1BYTE(WedgeDirectionType);
Yaowu Xuc27fc142016-08-22 16:08:15 -070059
60// 3-tuple: {direction, x_offset, y_offset}
61typedef struct {
62 WedgeDirectionType direction;
63 int x_offset;
64 int y_offset;
65} wedge_code_type;
66
67typedef uint8_t *wedge_masks_type[MAX_WEDGE_TYPES];
68
69typedef struct {
70 int bits;
71 const wedge_code_type *codebook;
72 uint8_t *signflip;
Yaowu Xuc27fc142016-08-22 16:08:15 -070073 wedge_masks_type *masks;
74} wedge_params_type;
75
Yaowu Xue51a4942019-05-06 09:53:44 -070076extern const wedge_params_type av1_wedge_params_lookup[BLOCK_SIZES_ALL];
Yaowu Xuc27fc142016-08-22 16:08:15 -070077
Ravi Chaudhary6ac4b132018-05-08 16:34:44 +053078typedef struct SubpelParams {
79 int xs;
80 int ys;
81 int subpel_x;
82 int subpel_y;
83} SubpelParams;
84
85struct build_prediction_ctxt {
86 const AV1_COMMON *cm;
87 int mi_row;
88 int mi_col;
89 uint8_t **tmp_buf;
90 int *tmp_width;
91 int *tmp_height;
92 int *tmp_stride;
93 int mb_to_far_edge;
94};
95
Peng Bin088bfd02018-05-21 11:34:44 +080096static INLINE int has_scale(int xs, int ys) {
97 return xs != SCALE_SUBPEL_SHIFTS || ys != SCALE_SUBPEL_SHIFTS;
98}
99
100static INLINE void revert_scale_extra_bits(SubpelParams *sp) {
101 sp->subpel_x >>= SCALE_EXTRA_BITS;
102 sp->subpel_y >>= SCALE_EXTRA_BITS;
103 sp->xs >>= SCALE_EXTRA_BITS;
104 sp->ys >>= SCALE_EXTRA_BITS;
105 assert(sp->subpel_x < SUBPEL_SHIFTS);
106 assert(sp->subpel_y < SUBPEL_SHIFTS);
107 assert(sp->xs <= SUBPEL_SHIFTS);
108 assert(sp->ys <= SUBPEL_SHIFTS);
109}
110
111static INLINE void inter_predictor(const uint8_t *src, int src_stride,
112 uint8_t *dst, int dst_stride,
113 const SubpelParams *subpel_params,
114 const struct scale_factors *sf, int w, int h,
115 ConvolveParams *conv_params,
Hui Sud547fa62018-09-06 16:13:58 -0700116 InterpFilters interp_filters,
117 int is_intrabc) {
Peng Bin088bfd02018-05-21 11:34:44 +0800118 assert(conv_params->do_average == 0 || conv_params->do_average == 1);
119 assert(sf);
Hui Sud547fa62018-09-06 16:13:58 -0700120 const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys);
121 assert(IMPLIES(is_intrabc, !is_scaled));
122 if (is_scaled) {
Peng Bin088bfd02018-05-21 11:34:44 +0800123 av1_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h,
124 interp_filters, subpel_params->subpel_x,
125 subpel_params->xs, subpel_params->subpel_y,
Hui Sud547fa62018-09-06 16:13:58 -0700126 subpel_params->ys, 1, conv_params, sf, is_intrabc);
Peng Bin088bfd02018-05-21 11:34:44 +0800127 } else {
128 SubpelParams sp = *subpel_params;
129 revert_scale_extra_bits(&sp);
130 av1_convolve_2d_facade(src, src_stride, dst, dst_stride, w, h,
131 interp_filters, sp.subpel_x, sp.xs, sp.subpel_y,
Hui Sud547fa62018-09-06 16:13:58 -0700132 sp.ys, 0, conv_params, sf, is_intrabc);
Peng Bin088bfd02018-05-21 11:34:44 +0800133 }
134}
135
Hui Sud547fa62018-09-06 16:13:58 -0700136static INLINE void highbd_inter_predictor(const uint8_t *src, int src_stride,
137 uint8_t *dst, int dst_stride,
138 const SubpelParams *subpel_params,
139 const struct scale_factors *sf, int w,
140 int h, ConvolveParams *conv_params,
141 InterpFilters interp_filters,
142 int is_intrabc, int bd) {
Peng Bin088bfd02018-05-21 11:34:44 +0800143 assert(conv_params->do_average == 0 || conv_params->do_average == 1);
144 assert(sf);
Hui Sud547fa62018-09-06 16:13:58 -0700145 const int is_scaled = has_scale(subpel_params->xs, subpel_params->ys);
146 assert(IMPLIES(is_intrabc, !is_scaled));
147 if (is_scaled) {
148 av1_highbd_convolve_2d_facade(
149 src, src_stride, dst, dst_stride, w, h, interp_filters,
150 subpel_params->subpel_x, subpel_params->xs, subpel_params->subpel_y,
151 subpel_params->ys, 1, conv_params, sf, is_intrabc, bd);
Peng Bin088bfd02018-05-21 11:34:44 +0800152 } else {
153 SubpelParams sp = *subpel_params;
154 revert_scale_extra_bits(&sp);
Hui Sud547fa62018-09-06 16:13:58 -0700155 av1_highbd_convolve_2d_facade(
156 src, src_stride, dst, dst_stride, w, h, interp_filters, sp.subpel_x,
157 sp.xs, sp.subpel_y, sp.ys, 0, conv_params, sf, is_intrabc, bd);
Peng Bin088bfd02018-05-21 11:34:44 +0800158 }
159}
160
Ravi Chaudhary6ac4b132018-05-08 16:34:44 +0530161void av1_modify_neighbor_predictor_for_obmc(MB_MODE_INFO *mbmi);
162int av1_skip_u4x4_pred_in_obmc(BLOCK_SIZE bsize,
163 const struct macroblockd_plane *pd, int dir);
164
Sarah Parker42d96102017-01-31 21:05:27 -0800165static INLINE int is_interinter_compound_used(COMPOUND_TYPE type,
166 BLOCK_SIZE sb_type) {
Zoe Liu8efc8272017-11-30 14:20:33 -0800167 const int comp_allowed = is_comp_ref_allowed(sb_type);
Sarah Parker42d96102017-01-31 21:05:27 -0800168 switch (type) {
Zoe Liu8efc8272017-11-30 14:20:33 -0800169 case COMPOUND_AVERAGE:
Debargha Mukherjee54eabb52019-02-01 16:54:33 -0800170 case COMPOUND_DISTWTD:
Sarah Parker5b4df2b2018-04-02 14:48:25 -0700171 case COMPOUND_DIFFWTD: return comp_allowed;
Zoe Liu8efc8272017-11-30 14:20:33 -0800172 case COMPOUND_WEDGE:
Yaowu Xue51a4942019-05-06 09:53:44 -0700173 return comp_allowed && av1_wedge_params_lookup[sb_type].bits > 0;
Sarah Parker42d96102017-01-31 21:05:27 -0800174 default: assert(0); return 0;
175 }
Yaowu Xuc27fc142016-08-22 16:08:15 -0700176}
177
Sarah Parker42d96102017-01-31 21:05:27 -0800178static INLINE int is_any_masked_compound_used(BLOCK_SIZE sb_type) {
179 COMPOUND_TYPE comp_type;
Peng Bin33ba1fe2018-01-24 11:48:08 +0800180 int i;
Zoe Liu8efc8272017-11-30 14:20:33 -0800181 if (!is_comp_ref_allowed(sb_type)) return 0;
Peng Bin33ba1fe2018-01-24 11:48:08 +0800182 for (i = 0; i < COMPOUND_TYPES; i++) {
183 comp_type = (COMPOUND_TYPE)i;
Sarah Parker42d96102017-01-31 21:05:27 -0800184 if (is_masked_compound_type(comp_type) &&
185 is_interinter_compound_used(comp_type, sb_type))
186 return 1;
187 }
188 return 0;
189}
190
191static INLINE int get_wedge_bits_lookup(BLOCK_SIZE sb_type) {
Yaowu Xue51a4942019-05-06 09:53:44 -0700192 return av1_wedge_params_lookup[sb_type].bits;
Yaowu Xuc27fc142016-08-22 16:08:15 -0700193}
194
195static INLINE int get_interinter_wedge_bits(BLOCK_SIZE sb_type) {
Yaowu Xue51a4942019-05-06 09:53:44 -0700196 const int wbits = av1_wedge_params_lookup[sb_type].bits;
Yaowu Xuc27fc142016-08-22 16:08:15 -0700197 return (wbits > 0) ? wbits + 1 : 0;
198}
199
200static INLINE int is_interintra_wedge_used(BLOCK_SIZE sb_type) {
Yaowu Xue51a4942019-05-06 09:53:44 -0700201 return av1_wedge_params_lookup[sb_type].bits > 0;
Yaowu Xuc27fc142016-08-22 16:08:15 -0700202}
203
204static INLINE int get_interintra_wedge_bits(BLOCK_SIZE sb_type) {
Yaowu Xue51a4942019-05-06 09:53:44 -0700205 return av1_wedge_params_lookup[sb_type].bits;
Yaowu Xuc27fc142016-08-22 16:08:15 -0700206}
Sarah Parker569edda2016-12-14 14:57:38 -0800207
Peng Bin9295fca2018-05-18 13:46:12 +0800208void av1_make_inter_predictor(const uint8_t *src, int src_stride, uint8_t *dst,
209 int dst_stride, const SubpelParams *subpel_params,
210 const struct scale_factors *sf, int w, int h,
211 ConvolveParams *conv_params,
212 InterpFilters interp_filters,
213 const WarpTypesAllowed *warp_types, int p_col,
214 int p_row, int plane, int ref,
215 const MB_MODE_INFO *mi, int build_for_obmc,
216 const MACROBLOCKD *xd, int can_use_previous);
Urvang Joshi52b62992018-02-02 14:43:07 -0800217
Rupert Swarbrick27e90292017-09-28 17:46:50 +0100218void av1_make_masked_inter_predictor(
219 const uint8_t *pre, int pre_stride, uint8_t *dst, int dst_stride,
Peng Bin9295fca2018-05-18 13:46:12 +0800220 const SubpelParams *subpel_params, const struct scale_factors *sf, int w,
221 int h, ConvolveParams *conv_params, InterpFilters interp_filters, int plane,
Peng Bin8c41e3a2018-05-18 13:10:28 +0800222 const WarpTypesAllowed *warp_types, int p_col, int p_row, int ref,
223 MACROBLOCKD *xd, int can_use_previous);
Yaowu Xuc27fc142016-08-22 16:08:15 -0700224
Yaowu Xuc27fc142016-08-22 16:08:15 -0700225// TODO(jkoleszar): yet another mv clamping function :-(
Remy Foray9333b312018-11-28 09:17:05 +0000226static INLINE MV clamp_mv_to_umv_border_sb(const MACROBLOCKD *xd,
227 const MV *src_mv, int bw, int bh,
228 int ss_x, int ss_y) {
Yaowu Xuc27fc142016-08-22 16:08:15 -0700229 // If the MV points so far into the UMV border that no visible pixels
230 // are used for reconstruction, the subpel part of the MV can be
231 // discarded and the MV limited to 16 pixels with equivalent results.
Yaowu Xuf883b422016-08-30 14:01:10 -0700232 const int spel_left = (AOM_INTERP_EXTEND + bw) << SUBPEL_BITS;
Yaowu Xuc27fc142016-08-22 16:08:15 -0700233 const int spel_right = spel_left - SUBPEL_SHIFTS;
Yaowu Xuf883b422016-08-30 14:01:10 -0700234 const int spel_top = (AOM_INTERP_EXTEND + bh) << SUBPEL_BITS;
Yaowu Xuc27fc142016-08-22 16:08:15 -0700235 const int spel_bottom = spel_top - SUBPEL_SHIFTS;
Remy Foray9333b312018-11-28 09:17:05 +0000236 MV clamped_mv = { (int16_t)(src_mv->row * (1 << (1 - ss_y))),
237 (int16_t)(src_mv->col * (1 << (1 - ss_x))) };
Yaowu Xuc27fc142016-08-22 16:08:15 -0700238 assert(ss_x <= 1);
239 assert(ss_y <= 1);
240
Remy Foray9333b312018-11-28 09:17:05 +0000241 clamp_mv(&clamped_mv, xd->mb_to_left_edge * (1 << (1 - ss_x)) - spel_left,
242 xd->mb_to_right_edge * (1 << (1 - ss_x)) + spel_right,
243 xd->mb_to_top_edge * (1 << (1 - ss_y)) - spel_top,
244 xd->mb_to_bottom_edge * (1 << (1 - ss_y)) + spel_bottom);
Yaowu Xuc27fc142016-08-22 16:08:15 -0700245
246 return clamped_mv;
247}
248
Jerome Jiangd289a892019-03-12 15:28:02 -0700249static INLINE int64_t scaled_buffer_offset(int x_offset, int y_offset,
250 int stride,
251 const struct scale_factors *sf) {
Debargha Mukherjee15836142017-06-27 07:07:31 -0700252 const int x =
253 sf ? sf->scale_value_x(x_offset, sf) >> SCALE_EXTRA_BITS : x_offset;
254 const int y =
255 sf ? sf->scale_value_y(y_offset, sf) >> SCALE_EXTRA_BITS : y_offset;
Jerome Jiangd289a892019-03-12 15:28:02 -0700256 return (int64_t)y * stride + x;
Yaowu Xuc27fc142016-08-22 16:08:15 -0700257}
258
Jingning Han91d9a792017-04-18 12:01:52 -0700259static INLINE void setup_pred_plane(struct buf_2d *dst, BLOCK_SIZE bsize,
260 uint8_t *src, int width, int height,
261 int stride, int mi_row, int mi_col,
Yaowu Xuc27fc142016-08-22 16:08:15 -0700262 const struct scale_factors *scale,
263 int subsampling_x, int subsampling_y) {
Rupert Swarbrick6a93b152017-08-09 10:18:21 +0100264 // Offset the buffer pointer
265 if (subsampling_y && (mi_row & 0x01) && (mi_size_high[bsize] == 1))
266 mi_row -= 1;
267 if (subsampling_x && (mi_col & 0x01) && (mi_size_wide[bsize] == 1))
268 mi_col -= 1;
Jingning Han91d9a792017-04-18 12:01:52 -0700269
Yaowu Xuc27fc142016-08-22 16:08:15 -0700270 const int x = (MI_SIZE * mi_col) >> subsampling_x;
271 const int y = (MI_SIZE * mi_row) >> subsampling_y;
272 dst->buf = src + scaled_buffer_offset(x, y, stride, scale);
273 dst->buf0 = src;
274 dst->width = width;
275 dst->height = height;
276 dst->stride = stride;
277}
278
Yaowu Xu989dd5b2017-10-11 21:59:46 -0700279void av1_setup_dst_planes(struct macroblockd_plane *planes, BLOCK_SIZE bsize,
Imdad Sardharwallaaf8e2642018-01-19 11:46:34 +0000280 const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col,
Deepa K G7d4a0c12018-04-11 18:20:14 +0530281 const int plane_start, const int plane_end);
Yaowu Xuc27fc142016-08-22 16:08:15 -0700282
Yaowu Xuf883b422016-08-30 14:01:10 -0700283void av1_setup_pre_planes(MACROBLOCKD *xd, int idx,
284 const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col,
Imdad Sardharwallaaf8e2642018-01-19 11:46:34 +0000285 const struct scale_factors *sf, const int num_planes);
Yaowu Xuc27fc142016-08-22 16:08:15 -0700286
Debargha Mukherjee0df711f2017-05-02 16:00:20 -0700287static INLINE void set_default_interp_filters(
288 MB_MODE_INFO *const mbmi, InterpFilter frame_interp_filter) {
Rupert Swarbrick27e90292017-09-28 17:46:50 +0100289 mbmi->interp_filters =
290 av1_broadcast_interp_filter(av1_unswitchable_filter(frame_interp_filter));
Debargha Mukherjee0df711f2017-05-02 16:00:20 -0700291}
292
Yaowu Xuf883b422016-08-30 14:01:10 -0700293static INLINE int av1_is_interp_needed(const MACROBLOCKD *const xd) {
Yue Chen53b53f02018-03-29 14:31:23 -0700294 const MB_MODE_INFO *const mbmi = xd->mi[0];
Zoe Liuf704a1c2017-10-02 16:55:59 -0700295 if (mbmi->skip_mode) return 0;
Zoe Liuf40a9572017-10-13 12:37:19 -0700296 if (mbmi->motion_mode == WARPED_CAUSAL) return 0;
Debargha Mukherjee05653872018-04-26 15:31:27 -0700297 if (is_nontrans_global_motion(xd, xd->mi[0])) return 0;
Debargha Mukherjee0df711f2017-05-02 16:00:20 -0700298 return 1;
299}
300
Ravi Chaudhary6ac4b132018-05-08 16:34:44 +0530301void av1_setup_build_prediction_by_above_pred(
302 MACROBLOCKD *xd, int rel_mi_col, uint8_t above_mi_width,
303 MB_MODE_INFO *above_mbmi, struct build_prediction_ctxt *ctxt,
304 const int num_planes);
305void av1_setup_build_prediction_by_left_pred(MACROBLOCKD *xd, int rel_mi_row,
306 uint8_t left_mi_height,
307 MB_MODE_INFO *left_mbmi,
308 struct build_prediction_ctxt *ctxt,
309 const int num_planes);
Yue Chen19d76012018-02-16 15:13:40 -0800310void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
311 int mi_row, int mi_col,
312 uint8_t *above[MAX_MB_PLANE],
313 int above_stride[MAX_MB_PLANE],
314 uint8_t *left[MAX_MB_PLANE],
315 int left_stride[MAX_MB_PLANE]);
Yue Chen19d76012018-02-16 15:13:40 -0800316
317const uint8_t *av1_get_obmc_mask(int length);
318void av1_count_overlappable_neighbors(const AV1_COMMON *cm, MACROBLOCKD *xd,
319 int mi_row, int mi_col);
Yaowu Xuc27fc142016-08-22 16:08:15 -0700320
Debargha Mukherjeec54594f2017-04-27 02:08:22 -0700321#define MASK_MASTER_SIZE ((MAX_WEDGE_SIZE) << 1)
322#define MASK_MASTER_STRIDE (MASK_MASTER_SIZE)
Yaowu Xuc27fc142016-08-22 16:08:15 -0700323
Yaowu Xuf883b422016-08-30 14:01:10 -0700324void av1_init_wedge_masks();
Yaowu Xuc27fc142016-08-22 16:08:15 -0700325
Remyaf75b9842019-06-13 15:54:17 +0530326static INLINE const uint8_t *av1_get_contiguous_soft_mask(int8_t wedge_index,
327 int8_t wedge_sign,
Yaowu Xuf883b422016-08-30 14:01:10 -0700328 BLOCK_SIZE sb_type) {
Yaowu Xue51a4942019-05-06 09:53:44 -0700329 return av1_wedge_params_lookup[sb_type].masks[wedge_sign][wedge_index];
Yaowu Xuc27fc142016-08-22 16:08:15 -0700330}
331
Sarah Parkerb9f757c2017-01-06 17:12:24 -0800332const uint8_t *av1_get_compound_type_mask(
333 const INTERINTER_COMPOUND_DATA *const comp_data, BLOCK_SIZE sb_type);
Yue Chen670b6602017-10-30 16:57:42 -0700334
Peng Binc4b0b0d2018-07-03 21:15:39 +0800335// build interintra_predictors for one plane
336void av1_build_interintra_predictors_sbp(const AV1_COMMON *cm, MACROBLOCKD *xd,
337 uint8_t *pred, int stride,
Hui Suee7a9c02019-01-24 15:10:31 -0800338 const BUFFER_SET *ctx, int plane,
Yaowu Xuf883b422016-08-30 14:01:10 -0700339 BLOCK_SIZE bsize);
Yue Chen670b6602017-10-30 16:57:42 -0700340
David Barker761b1ac2017-09-25 11:23:03 +0100341void av1_build_interintra_predictors_sbuv(const AV1_COMMON *cm, MACROBLOCKD *xd,
342 uint8_t *upred, uint8_t *vpred,
343 int ustride, int vstride,
Hui Suee7a9c02019-01-24 15:10:31 -0800344 const BUFFER_SET *ctx,
345 BLOCK_SIZE bsize);
Yaowu Xuc27fc142016-08-22 16:08:15 -0700346
Yaowu Xudcf72172019-05-10 15:46:22 -0700347void av1_build_intra_predictors_for_interintra(const AV1_COMMON *cm,
348 MACROBLOCKD *xd,
349 BLOCK_SIZE bsize, int plane,
350 const BUFFER_SET *ctx,
351 uint8_t *dst, int dst_stride);
Peng Binc4b0b0d2018-07-03 21:15:39 +0800352
Yaowu Xuf883b422016-08-30 14:01:10 -0700353void av1_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane,
354 const uint8_t *inter_pred, int inter_stride,
355 const uint8_t *intra_pred, int intra_stride);
Yue Chen670b6602017-10-30 16:57:42 -0700356
Debargha Mukherjee7ac3eb12018-12-12 10:26:50 -0800357void av1_dist_wtd_comp_weight_assign(const AV1_COMMON *cm,
358 const MB_MODE_INFO *mbmi, int order_idx,
359 int *fwd_offset, int *bck_offset,
360 int *use_dist_wtd_comp_avg,
361 int is_compound);
Ravi Chaudhary18c5f6f2018-06-06 13:43:07 +0530362int av1_allow_warp(const MB_MODE_INFO *const mbmi,
363 const WarpTypesAllowed *const warp_types,
364 const WarpedMotionParams *const gm_params,
Urvang Joshie3863382018-10-04 12:07:25 -0700365 int build_for_obmc, const struct scale_factors *const sf,
Ravi Chaudhary18c5f6f2018-06-06 13:43:07 +0530366 WarpedMotionParams *final_warp_params);
Cheng Chenf78632e2017-10-20 15:30:51 -0700367
Yaowu Xuc27fc142016-08-22 16:08:15 -0700368#ifdef __cplusplus
369} // extern "C"
370#endif
371
James Zerne1cbb132018-08-22 14:10:36 -0700372#endif // AOM_AV1_COMMON_RECONINTER_H_