• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #define IGNORE_MODE -1
30 // Searches for the best inter-intra mode. Returns IGNORE_MODE if no good mode
31 // is found, 0 otherwise.
32 int av1_handle_inter_intra_mode(const AV1_COMP *const cpi, MACROBLOCK *const x,
33                                 BLOCK_SIZE bsize, MB_MODE_INFO *mbmi,
34                                 HandleInterModeArgs *args, int64_t ref_best_rd,
35                                 int *rate_mv, int *tmp_rate2,
36                                 const BUFFER_SET *orig_dst);
37 
38 int av1_compound_type_rd(const AV1_COMP *const cpi, MACROBLOCK *x,
39                          HandleInterModeArgs *args, BLOCK_SIZE bsize,
40                          int_mv *cur_mv, int mode_search_mask,
41                          int masked_compound_used, const BUFFER_SET *orig_dst,
42                          const BUFFER_SET *tmp_dst,
43                          const CompoundTypeRdBuffers *buffers, int *rate_mv,
44                          int64_t *rd, RD_STATS *rd_stats, int64_t ref_best_rd,
45                          int64_t ref_skip_rd, int *is_luma_interp_done,
46                          int64_t rd_thresh);
47 
48 #ifdef __cplusplus
49 }  // extern "C"
50 #endif
51 
52 #endif  // AOM_AV1_ENCODER_COMPOUND_TYPE_H_
53