1 /* 2 * Copyright (c) 2020, 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_COMPOUND_TYPE_H_ 13 #define AOM_AV1_ENCODER_COMPOUND_TYPE_H_ 14 15 #include "av1/encoder/encoder.h" 16 #include "av1/encoder/interp_search.h" 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 // Structure to store the compound type related stats for best compound type 23 typedef struct { 24 INTERINTER_COMPOUND_DATA best_compound_data; 25 int64_t comp_best_model_rd; 26 int best_compmode_interinter_cost; 27 } BEST_COMP_TYPE_STATS; 28 29 int av1_handle_inter_intra_mode(const AV1_COMP *const cpi, MACROBLOCK *const x, 30 BLOCK_SIZE bsize, MB_MODE_INFO *mbmi, 31 HandleInterModeArgs *args, int64_t ref_best_rd, 32 int *rate_mv, int *tmp_rate2, 33 const BUFFER_SET *orig_dst); 34 35 int av1_compound_type_rd(const AV1_COMP *const cpi, MACROBLOCK *x, 36 BLOCK_SIZE bsize, int_mv *cur_mv, int mode_search_mask, 37 int masked_compound_used, const BUFFER_SET *orig_dst, 38 const BUFFER_SET *tmp_dst, 39 const CompoundTypeRdBuffers *buffers, int *rate_mv, 40 int64_t *rd, RD_STATS *rd_stats, int64_t ref_best_rd, 41 int64_t ref_skip_rd, int *is_luma_interp_done, 42 int64_t rd_thresh); 43 44 #ifdef __cplusplus 45 } // extern "C" 46 #endif 47 48 #endif // AOM_AV1_ENCODER_COMPOUND_TYPE_H_ 49