Coverage Report

Created: 2025-07-09 07:14

/src/libavif/ext/aom/av1/encoder/rdopt.h
Line
Count
Source (jump to first uncovered line)
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_RDOPT_H_
13
#define AOM_AV1_ENCODER_RDOPT_H_
14
15
#include <stdbool.h>
16
17
#include "av1/common/blockd.h"
18
#include "av1/common/txb_common.h"
19
20
#include "av1/encoder/block.h"
21
#include "av1/encoder/context_tree.h"
22
#include "av1/encoder/encoder.h"
23
#include "av1/encoder/encodetxb.h"
24
#include "av1/encoder/rdopt_utils.h"
25
26
#ifdef __cplusplus
27
extern "C" {
28
#endif
29
30
0
#define COMP_TYPE_RD_THRESH_SCALE 11
31
0
#define COMP_TYPE_RD_THRESH_SHIFT 4
32
10.6M
#define MAX_WINNER_MOTION_MODES 10
33
34
struct TileInfo;
35
struct macroblock;
36
struct RD_STATS;
37
38
/*!\brief AV1 intra mode selection for intra frames.
39
 *
40
 * \ingroup intra_mode_search
41
 * \callgraph
42
 * Top level function for rd-based intra mode selection during intra frame
43
 * encoding. This function will first search for the best luma prediction by
44
 * calling av1_rd_pick_intra_sby_mode, then it searches for chroma prediction
45
 * with av1_rd_pick_intra_sbuv_mode. If applicable, this function ends the
46
 * search with an evaluation for intrabc.
47
 *
48
 * \param[in]    cpi            Top-level encoder structure.
49
 * \param[in]    x              Pointer to structure holding all the data for
50
                                the current macroblock.
51
 * \param[in]    rd_cost        Struct to keep track of the RD information.
52
 * \param[in]    bsize          Current block size.
53
 * \param[in]    ctx            Structure to hold snapshot of coding context
54
                                during the mode picking process.
55
 * \param[in]    best_rd Best   RD seen for this block so far.
56
 *
57
 * \remark Nothing is returned. Instead, the MB_MODE_INFO struct inside x
58
 * is modified to store information about the best mode computed
59
 * in this function. The rd_cost struct is also updated with the RD stats
60
 * corresponding to the best mode found.
61
 */
62
void av1_rd_pick_intra_mode_sb(const struct AV1_COMP *cpi, struct macroblock *x,
63
                               struct RD_STATS *rd_cost, BLOCK_SIZE bsize,
64
                               PICK_MODE_CONTEXT *ctx, int64_t best_rd);
65
66
/*!\brief AV1 inter mode selection.
67
 *
68
 * \ingroup inter_mode_search
69
 * \callgraph
70
 * Top level function for inter mode selection. This function will loop over
71
 * all possible inter modes and select the best one for the current block by
72
 * computing the RD cost. The mode search and RD are computed in
73
 * handle_inter_mode(), which is called from this function within the main
74
 * loop.
75
 *
76
 * \param[in]    cpi            Top-level encoder structure
77
 * \param[in]    tile_data      Pointer to struct holding adaptive
78
                                data/contexts/models for the tile during
79
                                encoding
80
 * \param[in]    x              Pointer to structure holding all the data for
81
                                the current macroblock
82
 * \param[in]    rd_cost        Struct to keep track of the RD information
83
 * \param[in]    bsize          Current block size
84
 * \param[in]    ctx            Structure to hold snapshot of coding context
85
                                during the mode picking process
86
 * \param[in]    best_rd_so_far Best RD seen for this block so far
87
 *
88
 * \remark Nothing is returned. Instead, the MB_MODE_INFO struct inside x
89
 * is modified to store information about the best mode computed
90
 * in this function. The rd_cost struct is also updated with the RD stats
91
 * corresponding to the best mode found.
92
 */
93
void av1_rd_pick_inter_mode(struct AV1_COMP *cpi, struct TileDataEnc *tile_data,
94
                            struct macroblock *x, struct RD_STATS *rd_cost,
95
                            BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx,
96
                            int64_t best_rd_so_far);
97
98
/*!\brief AV1 intra mode selection based on Non-RD optimized model.
99
 *
100
 * \ingroup nonrd_mode_search
101
 * \callgraph
102
 * \callergraph
103
 * Top level function for Non-RD optimized intra mode selection.
104
 * This finction will loop over subset of intra modes and select the best one
105
 * based on calculated modelled RD cost. Only 4 intra modes are checked as
106
 * specified in \c intra_mode_list. When calculating RD cost Hadamard transform
107
 * of residual is used to calculate rate. Estmation of RD cost is performed
108
 * in \c av1_estimate_block_intra which is called from this function
109
 *
110
 * \param[in]    cpi            Top-level encoder structure
111
 * \param[in]    x              Pointer to structure holding all the data for
112
                                the current macroblock
113
 * \param[in]    rd_cost        Struct to keep track of the RD information
114
 * \param[in]    bsize          Current block size
115
 * \param[in]    ctx            Structure to hold snapshot of coding context
116
                                during the mode picking process
117
 *
118
 * \remark Nothing is returned. Instead, the MB_MODE_INFO struct inside x
119
 * is modified to store information about the best mode computed
120
 * in this function. The rd_cost struct is also updated with the RD stats
121
 * corresponding to the best mode found.
122
 */
123
void av1_nonrd_pick_intra_mode(AV1_COMP *cpi, MACROBLOCK *x, RD_STATS *rd_cost,
124
                               BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx);
125
126
/*!\brief AV1 inter mode selection based on Non-RD optimized model.
127
 *
128
 * \ingroup nonrd_mode_search
129
 * \callgraph
130
 * Top level function for Non-RD optimized inter mode selection.
131
 * This finction will loop over subset of inter modes and select the best one
132
 * based on calculated modelled RD cost. While making decisions which modes to
133
 * check, this function applies heuristics based on previously checked modes,
134
 * block residual variance, block size, and other factors to prune certain
135
 * modes and reference frames. Currently only single reference frame modes
136
 * are checked. Additional heuristics are applied to decide if intra modes
137
 *  need to be checked.
138
 *  *
139
 * \param[in]    cpi            Top-level encoder structure
140
 * \param[in]    tile_data      Pointer to struct holding adaptive
141
                                data/contexts/models for the tile during
142
                                encoding
143
 * \param[in]    x              Pointer to structure holding all the data for
144
                                the current macroblock
145
 * \param[in]    rd_cost        Struct to keep track of the RD information
146
 * \param[in]    bsize          Current block size
147
 * \param[in]    ctx            Structure to hold snapshot of coding context
148
                                during the mode picking process
149
 *
150
 * \remark Nothing is returned. Instead, the MB_MODE_INFO struct inside x
151
 * is modified to store information about the best mode computed
152
 * in this function. The rd_cost struct is also updated with the RD stats
153
 * corresponding to the best mode found.
154
 */
155
void av1_nonrd_pick_inter_mode_sb(struct AV1_COMP *cpi,
156
                                  struct TileDataEnc *tile_data,
157
                                  struct macroblock *x,
158
                                  struct RD_STATS *rd_cost, BLOCK_SIZE bsize,
159
                                  PICK_MODE_CONTEXT *ctx);
160
161
void av1_rd_pick_inter_mode_sb_seg_skip(
162
    const struct AV1_COMP *cpi, struct TileDataEnc *tile_data,
163
    struct macroblock *x, int mi_row, int mi_col, struct RD_STATS *rd_cost,
164
    BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx, int64_t best_rd_so_far);
165
166
void av1_inter_mode_data_init(struct TileDataEnc *tile_data);
167
void av1_inter_mode_data_fit(TileDataEnc *tile_data, int rdmult);
168
169
2.04M
static inline int coded_to_superres_mi(int mi_col, int denom) {
170
2.04M
  return (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
171
2.04M
}
Unexecuted instantiation: av1_cx_iface.c:coded_to_superres_mi
encodeframe.c:coded_to_superres_mi
Line
Count
Source
169
95.1k
static inline int coded_to_superres_mi(int mi_col, int denom) {
170
95.1k
  return (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
171
95.1k
}
encodeframe_utils.c:coded_to_superres_mi
Line
Count
Source
169
149k
static inline int coded_to_superres_mi(int mi_col, int denom) {
170
149k
  return (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
171
149k
}
Unexecuted instantiation: encodemb.c:coded_to_superres_mi
encoder.c:coded_to_superres_mi
Line
Count
Source
169
615k
static inline int coded_to_superres_mi(int mi_col, int denom) {
170
615k
  return (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
171
615k
}
encoder_utils.c:coded_to_superres_mi
Line
Count
Source
169
20.4k
static inline int coded_to_superres_mi(int mi_col, int denom) {
170
20.4k
  return (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
171
20.4k
}
Unexecuted instantiation: encodetxb.c:coded_to_superres_mi
Unexecuted instantiation: ethread.c:coded_to_superres_mi
Unexecuted instantiation: firstpass.c:coded_to_superres_mi
Unexecuted instantiation: global_motion_facade.c:coded_to_superres_mi
Unexecuted instantiation: mcomp.c:coded_to_superres_mi
Unexecuted instantiation: partition_search.c:coded_to_superres_mi
Unexecuted instantiation: partition_strategy.c:coded_to_superres_mi
Unexecuted instantiation: rd.c:coded_to_superres_mi
rdopt.c:coded_to_superres_mi
Line
Count
Source
169
1.16M
static inline int coded_to_superres_mi(int mi_col, int denom) {
170
1.16M
  return (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
171
1.16M
}
Unexecuted instantiation: nonrd_pickmode.c:coded_to_superres_mi
Unexecuted instantiation: nonrd_opt.c:coded_to_superres_mi
Unexecuted instantiation: speed_features.c:coded_to_superres_mi
Unexecuted instantiation: superres_scale.c:coded_to_superres_mi
Unexecuted instantiation: svc_layercontext.c:coded_to_superres_mi
Unexecuted instantiation: tokenize.c:coded_to_superres_mi
tpl_model.c:coded_to_superres_mi
Line
Count
Source
169
4.95k
static inline int coded_to_superres_mi(int mi_col, int denom) {
170
4.95k
  return (mi_col * denom + SCALE_NUMERATOR / 2) / SCALE_NUMERATOR;
171
4.95k
}
Unexecuted instantiation: var_based_part.c:coded_to_superres_mi
Unexecuted instantiation: compound_type.c:coded_to_superres_mi
Unexecuted instantiation: encode_strategy.c:coded_to_superres_mi
Unexecuted instantiation: motion_search_facade.c:coded_to_superres_mi
Unexecuted instantiation: rdopt_sse4.c:coded_to_superres_mi
Unexecuted instantiation: rdopt_avx2.c:coded_to_superres_mi
172
173
2.04M
static inline int av1_encoder_get_relative_dist(int a, int b) {
174
2.04M
  assert(a >= 0 && b >= 0);
175
2.04M
  return (a - b);
176
2.04M
}
Unexecuted instantiation: av1_cx_iface.c:av1_encoder_get_relative_dist
encodeframe.c:av1_encoder_get_relative_dist
Line
Count
Source
173
410k
static inline int av1_encoder_get_relative_dist(int a, int b) {
174
410k
  assert(a >= 0 && b >= 0);
175
410k
  return (a - b);
176
410k
}
Unexecuted instantiation: encodeframe_utils.c:av1_encoder_get_relative_dist
Unexecuted instantiation: encodemb.c:av1_encoder_get_relative_dist
Unexecuted instantiation: encoder.c:av1_encoder_get_relative_dist
Unexecuted instantiation: encoder_utils.c:av1_encoder_get_relative_dist
Unexecuted instantiation: encodetxb.c:av1_encoder_get_relative_dist
Unexecuted instantiation: ethread.c:av1_encoder_get_relative_dist
Unexecuted instantiation: firstpass.c:av1_encoder_get_relative_dist
global_motion_facade.c:av1_encoder_get_relative_dist
Line
Count
Source
173
52.1k
static inline int av1_encoder_get_relative_dist(int a, int b) {
174
52.1k
  assert(a >= 0 && b >= 0);
175
52.1k
  return (a - b);
176
52.1k
}
Unexecuted instantiation: mcomp.c:av1_encoder_get_relative_dist
Unexecuted instantiation: partition_search.c:av1_encoder_get_relative_dist
Unexecuted instantiation: partition_strategy.c:av1_encoder_get_relative_dist
Unexecuted instantiation: rd.c:av1_encoder_get_relative_dist
rdopt.c:av1_encoder_get_relative_dist
Line
Count
Source
173
1.54M
static inline int av1_encoder_get_relative_dist(int a, int b) {
174
1.54M
  assert(a >= 0 && b >= 0);
175
1.54M
  return (a - b);
176
1.54M
}
Unexecuted instantiation: nonrd_pickmode.c:av1_encoder_get_relative_dist
Unexecuted instantiation: nonrd_opt.c:av1_encoder_get_relative_dist
Unexecuted instantiation: speed_features.c:av1_encoder_get_relative_dist
Unexecuted instantiation: superres_scale.c:av1_encoder_get_relative_dist
Unexecuted instantiation: svc_layercontext.c:av1_encoder_get_relative_dist
Unexecuted instantiation: tokenize.c:av1_encoder_get_relative_dist
tpl_model.c:av1_encoder_get_relative_dist
Line
Count
Source
173
32.2k
static inline int av1_encoder_get_relative_dist(int a, int b) {
174
32.2k
  assert(a >= 0 && b >= 0);
175
32.2k
  return (a - b);
176
32.2k
}
Unexecuted instantiation: var_based_part.c:av1_encoder_get_relative_dist
Unexecuted instantiation: compound_type.c:av1_encoder_get_relative_dist
Unexecuted instantiation: encode_strategy.c:av1_encoder_get_relative_dist
Unexecuted instantiation: motion_search_facade.c:av1_encoder_get_relative_dist
Unexecuted instantiation: rdopt_sse4.c:av1_encoder_get_relative_dist
Unexecuted instantiation: rdopt_avx2.c:av1_encoder_get_relative_dist
177
178
// This function will return number of mi's in a superblock.
179
0
static inline int av1_get_sb_mi_size(const AV1_COMMON *const cm) {
180
0
  const int mi_alloc_size_1d = mi_size_wide[cm->mi_params.mi_alloc_bsize];
181
0
  int sb_mi_rows =
182
0
      (mi_size_wide[cm->seq_params->sb_size] + mi_alloc_size_1d - 1) /
183
0
      mi_alloc_size_1d;
184
0
  assert(mi_size_wide[cm->seq_params->sb_size] ==
185
0
         mi_size_high[cm->seq_params->sb_size]);
186
0
  int sb_mi_size = sb_mi_rows * sb_mi_rows;
187
0
188
0
  return sb_mi_size;
189
0
}
Unexecuted instantiation: av1_cx_iface.c:av1_get_sb_mi_size
Unexecuted instantiation: encodeframe.c:av1_get_sb_mi_size
Unexecuted instantiation: encodeframe_utils.c:av1_get_sb_mi_size
Unexecuted instantiation: encodemb.c:av1_get_sb_mi_size
Unexecuted instantiation: encoder.c:av1_get_sb_mi_size
Unexecuted instantiation: encoder_utils.c:av1_get_sb_mi_size
Unexecuted instantiation: encodetxb.c:av1_get_sb_mi_size
Unexecuted instantiation: ethread.c:av1_get_sb_mi_size
Unexecuted instantiation: firstpass.c:av1_get_sb_mi_size
Unexecuted instantiation: global_motion_facade.c:av1_get_sb_mi_size
Unexecuted instantiation: mcomp.c:av1_get_sb_mi_size
Unexecuted instantiation: partition_search.c:av1_get_sb_mi_size
Unexecuted instantiation: partition_strategy.c:av1_get_sb_mi_size
Unexecuted instantiation: rd.c:av1_get_sb_mi_size
Unexecuted instantiation: rdopt.c:av1_get_sb_mi_size
Unexecuted instantiation: nonrd_pickmode.c:av1_get_sb_mi_size
Unexecuted instantiation: nonrd_opt.c:av1_get_sb_mi_size
Unexecuted instantiation: speed_features.c:av1_get_sb_mi_size
Unexecuted instantiation: superres_scale.c:av1_get_sb_mi_size
Unexecuted instantiation: svc_layercontext.c:av1_get_sb_mi_size
Unexecuted instantiation: tokenize.c:av1_get_sb_mi_size
Unexecuted instantiation: tpl_model.c:av1_get_sb_mi_size
Unexecuted instantiation: var_based_part.c:av1_get_sb_mi_size
Unexecuted instantiation: compound_type.c:av1_get_sb_mi_size
Unexecuted instantiation: encode_strategy.c:av1_get_sb_mi_size
Unexecuted instantiation: motion_search_facade.c:av1_get_sb_mi_size
Unexecuted instantiation: rdopt_sse4.c:av1_get_sb_mi_size
Unexecuted instantiation: rdopt_avx2.c:av1_get_sb_mi_size
190
191
// This function prunes the mode if either of the reference frame falls in the
192
// pruning list
193
static inline int prune_ref(const MV_REFERENCE_FRAME *const ref_frame,
194
                            const unsigned int *const ref_display_order_hint,
195
                            const unsigned int frame_display_order_hint,
196
17.1M
                            const int *ref_frame_list) {
197
50.8M
  for (int i = 0; i < 2; i++) {
198
34.1M
    if (ref_frame_list[i] == NONE_FRAME) continue;
199
200
34.0M
    if (ref_frame[0] == ref_frame_list[i] ||
201
34.0M
        ref_frame[1] == ref_frame_list[i]) {
202
1.58M
      if (av1_encoder_get_relative_dist(
203
1.58M
              ref_display_order_hint[ref_frame_list[i] - LAST_FRAME],
204
1.58M
              frame_display_order_hint) < 0)
205
449k
        return 1;
206
1.58M
    }
207
34.0M
  }
208
16.7M
  return 0;
209
17.1M
}
Unexecuted instantiation: av1_cx_iface.c:prune_ref
Unexecuted instantiation: encodeframe.c:prune_ref
Unexecuted instantiation: encodeframe_utils.c:prune_ref
Unexecuted instantiation: encodemb.c:prune_ref
Unexecuted instantiation: encoder.c:prune_ref
Unexecuted instantiation: encoder_utils.c:prune_ref
Unexecuted instantiation: encodetxb.c:prune_ref
Unexecuted instantiation: ethread.c:prune_ref
Unexecuted instantiation: firstpass.c:prune_ref
global_motion_facade.c:prune_ref
Line
Count
Source
196
24.8k
                            const int *ref_frame_list) {
197
74.5k
  for (int i = 0; i < 2; i++) {
198
49.7k
    if (ref_frame_list[i] == NONE_FRAME) continue;
199
200
49.7k
    if (ref_frame[0] == ref_frame_list[i] ||
201
49.7k
        ref_frame[1] == ref_frame_list[i]) {
202
0
      if (av1_encoder_get_relative_dist(
203
0
              ref_display_order_hint[ref_frame_list[i] - LAST_FRAME],
204
0
              frame_display_order_hint) < 0)
205
0
        return 1;
206
0
    }
207
49.7k
  }
208
24.8k
  return 0;
209
24.8k
}
Unexecuted instantiation: mcomp.c:prune_ref
Unexecuted instantiation: partition_search.c:prune_ref
Unexecuted instantiation: partition_strategy.c:prune_ref
Unexecuted instantiation: rd.c:prune_ref
rdopt.c:prune_ref
Line
Count
Source
196
17.0M
                            const int *ref_frame_list) {
197
50.4M
  for (int i = 0; i < 2; i++) {
198
33.8M
    if (ref_frame_list[i] == NONE_FRAME) continue;
199
200
33.8M
    if (ref_frame[0] == ref_frame_list[i] ||
201
33.8M
        ref_frame[1] == ref_frame_list[i]) {
202
1.54M
      if (av1_encoder_get_relative_dist(
203
1.54M
              ref_display_order_hint[ref_frame_list[i] - LAST_FRAME],
204
1.54M
              frame_display_order_hint) < 0)
205
440k
        return 1;
206
1.54M
    }
207
33.8M
  }
208
16.5M
  return 0;
209
17.0M
}
Unexecuted instantiation: nonrd_pickmode.c:prune_ref
Unexecuted instantiation: nonrd_opt.c:prune_ref
Unexecuted instantiation: speed_features.c:prune_ref
Unexecuted instantiation: superres_scale.c:prune_ref
Unexecuted instantiation: svc_layercontext.c:prune_ref
Unexecuted instantiation: tokenize.c:prune_ref
tpl_model.c:prune_ref
Line
Count
Source
196
110k
                            const int *ref_frame_list) {
197
319k
  for (int i = 0; i < 2; i++) {
198
217k
    if (ref_frame_list[i] == NONE_FRAME) continue;
199
200
217k
    if (ref_frame[0] == ref_frame_list[i] ||
201
217k
        ref_frame[1] == ref_frame_list[i]) {
202
32.2k
      if (av1_encoder_get_relative_dist(
203
32.2k
              ref_display_order_hint[ref_frame_list[i] - LAST_FRAME],
204
32.2k
              frame_display_order_hint) < 0)
205
8.75k
        return 1;
206
32.2k
    }
207
217k
  }
208
102k
  return 0;
209
110k
}
Unexecuted instantiation: var_based_part.c:prune_ref
Unexecuted instantiation: compound_type.c:prune_ref
Unexecuted instantiation: encode_strategy.c:prune_ref
Unexecuted instantiation: motion_search_facade.c:prune_ref
Unexecuted instantiation: rdopt_sse4.c:prune_ref
Unexecuted instantiation: rdopt_avx2.c:prune_ref
210
211
static inline int has_closest_ref_frames(const MV_REFERENCE_FRAME *ref_frame,
212
                                         int8_t closest_past_ref,
213
0
                                         int8_t closest_future_ref) {
214
0
  int has_closest_past_ref =
215
0
      (ref_frame[0] == closest_past_ref) || (ref_frame[1] == closest_past_ref);
216
0
  int has_closest_future_ref = (ref_frame[0] == closest_future_ref) ||
217
0
                               (ref_frame[1] == closest_future_ref);
218
0
  return (has_closest_past_ref && has_closest_future_ref);
219
0
}
Unexecuted instantiation: av1_cx_iface.c:has_closest_ref_frames
Unexecuted instantiation: encodeframe.c:has_closest_ref_frames
Unexecuted instantiation: encodeframe_utils.c:has_closest_ref_frames
Unexecuted instantiation: encodemb.c:has_closest_ref_frames
Unexecuted instantiation: encoder.c:has_closest_ref_frames
Unexecuted instantiation: encoder_utils.c:has_closest_ref_frames
Unexecuted instantiation: encodetxb.c:has_closest_ref_frames
Unexecuted instantiation: ethread.c:has_closest_ref_frames
Unexecuted instantiation: firstpass.c:has_closest_ref_frames
Unexecuted instantiation: global_motion_facade.c:has_closest_ref_frames
Unexecuted instantiation: mcomp.c:has_closest_ref_frames
Unexecuted instantiation: partition_search.c:has_closest_ref_frames
Unexecuted instantiation: partition_strategy.c:has_closest_ref_frames
Unexecuted instantiation: rd.c:has_closest_ref_frames
Unexecuted instantiation: rdopt.c:has_closest_ref_frames
Unexecuted instantiation: nonrd_pickmode.c:has_closest_ref_frames
Unexecuted instantiation: nonrd_opt.c:has_closest_ref_frames
Unexecuted instantiation: speed_features.c:has_closest_ref_frames
Unexecuted instantiation: superres_scale.c:has_closest_ref_frames
Unexecuted instantiation: svc_layercontext.c:has_closest_ref_frames
Unexecuted instantiation: tokenize.c:has_closest_ref_frames
Unexecuted instantiation: tpl_model.c:has_closest_ref_frames
Unexecuted instantiation: var_based_part.c:has_closest_ref_frames
Unexecuted instantiation: compound_type.c:has_closest_ref_frames
Unexecuted instantiation: encode_strategy.c:has_closest_ref_frames
Unexecuted instantiation: motion_search_facade.c:has_closest_ref_frames
Unexecuted instantiation: rdopt_sse4.c:has_closest_ref_frames
Unexecuted instantiation: rdopt_avx2.c:has_closest_ref_frames
220
221
static inline int has_best_pred_mv_sad(const MV_REFERENCE_FRAME *ref_frame,
222
0
                                       const MACROBLOCK *const x) {
223
0
  int has_best_past_pred_mv_sad = 0;
224
0
  int has_best_future_pred_mv_sad = 0;
225
0
  if (x->best_pred_mv_sad[0] < INT_MAX && x->best_pred_mv_sad[1] < INT_MAX) {
226
0
    has_best_past_pred_mv_sad =
227
0
        (x->pred_mv_sad[ref_frame[0]] == x->best_pred_mv_sad[0]) ||
228
0
        (x->pred_mv_sad[ref_frame[1]] == x->best_pred_mv_sad[0]);
229
0
    has_best_future_pred_mv_sad =
230
0
        (x->pred_mv_sad[ref_frame[0]] == x->best_pred_mv_sad[1]) ||
231
0
        (x->pred_mv_sad[ref_frame[1]] == x->best_pred_mv_sad[1]);
232
0
  }
233
0
  return (has_best_past_pred_mv_sad && has_best_future_pred_mv_sad);
234
0
}
Unexecuted instantiation: av1_cx_iface.c:has_best_pred_mv_sad
Unexecuted instantiation: encodeframe.c:has_best_pred_mv_sad
Unexecuted instantiation: encodeframe_utils.c:has_best_pred_mv_sad
Unexecuted instantiation: encodemb.c:has_best_pred_mv_sad
Unexecuted instantiation: encoder.c:has_best_pred_mv_sad
Unexecuted instantiation: encoder_utils.c:has_best_pred_mv_sad
Unexecuted instantiation: encodetxb.c:has_best_pred_mv_sad
Unexecuted instantiation: ethread.c:has_best_pred_mv_sad
Unexecuted instantiation: firstpass.c:has_best_pred_mv_sad
Unexecuted instantiation: global_motion_facade.c:has_best_pred_mv_sad
Unexecuted instantiation: mcomp.c:has_best_pred_mv_sad
Unexecuted instantiation: partition_search.c:has_best_pred_mv_sad
Unexecuted instantiation: partition_strategy.c:has_best_pred_mv_sad
Unexecuted instantiation: rd.c:has_best_pred_mv_sad
Unexecuted instantiation: rdopt.c:has_best_pred_mv_sad
Unexecuted instantiation: nonrd_pickmode.c:has_best_pred_mv_sad
Unexecuted instantiation: nonrd_opt.c:has_best_pred_mv_sad
Unexecuted instantiation: speed_features.c:has_best_pred_mv_sad
Unexecuted instantiation: superres_scale.c:has_best_pred_mv_sad
Unexecuted instantiation: svc_layercontext.c:has_best_pred_mv_sad
Unexecuted instantiation: tokenize.c:has_best_pred_mv_sad
Unexecuted instantiation: tpl_model.c:has_best_pred_mv_sad
Unexecuted instantiation: var_based_part.c:has_best_pred_mv_sad
Unexecuted instantiation: compound_type.c:has_best_pred_mv_sad
Unexecuted instantiation: encode_strategy.c:has_best_pred_mv_sad
Unexecuted instantiation: motion_search_facade.c:has_best_pred_mv_sad
Unexecuted instantiation: rdopt_sse4.c:has_best_pred_mv_sad
Unexecuted instantiation: rdopt_avx2.c:has_best_pred_mv_sad
235
236
static inline int prune_ref_by_selective_ref_frame(
237
    const AV1_COMP *const cpi, const MACROBLOCK *const x,
238
    const MV_REFERENCE_FRAME *const ref_frame,
239
8.65M
    const unsigned int *const ref_display_order_hint) {
240
8.65M
  const SPEED_FEATURES *const sf = &cpi->sf;
241
8.65M
  if (!sf->inter_sf.selective_ref_frame) return 0;
242
243
8.65M
  const int comp_pred = ref_frame[1] > INTRA_FRAME;
244
245
8.65M
  if (sf->inter_sf.selective_ref_frame >= 2 ||
246
8.65M
      (sf->inter_sf.selective_ref_frame == 1 && comp_pred)) {
247
8.65M
    int ref_frame_list[2] = { LAST3_FRAME, LAST2_FRAME };
248
249
8.65M
    if (x != NULL) {
250
      // Disable pruning if either tpl suggests that we keep the frame or
251
      // the pred_mv gives us the best sad
252
8.58M
      if (x->tpl_keep_ref_frame[LAST3_FRAME] ||
253
8.58M
          x->pred_mv_sad[LAST3_FRAME] == x->best_pred_mv_sad[0]) {
254
6.75k
        ref_frame_list[0] = NONE_FRAME;
255
6.75k
      }
256
8.58M
      if (x->tpl_keep_ref_frame[LAST2_FRAME] ||
257
8.58M
          x->pred_mv_sad[LAST2_FRAME] == x->best_pred_mv_sad[0]) {
258
6.75k
        ref_frame_list[1] = NONE_FRAME;
259
6.75k
      }
260
8.58M
    }
261
262
8.65M
    if (prune_ref(ref_frame, ref_display_order_hint,
263
8.65M
                  ref_display_order_hint[GOLDEN_FRAME - LAST_FRAME],
264
8.65M
                  ref_frame_list))
265
103k
      return 1;
266
8.65M
  }
267
268
8.55M
  if (sf->inter_sf.selective_ref_frame >= 3) {
269
8.55M
    int ref_frame_list[2] = { ALTREF2_FRAME, BWDREF_FRAME };
270
271
8.55M
    if (x != NULL) {
272
      // Disable pruning if either tpl suggests that we keep the frame or
273
      // the pred_mv gives us the best sad
274
8.48M
      if (x->tpl_keep_ref_frame[ALTREF2_FRAME] ||
275
8.48M
          x->pred_mv_sad[ALTREF2_FRAME] == x->best_pred_mv_sad[0]) {
276
6.75k
        ref_frame_list[0] = NONE_FRAME;
277
6.75k
      }
278
8.48M
      if (x->tpl_keep_ref_frame[BWDREF_FRAME] ||
279
8.48M
          x->pred_mv_sad[BWDREF_FRAME] == x->best_pred_mv_sad[0]) {
280
6.75k
        ref_frame_list[1] = NONE_FRAME;
281
6.75k
      }
282
8.48M
    }
283
284
8.55M
    if (prune_ref(ref_frame, ref_display_order_hint,
285
8.55M
                  ref_display_order_hint[LAST_FRAME - LAST_FRAME],
286
8.55M
                  ref_frame_list))
287
345k
      return 1;
288
8.55M
  }
289
290
8.20M
  if (x != NULL && sf->inter_sf.prune_comp_ref_frames && comp_pred) {
291
0
    int closest_ref_frames = has_closest_ref_frames(
292
0
        ref_frame, cpi->ref_frame_dist_info.nearest_past_ref,
293
0
        cpi->ref_frame_dist_info.nearest_future_ref);
294
0
    if (closest_ref_frames == 0) {
295
      // Prune reference frames which are not the closest to the current frame.
296
0
      if (sf->inter_sf.prune_comp_ref_frames >= 2) {
297
0
        return 1;
298
0
      } else if (sf->inter_sf.prune_comp_ref_frames == 1) {
299
        // Prune reference frames with non minimum pred_mv_sad.
300
0
        if (has_best_pred_mv_sad(ref_frame, x) == 0) return 1;
301
0
      }
302
0
    }
303
0
  }
304
305
8.20M
  return 0;
306
8.20M
}
Unexecuted instantiation: av1_cx_iface.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: encodeframe.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: encodeframe_utils.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: encodemb.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: encoder.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: encoder_utils.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: encodetxb.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: ethread.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: firstpass.c:prune_ref_by_selective_ref_frame
global_motion_facade.c:prune_ref_by_selective_ref_frame
Line
Count
Source
239
12.4k
    const unsigned int *const ref_display_order_hint) {
240
12.4k
  const SPEED_FEATURES *const sf = &cpi->sf;
241
12.4k
  if (!sf->inter_sf.selective_ref_frame) return 0;
242
243
12.4k
  const int comp_pred = ref_frame[1] > INTRA_FRAME;
244
245
12.4k
  if (sf->inter_sf.selective_ref_frame >= 2 ||
246
12.4k
      (sf->inter_sf.selective_ref_frame == 1 && comp_pred)) {
247
12.4k
    int ref_frame_list[2] = { LAST3_FRAME, LAST2_FRAME };
248
249
12.4k
    if (x != NULL) {
250
      // Disable pruning if either tpl suggests that we keep the frame or
251
      // the pred_mv gives us the best sad
252
0
      if (x->tpl_keep_ref_frame[LAST3_FRAME] ||
253
0
          x->pred_mv_sad[LAST3_FRAME] == x->best_pred_mv_sad[0]) {
254
0
        ref_frame_list[0] = NONE_FRAME;
255
0
      }
256
0
      if (x->tpl_keep_ref_frame[LAST2_FRAME] ||
257
0
          x->pred_mv_sad[LAST2_FRAME] == x->best_pred_mv_sad[0]) {
258
0
        ref_frame_list[1] = NONE_FRAME;
259
0
      }
260
0
    }
261
262
12.4k
    if (prune_ref(ref_frame, ref_display_order_hint,
263
12.4k
                  ref_display_order_hint[GOLDEN_FRAME - LAST_FRAME],
264
12.4k
                  ref_frame_list))
265
0
      return 1;
266
12.4k
  }
267
268
12.4k
  if (sf->inter_sf.selective_ref_frame >= 3) {
269
12.4k
    int ref_frame_list[2] = { ALTREF2_FRAME, BWDREF_FRAME };
270
271
12.4k
    if (x != NULL) {
272
      // Disable pruning if either tpl suggests that we keep the frame or
273
      // the pred_mv gives us the best sad
274
0
      if (x->tpl_keep_ref_frame[ALTREF2_FRAME] ||
275
0
          x->pred_mv_sad[ALTREF2_FRAME] == x->best_pred_mv_sad[0]) {
276
0
        ref_frame_list[0] = NONE_FRAME;
277
0
      }
278
0
      if (x->tpl_keep_ref_frame[BWDREF_FRAME] ||
279
0
          x->pred_mv_sad[BWDREF_FRAME] == x->best_pred_mv_sad[0]) {
280
0
        ref_frame_list[1] = NONE_FRAME;
281
0
      }
282
0
    }
283
284
12.4k
    if (prune_ref(ref_frame, ref_display_order_hint,
285
12.4k
                  ref_display_order_hint[LAST_FRAME - LAST_FRAME],
286
12.4k
                  ref_frame_list))
287
0
      return 1;
288
12.4k
  }
289
290
12.4k
  if (x != NULL && sf->inter_sf.prune_comp_ref_frames && comp_pred) {
291
0
    int closest_ref_frames = has_closest_ref_frames(
292
0
        ref_frame, cpi->ref_frame_dist_info.nearest_past_ref,
293
0
        cpi->ref_frame_dist_info.nearest_future_ref);
294
0
    if (closest_ref_frames == 0) {
295
      // Prune reference frames which are not the closest to the current frame.
296
0
      if (sf->inter_sf.prune_comp_ref_frames >= 2) {
297
0
        return 1;
298
0
      } else if (sf->inter_sf.prune_comp_ref_frames == 1) {
299
        // Prune reference frames with non minimum pred_mv_sad.
300
0
        if (has_best_pred_mv_sad(ref_frame, x) == 0) return 1;
301
0
      }
302
0
    }
303
0
  }
304
305
12.4k
  return 0;
306
12.4k
}
Unexecuted instantiation: mcomp.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: partition_search.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: partition_strategy.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: rd.c:prune_ref_by_selective_ref_frame
rdopt.c:prune_ref_by_selective_ref_frame
Line
Count
Source
239
8.58M
    const unsigned int *const ref_display_order_hint) {
240
8.58M
  const SPEED_FEATURES *const sf = &cpi->sf;
241
8.58M
  if (!sf->inter_sf.selective_ref_frame) return 0;
242
243
8.58M
  const int comp_pred = ref_frame[1] > INTRA_FRAME;
244
245
8.58M
  if (sf->inter_sf.selective_ref_frame >= 2 ||
246
8.58M
      (sf->inter_sf.selective_ref_frame == 1 && comp_pred)) {
247
8.58M
    int ref_frame_list[2] = { LAST3_FRAME, LAST2_FRAME };
248
249
8.58M
    if (x != NULL) {
250
      // Disable pruning if either tpl suggests that we keep the frame or
251
      // the pred_mv gives us the best sad
252
8.58M
      if (x->tpl_keep_ref_frame[LAST3_FRAME] ||
253
8.58M
          x->pred_mv_sad[LAST3_FRAME] == x->best_pred_mv_sad[0]) {
254
6.75k
        ref_frame_list[0] = NONE_FRAME;
255
6.75k
      }
256
8.58M
      if (x->tpl_keep_ref_frame[LAST2_FRAME] ||
257
8.58M
          x->pred_mv_sad[LAST2_FRAME] == x->best_pred_mv_sad[0]) {
258
6.75k
        ref_frame_list[1] = NONE_FRAME;
259
6.75k
      }
260
8.58M
    }
261
262
8.58M
    if (prune_ref(ref_frame, ref_display_order_hint,
263
8.58M
                  ref_display_order_hint[GOLDEN_FRAME - LAST_FRAME],
264
8.58M
                  ref_frame_list))
265
101k
      return 1;
266
8.58M
  }
267
268
8.48M
  if (sf->inter_sf.selective_ref_frame >= 3) {
269
8.48M
    int ref_frame_list[2] = { ALTREF2_FRAME, BWDREF_FRAME };
270
271
8.48M
    if (x != NULL) {
272
      // Disable pruning if either tpl suggests that we keep the frame or
273
      // the pred_mv gives us the best sad
274
8.48M
      if (x->tpl_keep_ref_frame[ALTREF2_FRAME] ||
275
8.48M
          x->pred_mv_sad[ALTREF2_FRAME] == x->best_pred_mv_sad[0]) {
276
6.75k
        ref_frame_list[0] = NONE_FRAME;
277
6.75k
      }
278
8.48M
      if (x->tpl_keep_ref_frame[BWDREF_FRAME] ||
279
8.48M
          x->pred_mv_sad[BWDREF_FRAME] == x->best_pred_mv_sad[0]) {
280
6.75k
        ref_frame_list[1] = NONE_FRAME;
281
6.75k
      }
282
8.48M
    }
283
284
8.48M
    if (prune_ref(ref_frame, ref_display_order_hint,
285
8.48M
                  ref_display_order_hint[LAST_FRAME - LAST_FRAME],
286
8.48M
                  ref_frame_list))
287
338k
      return 1;
288
8.48M
  }
289
290
8.15M
  if (x != NULL && sf->inter_sf.prune_comp_ref_frames && comp_pred) {
291
0
    int closest_ref_frames = has_closest_ref_frames(
292
0
        ref_frame, cpi->ref_frame_dist_info.nearest_past_ref,
293
0
        cpi->ref_frame_dist_info.nearest_future_ref);
294
0
    if (closest_ref_frames == 0) {
295
      // Prune reference frames which are not the closest to the current frame.
296
0
      if (sf->inter_sf.prune_comp_ref_frames >= 2) {
297
0
        return 1;
298
0
      } else if (sf->inter_sf.prune_comp_ref_frames == 1) {
299
        // Prune reference frames with non minimum pred_mv_sad.
300
0
        if (has_best_pred_mv_sad(ref_frame, x) == 0) return 1;
301
0
      }
302
0
    }
303
0
  }
304
305
8.14M
  return 0;
306
8.14M
}
Unexecuted instantiation: nonrd_pickmode.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: nonrd_opt.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: speed_features.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: superres_scale.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: svc_layercontext.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: tokenize.c:prune_ref_by_selective_ref_frame
tpl_model.c:prune_ref_by_selective_ref_frame
Line
Count
Source
239
56.3k
    const unsigned int *const ref_display_order_hint) {
240
56.3k
  const SPEED_FEATURES *const sf = &cpi->sf;
241
56.3k
  if (!sf->inter_sf.selective_ref_frame) return 0;
242
243
56.3k
  const int comp_pred = ref_frame[1] > INTRA_FRAME;
244
245
56.3k
  if (sf->inter_sf.selective_ref_frame >= 2 ||
246
56.3k
      (sf->inter_sf.selective_ref_frame == 1 && comp_pred)) {
247
56.3k
    int ref_frame_list[2] = { LAST3_FRAME, LAST2_FRAME };
248
249
56.3k
    if (x != NULL) {
250
      // Disable pruning if either tpl suggests that we keep the frame or
251
      // the pred_mv gives us the best sad
252
0
      if (x->tpl_keep_ref_frame[LAST3_FRAME] ||
253
0
          x->pred_mv_sad[LAST3_FRAME] == x->best_pred_mv_sad[0]) {
254
0
        ref_frame_list[0] = NONE_FRAME;
255
0
      }
256
0
      if (x->tpl_keep_ref_frame[LAST2_FRAME] ||
257
0
          x->pred_mv_sad[LAST2_FRAME] == x->best_pred_mv_sad[0]) {
258
0
        ref_frame_list[1] = NONE_FRAME;
259
0
      }
260
0
    }
261
262
56.3k
    if (prune_ref(ref_frame, ref_display_order_hint,
263
56.3k
                  ref_display_order_hint[GOLDEN_FRAME - LAST_FRAME],
264
56.3k
                  ref_frame_list))
265
2.02k
      return 1;
266
56.3k
  }
267
268
54.3k
  if (sf->inter_sf.selective_ref_frame >= 3) {
269
54.3k
    int ref_frame_list[2] = { ALTREF2_FRAME, BWDREF_FRAME };
270
271
54.3k
    if (x != NULL) {
272
      // Disable pruning if either tpl suggests that we keep the frame or
273
      // the pred_mv gives us the best sad
274
0
      if (x->tpl_keep_ref_frame[ALTREF2_FRAME] ||
275
0
          x->pred_mv_sad[ALTREF2_FRAME] == x->best_pred_mv_sad[0]) {
276
0
        ref_frame_list[0] = NONE_FRAME;
277
0
      }
278
0
      if (x->tpl_keep_ref_frame[BWDREF_FRAME] ||
279
0
          x->pred_mv_sad[BWDREF_FRAME] == x->best_pred_mv_sad[0]) {
280
0
        ref_frame_list[1] = NONE_FRAME;
281
0
      }
282
0
    }
283
284
54.3k
    if (prune_ref(ref_frame, ref_display_order_hint,
285
54.3k
                  ref_display_order_hint[LAST_FRAME - LAST_FRAME],
286
54.3k
                  ref_frame_list))
287
6.73k
      return 1;
288
54.3k
  }
289
290
47.6k
  if (x != NULL && sf->inter_sf.prune_comp_ref_frames && comp_pred) {
291
0
    int closest_ref_frames = has_closest_ref_frames(
292
0
        ref_frame, cpi->ref_frame_dist_info.nearest_past_ref,
293
0
        cpi->ref_frame_dist_info.nearest_future_ref);
294
0
    if (closest_ref_frames == 0) {
295
      // Prune reference frames which are not the closest to the current frame.
296
0
      if (sf->inter_sf.prune_comp_ref_frames >= 2) {
297
0
        return 1;
298
0
      } else if (sf->inter_sf.prune_comp_ref_frames == 1) {
299
        // Prune reference frames with non minimum pred_mv_sad.
300
0
        if (has_best_pred_mv_sad(ref_frame, x) == 0) return 1;
301
0
      }
302
0
    }
303
0
  }
304
305
47.6k
  return 0;
306
47.6k
}
Unexecuted instantiation: var_based_part.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: compound_type.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: encode_strategy.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: motion_search_facade.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: rdopt_sse4.c:prune_ref_by_selective_ref_frame
Unexecuted instantiation: rdopt_avx2.c:prune_ref_by_selective_ref_frame
307
308
// This function will copy the best reference mode information from
309
// MB_MODE_INFO_EXT to MB_MODE_INFO_EXT_FRAME.
310
static inline void av1_copy_mbmi_ext_to_mbmi_ext_frame(
311
    MB_MODE_INFO_EXT_FRAME *mbmi_ext_best,
312
33.9M
    const MB_MODE_INFO_EXT *const mbmi_ext, uint8_t ref_frame_type) {
313
33.9M
  memcpy(mbmi_ext_best->ref_mv_stack, mbmi_ext->ref_mv_stack[ref_frame_type],
314
33.9M
         sizeof(mbmi_ext->ref_mv_stack[USABLE_REF_MV_STACK_SIZE]));
315
33.9M
  memcpy(mbmi_ext_best->weight, mbmi_ext->weight[ref_frame_type],
316
33.9M
         sizeof(mbmi_ext->weight[USABLE_REF_MV_STACK_SIZE]));
317
33.9M
  mbmi_ext_best->mode_context = mbmi_ext->mode_context[ref_frame_type];
318
33.9M
  mbmi_ext_best->ref_mv_count = mbmi_ext->ref_mv_count[ref_frame_type];
319
33.9M
  memcpy(mbmi_ext_best->global_mvs, mbmi_ext->global_mvs,
320
33.9M
         sizeof(mbmi_ext->global_mvs));
321
33.9M
}
Unexecuted instantiation: av1_cx_iface.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: encodeframe.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: encodeframe_utils.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: encodemb.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: encoder.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: encoder_utils.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: encodetxb.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: ethread.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: firstpass.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: global_motion_facade.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: mcomp.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
partition_search.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Line
Count
Source
312
21.7M
    const MB_MODE_INFO_EXT *const mbmi_ext, uint8_t ref_frame_type) {
313
21.7M
  memcpy(mbmi_ext_best->ref_mv_stack, mbmi_ext->ref_mv_stack[ref_frame_type],
314
21.7M
         sizeof(mbmi_ext->ref_mv_stack[USABLE_REF_MV_STACK_SIZE]));
315
21.7M
  memcpy(mbmi_ext_best->weight, mbmi_ext->weight[ref_frame_type],
316
21.7M
         sizeof(mbmi_ext->weight[USABLE_REF_MV_STACK_SIZE]));
317
21.7M
  mbmi_ext_best->mode_context = mbmi_ext->mode_context[ref_frame_type];
318
21.7M
  mbmi_ext_best->ref_mv_count = mbmi_ext->ref_mv_count[ref_frame_type];
319
21.7M
  memcpy(mbmi_ext_best->global_mvs, mbmi_ext->global_mvs,
320
21.7M
         sizeof(mbmi_ext->global_mvs));
321
21.7M
}
Unexecuted instantiation: partition_strategy.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: rd.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
rdopt.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Line
Count
Source
312
10.5M
    const MB_MODE_INFO_EXT *const mbmi_ext, uint8_t ref_frame_type) {
313
10.5M
  memcpy(mbmi_ext_best->ref_mv_stack, mbmi_ext->ref_mv_stack[ref_frame_type],
314
10.5M
         sizeof(mbmi_ext->ref_mv_stack[USABLE_REF_MV_STACK_SIZE]));
315
10.5M
  memcpy(mbmi_ext_best->weight, mbmi_ext->weight[ref_frame_type],
316
10.5M
         sizeof(mbmi_ext->weight[USABLE_REF_MV_STACK_SIZE]));
317
10.5M
  mbmi_ext_best->mode_context = mbmi_ext->mode_context[ref_frame_type];
318
10.5M
  mbmi_ext_best->ref_mv_count = mbmi_ext->ref_mv_count[ref_frame_type];
319
10.5M
  memcpy(mbmi_ext_best->global_mvs, mbmi_ext->global_mvs,
320
10.5M
         sizeof(mbmi_ext->global_mvs));
321
10.5M
}
nonrd_pickmode.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Line
Count
Source
312
1.61M
    const MB_MODE_INFO_EXT *const mbmi_ext, uint8_t ref_frame_type) {
313
1.61M
  memcpy(mbmi_ext_best->ref_mv_stack, mbmi_ext->ref_mv_stack[ref_frame_type],
314
1.61M
         sizeof(mbmi_ext->ref_mv_stack[USABLE_REF_MV_STACK_SIZE]));
315
1.61M
  memcpy(mbmi_ext_best->weight, mbmi_ext->weight[ref_frame_type],
316
1.61M
         sizeof(mbmi_ext->weight[USABLE_REF_MV_STACK_SIZE]));
317
1.61M
  mbmi_ext_best->mode_context = mbmi_ext->mode_context[ref_frame_type];
318
1.61M
  mbmi_ext_best->ref_mv_count = mbmi_ext->ref_mv_count[ref_frame_type];
319
1.61M
  memcpy(mbmi_ext_best->global_mvs, mbmi_ext->global_mvs,
320
1.61M
         sizeof(mbmi_ext->global_mvs));
321
1.61M
}
Unexecuted instantiation: nonrd_opt.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: speed_features.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: superres_scale.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: svc_layercontext.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: tokenize.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: tpl_model.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: var_based_part.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: compound_type.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: encode_strategy.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: motion_search_facade.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: rdopt_sse4.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
Unexecuted instantiation: rdopt_avx2.c:av1_copy_mbmi_ext_to_mbmi_ext_frame
322
323
#ifdef __cplusplus
324
}  // extern "C"
325
#endif
326
327
#endif  // AOM_AV1_ENCODER_RDOPT_H_