/src/aom/av1/encoder/rd.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_RD_H_ |
13 | | #define AOM_AV1_ENCODER_RD_H_ |
14 | | |
15 | | #include <limits.h> |
16 | | |
17 | | #include "av1/common/blockd.h" |
18 | | |
19 | | #include "av1/encoder/block.h" |
20 | | #include "av1/encoder/context_tree.h" |
21 | | #include "av1/encoder/cost.h" |
22 | | #include "av1/encoder/ratectrl.h" |
23 | | |
24 | | #ifdef __cplusplus |
25 | | extern "C" { |
26 | | #endif |
27 | | |
28 | 143M | #define RDDIV_BITS 7 |
29 | | #define RD_EPB_SHIFT 6 |
30 | | |
31 | | #define RDCOST(RM, R, D) \ |
32 | 143M | (ROUND_POWER_OF_TWO(((int64_t)(R)) * (RM), AV1_PROB_COST_SHIFT) + \ |
33 | 143M | ((D) * (1 << RDDIV_BITS))) |
34 | | |
35 | | #define RDCOST_NEG_R(RM, R, D) \ |
36 | 15.2k | (((D) * (1 << RDDIV_BITS)) - \ |
37 | 15.2k | ROUND_POWER_OF_TWO(((int64_t)(R)) * (RM), AV1_PROB_COST_SHIFT)) |
38 | | |
39 | | #define RDCOST_DBL_WITH_NATIVE_BD_DIST(RM, R, D, BD) \ |
40 | 0 | (((((double)(R)) * (RM)) / (double)(1 << AV1_PROB_COST_SHIFT)) + \ |
41 | 0 | ((double)((D) >> (2 * (BD - 8))) * (1 << RDDIV_BITS))) |
42 | | |
43 | | #define QIDX_SKIP_THRESH 115 |
44 | | |
45 | 0 | #define MV_COST_WEIGHT 108 |
46 | 0 | #define MV_COST_WEIGHT_SUB 120 |
47 | | |
48 | | // The fractional part of rd_thresh factor is stored with 5 bits. The maximum |
49 | | // factor that we allow is two, which is stored as 2 ** (5+1) = 64 |
50 | 13.1M | #define RD_THRESH_FAC_FRAC_BITS (5) |
51 | 13.1M | #define RD_THRESH_FAC_FRAC_VAL (1 << (RD_THRESH_FAC_FRAC_BITS)) |
52 | 0 | #define RD_THRESH_MAX_FACT ((RD_THRESH_FAC_FRAC_VAL) << 1) |
53 | 0 | #define RD_THRESH_LOG_DEC_FACTOR (4) |
54 | | #define RD_THRESH_INC (1) |
55 | | |
56 | | // Factor to weigh the rate for switchable interp filters. |
57 | 0 | #define SWITCHABLE_INTERP_RATE_FACTOR 1 |
58 | | |
59 | | enum { |
60 | | // Default initialization when we are not using winner mode framework. e.g. |
61 | | // intrabc |
62 | | DEFAULT_EVAL = 0, |
63 | | // Initialization for selecting winner mode |
64 | | MODE_EVAL, |
65 | | // Initialization for winner mode evaluation |
66 | | WINNER_MODE_EVAL, |
67 | | // All mode evaluation types |
68 | | MODE_EVAL_TYPES, |
69 | | } UENUM1BYTE(MODE_EVAL_TYPE); |
70 | | |
71 | | typedef struct RD_OPT { |
72 | | // Thresh_mult is used to set a threshold for the rd score. A higher value |
73 | | // means that we will accept the best mode so far more often. This number |
74 | | // is used in combination with the current block size, and thresh_freq_fact |
75 | | // to pick a threshold. |
76 | | int thresh_mult[MAX_MODES]; |
77 | | |
78 | | int threshes[MAX_SEGMENTS][BLOCK_SIZES_ALL][MAX_MODES]; |
79 | | |
80 | | int RDMULT; |
81 | | |
82 | | double r0; |
83 | | } RD_OPT; |
84 | | |
85 | 53.3M | static INLINE void av1_init_rd_stats(RD_STATS *rd_stats) { |
86 | | #if CONFIG_RD_DEBUG |
87 | | int plane; |
88 | | #endif |
89 | 53.3M | rd_stats->rate = 0; |
90 | 53.3M | rd_stats->dist = 0; |
91 | 53.3M | rd_stats->rdcost = 0; |
92 | 53.3M | rd_stats->sse = 0; |
93 | 53.3M | rd_stats->skip_txfm = 1; |
94 | 53.3M | rd_stats->zero_rate = 0; |
95 | | #if CONFIG_RD_DEBUG |
96 | | // This may run into problems when monochrome video is |
97 | | // encoded, as there will only be 1 plane |
98 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { |
99 | | rd_stats->txb_coeff_cost[plane] = 0; |
100 | | } |
101 | | #endif |
102 | 53.3M | } Unexecuted instantiation: av1_cx_iface.c:av1_init_rd_stats Unexecuted instantiation: av1_quantize.c:av1_init_rd_stats Unexecuted instantiation: bitstream.c:av1_init_rd_stats Unexecuted instantiation: encodemv.c:av1_init_rd_stats Unexecuted instantiation: encoder.c:av1_init_rd_stats Unexecuted instantiation: encoder_utils.c:av1_init_rd_stats Unexecuted instantiation: encodetxb.c:av1_init_rd_stats Unexecuted instantiation: ethread.c:av1_init_rd_stats Unexecuted instantiation: firstpass.c:av1_init_rd_stats Unexecuted instantiation: global_motion_facade.c:av1_init_rd_stats Unexecuted instantiation: level.c:av1_init_rd_stats Unexecuted instantiation: lookahead.c:av1_init_rd_stats Unexecuted instantiation: mcomp.c:av1_init_rd_stats Unexecuted instantiation: mv_prec.c:av1_init_rd_stats Unexecuted instantiation: palette.c:av1_init_rd_stats Unexecuted instantiation: pass2_strategy.c:av1_init_rd_stats Unexecuted instantiation: pickcdef.c:av1_init_rd_stats Unexecuted instantiation: picklpf.c:av1_init_rd_stats Unexecuted instantiation: pickrst.c:av1_init_rd_stats Unexecuted instantiation: ratectrl.c:av1_init_rd_stats Unexecuted instantiation: rd.c:av1_init_rd_stats Unexecuted instantiation: rdopt.c:av1_init_rd_stats Unexecuted instantiation: segmentation.c:av1_init_rd_stats Unexecuted instantiation: speed_features.c:av1_init_rd_stats Unexecuted instantiation: superres_scale.c:av1_init_rd_stats Unexecuted instantiation: svc_layercontext.c:av1_init_rd_stats Unexecuted instantiation: temporal_filter.c:av1_init_rd_stats Unexecuted instantiation: thirdpass.c:av1_init_rd_stats Unexecuted instantiation: tokenize.c:av1_init_rd_stats Unexecuted instantiation: tpl_model.c:av1_init_rd_stats tx_search.c:av1_init_rd_stats Line | Count | Source | 85 | 52.7M | static INLINE void av1_init_rd_stats(RD_STATS *rd_stats) { | 86 | | #if CONFIG_RD_DEBUG | 87 | | int plane; | 88 | | #endif | 89 | 52.7M | rd_stats->rate = 0; | 90 | 52.7M | rd_stats->dist = 0; | 91 | 52.7M | rd_stats->rdcost = 0; | 92 | 52.7M | rd_stats->sse = 0; | 93 | 52.7M | rd_stats->skip_txfm = 1; | 94 | 52.7M | rd_stats->zero_rate = 0; | 95 | | #if CONFIG_RD_DEBUG | 96 | | // This may run into problems when monochrome video is | 97 | | // encoded, as there will only be 1 plane | 98 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { | 99 | | rd_stats->txb_coeff_cost[plane] = 0; | 100 | | } | 101 | | #endif | 102 | 52.7M | } |
Unexecuted instantiation: txb_rdopt.c:av1_init_rd_stats intra_mode_search.c:av1_init_rd_stats Line | Count | Source | 85 | 385k | static INLINE void av1_init_rd_stats(RD_STATS *rd_stats) { | 86 | | #if CONFIG_RD_DEBUG | 87 | | int plane; | 88 | | #endif | 89 | 385k | rd_stats->rate = 0; | 90 | 385k | rd_stats->dist = 0; | 91 | 385k | rd_stats->rdcost = 0; | 92 | 385k | rd_stats->sse = 0; | 93 | 385k | rd_stats->skip_txfm = 1; | 94 | 385k | rd_stats->zero_rate = 0; | 95 | | #if CONFIG_RD_DEBUG | 96 | | // This may run into problems when monochrome video is | 97 | | // encoded, as there will only be 1 plane | 98 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { | 99 | | rd_stats->txb_coeff_cost[plane] = 0; | 100 | | } | 101 | | #endif | 102 | 385k | } |
Unexecuted instantiation: var_based_part.c:av1_init_rd_stats Unexecuted instantiation: av1_noise_estimate.c:av1_init_rd_stats Unexecuted instantiation: aq_complexity.c:av1_init_rd_stats Unexecuted instantiation: aq_cyclicrefresh.c:av1_init_rd_stats Unexecuted instantiation: aq_variance.c:av1_init_rd_stats Unexecuted instantiation: allintra_vis.c:av1_init_rd_stats Unexecuted instantiation: compound_type.c:av1_init_rd_stats Unexecuted instantiation: context_tree.c:av1_init_rd_stats Unexecuted instantiation: encodeframe.c:av1_init_rd_stats Unexecuted instantiation: encodeframe_utils.c:av1_init_rd_stats Unexecuted instantiation: encodemb.c:av1_init_rd_stats Unexecuted instantiation: encode_strategy.c:av1_init_rd_stats Unexecuted instantiation: global_motion.c:av1_init_rd_stats Unexecuted instantiation: gop_structure.c:av1_init_rd_stats Unexecuted instantiation: interp_search.c:av1_init_rd_stats Unexecuted instantiation: motion_search_facade.c:av1_init_rd_stats partition_search.c:av1_init_rd_stats Line | Count | Source | 85 | 265k | static INLINE void av1_init_rd_stats(RD_STATS *rd_stats) { | 86 | | #if CONFIG_RD_DEBUG | 87 | | int plane; | 88 | | #endif | 89 | 265k | rd_stats->rate = 0; | 90 | 265k | rd_stats->dist = 0; | 91 | 265k | rd_stats->rdcost = 0; | 92 | 265k | rd_stats->sse = 0; | 93 | 265k | rd_stats->skip_txfm = 1; | 94 | 265k | rd_stats->zero_rate = 0; | 95 | | #if CONFIG_RD_DEBUG | 96 | | // This may run into problems when monochrome video is | 97 | | // encoded, as there will only be 1 plane | 98 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { | 99 | | rd_stats->txb_coeff_cost[plane] = 0; | 100 | | } | 101 | | #endif | 102 | 265k | } |
Unexecuted instantiation: partition_strategy.c:av1_init_rd_stats Unexecuted instantiation: nonrd_pickmode.c:av1_init_rd_stats |
103 | | |
104 | 91.1M | static INLINE void av1_invalid_rd_stats(RD_STATS *rd_stats) { |
105 | | #if CONFIG_RD_DEBUG |
106 | | int plane; |
107 | | #endif |
108 | 91.1M | rd_stats->rate = INT_MAX; |
109 | 91.1M | rd_stats->dist = INT64_MAX; |
110 | 91.1M | rd_stats->rdcost = INT64_MAX; |
111 | 91.1M | rd_stats->sse = INT64_MAX; |
112 | 91.1M | rd_stats->skip_txfm = 0; |
113 | 91.1M | rd_stats->zero_rate = 0; |
114 | | #if CONFIG_RD_DEBUG |
115 | | // This may run into problems when monochrome video is |
116 | | // encoded, as there will only be 1 plane |
117 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { |
118 | | rd_stats->txb_coeff_cost[plane] = INT_MAX; |
119 | | } |
120 | | #endif |
121 | 91.1M | } Unexecuted instantiation: av1_cx_iface.c:av1_invalid_rd_stats Unexecuted instantiation: av1_quantize.c:av1_invalid_rd_stats Unexecuted instantiation: bitstream.c:av1_invalid_rd_stats Unexecuted instantiation: encodemv.c:av1_invalid_rd_stats Unexecuted instantiation: encoder.c:av1_invalid_rd_stats Unexecuted instantiation: encoder_utils.c:av1_invalid_rd_stats Unexecuted instantiation: encodetxb.c:av1_invalid_rd_stats Unexecuted instantiation: ethread.c:av1_invalid_rd_stats Unexecuted instantiation: firstpass.c:av1_invalid_rd_stats Unexecuted instantiation: global_motion_facade.c:av1_invalid_rd_stats Unexecuted instantiation: level.c:av1_invalid_rd_stats Unexecuted instantiation: lookahead.c:av1_invalid_rd_stats Unexecuted instantiation: mcomp.c:av1_invalid_rd_stats Unexecuted instantiation: mv_prec.c:av1_invalid_rd_stats Unexecuted instantiation: palette.c:av1_invalid_rd_stats Unexecuted instantiation: pass2_strategy.c:av1_invalid_rd_stats Unexecuted instantiation: pickcdef.c:av1_invalid_rd_stats Unexecuted instantiation: picklpf.c:av1_invalid_rd_stats Unexecuted instantiation: pickrst.c:av1_invalid_rd_stats Unexecuted instantiation: ratectrl.c:av1_invalid_rd_stats Unexecuted instantiation: rd.c:av1_invalid_rd_stats Unexecuted instantiation: rdopt.c:av1_invalid_rd_stats Unexecuted instantiation: segmentation.c:av1_invalid_rd_stats Unexecuted instantiation: speed_features.c:av1_invalid_rd_stats Unexecuted instantiation: superres_scale.c:av1_invalid_rd_stats Unexecuted instantiation: svc_layercontext.c:av1_invalid_rd_stats Unexecuted instantiation: temporal_filter.c:av1_invalid_rd_stats Unexecuted instantiation: thirdpass.c:av1_invalid_rd_stats Unexecuted instantiation: tokenize.c:av1_invalid_rd_stats Unexecuted instantiation: tpl_model.c:av1_invalid_rd_stats tx_search.c:av1_invalid_rd_stats Line | Count | Source | 104 | 88.0M | static INLINE void av1_invalid_rd_stats(RD_STATS *rd_stats) { | 105 | | #if CONFIG_RD_DEBUG | 106 | | int plane; | 107 | | #endif | 108 | 88.0M | rd_stats->rate = INT_MAX; | 109 | 88.0M | rd_stats->dist = INT64_MAX; | 110 | 88.0M | rd_stats->rdcost = INT64_MAX; | 111 | 88.0M | rd_stats->sse = INT64_MAX; | 112 | 88.0M | rd_stats->skip_txfm = 0; | 113 | 88.0M | rd_stats->zero_rate = 0; | 114 | | #if CONFIG_RD_DEBUG | 115 | | // This may run into problems when monochrome video is | 116 | | // encoded, as there will only be 1 plane | 117 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { | 118 | | rd_stats->txb_coeff_cost[plane] = INT_MAX; | 119 | | } | 120 | | #endif | 121 | 88.0M | } |
Unexecuted instantiation: txb_rdopt.c:av1_invalid_rd_stats intra_mode_search.c:av1_invalid_rd_stats Line | Count | Source | 104 | 2.61M | static INLINE void av1_invalid_rd_stats(RD_STATS *rd_stats) { | 105 | | #if CONFIG_RD_DEBUG | 106 | | int plane; | 107 | | #endif | 108 | 2.61M | rd_stats->rate = INT_MAX; | 109 | 2.61M | rd_stats->dist = INT64_MAX; | 110 | 2.61M | rd_stats->rdcost = INT64_MAX; | 111 | 2.61M | rd_stats->sse = INT64_MAX; | 112 | 2.61M | rd_stats->skip_txfm = 0; | 113 | 2.61M | rd_stats->zero_rate = 0; | 114 | | #if CONFIG_RD_DEBUG | 115 | | // This may run into problems when monochrome video is | 116 | | // encoded, as there will only be 1 plane | 117 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { | 118 | | rd_stats->txb_coeff_cost[plane] = INT_MAX; | 119 | | } | 120 | | #endif | 121 | 2.61M | } |
Unexecuted instantiation: var_based_part.c:av1_invalid_rd_stats Unexecuted instantiation: av1_noise_estimate.c:av1_invalid_rd_stats Unexecuted instantiation: aq_complexity.c:av1_invalid_rd_stats Unexecuted instantiation: aq_cyclicrefresh.c:av1_invalid_rd_stats Unexecuted instantiation: aq_variance.c:av1_invalid_rd_stats Unexecuted instantiation: allintra_vis.c:av1_invalid_rd_stats Unexecuted instantiation: compound_type.c:av1_invalid_rd_stats context_tree.c:av1_invalid_rd_stats Line | Count | Source | 104 | 167k | static INLINE void av1_invalid_rd_stats(RD_STATS *rd_stats) { | 105 | | #if CONFIG_RD_DEBUG | 106 | | int plane; | 107 | | #endif | 108 | 167k | rd_stats->rate = INT_MAX; | 109 | 167k | rd_stats->dist = INT64_MAX; | 110 | 167k | rd_stats->rdcost = INT64_MAX; | 111 | 167k | rd_stats->sse = INT64_MAX; | 112 | 167k | rd_stats->skip_txfm = 0; | 113 | 167k | rd_stats->zero_rate = 0; | 114 | | #if CONFIG_RD_DEBUG | 115 | | // This may run into problems when monochrome video is | 116 | | // encoded, as there will only be 1 plane | 117 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { | 118 | | rd_stats->txb_coeff_cost[plane] = INT_MAX; | 119 | | } | 120 | | #endif | 121 | 167k | } |
encodeframe.c:av1_invalid_rd_stats Line | Count | Source | 104 | 11.7k | static INLINE void av1_invalid_rd_stats(RD_STATS *rd_stats) { | 105 | | #if CONFIG_RD_DEBUG | 106 | | int plane; | 107 | | #endif | 108 | 11.7k | rd_stats->rate = INT_MAX; | 109 | 11.7k | rd_stats->dist = INT64_MAX; | 110 | 11.7k | rd_stats->rdcost = INT64_MAX; | 111 | 11.7k | rd_stats->sse = INT64_MAX; | 112 | 11.7k | rd_stats->skip_txfm = 0; | 113 | 11.7k | rd_stats->zero_rate = 0; | 114 | | #if CONFIG_RD_DEBUG | 115 | | // This may run into problems when monochrome video is | 116 | | // encoded, as there will only be 1 plane | 117 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { | 118 | | rd_stats->txb_coeff_cost[plane] = INT_MAX; | 119 | | } | 120 | | #endif | 121 | 11.7k | } |
Unexecuted instantiation: encodeframe_utils.c:av1_invalid_rd_stats Unexecuted instantiation: encodemb.c:av1_invalid_rd_stats Unexecuted instantiation: encode_strategy.c:av1_invalid_rd_stats Unexecuted instantiation: global_motion.c:av1_invalid_rd_stats Unexecuted instantiation: gop_structure.c:av1_invalid_rd_stats Unexecuted instantiation: interp_search.c:av1_invalid_rd_stats Unexecuted instantiation: motion_search_facade.c:av1_invalid_rd_stats partition_search.c:av1_invalid_rd_stats Line | Count | Source | 104 | 311k | static INLINE void av1_invalid_rd_stats(RD_STATS *rd_stats) { | 105 | | #if CONFIG_RD_DEBUG | 106 | | int plane; | 107 | | #endif | 108 | 311k | rd_stats->rate = INT_MAX; | 109 | 311k | rd_stats->dist = INT64_MAX; | 110 | 311k | rd_stats->rdcost = INT64_MAX; | 111 | 311k | rd_stats->sse = INT64_MAX; | 112 | 311k | rd_stats->skip_txfm = 0; | 113 | 311k | rd_stats->zero_rate = 0; | 114 | | #if CONFIG_RD_DEBUG | 115 | | // This may run into problems when monochrome video is | 116 | | // encoded, as there will only be 1 plane | 117 | | for (plane = 0; plane < MAX_MB_PLANE; ++plane) { | 118 | | rd_stats->txb_coeff_cost[plane] = INT_MAX; | 119 | | } | 120 | | #endif | 121 | 311k | } |
Unexecuted instantiation: partition_strategy.c:av1_invalid_rd_stats Unexecuted instantiation: nonrd_pickmode.c:av1_invalid_rd_stats |
122 | | |
123 | | static INLINE void av1_merge_rd_stats(RD_STATS *rd_stats_dst, |
124 | 45.5M | const RD_STATS *rd_stats_src) { |
125 | 45.5M | if (rd_stats_dst->rate == INT_MAX || rd_stats_src->rate == INT_MAX) { |
126 | | // If rd_stats_dst or rd_stats_src has invalid rate, we will make |
127 | | // rd_stats_dst invalid. |
128 | 0 | av1_invalid_rd_stats(rd_stats_dst); |
129 | 0 | return; |
130 | 0 | } |
131 | 45.5M | rd_stats_dst->rate = (int)AOMMIN( |
132 | 45.5M | ((int64_t)rd_stats_dst->rate + (int64_t)rd_stats_src->rate), INT_MAX); |
133 | 45.5M | if (!rd_stats_dst->zero_rate) |
134 | 45.5M | rd_stats_dst->zero_rate = rd_stats_src->zero_rate; |
135 | 45.5M | rd_stats_dst->dist += rd_stats_src->dist; |
136 | 45.5M | rd_stats_dst->sse += rd_stats_src->sse; |
137 | 45.5M | rd_stats_dst->skip_txfm &= rd_stats_src->skip_txfm; |
138 | | #if CONFIG_RD_DEBUG |
139 | | // This may run into problems when monochrome video is |
140 | | // encoded, as there will only be 1 plane |
141 | | for (int plane = 0; plane < MAX_MB_PLANE; ++plane) { |
142 | | rd_stats_dst->txb_coeff_cost[plane] += rd_stats_src->txb_coeff_cost[plane]; |
143 | | } |
144 | | #endif |
145 | 45.5M | } Unexecuted instantiation: av1_cx_iface.c:av1_merge_rd_stats Unexecuted instantiation: av1_quantize.c:av1_merge_rd_stats Unexecuted instantiation: bitstream.c:av1_merge_rd_stats Unexecuted instantiation: encodemv.c:av1_merge_rd_stats Unexecuted instantiation: encoder.c:av1_merge_rd_stats Unexecuted instantiation: encoder_utils.c:av1_merge_rd_stats Unexecuted instantiation: encodetxb.c:av1_merge_rd_stats Unexecuted instantiation: ethread.c:av1_merge_rd_stats Unexecuted instantiation: firstpass.c:av1_merge_rd_stats Unexecuted instantiation: global_motion_facade.c:av1_merge_rd_stats Unexecuted instantiation: level.c:av1_merge_rd_stats Unexecuted instantiation: lookahead.c:av1_merge_rd_stats Unexecuted instantiation: mcomp.c:av1_merge_rd_stats Unexecuted instantiation: mv_prec.c:av1_merge_rd_stats Unexecuted instantiation: palette.c:av1_merge_rd_stats Unexecuted instantiation: pass2_strategy.c:av1_merge_rd_stats Unexecuted instantiation: pickcdef.c:av1_merge_rd_stats Unexecuted instantiation: picklpf.c:av1_merge_rd_stats Unexecuted instantiation: pickrst.c:av1_merge_rd_stats Unexecuted instantiation: ratectrl.c:av1_merge_rd_stats Unexecuted instantiation: rd.c:av1_merge_rd_stats Unexecuted instantiation: rdopt.c:av1_merge_rd_stats Unexecuted instantiation: segmentation.c:av1_merge_rd_stats Unexecuted instantiation: speed_features.c:av1_merge_rd_stats Unexecuted instantiation: superres_scale.c:av1_merge_rd_stats Unexecuted instantiation: svc_layercontext.c:av1_merge_rd_stats Unexecuted instantiation: temporal_filter.c:av1_merge_rd_stats Unexecuted instantiation: thirdpass.c:av1_merge_rd_stats Unexecuted instantiation: tokenize.c:av1_merge_rd_stats Unexecuted instantiation: tpl_model.c:av1_merge_rd_stats tx_search.c:av1_merge_rd_stats Line | Count | Source | 124 | 44.6M | const RD_STATS *rd_stats_src) { | 125 | 44.6M | if (rd_stats_dst->rate == INT_MAX || rd_stats_src->rate == INT_MAX) { | 126 | | // If rd_stats_dst or rd_stats_src has invalid rate, we will make | 127 | | // rd_stats_dst invalid. | 128 | 0 | av1_invalid_rd_stats(rd_stats_dst); | 129 | 0 | return; | 130 | 0 | } | 131 | 44.6M | rd_stats_dst->rate = (int)AOMMIN( | 132 | 44.6M | ((int64_t)rd_stats_dst->rate + (int64_t)rd_stats_src->rate), INT_MAX); | 133 | 44.6M | if (!rd_stats_dst->zero_rate) | 134 | 44.5M | rd_stats_dst->zero_rate = rd_stats_src->zero_rate; | 135 | 44.6M | rd_stats_dst->dist += rd_stats_src->dist; | 136 | 44.6M | rd_stats_dst->sse += rd_stats_src->sse; | 137 | 44.6M | rd_stats_dst->skip_txfm &= rd_stats_src->skip_txfm; | 138 | | #if CONFIG_RD_DEBUG | 139 | | // This may run into problems when monochrome video is | 140 | | // encoded, as there will only be 1 plane | 141 | | for (int plane = 0; plane < MAX_MB_PLANE; ++plane) { | 142 | | rd_stats_dst->txb_coeff_cost[plane] += rd_stats_src->txb_coeff_cost[plane]; | 143 | | } | 144 | | #endif | 145 | 44.6M | } |
Unexecuted instantiation: txb_rdopt.c:av1_merge_rd_stats intra_mode_search.c:av1_merge_rd_stats Line | Count | Source | 124 | 924k | const RD_STATS *rd_stats_src) { | 125 | 924k | if (rd_stats_dst->rate == INT_MAX || rd_stats_src->rate == INT_MAX) { | 126 | | // If rd_stats_dst or rd_stats_src has invalid rate, we will make | 127 | | // rd_stats_dst invalid. | 128 | 0 | av1_invalid_rd_stats(rd_stats_dst); | 129 | 0 | return; | 130 | 0 | } | 131 | 924k | rd_stats_dst->rate = (int)AOMMIN( | 132 | 924k | ((int64_t)rd_stats_dst->rate + (int64_t)rd_stats_src->rate), INT_MAX); | 133 | 924k | if (!rd_stats_dst->zero_rate) | 134 | 924k | rd_stats_dst->zero_rate = rd_stats_src->zero_rate; | 135 | 924k | rd_stats_dst->dist += rd_stats_src->dist; | 136 | 924k | rd_stats_dst->sse += rd_stats_src->sse; | 137 | 924k | rd_stats_dst->skip_txfm &= rd_stats_src->skip_txfm; | 138 | | #if CONFIG_RD_DEBUG | 139 | | // This may run into problems when monochrome video is | 140 | | // encoded, as there will only be 1 plane | 141 | | for (int plane = 0; plane < MAX_MB_PLANE; ++plane) { | 142 | | rd_stats_dst->txb_coeff_cost[plane] += rd_stats_src->txb_coeff_cost[plane]; | 143 | | } | 144 | | #endif | 145 | 924k | } |
Unexecuted instantiation: var_based_part.c:av1_merge_rd_stats Unexecuted instantiation: av1_noise_estimate.c:av1_merge_rd_stats Unexecuted instantiation: aq_complexity.c:av1_merge_rd_stats Unexecuted instantiation: aq_cyclicrefresh.c:av1_merge_rd_stats Unexecuted instantiation: aq_variance.c:av1_merge_rd_stats Unexecuted instantiation: allintra_vis.c:av1_merge_rd_stats Unexecuted instantiation: compound_type.c:av1_merge_rd_stats Unexecuted instantiation: context_tree.c:av1_merge_rd_stats Unexecuted instantiation: encodeframe.c:av1_merge_rd_stats Unexecuted instantiation: encodeframe_utils.c:av1_merge_rd_stats Unexecuted instantiation: encodemb.c:av1_merge_rd_stats Unexecuted instantiation: encode_strategy.c:av1_merge_rd_stats Unexecuted instantiation: global_motion.c:av1_merge_rd_stats Unexecuted instantiation: gop_structure.c:av1_merge_rd_stats Unexecuted instantiation: interp_search.c:av1_merge_rd_stats Unexecuted instantiation: motion_search_facade.c:av1_merge_rd_stats Unexecuted instantiation: partition_search.c:av1_merge_rd_stats Unexecuted instantiation: partition_strategy.c:av1_merge_rd_stats Unexecuted instantiation: nonrd_pickmode.c:av1_merge_rd_stats |
146 | | |
147 | | static INLINE void av1_accumulate_rd_stats(RD_STATS *rd_stats, int64_t dist, |
148 | | int rate, int skip_txfm, int64_t sse, |
149 | 0 | int zero_rate) { |
150 | 0 | assert(rd_stats->rate != INT_MAX && rate != INT_MAX); |
151 | 0 | rd_stats->rate += rate; |
152 | 0 | if (!rd_stats->zero_rate) rd_stats->zero_rate = zero_rate; |
153 | 0 | rd_stats->dist += dist; |
154 | 0 | rd_stats->skip_txfm &= skip_txfm; |
155 | 0 | rd_stats->sse += sse; |
156 | 0 | } Unexecuted instantiation: av1_cx_iface.c:av1_accumulate_rd_stats Unexecuted instantiation: av1_quantize.c:av1_accumulate_rd_stats Unexecuted instantiation: bitstream.c:av1_accumulate_rd_stats Unexecuted instantiation: encodemv.c:av1_accumulate_rd_stats Unexecuted instantiation: encoder.c:av1_accumulate_rd_stats Unexecuted instantiation: encoder_utils.c:av1_accumulate_rd_stats Unexecuted instantiation: encodetxb.c:av1_accumulate_rd_stats Unexecuted instantiation: ethread.c:av1_accumulate_rd_stats Unexecuted instantiation: firstpass.c:av1_accumulate_rd_stats Unexecuted instantiation: global_motion_facade.c:av1_accumulate_rd_stats Unexecuted instantiation: level.c:av1_accumulate_rd_stats Unexecuted instantiation: lookahead.c:av1_accumulate_rd_stats Unexecuted instantiation: mcomp.c:av1_accumulate_rd_stats Unexecuted instantiation: mv_prec.c:av1_accumulate_rd_stats Unexecuted instantiation: palette.c:av1_accumulate_rd_stats Unexecuted instantiation: pass2_strategy.c:av1_accumulate_rd_stats Unexecuted instantiation: pickcdef.c:av1_accumulate_rd_stats Unexecuted instantiation: picklpf.c:av1_accumulate_rd_stats Unexecuted instantiation: pickrst.c:av1_accumulate_rd_stats Unexecuted instantiation: ratectrl.c:av1_accumulate_rd_stats Unexecuted instantiation: rd.c:av1_accumulate_rd_stats Unexecuted instantiation: rdopt.c:av1_accumulate_rd_stats Unexecuted instantiation: segmentation.c:av1_accumulate_rd_stats Unexecuted instantiation: speed_features.c:av1_accumulate_rd_stats Unexecuted instantiation: superres_scale.c:av1_accumulate_rd_stats Unexecuted instantiation: svc_layercontext.c:av1_accumulate_rd_stats Unexecuted instantiation: temporal_filter.c:av1_accumulate_rd_stats Unexecuted instantiation: thirdpass.c:av1_accumulate_rd_stats Unexecuted instantiation: tokenize.c:av1_accumulate_rd_stats Unexecuted instantiation: tpl_model.c:av1_accumulate_rd_stats Unexecuted instantiation: tx_search.c:av1_accumulate_rd_stats Unexecuted instantiation: txb_rdopt.c:av1_accumulate_rd_stats Unexecuted instantiation: intra_mode_search.c:av1_accumulate_rd_stats Unexecuted instantiation: var_based_part.c:av1_accumulate_rd_stats Unexecuted instantiation: av1_noise_estimate.c:av1_accumulate_rd_stats Unexecuted instantiation: aq_complexity.c:av1_accumulate_rd_stats Unexecuted instantiation: aq_cyclicrefresh.c:av1_accumulate_rd_stats Unexecuted instantiation: aq_variance.c:av1_accumulate_rd_stats Unexecuted instantiation: allintra_vis.c:av1_accumulate_rd_stats Unexecuted instantiation: compound_type.c:av1_accumulate_rd_stats Unexecuted instantiation: context_tree.c:av1_accumulate_rd_stats Unexecuted instantiation: encodeframe.c:av1_accumulate_rd_stats Unexecuted instantiation: encodeframe_utils.c:av1_accumulate_rd_stats Unexecuted instantiation: encodemb.c:av1_accumulate_rd_stats Unexecuted instantiation: encode_strategy.c:av1_accumulate_rd_stats Unexecuted instantiation: global_motion.c:av1_accumulate_rd_stats Unexecuted instantiation: gop_structure.c:av1_accumulate_rd_stats Unexecuted instantiation: interp_search.c:av1_accumulate_rd_stats Unexecuted instantiation: motion_search_facade.c:av1_accumulate_rd_stats Unexecuted instantiation: partition_search.c:av1_accumulate_rd_stats Unexecuted instantiation: partition_strategy.c:av1_accumulate_rd_stats Unexecuted instantiation: nonrd_pickmode.c:av1_accumulate_rd_stats |
157 | | |
158 | 1.77M | static INLINE int64_t av1_calculate_rd_cost(int mult, int rate, int64_t dist) { |
159 | 1.77M | assert(mult >= 0); |
160 | 1.77M | if (rate >= 0) { |
161 | 1.75M | return RDCOST(mult, rate, dist); |
162 | 1.75M | } |
163 | 15.2k | return RDCOST_NEG_R(mult, -rate, dist); |
164 | 1.77M | } Unexecuted instantiation: av1_cx_iface.c:av1_calculate_rd_cost Unexecuted instantiation: av1_quantize.c:av1_calculate_rd_cost Unexecuted instantiation: bitstream.c:av1_calculate_rd_cost Unexecuted instantiation: encodemv.c:av1_calculate_rd_cost Unexecuted instantiation: encoder.c:av1_calculate_rd_cost Unexecuted instantiation: encoder_utils.c:av1_calculate_rd_cost Unexecuted instantiation: encodetxb.c:av1_calculate_rd_cost Unexecuted instantiation: ethread.c:av1_calculate_rd_cost Unexecuted instantiation: firstpass.c:av1_calculate_rd_cost Unexecuted instantiation: global_motion_facade.c:av1_calculate_rd_cost Unexecuted instantiation: level.c:av1_calculate_rd_cost Unexecuted instantiation: lookahead.c:av1_calculate_rd_cost Unexecuted instantiation: mcomp.c:av1_calculate_rd_cost Unexecuted instantiation: mv_prec.c:av1_calculate_rd_cost Unexecuted instantiation: palette.c:av1_calculate_rd_cost Unexecuted instantiation: pass2_strategy.c:av1_calculate_rd_cost Unexecuted instantiation: pickcdef.c:av1_calculate_rd_cost Unexecuted instantiation: picklpf.c:av1_calculate_rd_cost Unexecuted instantiation: pickrst.c:av1_calculate_rd_cost Unexecuted instantiation: ratectrl.c:av1_calculate_rd_cost Unexecuted instantiation: rd.c:av1_calculate_rd_cost Unexecuted instantiation: rdopt.c:av1_calculate_rd_cost Unexecuted instantiation: segmentation.c:av1_calculate_rd_cost Unexecuted instantiation: speed_features.c:av1_calculate_rd_cost Unexecuted instantiation: superres_scale.c:av1_calculate_rd_cost Unexecuted instantiation: svc_layercontext.c:av1_calculate_rd_cost Unexecuted instantiation: temporal_filter.c:av1_calculate_rd_cost Unexecuted instantiation: thirdpass.c:av1_calculate_rd_cost Unexecuted instantiation: tokenize.c:av1_calculate_rd_cost Unexecuted instantiation: tpl_model.c:av1_calculate_rd_cost Unexecuted instantiation: tx_search.c:av1_calculate_rd_cost Unexecuted instantiation: txb_rdopt.c:av1_calculate_rd_cost intra_mode_search.c:av1_calculate_rd_cost Line | Count | Source | 158 | 1.30M | static INLINE int64_t av1_calculate_rd_cost(int mult, int rate, int64_t dist) { | 159 | 1.30M | assert(mult >= 0); | 160 | 1.30M | if (rate >= 0) { | 161 | 1.30M | return RDCOST(mult, rate, dist); | 162 | 1.30M | } | 163 | 6 | return RDCOST_NEG_R(mult, -rate, dist); | 164 | 1.30M | } |
Unexecuted instantiation: var_based_part.c:av1_calculate_rd_cost Unexecuted instantiation: av1_noise_estimate.c:av1_calculate_rd_cost Unexecuted instantiation: aq_complexity.c:av1_calculate_rd_cost Unexecuted instantiation: aq_cyclicrefresh.c:av1_calculate_rd_cost Unexecuted instantiation: aq_variance.c:av1_calculate_rd_cost Unexecuted instantiation: allintra_vis.c:av1_calculate_rd_cost Unexecuted instantiation: compound_type.c:av1_calculate_rd_cost Unexecuted instantiation: context_tree.c:av1_calculate_rd_cost Unexecuted instantiation: encodeframe.c:av1_calculate_rd_cost Unexecuted instantiation: encodeframe_utils.c:av1_calculate_rd_cost Unexecuted instantiation: encodemb.c:av1_calculate_rd_cost Unexecuted instantiation: encode_strategy.c:av1_calculate_rd_cost Unexecuted instantiation: global_motion.c:av1_calculate_rd_cost Unexecuted instantiation: gop_structure.c:av1_calculate_rd_cost Unexecuted instantiation: interp_search.c:av1_calculate_rd_cost Unexecuted instantiation: motion_search_facade.c:av1_calculate_rd_cost partition_search.c:av1_calculate_rd_cost Line | Count | Source | 158 | 463k | static INLINE int64_t av1_calculate_rd_cost(int mult, int rate, int64_t dist) { | 159 | 463k | assert(mult >= 0); | 160 | 463k | if (rate >= 0) { | 161 | 448k | return RDCOST(mult, rate, dist); | 162 | 448k | } | 163 | 15.2k | return RDCOST_NEG_R(mult, -rate, dist); | 164 | 463k | } |
Unexecuted instantiation: partition_strategy.c:av1_calculate_rd_cost Unexecuted instantiation: nonrd_pickmode.c:av1_calculate_rd_cost |
165 | | |
166 | 1.77M | static INLINE void av1_rd_cost_update(int mult, RD_STATS *rd_cost) { |
167 | 1.77M | if (rd_cost->rate < INT_MAX && rd_cost->dist < INT64_MAX && |
168 | 1.77M | rd_cost->rdcost < INT64_MAX) { |
169 | 1.64M | rd_cost->rdcost = av1_calculate_rd_cost(mult, rd_cost->rate, rd_cost->dist); |
170 | 1.64M | } else { |
171 | 132k | av1_invalid_rd_stats(rd_cost); |
172 | 132k | } |
173 | 1.77M | } Unexecuted instantiation: av1_cx_iface.c:av1_rd_cost_update Unexecuted instantiation: av1_quantize.c:av1_rd_cost_update Unexecuted instantiation: bitstream.c:av1_rd_cost_update Unexecuted instantiation: encodemv.c:av1_rd_cost_update Unexecuted instantiation: encoder.c:av1_rd_cost_update Unexecuted instantiation: encoder_utils.c:av1_rd_cost_update Unexecuted instantiation: encodetxb.c:av1_rd_cost_update Unexecuted instantiation: ethread.c:av1_rd_cost_update Unexecuted instantiation: firstpass.c:av1_rd_cost_update Unexecuted instantiation: global_motion_facade.c:av1_rd_cost_update Unexecuted instantiation: level.c:av1_rd_cost_update Unexecuted instantiation: lookahead.c:av1_rd_cost_update Unexecuted instantiation: mcomp.c:av1_rd_cost_update Unexecuted instantiation: mv_prec.c:av1_rd_cost_update Unexecuted instantiation: palette.c:av1_rd_cost_update Unexecuted instantiation: pass2_strategy.c:av1_rd_cost_update Unexecuted instantiation: pickcdef.c:av1_rd_cost_update Unexecuted instantiation: picklpf.c:av1_rd_cost_update Unexecuted instantiation: pickrst.c:av1_rd_cost_update Unexecuted instantiation: ratectrl.c:av1_rd_cost_update Unexecuted instantiation: rd.c:av1_rd_cost_update Unexecuted instantiation: rdopt.c:av1_rd_cost_update Unexecuted instantiation: segmentation.c:av1_rd_cost_update Unexecuted instantiation: speed_features.c:av1_rd_cost_update Unexecuted instantiation: superres_scale.c:av1_rd_cost_update Unexecuted instantiation: svc_layercontext.c:av1_rd_cost_update Unexecuted instantiation: temporal_filter.c:av1_rd_cost_update Unexecuted instantiation: thirdpass.c:av1_rd_cost_update Unexecuted instantiation: tokenize.c:av1_rd_cost_update Unexecuted instantiation: tpl_model.c:av1_rd_cost_update Unexecuted instantiation: tx_search.c:av1_rd_cost_update Unexecuted instantiation: txb_rdopt.c:av1_rd_cost_update intra_mode_search.c:av1_rd_cost_update Line | Count | Source | 166 | 1.30M | static INLINE void av1_rd_cost_update(int mult, RD_STATS *rd_cost) { | 167 | 1.30M | if (rd_cost->rate < INT_MAX && rd_cost->dist < INT64_MAX && | 168 | 1.30M | rd_cost->rdcost < INT64_MAX) { | 169 | 1.30M | rd_cost->rdcost = av1_calculate_rd_cost(mult, rd_cost->rate, rd_cost->dist); | 170 | 1.30M | } else { | 171 | 4 | av1_invalid_rd_stats(rd_cost); | 172 | 4 | } | 173 | 1.30M | } |
Unexecuted instantiation: var_based_part.c:av1_rd_cost_update Unexecuted instantiation: av1_noise_estimate.c:av1_rd_cost_update Unexecuted instantiation: aq_complexity.c:av1_rd_cost_update Unexecuted instantiation: aq_cyclicrefresh.c:av1_rd_cost_update Unexecuted instantiation: aq_variance.c:av1_rd_cost_update Unexecuted instantiation: allintra_vis.c:av1_rd_cost_update Unexecuted instantiation: compound_type.c:av1_rd_cost_update Unexecuted instantiation: context_tree.c:av1_rd_cost_update Unexecuted instantiation: encodeframe.c:av1_rd_cost_update Unexecuted instantiation: encodeframe_utils.c:av1_rd_cost_update Unexecuted instantiation: encodemb.c:av1_rd_cost_update Unexecuted instantiation: encode_strategy.c:av1_rd_cost_update Unexecuted instantiation: global_motion.c:av1_rd_cost_update Unexecuted instantiation: gop_structure.c:av1_rd_cost_update Unexecuted instantiation: interp_search.c:av1_rd_cost_update Unexecuted instantiation: motion_search_facade.c:av1_rd_cost_update partition_search.c:av1_rd_cost_update Line | Count | Source | 166 | 464k | static INLINE void av1_rd_cost_update(int mult, RD_STATS *rd_cost) { | 167 | 464k | if (rd_cost->rate < INT_MAX && rd_cost->dist < INT64_MAX && | 168 | 464k | rd_cost->rdcost < INT64_MAX) { | 169 | 331k | rd_cost->rdcost = av1_calculate_rd_cost(mult, rd_cost->rate, rd_cost->dist); | 170 | 331k | } else { | 171 | 132k | av1_invalid_rd_stats(rd_cost); | 172 | 132k | } | 173 | 464k | } |
Unexecuted instantiation: partition_strategy.c:av1_rd_cost_update Unexecuted instantiation: nonrd_pickmode.c:av1_rd_cost_update |
174 | | |
175 | | static INLINE void av1_rd_stats_subtraction(int mult, |
176 | | const RD_STATS *const left, |
177 | | const RD_STATS *const right, |
178 | 198k | RD_STATS *result) { |
179 | 198k | if (left->rate == INT_MAX || right->rate == INT_MAX || |
180 | 198k | left->dist == INT64_MAX || right->dist == INT64_MAX || |
181 | 198k | left->rdcost == INT64_MAX || right->rdcost == INT64_MAX) { |
182 | 66.6k | av1_invalid_rd_stats(result); |
183 | 132k | } else { |
184 | 132k | result->rate = left->rate - right->rate; |
185 | 132k | result->dist = left->dist - right->dist; |
186 | 132k | result->rdcost = av1_calculate_rd_cost(mult, result->rate, result->dist); |
187 | 132k | } |
188 | 198k | } Unexecuted instantiation: av1_cx_iface.c:av1_rd_stats_subtraction Unexecuted instantiation: av1_quantize.c:av1_rd_stats_subtraction Unexecuted instantiation: bitstream.c:av1_rd_stats_subtraction Unexecuted instantiation: encodemv.c:av1_rd_stats_subtraction Unexecuted instantiation: encoder.c:av1_rd_stats_subtraction Unexecuted instantiation: encoder_utils.c:av1_rd_stats_subtraction Unexecuted instantiation: encodetxb.c:av1_rd_stats_subtraction Unexecuted instantiation: ethread.c:av1_rd_stats_subtraction Unexecuted instantiation: firstpass.c:av1_rd_stats_subtraction Unexecuted instantiation: global_motion_facade.c:av1_rd_stats_subtraction Unexecuted instantiation: level.c:av1_rd_stats_subtraction Unexecuted instantiation: lookahead.c:av1_rd_stats_subtraction Unexecuted instantiation: mcomp.c:av1_rd_stats_subtraction Unexecuted instantiation: mv_prec.c:av1_rd_stats_subtraction Unexecuted instantiation: palette.c:av1_rd_stats_subtraction Unexecuted instantiation: pass2_strategy.c:av1_rd_stats_subtraction Unexecuted instantiation: pickcdef.c:av1_rd_stats_subtraction Unexecuted instantiation: picklpf.c:av1_rd_stats_subtraction Unexecuted instantiation: pickrst.c:av1_rd_stats_subtraction Unexecuted instantiation: ratectrl.c:av1_rd_stats_subtraction Unexecuted instantiation: rd.c:av1_rd_stats_subtraction Unexecuted instantiation: rdopt.c:av1_rd_stats_subtraction Unexecuted instantiation: segmentation.c:av1_rd_stats_subtraction Unexecuted instantiation: speed_features.c:av1_rd_stats_subtraction Unexecuted instantiation: superres_scale.c:av1_rd_stats_subtraction Unexecuted instantiation: svc_layercontext.c:av1_rd_stats_subtraction Unexecuted instantiation: temporal_filter.c:av1_rd_stats_subtraction Unexecuted instantiation: thirdpass.c:av1_rd_stats_subtraction Unexecuted instantiation: tokenize.c:av1_rd_stats_subtraction Unexecuted instantiation: tpl_model.c:av1_rd_stats_subtraction Unexecuted instantiation: tx_search.c:av1_rd_stats_subtraction Unexecuted instantiation: txb_rdopt.c:av1_rd_stats_subtraction Unexecuted instantiation: intra_mode_search.c:av1_rd_stats_subtraction Unexecuted instantiation: var_based_part.c:av1_rd_stats_subtraction Unexecuted instantiation: av1_noise_estimate.c:av1_rd_stats_subtraction Unexecuted instantiation: aq_complexity.c:av1_rd_stats_subtraction Unexecuted instantiation: aq_cyclicrefresh.c:av1_rd_stats_subtraction Unexecuted instantiation: aq_variance.c:av1_rd_stats_subtraction Unexecuted instantiation: allintra_vis.c:av1_rd_stats_subtraction Unexecuted instantiation: compound_type.c:av1_rd_stats_subtraction Unexecuted instantiation: context_tree.c:av1_rd_stats_subtraction Unexecuted instantiation: encodeframe.c:av1_rd_stats_subtraction Unexecuted instantiation: encodeframe_utils.c:av1_rd_stats_subtraction Unexecuted instantiation: encodemb.c:av1_rd_stats_subtraction Unexecuted instantiation: encode_strategy.c:av1_rd_stats_subtraction Unexecuted instantiation: global_motion.c:av1_rd_stats_subtraction Unexecuted instantiation: gop_structure.c:av1_rd_stats_subtraction Unexecuted instantiation: interp_search.c:av1_rd_stats_subtraction Unexecuted instantiation: motion_search_facade.c:av1_rd_stats_subtraction partition_search.c:av1_rd_stats_subtraction Line | Count | Source | 178 | 198k | RD_STATS *result) { | 179 | 198k | if (left->rate == INT_MAX || right->rate == INT_MAX || | 180 | 198k | left->dist == INT64_MAX || right->dist == INT64_MAX || | 181 | 198k | left->rdcost == INT64_MAX || right->rdcost == INT64_MAX) { | 182 | 66.6k | av1_invalid_rd_stats(result); | 183 | 132k | } else { | 184 | 132k | result->rate = left->rate - right->rate; | 185 | 132k | result->dist = left->dist - right->dist; | 186 | 132k | result->rdcost = av1_calculate_rd_cost(mult, result->rate, result->dist); | 187 | 132k | } | 188 | 198k | } |
Unexecuted instantiation: partition_strategy.c:av1_rd_stats_subtraction Unexecuted instantiation: nonrd_pickmode.c:av1_rd_stats_subtraction |
189 | | |
190 | | struct TileInfo; |
191 | | struct TileDataEnc; |
192 | | struct AV1_COMP; |
193 | | struct macroblock; |
194 | | |
195 | | /*!\brief Compute rdmult based on q index and frame update type |
196 | | * |
197 | | * \param[in] bit_depth bit depth |
198 | | * \param[in] update_type frame update type |
199 | | * \param[in] qindex q index |
200 | | * |
201 | | * \return rdmult |
202 | | */ |
203 | | int av1_compute_rd_mult_based_on_qindex(aom_bit_depth_t bit_depth, |
204 | | FRAME_UPDATE_TYPE update_type, |
205 | | int qindex); |
206 | | |
207 | | int av1_compute_rd_mult(const struct AV1_COMP *cpi, int qindex); |
208 | | |
209 | | void av1_initialize_rd_consts(struct AV1_COMP *cpi); |
210 | | |
211 | | // Sets the multiplier to convert mv cost to l1 error during motion search. |
212 | | void av1_set_sad_per_bit(const struct AV1_COMP *cpi, int *sadperbit, |
213 | | int qindex); |
214 | | |
215 | | void av1_model_rd_from_var_lapndz(int64_t var, unsigned int n, |
216 | | unsigned int qstep, int *rate, int64_t *dist); |
217 | | |
218 | | void av1_model_rd_curvfit(BLOCK_SIZE bsize, double sse_norm, double xqr, |
219 | | double *rate_f, double *distbysse_f); |
220 | | void av1_model_rd_surffit(BLOCK_SIZE bsize, double sse_norm, double xm, |
221 | | double yl, double *rate_f, double *distbysse_f); |
222 | | |
223 | | int av1_get_switchable_rate(const MACROBLOCK *x, const MACROBLOCKD *xd, |
224 | | InterpFilter interp_filter, int dual_filter); |
225 | | |
226 | | YV12_BUFFER_CONFIG *av1_get_scaled_ref_frame(const struct AV1_COMP *cpi, |
227 | | int ref_frame); |
228 | | |
229 | | void av1_init_me_luts(void); |
230 | | |
231 | | void av1_set_mvcost(MACROBLOCK *x, int ref, int ref_mv_idx); |
232 | | |
233 | | void av1_get_entropy_contexts(BLOCK_SIZE plane_bsize, |
234 | | const struct macroblockd_plane *pd, |
235 | | ENTROPY_CONTEXT t_above[MAX_MIB_SIZE], |
236 | | ENTROPY_CONTEXT t_left[MAX_MIB_SIZE]); |
237 | | |
238 | | void av1_set_rd_speed_thresholds(struct AV1_COMP *cpi); |
239 | | |
240 | | void av1_update_rd_thresh_fact(const AV1_COMMON *const cm, |
241 | | int (*fact)[MAX_MODES], int rd_thresh, |
242 | | BLOCK_SIZE bsize, THR_MODES best_mode_index, |
243 | | THR_MODES inter_mode_start, |
244 | | THR_MODES inter_mode_end, |
245 | | THR_MODES intra_mode_start, |
246 | | THR_MODES intra_mode_end); |
247 | | |
248 | 3.59k | static INLINE void reset_thresh_freq_fact(MACROBLOCK *const x) { |
249 | 82.6k | for (int i = 0; i < BLOCK_SIZES_ALL; ++i) { |
250 | 13.2M | for (int j = 0; j < MAX_MODES; ++j) { |
251 | 13.1M | x->thresh_freq_fact[i][j] = RD_THRESH_FAC_FRAC_VAL; |
252 | 13.1M | } |
253 | 79.0k | } |
254 | 3.59k | } Unexecuted instantiation: av1_cx_iface.c:reset_thresh_freq_fact Unexecuted instantiation: av1_quantize.c:reset_thresh_freq_fact Unexecuted instantiation: bitstream.c:reset_thresh_freq_fact Unexecuted instantiation: encodemv.c:reset_thresh_freq_fact Unexecuted instantiation: encoder.c:reset_thresh_freq_fact Unexecuted instantiation: encoder_utils.c:reset_thresh_freq_fact Unexecuted instantiation: encodetxb.c:reset_thresh_freq_fact Unexecuted instantiation: ethread.c:reset_thresh_freq_fact Unexecuted instantiation: firstpass.c:reset_thresh_freq_fact Unexecuted instantiation: global_motion_facade.c:reset_thresh_freq_fact Unexecuted instantiation: level.c:reset_thresh_freq_fact Unexecuted instantiation: lookahead.c:reset_thresh_freq_fact Unexecuted instantiation: mcomp.c:reset_thresh_freq_fact Unexecuted instantiation: mv_prec.c:reset_thresh_freq_fact Unexecuted instantiation: palette.c:reset_thresh_freq_fact Unexecuted instantiation: pass2_strategy.c:reset_thresh_freq_fact Unexecuted instantiation: pickcdef.c:reset_thresh_freq_fact Unexecuted instantiation: picklpf.c:reset_thresh_freq_fact Unexecuted instantiation: pickrst.c:reset_thresh_freq_fact Unexecuted instantiation: ratectrl.c:reset_thresh_freq_fact Unexecuted instantiation: rd.c:reset_thresh_freq_fact Unexecuted instantiation: rdopt.c:reset_thresh_freq_fact Unexecuted instantiation: segmentation.c:reset_thresh_freq_fact Unexecuted instantiation: speed_features.c:reset_thresh_freq_fact Unexecuted instantiation: superres_scale.c:reset_thresh_freq_fact Unexecuted instantiation: svc_layercontext.c:reset_thresh_freq_fact Unexecuted instantiation: temporal_filter.c:reset_thresh_freq_fact Unexecuted instantiation: thirdpass.c:reset_thresh_freq_fact Unexecuted instantiation: tokenize.c:reset_thresh_freq_fact Unexecuted instantiation: tpl_model.c:reset_thresh_freq_fact Unexecuted instantiation: tx_search.c:reset_thresh_freq_fact Unexecuted instantiation: txb_rdopt.c:reset_thresh_freq_fact Unexecuted instantiation: intra_mode_search.c:reset_thresh_freq_fact Unexecuted instantiation: var_based_part.c:reset_thresh_freq_fact Unexecuted instantiation: av1_noise_estimate.c:reset_thresh_freq_fact Unexecuted instantiation: aq_complexity.c:reset_thresh_freq_fact Unexecuted instantiation: aq_cyclicrefresh.c:reset_thresh_freq_fact Unexecuted instantiation: aq_variance.c:reset_thresh_freq_fact Unexecuted instantiation: allintra_vis.c:reset_thresh_freq_fact Unexecuted instantiation: compound_type.c:reset_thresh_freq_fact Unexecuted instantiation: context_tree.c:reset_thresh_freq_fact encodeframe.c:reset_thresh_freq_fact Line | Count | Source | 248 | 3.59k | static INLINE void reset_thresh_freq_fact(MACROBLOCK *const x) { | 249 | 82.6k | for (int i = 0; i < BLOCK_SIZES_ALL; ++i) { | 250 | 13.2M | for (int j = 0; j < MAX_MODES; ++j) { | 251 | 13.1M | x->thresh_freq_fact[i][j] = RD_THRESH_FAC_FRAC_VAL; | 252 | 13.1M | } | 253 | 79.0k | } | 254 | 3.59k | } |
Unexecuted instantiation: encodeframe_utils.c:reset_thresh_freq_fact Unexecuted instantiation: encodemb.c:reset_thresh_freq_fact Unexecuted instantiation: encode_strategy.c:reset_thresh_freq_fact Unexecuted instantiation: global_motion.c:reset_thresh_freq_fact Unexecuted instantiation: gop_structure.c:reset_thresh_freq_fact Unexecuted instantiation: interp_search.c:reset_thresh_freq_fact Unexecuted instantiation: motion_search_facade.c:reset_thresh_freq_fact Unexecuted instantiation: partition_search.c:reset_thresh_freq_fact Unexecuted instantiation: partition_strategy.c:reset_thresh_freq_fact Unexecuted instantiation: nonrd_pickmode.c:reset_thresh_freq_fact |
255 | | |
256 | | static INLINE int rd_less_than_thresh(int64_t best_rd, int64_t thresh, |
257 | 0 | int thresh_fact) { |
258 | 0 | return best_rd < (thresh * thresh_fact >> 5) || thresh == INT_MAX; |
259 | 0 | } Unexecuted instantiation: av1_cx_iface.c:rd_less_than_thresh Unexecuted instantiation: av1_quantize.c:rd_less_than_thresh Unexecuted instantiation: bitstream.c:rd_less_than_thresh Unexecuted instantiation: encodemv.c:rd_less_than_thresh Unexecuted instantiation: encoder.c:rd_less_than_thresh Unexecuted instantiation: encoder_utils.c:rd_less_than_thresh Unexecuted instantiation: encodetxb.c:rd_less_than_thresh Unexecuted instantiation: ethread.c:rd_less_than_thresh Unexecuted instantiation: firstpass.c:rd_less_than_thresh Unexecuted instantiation: global_motion_facade.c:rd_less_than_thresh Unexecuted instantiation: level.c:rd_less_than_thresh Unexecuted instantiation: lookahead.c:rd_less_than_thresh Unexecuted instantiation: mcomp.c:rd_less_than_thresh Unexecuted instantiation: mv_prec.c:rd_less_than_thresh Unexecuted instantiation: palette.c:rd_less_than_thresh Unexecuted instantiation: pass2_strategy.c:rd_less_than_thresh Unexecuted instantiation: pickcdef.c:rd_less_than_thresh Unexecuted instantiation: picklpf.c:rd_less_than_thresh Unexecuted instantiation: pickrst.c:rd_less_than_thresh Unexecuted instantiation: ratectrl.c:rd_less_than_thresh Unexecuted instantiation: rd.c:rd_less_than_thresh Unexecuted instantiation: rdopt.c:rd_less_than_thresh Unexecuted instantiation: segmentation.c:rd_less_than_thresh Unexecuted instantiation: speed_features.c:rd_less_than_thresh Unexecuted instantiation: superres_scale.c:rd_less_than_thresh Unexecuted instantiation: svc_layercontext.c:rd_less_than_thresh Unexecuted instantiation: temporal_filter.c:rd_less_than_thresh Unexecuted instantiation: thirdpass.c:rd_less_than_thresh Unexecuted instantiation: tokenize.c:rd_less_than_thresh Unexecuted instantiation: tpl_model.c:rd_less_than_thresh Unexecuted instantiation: tx_search.c:rd_less_than_thresh Unexecuted instantiation: txb_rdopt.c:rd_less_than_thresh Unexecuted instantiation: intra_mode_search.c:rd_less_than_thresh Unexecuted instantiation: var_based_part.c:rd_less_than_thresh Unexecuted instantiation: av1_noise_estimate.c:rd_less_than_thresh Unexecuted instantiation: aq_complexity.c:rd_less_than_thresh Unexecuted instantiation: aq_cyclicrefresh.c:rd_less_than_thresh Unexecuted instantiation: aq_variance.c:rd_less_than_thresh Unexecuted instantiation: allintra_vis.c:rd_less_than_thresh Unexecuted instantiation: compound_type.c:rd_less_than_thresh Unexecuted instantiation: context_tree.c:rd_less_than_thresh Unexecuted instantiation: encodeframe.c:rd_less_than_thresh Unexecuted instantiation: encodeframe_utils.c:rd_less_than_thresh Unexecuted instantiation: encodemb.c:rd_less_than_thresh Unexecuted instantiation: encode_strategy.c:rd_less_than_thresh Unexecuted instantiation: global_motion.c:rd_less_than_thresh Unexecuted instantiation: gop_structure.c:rd_less_than_thresh Unexecuted instantiation: interp_search.c:rd_less_than_thresh Unexecuted instantiation: motion_search_facade.c:rd_less_than_thresh Unexecuted instantiation: partition_search.c:rd_less_than_thresh Unexecuted instantiation: partition_strategy.c:rd_less_than_thresh Unexecuted instantiation: nonrd_pickmode.c:rd_less_than_thresh |
260 | | |
261 | | void av1_mv_pred(const struct AV1_COMP *cpi, MACROBLOCK *x, |
262 | | uint8_t *ref_y_buffer, int ref_y_stride, int ref_frame, |
263 | | BLOCK_SIZE block_size); |
264 | | |
265 | | // Sets the multiplier to convert mv cost to l2 error during motion search. |
266 | 370k | static INLINE void av1_set_error_per_bit(int *errorperbit, int rdmult) { |
267 | 370k | *errorperbit = AOMMAX(rdmult >> RD_EPB_SHIFT, 1); |
268 | 370k | } Unexecuted instantiation: av1_cx_iface.c:av1_set_error_per_bit av1_quantize.c:av1_set_error_per_bit Line | Count | Source | 266 | 1.26k | static INLINE void av1_set_error_per_bit(int *errorperbit, int rdmult) { | 267 | 1.26k | *errorperbit = AOMMAX(rdmult >> RD_EPB_SHIFT, 1); | 268 | 1.26k | } |
Unexecuted instantiation: bitstream.c:av1_set_error_per_bit Unexecuted instantiation: encodemv.c:av1_set_error_per_bit Unexecuted instantiation: encoder.c:av1_set_error_per_bit Unexecuted instantiation: encoder_utils.c:av1_set_error_per_bit Unexecuted instantiation: encodetxb.c:av1_set_error_per_bit Unexecuted instantiation: ethread.c:av1_set_error_per_bit Unexecuted instantiation: firstpass.c:av1_set_error_per_bit Unexecuted instantiation: global_motion_facade.c:av1_set_error_per_bit Unexecuted instantiation: level.c:av1_set_error_per_bit Unexecuted instantiation: lookahead.c:av1_set_error_per_bit Unexecuted instantiation: mcomp.c:av1_set_error_per_bit Unexecuted instantiation: mv_prec.c:av1_set_error_per_bit Unexecuted instantiation: palette.c:av1_set_error_per_bit Unexecuted instantiation: pass2_strategy.c:av1_set_error_per_bit Unexecuted instantiation: pickcdef.c:av1_set_error_per_bit Unexecuted instantiation: picklpf.c:av1_set_error_per_bit Unexecuted instantiation: pickrst.c:av1_set_error_per_bit Unexecuted instantiation: ratectrl.c:av1_set_error_per_bit rd.c:av1_set_error_per_bit Line | Count | Source | 266 | 1.26k | static INLINE void av1_set_error_per_bit(int *errorperbit, int rdmult) { | 267 | 1.26k | *errorperbit = AOMMAX(rdmult >> RD_EPB_SHIFT, 1); | 268 | 1.26k | } |
Unexecuted instantiation: rdopt.c:av1_set_error_per_bit Unexecuted instantiation: segmentation.c:av1_set_error_per_bit Unexecuted instantiation: speed_features.c:av1_set_error_per_bit Unexecuted instantiation: superres_scale.c:av1_set_error_per_bit Unexecuted instantiation: svc_layercontext.c:av1_set_error_per_bit Unexecuted instantiation: temporal_filter.c:av1_set_error_per_bit Unexecuted instantiation: thirdpass.c:av1_set_error_per_bit Unexecuted instantiation: tokenize.c:av1_set_error_per_bit Unexecuted instantiation: tpl_model.c:av1_set_error_per_bit Unexecuted instantiation: tx_search.c:av1_set_error_per_bit Unexecuted instantiation: txb_rdopt.c:av1_set_error_per_bit Unexecuted instantiation: intra_mode_search.c:av1_set_error_per_bit Unexecuted instantiation: var_based_part.c:av1_set_error_per_bit Unexecuted instantiation: av1_noise_estimate.c:av1_set_error_per_bit Unexecuted instantiation: aq_complexity.c:av1_set_error_per_bit Unexecuted instantiation: aq_cyclicrefresh.c:av1_set_error_per_bit Unexecuted instantiation: aq_variance.c:av1_set_error_per_bit Unexecuted instantiation: allintra_vis.c:av1_set_error_per_bit Unexecuted instantiation: compound_type.c:av1_set_error_per_bit Unexecuted instantiation: context_tree.c:av1_set_error_per_bit Unexecuted instantiation: encodeframe.c:av1_set_error_per_bit encodeframe_utils.c:av1_set_error_per_bit Line | Count | Source | 266 | 255k | static INLINE void av1_set_error_per_bit(int *errorperbit, int rdmult) { | 267 | 255k | *errorperbit = AOMMAX(rdmult >> RD_EPB_SHIFT, 1); | 268 | 255k | } |
Unexecuted instantiation: encodemb.c:av1_set_error_per_bit Unexecuted instantiation: encode_strategy.c:av1_set_error_per_bit Unexecuted instantiation: global_motion.c:av1_set_error_per_bit Unexecuted instantiation: gop_structure.c:av1_set_error_per_bit Unexecuted instantiation: interp_search.c:av1_set_error_per_bit Unexecuted instantiation: motion_search_facade.c:av1_set_error_per_bit partition_search.c:av1_set_error_per_bit Line | Count | Source | 266 | 112k | static INLINE void av1_set_error_per_bit(int *errorperbit, int rdmult) { | 267 | 112k | *errorperbit = AOMMAX(rdmult >> RD_EPB_SHIFT, 1); | 268 | 112k | } |
Unexecuted instantiation: partition_strategy.c:av1_set_error_per_bit Unexecuted instantiation: nonrd_pickmode.c:av1_set_error_per_bit |
269 | | |
270 | | // Get the threshold for R-D optimization of coefficients depending upon mode |
271 | | // decision/winner mode processing |
272 | | static INLINE void get_rd_opt_coeff_thresh( |
273 | | const uint32_t (*const coeff_opt_threshold)[2], |
274 | | TxfmSearchParams *txfm_params, int enable_winner_mode_for_coeff_opt, |
275 | 473k | int is_winner_mode) { |
276 | 473k | if (!enable_winner_mode_for_coeff_opt) { |
277 | | // Default initialization of threshold |
278 | 224k | txfm_params->coeff_opt_thresholds[0] = coeff_opt_threshold[DEFAULT_EVAL][0]; |
279 | 224k | txfm_params->coeff_opt_thresholds[1] = coeff_opt_threshold[DEFAULT_EVAL][1]; |
280 | 224k | return; |
281 | 224k | } |
282 | | // TODO(any): Experiment with coeff_opt_dist_threshold values when |
283 | | // enable_winner_mode_for_coeff_opt is ON |
284 | | // TODO(any): Skip the winner mode processing for blocks with lower residual |
285 | | // energy as R-D optimization of coefficients would have been enabled during |
286 | | // mode decision |
287 | | |
288 | | // Use conservative threshold during mode decision and perform R-D |
289 | | // optimization of coeffs always for winner modes |
290 | 248k | if (is_winner_mode) { |
291 | 136k | txfm_params->coeff_opt_thresholds[0] = |
292 | 136k | coeff_opt_threshold[WINNER_MODE_EVAL][0]; |
293 | 136k | txfm_params->coeff_opt_thresholds[1] = |
294 | 136k | coeff_opt_threshold[WINNER_MODE_EVAL][1]; |
295 | 136k | } else { |
296 | 112k | txfm_params->coeff_opt_thresholds[0] = coeff_opt_threshold[MODE_EVAL][0]; |
297 | 112k | txfm_params->coeff_opt_thresholds[1] = coeff_opt_threshold[MODE_EVAL][1]; |
298 | 112k | } |
299 | 248k | } Unexecuted instantiation: av1_cx_iface.c:get_rd_opt_coeff_thresh Unexecuted instantiation: av1_quantize.c:get_rd_opt_coeff_thresh Unexecuted instantiation: bitstream.c:get_rd_opt_coeff_thresh Unexecuted instantiation: encodemv.c:get_rd_opt_coeff_thresh Unexecuted instantiation: encoder.c:get_rd_opt_coeff_thresh Unexecuted instantiation: encoder_utils.c:get_rd_opt_coeff_thresh Unexecuted instantiation: encodetxb.c:get_rd_opt_coeff_thresh Unexecuted instantiation: ethread.c:get_rd_opt_coeff_thresh Unexecuted instantiation: firstpass.c:get_rd_opt_coeff_thresh Unexecuted instantiation: global_motion_facade.c:get_rd_opt_coeff_thresh Unexecuted instantiation: level.c:get_rd_opt_coeff_thresh Unexecuted instantiation: lookahead.c:get_rd_opt_coeff_thresh Unexecuted instantiation: mcomp.c:get_rd_opt_coeff_thresh Unexecuted instantiation: mv_prec.c:get_rd_opt_coeff_thresh Unexecuted instantiation: palette.c:get_rd_opt_coeff_thresh Unexecuted instantiation: pass2_strategy.c:get_rd_opt_coeff_thresh Unexecuted instantiation: pickcdef.c:get_rd_opt_coeff_thresh Unexecuted instantiation: picklpf.c:get_rd_opt_coeff_thresh Unexecuted instantiation: pickrst.c:get_rd_opt_coeff_thresh Unexecuted instantiation: ratectrl.c:get_rd_opt_coeff_thresh Unexecuted instantiation: rd.c:get_rd_opt_coeff_thresh rdopt.c:get_rd_opt_coeff_thresh Line | Count | Source | 275 | 112k | int is_winner_mode) { | 276 | 112k | if (!enable_winner_mode_for_coeff_opt) { | 277 | | // Default initialization of threshold | 278 | 112k | txfm_params->coeff_opt_thresholds[0] = coeff_opt_threshold[DEFAULT_EVAL][0]; | 279 | 112k | txfm_params->coeff_opt_thresholds[1] = coeff_opt_threshold[DEFAULT_EVAL][1]; | 280 | 112k | return; | 281 | 112k | } | 282 | | // TODO(any): Experiment with coeff_opt_dist_threshold values when | 283 | | // enable_winner_mode_for_coeff_opt is ON | 284 | | // TODO(any): Skip the winner mode processing for blocks with lower residual | 285 | | // energy as R-D optimization of coefficients would have been enabled during | 286 | | // mode decision | 287 | | | 288 | | // Use conservative threshold during mode decision and perform R-D | 289 | | // optimization of coeffs always for winner modes | 290 | 0 | if (is_winner_mode) { | 291 | 0 | txfm_params->coeff_opt_thresholds[0] = | 292 | 0 | coeff_opt_threshold[WINNER_MODE_EVAL][0]; | 293 | 0 | txfm_params->coeff_opt_thresholds[1] = | 294 | 0 | coeff_opt_threshold[WINNER_MODE_EVAL][1]; | 295 | 0 | } else { | 296 | 0 | txfm_params->coeff_opt_thresholds[0] = coeff_opt_threshold[MODE_EVAL][0]; | 297 | 0 | txfm_params->coeff_opt_thresholds[1] = coeff_opt_threshold[MODE_EVAL][1]; | 298 | 0 | } | 299 | 0 | } |
Unexecuted instantiation: segmentation.c:get_rd_opt_coeff_thresh Unexecuted instantiation: speed_features.c:get_rd_opt_coeff_thresh Unexecuted instantiation: superres_scale.c:get_rd_opt_coeff_thresh Unexecuted instantiation: svc_layercontext.c:get_rd_opt_coeff_thresh Unexecuted instantiation: temporal_filter.c:get_rd_opt_coeff_thresh Unexecuted instantiation: thirdpass.c:get_rd_opt_coeff_thresh Unexecuted instantiation: tokenize.c:get_rd_opt_coeff_thresh Unexecuted instantiation: tpl_model.c:get_rd_opt_coeff_thresh Unexecuted instantiation: tx_search.c:get_rd_opt_coeff_thresh Unexecuted instantiation: txb_rdopt.c:get_rd_opt_coeff_thresh intra_mode_search.c:get_rd_opt_coeff_thresh Line | Count | Source | 275 | 248k | int is_winner_mode) { | 276 | 248k | if (!enable_winner_mode_for_coeff_opt) { | 277 | | // Default initialization of threshold | 278 | 0 | txfm_params->coeff_opt_thresholds[0] = coeff_opt_threshold[DEFAULT_EVAL][0]; | 279 | 0 | txfm_params->coeff_opt_thresholds[1] = coeff_opt_threshold[DEFAULT_EVAL][1]; | 280 | 0 | return; | 281 | 0 | } | 282 | | // TODO(any): Experiment with coeff_opt_dist_threshold values when | 283 | | // enable_winner_mode_for_coeff_opt is ON | 284 | | // TODO(any): Skip the winner mode processing for blocks with lower residual | 285 | | // energy as R-D optimization of coefficients would have been enabled during | 286 | | // mode decision | 287 | | | 288 | | // Use conservative threshold during mode decision and perform R-D | 289 | | // optimization of coeffs always for winner modes | 290 | 248k | if (is_winner_mode) { | 291 | 136k | txfm_params->coeff_opt_thresholds[0] = | 292 | 136k | coeff_opt_threshold[WINNER_MODE_EVAL][0]; | 293 | 136k | txfm_params->coeff_opt_thresholds[1] = | 294 | 136k | coeff_opt_threshold[WINNER_MODE_EVAL][1]; | 295 | 136k | } else { | 296 | 112k | txfm_params->coeff_opt_thresholds[0] = coeff_opt_threshold[MODE_EVAL][0]; | 297 | 112k | txfm_params->coeff_opt_thresholds[1] = coeff_opt_threshold[MODE_EVAL][1]; | 298 | 112k | } | 299 | 248k | } |
Unexecuted instantiation: var_based_part.c:get_rd_opt_coeff_thresh Unexecuted instantiation: av1_noise_estimate.c:get_rd_opt_coeff_thresh Unexecuted instantiation: aq_complexity.c:get_rd_opt_coeff_thresh Unexecuted instantiation: aq_cyclicrefresh.c:get_rd_opt_coeff_thresh Unexecuted instantiation: aq_variance.c:get_rd_opt_coeff_thresh Unexecuted instantiation: allintra_vis.c:get_rd_opt_coeff_thresh Unexecuted instantiation: compound_type.c:get_rd_opt_coeff_thresh Unexecuted instantiation: context_tree.c:get_rd_opt_coeff_thresh Unexecuted instantiation: encodeframe.c:get_rd_opt_coeff_thresh Unexecuted instantiation: encodeframe_utils.c:get_rd_opt_coeff_thresh Unexecuted instantiation: encodemb.c:get_rd_opt_coeff_thresh Unexecuted instantiation: encode_strategy.c:get_rd_opt_coeff_thresh Unexecuted instantiation: global_motion.c:get_rd_opt_coeff_thresh Unexecuted instantiation: gop_structure.c:get_rd_opt_coeff_thresh Unexecuted instantiation: interp_search.c:get_rd_opt_coeff_thresh Unexecuted instantiation: motion_search_facade.c:get_rd_opt_coeff_thresh partition_search.c:get_rd_opt_coeff_thresh Line | Count | Source | 275 | 112k | int is_winner_mode) { | 276 | 112k | if (!enable_winner_mode_for_coeff_opt) { | 277 | | // Default initialization of threshold | 278 | 112k | txfm_params->coeff_opt_thresholds[0] = coeff_opt_threshold[DEFAULT_EVAL][0]; | 279 | 112k | txfm_params->coeff_opt_thresholds[1] = coeff_opt_threshold[DEFAULT_EVAL][1]; | 280 | 112k | return; | 281 | 112k | } | 282 | | // TODO(any): Experiment with coeff_opt_dist_threshold values when | 283 | | // enable_winner_mode_for_coeff_opt is ON | 284 | | // TODO(any): Skip the winner mode processing for blocks with lower residual | 285 | | // energy as R-D optimization of coefficients would have been enabled during | 286 | | // mode decision | 287 | | | 288 | | // Use conservative threshold during mode decision and perform R-D | 289 | | // optimization of coeffs always for winner modes | 290 | 0 | if (is_winner_mode) { | 291 | 0 | txfm_params->coeff_opt_thresholds[0] = | 292 | 0 | coeff_opt_threshold[WINNER_MODE_EVAL][0]; | 293 | 0 | txfm_params->coeff_opt_thresholds[1] = | 294 | 0 | coeff_opt_threshold[WINNER_MODE_EVAL][1]; | 295 | 0 | } else { | 296 | 0 | txfm_params->coeff_opt_thresholds[0] = coeff_opt_threshold[MODE_EVAL][0]; | 297 | 0 | txfm_params->coeff_opt_thresholds[1] = coeff_opt_threshold[MODE_EVAL][1]; | 298 | 0 | } | 299 | 0 | } |
Unexecuted instantiation: partition_strategy.c:get_rd_opt_coeff_thresh Unexecuted instantiation: nonrd_pickmode.c:get_rd_opt_coeff_thresh |
300 | | |
301 | | // Used to reset the state of mb rd hash information |
302 | 148k | static INLINE void reset_mb_rd_record(MB_RD_RECORD *const mb_rd_record) { |
303 | 148k | if (!mb_rd_record) return; |
304 | | |
305 | | // Reset the state for use_mb_rd_hash |
306 | 18.4E | mb_rd_record->num = mb_rd_record->index_start = 0; |
307 | 18.4E | } Unexecuted instantiation: av1_cx_iface.c:reset_mb_rd_record Unexecuted instantiation: av1_quantize.c:reset_mb_rd_record Unexecuted instantiation: bitstream.c:reset_mb_rd_record Unexecuted instantiation: encodemv.c:reset_mb_rd_record Unexecuted instantiation: encoder.c:reset_mb_rd_record Unexecuted instantiation: encoder_utils.c:reset_mb_rd_record Unexecuted instantiation: encodetxb.c:reset_mb_rd_record Unexecuted instantiation: ethread.c:reset_mb_rd_record Unexecuted instantiation: firstpass.c:reset_mb_rd_record Unexecuted instantiation: global_motion_facade.c:reset_mb_rd_record Unexecuted instantiation: level.c:reset_mb_rd_record Unexecuted instantiation: lookahead.c:reset_mb_rd_record Unexecuted instantiation: mcomp.c:reset_mb_rd_record Unexecuted instantiation: mv_prec.c:reset_mb_rd_record Unexecuted instantiation: palette.c:reset_mb_rd_record Unexecuted instantiation: pass2_strategy.c:reset_mb_rd_record Unexecuted instantiation: pickcdef.c:reset_mb_rd_record Unexecuted instantiation: picklpf.c:reset_mb_rd_record Unexecuted instantiation: pickrst.c:reset_mb_rd_record Unexecuted instantiation: ratectrl.c:reset_mb_rd_record Unexecuted instantiation: rd.c:reset_mb_rd_record Unexecuted instantiation: rdopt.c:reset_mb_rd_record Unexecuted instantiation: segmentation.c:reset_mb_rd_record Unexecuted instantiation: speed_features.c:reset_mb_rd_record Unexecuted instantiation: superres_scale.c:reset_mb_rd_record Unexecuted instantiation: svc_layercontext.c:reset_mb_rd_record Unexecuted instantiation: temporal_filter.c:reset_mb_rd_record Unexecuted instantiation: thirdpass.c:reset_mb_rd_record Unexecuted instantiation: tokenize.c:reset_mb_rd_record Unexecuted instantiation: tpl_model.c:reset_mb_rd_record Unexecuted instantiation: tx_search.c:reset_mb_rd_record Unexecuted instantiation: txb_rdopt.c:reset_mb_rd_record intra_mode_search.c:reset_mb_rd_record Line | Count | Source | 302 | 136k | static INLINE void reset_mb_rd_record(MB_RD_RECORD *const mb_rd_record) { | 303 | 136k | if (!mb_rd_record) return; | 304 | | | 305 | | // Reset the state for use_mb_rd_hash | 306 | 0 | mb_rd_record->num = mb_rd_record->index_start = 0; | 307 | 0 | } |
Unexecuted instantiation: var_based_part.c:reset_mb_rd_record Unexecuted instantiation: av1_noise_estimate.c:reset_mb_rd_record Unexecuted instantiation: aq_complexity.c:reset_mb_rd_record Unexecuted instantiation: aq_cyclicrefresh.c:reset_mb_rd_record Unexecuted instantiation: aq_variance.c:reset_mb_rd_record Unexecuted instantiation: allintra_vis.c:reset_mb_rd_record Unexecuted instantiation: compound_type.c:reset_mb_rd_record Unexecuted instantiation: context_tree.c:reset_mb_rd_record encodeframe.c:reset_mb_rd_record Line | Count | Source | 302 | 11.7k | static INLINE void reset_mb_rd_record(MB_RD_RECORD *const mb_rd_record) { | 303 | 11.7k | if (!mb_rd_record) return; | 304 | | | 305 | | // Reset the state for use_mb_rd_hash | 306 | 18.4E | mb_rd_record->num = mb_rd_record->index_start = 0; | 307 | 18.4E | } |
Unexecuted instantiation: encodeframe_utils.c:reset_mb_rd_record Unexecuted instantiation: encodemb.c:reset_mb_rd_record Unexecuted instantiation: encode_strategy.c:reset_mb_rd_record Unexecuted instantiation: global_motion.c:reset_mb_rd_record Unexecuted instantiation: gop_structure.c:reset_mb_rd_record Unexecuted instantiation: interp_search.c:reset_mb_rd_record Unexecuted instantiation: motion_search_facade.c:reset_mb_rd_record Unexecuted instantiation: partition_search.c:reset_mb_rd_record Unexecuted instantiation: partition_strategy.c:reset_mb_rd_record Unexecuted instantiation: nonrd_pickmode.c:reset_mb_rd_record |
308 | | |
309 | | void av1_setup_pred_block(const MACROBLOCKD *xd, |
310 | | struct buf_2d dst[MAX_MB_PLANE], |
311 | | const YV12_BUFFER_CONFIG *src, |
312 | | const struct scale_factors *scale, |
313 | | const struct scale_factors *scale_uv, |
314 | | const int num_planes); |
315 | | |
316 | | int av1_get_intra_cost_penalty(int qindex, int qdelta, |
317 | | aom_bit_depth_t bit_depth); |
318 | | |
319 | | void av1_fill_mode_rates(AV1_COMMON *const cm, ModeCosts *mode_costs, |
320 | | FRAME_CONTEXT *fc); |
321 | | |
322 | | void av1_fill_lr_rates(ModeCosts *mode_costs, FRAME_CONTEXT *fc); |
323 | | |
324 | | void av1_fill_coeff_costs(CoeffCosts *coeff_costs, FRAME_CONTEXT *fc, |
325 | | const int num_planes); |
326 | | |
327 | | void av1_fill_mv_costs(const nmv_context *nmvc, int integer_mv, int usehp, |
328 | | MvCosts *mv_costs); |
329 | | |
330 | | void av1_fill_dv_costs(const nmv_context *ndvc, IntraBCMVCosts *dv_costs); |
331 | | |
332 | | int av1_get_adaptive_rdmult(const struct AV1_COMP *cpi, double beta); |
333 | | |
334 | | int av1_get_deltaq_offset(aom_bit_depth_t bit_depth, int qindex, double beta); |
335 | | |
336 | | /*!\brief Adjust current superblock's q_index based on delta q resolution |
337 | | * |
338 | | * \param[in] delta_q_res delta q resolution |
339 | | * \param[in] prev_qindex previous superblock's q index |
340 | | * \param[in] curr_qindex current superblock's q index |
341 | | * |
342 | | * \return the current superblock's adjusted q_index |
343 | | */ |
344 | | int av1_adjust_q_from_delta_q_res(int delta_q_res, int prev_qindex, |
345 | | int curr_qindex); |
346 | | |
347 | | #ifdef __cplusplus |
348 | | } // extern "C" |
349 | | #endif |
350 | | |
351 | | #endif // AOM_AV1_ENCODER_RD_H_ |