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_ENCODER_RECONINTER_ENC_H_ 13 #define AOM_AV1_ENCODER_RECONINTER_ENC_H_ 14 15 #include "aom/aom_integer.h" 16 #include "av1/common/av1_common_int.h" 17 #include "av1/common/blockd.h" 18 #include "av1/common/convolve.h" 19 #include "av1/common/filter.h" 20 #include "av1/common/reconinter.h" 21 #include "av1/common/warped_motion.h" 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 void aom_highbd_comp_mask_upsampled_pred( 28 MACROBLOCKD *xd, const struct AV1Common *const cm, int mi_row, int mi_col, 29 const MV *const mv, uint8_t *comp_pred8, const uint8_t *pred8, int width, 30 int height, int subpel_x_q3, int subpel_y_q3, const uint8_t *ref8, 31 int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask, 32 int bd, int subpel_search); 33 34 // Build single or compound reference inter predictors for all planes. 35 // Can build inter-intra predictors, masked predictors etc as well. 36 void av1_enc_build_inter_predictor(const AV1_COMMON *cm, MACROBLOCKD *xd, 37 int mi_row, int mi_col, 38 const BUFFER_SET *ctx, BLOCK_SIZE bsize, 39 int plane_from, int plane_to); 40 41 void av1_enc_build_inter_predictor_y(MACROBLOCKD *xd, int mi_row, int mi_col); 42 43 void av1_enc_build_inter_predictor_y_nonrd(MACROBLOCKD *xd, 44 InterPredParams *inter_pred_params, 45 const SubpelParams *subpel_params); 46 47 // Build one inter predictor. It is called for building predictor for single 48 // reference case, or just the 1st or 2nd reference in compound reference case. 49 // Can build both regular and masked predictors. 50 void av1_enc_build_one_inter_predictor(uint8_t *dst, int dst_stride, 51 const MV *src_mv, 52 InterPredParams *inter_pred_params); 53 54 void av1_build_prediction_by_above_preds(const AV1_COMMON *cm, MACROBLOCKD *xd, 55 uint8_t *tmp_buf[MAX_MB_PLANE], 56 int tmp_width[MAX_MB_PLANE], 57 int tmp_height[MAX_MB_PLANE], 58 int tmp_stride[MAX_MB_PLANE]); 59 60 void av1_build_prediction_by_left_preds(const AV1_COMMON *cm, MACROBLOCKD *xd, 61 uint8_t *tmp_buf[MAX_MB_PLANE], 62 int tmp_width[MAX_MB_PLANE], 63 int tmp_height[MAX_MB_PLANE], 64 int tmp_stride[MAX_MB_PLANE]); 65 66 void av1_build_obmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd); 67 68 // |ext_dst*| are indexed from |plane_from| to |plane_to| inclusive. 69 void av1_build_inter_predictors_for_planes_single_buf( 70 MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane_from, int plane_to, int ref, 71 uint8_t *ext_dst[], int ext_dst_stride[]); 72 73 // |ext_dst*| are indexed from |plane_from| to |plane_to| inclusive. 74 void av1_build_wedge_inter_predictor_from_buf(MACROBLOCKD *xd, BLOCK_SIZE bsize, 75 int plane_from, int plane_to, 76 uint8_t *ext_dst0[], 77 int ext_dst_stride0[], 78 uint8_t *ext_dst1[], 79 int ext_dst_stride1[]); 80 81 #ifdef __cplusplus 82 } // extern "C" 83 #endif 84 85 #endif // AOM_AV1_ENCODER_RECONINTER_ENC_H_ 86