Coverage Report

Created: 2026-03-08 06:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/aom/av1/common/txb_common.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2017, 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_COMMON_TXB_COMMON_H_
13
#define AOM_AV1_COMMON_TXB_COMMON_H_
14
15
#include "av1/common/av1_common_int.h"
16
17
extern const int16_t av1_eob_group_start[12];
18
extern const int16_t av1_eob_offset_bits[12];
19
20
extern const int8_t av1_coeff_band_4x4[16];
21
22
extern const int8_t av1_coeff_band_8x8[64];
23
24
extern const int8_t av1_coeff_band_16x16[256];
25
26
extern const int8_t av1_coeff_band_32x32[1024];
27
28
extern const int8_t *av1_nz_map_ctx_offset[TX_SIZES_ALL];
29
30
typedef struct txb_ctx {
31
  int txb_skip_ctx;
32
  int dc_sign_ctx;
33
} TXB_CTX;
34
35
static const int base_level_count_to_index[13] = {
36
  0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
37
};
38
39
static const TX_CLASS tx_type_to_class[TX_TYPES] = {
40
  TX_CLASS_2D,     // DCT_DCT
41
  TX_CLASS_2D,     // ADST_DCT
42
  TX_CLASS_2D,     // DCT_ADST
43
  TX_CLASS_2D,     // ADST_ADST
44
  TX_CLASS_2D,     // FLIPADST_DCT
45
  TX_CLASS_2D,     // DCT_FLIPADST
46
  TX_CLASS_2D,     // FLIPADST_FLIPADST
47
  TX_CLASS_2D,     // ADST_FLIPADST
48
  TX_CLASS_2D,     // FLIPADST_ADST
49
  TX_CLASS_2D,     // IDTX
50
  TX_CLASS_VERT,   // V_DCT
51
  TX_CLASS_HORIZ,  // H_DCT
52
  TX_CLASS_VERT,   // V_ADST
53
  TX_CLASS_HORIZ,  // H_ADST
54
  TX_CLASS_VERT,   // V_FLIPADST
55
  TX_CLASS_HORIZ,  // H_FLIPADST
56
};
57
58
4.63M
static INLINE int get_txb_bwl(TX_SIZE tx_size) {
59
4.63M
  tx_size = av1_get_adjusted_tx_size(tx_size);
60
4.63M
  return tx_size_wide_log2[tx_size];
61
4.63M
}
decodetxb.c:get_txb_bwl
Line
Count
Source
58
3.63M
static INLINE int get_txb_bwl(TX_SIZE tx_size) {
59
3.63M
  tx_size = av1_get_adjusted_tx_size(tx_size);
60
3.63M
  return tx_size_wide_log2[tx_size];
61
3.63M
}
Unexecuted instantiation: av1_cx_iface.c:get_txb_bwl
Unexecuted instantiation: av1_quantize.c:get_txb_bwl
Unexecuted instantiation: bitstream.c:get_txb_bwl
Unexecuted instantiation: encodemv.c:get_txb_bwl
Unexecuted instantiation: encoder.c:get_txb_bwl
Unexecuted instantiation: encoder_utils.c:get_txb_bwl
encodetxb.c:get_txb_bwl
Line
Count
Source
58
929k
static INLINE int get_txb_bwl(TX_SIZE tx_size) {
59
929k
  tx_size = av1_get_adjusted_tx_size(tx_size);
60
929k
  return tx_size_wide_log2[tx_size];
61
929k
}
Unexecuted instantiation: ethread.c:get_txb_bwl
Unexecuted instantiation: firstpass.c:get_txb_bwl
Unexecuted instantiation: global_motion_facade.c:get_txb_bwl
Unexecuted instantiation: level.c:get_txb_bwl
Unexecuted instantiation: lookahead.c:get_txb_bwl
Unexecuted instantiation: mcomp.c:get_txb_bwl
Unexecuted instantiation: mv_prec.c:get_txb_bwl
Unexecuted instantiation: palette.c:get_txb_bwl
Unexecuted instantiation: pass2_strategy.c:get_txb_bwl
Unexecuted instantiation: pickcdef.c:get_txb_bwl
Unexecuted instantiation: picklpf.c:get_txb_bwl
Unexecuted instantiation: pickrst.c:get_txb_bwl
Unexecuted instantiation: ratectrl.c:get_txb_bwl
Unexecuted instantiation: rd.c:get_txb_bwl
Unexecuted instantiation: rdopt.c:get_txb_bwl
Unexecuted instantiation: segmentation.c:get_txb_bwl
Unexecuted instantiation: speed_features.c:get_txb_bwl
Unexecuted instantiation: superres_scale.c:get_txb_bwl
Unexecuted instantiation: svc_layercontext.c:get_txb_bwl
Unexecuted instantiation: temporal_filter.c:get_txb_bwl
Unexecuted instantiation: thirdpass.c:get_txb_bwl
Unexecuted instantiation: tokenize.c:get_txb_bwl
Unexecuted instantiation: tpl_model.c:get_txb_bwl
Unexecuted instantiation: tx_search.c:get_txb_bwl
txb_rdopt.c:get_txb_bwl
Line
Count
Source
58
67.4k
static INLINE int get_txb_bwl(TX_SIZE tx_size) {
59
67.4k
  tx_size = av1_get_adjusted_tx_size(tx_size);
60
67.4k
  return tx_size_wide_log2[tx_size];
61
67.4k
}
Unexecuted instantiation: intra_mode_search.c:get_txb_bwl
Unexecuted instantiation: var_based_part.c:get_txb_bwl
Unexecuted instantiation: av1_noise_estimate.c:get_txb_bwl
Unexecuted instantiation: entropy.c:get_txb_bwl
Unexecuted instantiation: entropymode.c:get_txb_bwl
Unexecuted instantiation: txb_common.c:get_txb_bwl
Unexecuted instantiation: aq_complexity.c:get_txb_bwl
Unexecuted instantiation: aq_cyclicrefresh.c:get_txb_bwl
Unexecuted instantiation: aq_variance.c:get_txb_bwl
Unexecuted instantiation: allintra_vis.c:get_txb_bwl
Unexecuted instantiation: compound_type.c:get_txb_bwl
Unexecuted instantiation: context_tree.c:get_txb_bwl
Unexecuted instantiation: encodeframe.c:get_txb_bwl
Unexecuted instantiation: encodeframe_utils.c:get_txb_bwl
Unexecuted instantiation: encodemb.c:get_txb_bwl
Unexecuted instantiation: encode_strategy.c:get_txb_bwl
Unexecuted instantiation: global_motion.c:get_txb_bwl
Unexecuted instantiation: gop_structure.c:get_txb_bwl
Unexecuted instantiation: interp_search.c:get_txb_bwl
Unexecuted instantiation: motion_search_facade.c:get_txb_bwl
Unexecuted instantiation: partition_search.c:get_txb_bwl
Unexecuted instantiation: partition_strategy.c:get_txb_bwl
Unexecuted instantiation: nonrd_pickmode.c:get_txb_bwl
62
63
4.60M
static INLINE int get_txb_wide(TX_SIZE tx_size) {
64
4.60M
  tx_size = av1_get_adjusted_tx_size(tx_size);
65
4.60M
  return tx_size_wide[tx_size];
66
4.60M
}
decodetxb.c:get_txb_wide
Line
Count
Source
63
3.63M
static INLINE int get_txb_wide(TX_SIZE tx_size) {
64
3.63M
  tx_size = av1_get_adjusted_tx_size(tx_size);
65
3.63M
  return tx_size_wide[tx_size];
66
3.63M
}
Unexecuted instantiation: av1_cx_iface.c:get_txb_wide
Unexecuted instantiation: av1_quantize.c:get_txb_wide
Unexecuted instantiation: bitstream.c:get_txb_wide
Unexecuted instantiation: encodemv.c:get_txb_wide
Unexecuted instantiation: encoder.c:get_txb_wide
Unexecuted instantiation: encoder_utils.c:get_txb_wide
encodetxb.c:get_txb_wide
Line
Count
Source
63
900k
static INLINE int get_txb_wide(TX_SIZE tx_size) {
64
900k
  tx_size = av1_get_adjusted_tx_size(tx_size);
65
900k
  return tx_size_wide[tx_size];
66
900k
}
Unexecuted instantiation: ethread.c:get_txb_wide
Unexecuted instantiation: firstpass.c:get_txb_wide
Unexecuted instantiation: global_motion_facade.c:get_txb_wide
Unexecuted instantiation: level.c:get_txb_wide
Unexecuted instantiation: lookahead.c:get_txb_wide
Unexecuted instantiation: mcomp.c:get_txb_wide
Unexecuted instantiation: mv_prec.c:get_txb_wide
Unexecuted instantiation: palette.c:get_txb_wide
Unexecuted instantiation: pass2_strategy.c:get_txb_wide
Unexecuted instantiation: pickcdef.c:get_txb_wide
Unexecuted instantiation: picklpf.c:get_txb_wide
Unexecuted instantiation: pickrst.c:get_txb_wide
Unexecuted instantiation: ratectrl.c:get_txb_wide
Unexecuted instantiation: rd.c:get_txb_wide
Unexecuted instantiation: rdopt.c:get_txb_wide
Unexecuted instantiation: segmentation.c:get_txb_wide
Unexecuted instantiation: speed_features.c:get_txb_wide
Unexecuted instantiation: superres_scale.c:get_txb_wide
Unexecuted instantiation: svc_layercontext.c:get_txb_wide
Unexecuted instantiation: temporal_filter.c:get_txb_wide
Unexecuted instantiation: thirdpass.c:get_txb_wide
Unexecuted instantiation: tokenize.c:get_txb_wide
Unexecuted instantiation: tpl_model.c:get_txb_wide
Unexecuted instantiation: tx_search.c:get_txb_wide
txb_rdopt.c:get_txb_wide
Line
Count
Source
63
67.4k
static INLINE int get_txb_wide(TX_SIZE tx_size) {
64
67.4k
  tx_size = av1_get_adjusted_tx_size(tx_size);
65
67.4k
  return tx_size_wide[tx_size];
66
67.4k
}
Unexecuted instantiation: intra_mode_search.c:get_txb_wide
Unexecuted instantiation: var_based_part.c:get_txb_wide
Unexecuted instantiation: av1_noise_estimate.c:get_txb_wide
Unexecuted instantiation: entropy.c:get_txb_wide
Unexecuted instantiation: entropymode.c:get_txb_wide
Unexecuted instantiation: txb_common.c:get_txb_wide
Unexecuted instantiation: aq_complexity.c:get_txb_wide
Unexecuted instantiation: aq_cyclicrefresh.c:get_txb_wide
Unexecuted instantiation: aq_variance.c:get_txb_wide
Unexecuted instantiation: allintra_vis.c:get_txb_wide
Unexecuted instantiation: compound_type.c:get_txb_wide
Unexecuted instantiation: context_tree.c:get_txb_wide
Unexecuted instantiation: encodeframe.c:get_txb_wide
Unexecuted instantiation: encodeframe_utils.c:get_txb_wide
Unexecuted instantiation: encodemb.c:get_txb_wide
Unexecuted instantiation: encode_strategy.c:get_txb_wide
Unexecuted instantiation: global_motion.c:get_txb_wide
Unexecuted instantiation: gop_structure.c:get_txb_wide
Unexecuted instantiation: interp_search.c:get_txb_wide
Unexecuted instantiation: motion_search_facade.c:get_txb_wide
Unexecuted instantiation: partition_search.c:get_txb_wide
Unexecuted instantiation: partition_strategy.c:get_txb_wide
Unexecuted instantiation: nonrd_pickmode.c:get_txb_wide
67
68
4.63M
static INLINE int get_txb_high(TX_SIZE tx_size) {
69
4.63M
  tx_size = av1_get_adjusted_tx_size(tx_size);
70
4.63M
  return tx_size_high[tx_size];
71
4.63M
}
decodetxb.c:get_txb_high
Line
Count
Source
68
3.63M
static INLINE int get_txb_high(TX_SIZE tx_size) {
69
3.63M
  tx_size = av1_get_adjusted_tx_size(tx_size);
70
3.63M
  return tx_size_high[tx_size];
71
3.63M
}
Unexecuted instantiation: av1_cx_iface.c:get_txb_high
Unexecuted instantiation: av1_quantize.c:get_txb_high
Unexecuted instantiation: bitstream.c:get_txb_high
Unexecuted instantiation: encodemv.c:get_txb_high
Unexecuted instantiation: encoder.c:get_txb_high
Unexecuted instantiation: encoder_utils.c:get_txb_high
encodetxb.c:get_txb_high
Line
Count
Source
68
929k
static INLINE int get_txb_high(TX_SIZE tx_size) {
69
929k
  tx_size = av1_get_adjusted_tx_size(tx_size);
70
929k
  return tx_size_high[tx_size];
71
929k
}
Unexecuted instantiation: ethread.c:get_txb_high
Unexecuted instantiation: firstpass.c:get_txb_high
Unexecuted instantiation: global_motion_facade.c:get_txb_high
Unexecuted instantiation: level.c:get_txb_high
Unexecuted instantiation: lookahead.c:get_txb_high
Unexecuted instantiation: mcomp.c:get_txb_high
Unexecuted instantiation: mv_prec.c:get_txb_high
Unexecuted instantiation: palette.c:get_txb_high
Unexecuted instantiation: pass2_strategy.c:get_txb_high
Unexecuted instantiation: pickcdef.c:get_txb_high
Unexecuted instantiation: picklpf.c:get_txb_high
Unexecuted instantiation: pickrst.c:get_txb_high
Unexecuted instantiation: ratectrl.c:get_txb_high
Unexecuted instantiation: rd.c:get_txb_high
Unexecuted instantiation: rdopt.c:get_txb_high
Unexecuted instantiation: segmentation.c:get_txb_high
Unexecuted instantiation: speed_features.c:get_txb_high
Unexecuted instantiation: superres_scale.c:get_txb_high
Unexecuted instantiation: svc_layercontext.c:get_txb_high
Unexecuted instantiation: temporal_filter.c:get_txb_high
Unexecuted instantiation: thirdpass.c:get_txb_high
Unexecuted instantiation: tokenize.c:get_txb_high
Unexecuted instantiation: tpl_model.c:get_txb_high
Unexecuted instantiation: tx_search.c:get_txb_high
txb_rdopt.c:get_txb_high
Line
Count
Source
68
67.4k
static INLINE int get_txb_high(TX_SIZE tx_size) {
69
67.4k
  tx_size = av1_get_adjusted_tx_size(tx_size);
70
67.4k
  return tx_size_high[tx_size];
71
67.4k
}
Unexecuted instantiation: intra_mode_search.c:get_txb_high
Unexecuted instantiation: var_based_part.c:get_txb_high
Unexecuted instantiation: av1_noise_estimate.c:get_txb_high
Unexecuted instantiation: entropy.c:get_txb_high
Unexecuted instantiation: entropymode.c:get_txb_high
Unexecuted instantiation: txb_common.c:get_txb_high
Unexecuted instantiation: aq_complexity.c:get_txb_high
Unexecuted instantiation: aq_cyclicrefresh.c:get_txb_high
Unexecuted instantiation: aq_variance.c:get_txb_high
Unexecuted instantiation: allintra_vis.c:get_txb_high
Unexecuted instantiation: compound_type.c:get_txb_high
Unexecuted instantiation: context_tree.c:get_txb_high
Unexecuted instantiation: encodeframe.c:get_txb_high
Unexecuted instantiation: encodeframe_utils.c:get_txb_high
Unexecuted instantiation: encodemb.c:get_txb_high
Unexecuted instantiation: encode_strategy.c:get_txb_high
Unexecuted instantiation: global_motion.c:get_txb_high
Unexecuted instantiation: gop_structure.c:get_txb_high
Unexecuted instantiation: interp_search.c:get_txb_high
Unexecuted instantiation: motion_search_facade.c:get_txb_high
Unexecuted instantiation: partition_search.c:get_txb_high
Unexecuted instantiation: partition_strategy.c:get_txb_high
Unexecuted instantiation: nonrd_pickmode.c:get_txb_high
72
73
3.70M
static INLINE uint8_t *set_levels(uint8_t *const levels_buf, const int width) {
74
3.70M
  return levels_buf + TX_PAD_TOP * (width + TX_PAD_HOR);
75
3.70M
}
decodetxb.c:set_levels
Line
Count
Source
73
3.63M
static INLINE uint8_t *set_levels(uint8_t *const levels_buf, const int width) {
74
3.63M
  return levels_buf + TX_PAD_TOP * (width + TX_PAD_HOR);
75
3.63M
}
Unexecuted instantiation: av1_cx_iface.c:set_levels
Unexecuted instantiation: av1_quantize.c:set_levels
Unexecuted instantiation: bitstream.c:set_levels
Unexecuted instantiation: encodemv.c:set_levels
Unexecuted instantiation: encoder.c:set_levels
Unexecuted instantiation: encoder_utils.c:set_levels
encodetxb.c:set_levels
Line
Count
Source
73
6.97k
static INLINE uint8_t *set_levels(uint8_t *const levels_buf, const int width) {
74
6.97k
  return levels_buf + TX_PAD_TOP * (width + TX_PAD_HOR);
75
6.97k
}
Unexecuted instantiation: ethread.c:set_levels
Unexecuted instantiation: firstpass.c:set_levels
Unexecuted instantiation: global_motion_facade.c:set_levels
Unexecuted instantiation: level.c:set_levels
Unexecuted instantiation: lookahead.c:set_levels
Unexecuted instantiation: mcomp.c:set_levels
Unexecuted instantiation: mv_prec.c:set_levels
Unexecuted instantiation: palette.c:set_levels
Unexecuted instantiation: pass2_strategy.c:set_levels
Unexecuted instantiation: pickcdef.c:set_levels
Unexecuted instantiation: picklpf.c:set_levels
Unexecuted instantiation: pickrst.c:set_levels
Unexecuted instantiation: ratectrl.c:set_levels
Unexecuted instantiation: rd.c:set_levels
Unexecuted instantiation: rdopt.c:set_levels
Unexecuted instantiation: segmentation.c:set_levels
Unexecuted instantiation: speed_features.c:set_levels
Unexecuted instantiation: superres_scale.c:set_levels
Unexecuted instantiation: svc_layercontext.c:set_levels
Unexecuted instantiation: temporal_filter.c:set_levels
Unexecuted instantiation: thirdpass.c:set_levels
Unexecuted instantiation: tokenize.c:set_levels
Unexecuted instantiation: tpl_model.c:set_levels
Unexecuted instantiation: tx_search.c:set_levels
txb_rdopt.c:set_levels
Line
Count
Source
73
67.4k
static INLINE uint8_t *set_levels(uint8_t *const levels_buf, const int width) {
74
67.4k
  return levels_buf + TX_PAD_TOP * (width + TX_PAD_HOR);
75
67.4k
}
Unexecuted instantiation: intra_mode_search.c:set_levels
Unexecuted instantiation: var_based_part.c:set_levels
Unexecuted instantiation: av1_noise_estimate.c:set_levels
Unexecuted instantiation: entropy.c:set_levels
Unexecuted instantiation: entropymode.c:set_levels
Unexecuted instantiation: txb_common.c:set_levels
Unexecuted instantiation: aq_complexity.c:set_levels
Unexecuted instantiation: aq_cyclicrefresh.c:set_levels
Unexecuted instantiation: aq_variance.c:set_levels
Unexecuted instantiation: allintra_vis.c:set_levels
Unexecuted instantiation: compound_type.c:set_levels
Unexecuted instantiation: context_tree.c:set_levels
Unexecuted instantiation: encodeframe.c:set_levels
Unexecuted instantiation: encodeframe_utils.c:set_levels
Unexecuted instantiation: encodemb.c:set_levels
Unexecuted instantiation: encode_strategy.c:set_levels
Unexecuted instantiation: global_motion.c:set_levels
Unexecuted instantiation: gop_structure.c:set_levels
Unexecuted instantiation: interp_search.c:set_levels
Unexecuted instantiation: motion_search_facade.c:set_levels
Unexecuted instantiation: partition_search.c:set_levels
Unexecuted instantiation: partition_strategy.c:set_levels
Unexecuted instantiation: nonrd_pickmode.c:set_levels
76
77
99.6M
static INLINE int get_padded_idx(const int idx, const int bwl) {
78
99.6M
  return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
79
99.6M
}
decodetxb.c:get_padded_idx
Line
Count
Source
77
99.2M
static INLINE int get_padded_idx(const int idx, const int bwl) {
78
99.2M
  return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
79
99.2M
}
Unexecuted instantiation: av1_cx_iface.c:get_padded_idx
Unexecuted instantiation: av1_quantize.c:get_padded_idx
Unexecuted instantiation: bitstream.c:get_padded_idx
Unexecuted instantiation: encodemv.c:get_padded_idx
Unexecuted instantiation: encoder.c:get_padded_idx
Unexecuted instantiation: encoder_utils.c:get_padded_idx
encodetxb.c:get_padded_idx
Line
Count
Source
77
348k
static INLINE int get_padded_idx(const int idx, const int bwl) {
78
348k
  return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
79
348k
}
Unexecuted instantiation: ethread.c:get_padded_idx
Unexecuted instantiation: firstpass.c:get_padded_idx
Unexecuted instantiation: global_motion_facade.c:get_padded_idx
Unexecuted instantiation: level.c:get_padded_idx
Unexecuted instantiation: lookahead.c:get_padded_idx
Unexecuted instantiation: mcomp.c:get_padded_idx
Unexecuted instantiation: mv_prec.c:get_padded_idx
Unexecuted instantiation: palette.c:get_padded_idx
Unexecuted instantiation: pass2_strategy.c:get_padded_idx
Unexecuted instantiation: pickcdef.c:get_padded_idx
Unexecuted instantiation: picklpf.c:get_padded_idx
Unexecuted instantiation: pickrst.c:get_padded_idx
Unexecuted instantiation: ratectrl.c:get_padded_idx
Unexecuted instantiation: rd.c:get_padded_idx
Unexecuted instantiation: rdopt.c:get_padded_idx
Unexecuted instantiation: segmentation.c:get_padded_idx
Unexecuted instantiation: speed_features.c:get_padded_idx
Unexecuted instantiation: superres_scale.c:get_padded_idx
Unexecuted instantiation: svc_layercontext.c:get_padded_idx
Unexecuted instantiation: temporal_filter.c:get_padded_idx
Unexecuted instantiation: thirdpass.c:get_padded_idx
Unexecuted instantiation: tokenize.c:get_padded_idx
Unexecuted instantiation: tpl_model.c:get_padded_idx
Unexecuted instantiation: tx_search.c:get_padded_idx
txb_rdopt.c:get_padded_idx
Line
Count
Source
77
31.6k
static INLINE int get_padded_idx(const int idx, const int bwl) {
78
31.6k
  return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
79
31.6k
}
Unexecuted instantiation: intra_mode_search.c:get_padded_idx
Unexecuted instantiation: var_based_part.c:get_padded_idx
Unexecuted instantiation: av1_noise_estimate.c:get_padded_idx
Unexecuted instantiation: entropy.c:get_padded_idx
Unexecuted instantiation: entropymode.c:get_padded_idx
Unexecuted instantiation: txb_common.c:get_padded_idx
Unexecuted instantiation: aq_complexity.c:get_padded_idx
Unexecuted instantiation: aq_cyclicrefresh.c:get_padded_idx
Unexecuted instantiation: aq_variance.c:get_padded_idx
Unexecuted instantiation: allintra_vis.c:get_padded_idx
Unexecuted instantiation: compound_type.c:get_padded_idx
Unexecuted instantiation: context_tree.c:get_padded_idx
Unexecuted instantiation: encodeframe.c:get_padded_idx
Unexecuted instantiation: encodeframe_utils.c:get_padded_idx
Unexecuted instantiation: encodemb.c:get_padded_idx
Unexecuted instantiation: encode_strategy.c:get_padded_idx
Unexecuted instantiation: global_motion.c:get_padded_idx
Unexecuted instantiation: gop_structure.c:get_padded_idx
Unexecuted instantiation: interp_search.c:get_padded_idx
Unexecuted instantiation: motion_search_facade.c:get_padded_idx
Unexecuted instantiation: partition_search.c:get_padded_idx
Unexecuted instantiation: partition_strategy.c:get_padded_idx
Unexecuted instantiation: nonrd_pickmode.c:get_padded_idx
80
81
static INLINE int get_base_ctx_from_count_mag(int row, int col, int count,
82
0
                                              int sig_mag) {
83
0
  const int ctx = base_level_count_to_index[count];
84
0
  int ctx_idx = -1;
85
0
86
0
  if (row == 0 && col == 0) {
87
0
    if (sig_mag >= 2) return 0;
88
0
89
0
    if (sig_mag == 1) {
90
0
      if (count >= 2)
91
0
        ctx_idx = 1;
92
0
      else
93
0
        ctx_idx = 2;
94
0
95
0
      return ctx_idx;
96
0
    }
97
0
98
0
    ctx_idx = 3 + ctx;
99
0
    assert(ctx_idx <= 6);
100
0
    return ctx_idx;
101
0
  } else if (row == 0) {
102
0
    if (sig_mag >= 2) return 6;
103
0
    if (sig_mag == 1) {
104
0
      if (count >= 2)
105
0
        ctx_idx = 7;
106
0
      else
107
0
        ctx_idx = 8;
108
0
      return ctx_idx;
109
0
    }
110
0
111
0
    ctx_idx = 9 + ctx;
112
0
    assert(ctx_idx <= 11);
113
0
    return ctx_idx;
114
0
  } else if (col == 0) {
115
0
    if (sig_mag >= 2) return 12;
116
0
    if (sig_mag == 1) {
117
0
      if (count >= 2)
118
0
        ctx_idx = 13;
119
0
      else
120
0
        ctx_idx = 14;
121
0
122
0
      return ctx_idx;
123
0
    }
124
0
125
0
    ctx_idx = 15 + ctx;
126
0
    assert(ctx_idx <= 17);
127
0
    // TODO(angiebird): turn this on once the optimization is finalized
128
0
    // assert(ctx_idx < 28);
129
0
  } else {
130
0
    if (sig_mag >= 2) return 18;
131
0
    if (sig_mag == 1) {
132
0
      if (count >= 2)
133
0
        ctx_idx = 19;
134
0
      else
135
0
        ctx_idx = 20;
136
0
      return ctx_idx;
137
0
    }
138
0
139
0
    ctx_idx = 21 + ctx;
140
0
141
0
    assert(ctx_idx <= 24);
142
0
  }
143
0
  return ctx_idx;
144
0
}
Unexecuted instantiation: decodetxb.c:get_base_ctx_from_count_mag
Unexecuted instantiation: av1_cx_iface.c:get_base_ctx_from_count_mag
Unexecuted instantiation: av1_quantize.c:get_base_ctx_from_count_mag
Unexecuted instantiation: bitstream.c:get_base_ctx_from_count_mag
Unexecuted instantiation: encodemv.c:get_base_ctx_from_count_mag
Unexecuted instantiation: encoder.c:get_base_ctx_from_count_mag
Unexecuted instantiation: encoder_utils.c:get_base_ctx_from_count_mag
Unexecuted instantiation: encodetxb.c:get_base_ctx_from_count_mag
Unexecuted instantiation: ethread.c:get_base_ctx_from_count_mag
Unexecuted instantiation: firstpass.c:get_base_ctx_from_count_mag
Unexecuted instantiation: global_motion_facade.c:get_base_ctx_from_count_mag
Unexecuted instantiation: level.c:get_base_ctx_from_count_mag
Unexecuted instantiation: lookahead.c:get_base_ctx_from_count_mag
Unexecuted instantiation: mcomp.c:get_base_ctx_from_count_mag
Unexecuted instantiation: mv_prec.c:get_base_ctx_from_count_mag
Unexecuted instantiation: palette.c:get_base_ctx_from_count_mag
Unexecuted instantiation: pass2_strategy.c:get_base_ctx_from_count_mag
Unexecuted instantiation: pickcdef.c:get_base_ctx_from_count_mag
Unexecuted instantiation: picklpf.c:get_base_ctx_from_count_mag
Unexecuted instantiation: pickrst.c:get_base_ctx_from_count_mag
Unexecuted instantiation: ratectrl.c:get_base_ctx_from_count_mag
Unexecuted instantiation: rd.c:get_base_ctx_from_count_mag
Unexecuted instantiation: rdopt.c:get_base_ctx_from_count_mag
Unexecuted instantiation: segmentation.c:get_base_ctx_from_count_mag
Unexecuted instantiation: speed_features.c:get_base_ctx_from_count_mag
Unexecuted instantiation: superres_scale.c:get_base_ctx_from_count_mag
Unexecuted instantiation: svc_layercontext.c:get_base_ctx_from_count_mag
Unexecuted instantiation: temporal_filter.c:get_base_ctx_from_count_mag
Unexecuted instantiation: thirdpass.c:get_base_ctx_from_count_mag
Unexecuted instantiation: tokenize.c:get_base_ctx_from_count_mag
Unexecuted instantiation: tpl_model.c:get_base_ctx_from_count_mag
Unexecuted instantiation: tx_search.c:get_base_ctx_from_count_mag
Unexecuted instantiation: txb_rdopt.c:get_base_ctx_from_count_mag
Unexecuted instantiation: intra_mode_search.c:get_base_ctx_from_count_mag
Unexecuted instantiation: var_based_part.c:get_base_ctx_from_count_mag
Unexecuted instantiation: av1_noise_estimate.c:get_base_ctx_from_count_mag
Unexecuted instantiation: entropy.c:get_base_ctx_from_count_mag
Unexecuted instantiation: entropymode.c:get_base_ctx_from_count_mag
Unexecuted instantiation: txb_common.c:get_base_ctx_from_count_mag
Unexecuted instantiation: aq_complexity.c:get_base_ctx_from_count_mag
Unexecuted instantiation: aq_cyclicrefresh.c:get_base_ctx_from_count_mag
Unexecuted instantiation: aq_variance.c:get_base_ctx_from_count_mag
Unexecuted instantiation: allintra_vis.c:get_base_ctx_from_count_mag
Unexecuted instantiation: compound_type.c:get_base_ctx_from_count_mag
Unexecuted instantiation: context_tree.c:get_base_ctx_from_count_mag
Unexecuted instantiation: encodeframe.c:get_base_ctx_from_count_mag
Unexecuted instantiation: encodeframe_utils.c:get_base_ctx_from_count_mag
Unexecuted instantiation: encodemb.c:get_base_ctx_from_count_mag
Unexecuted instantiation: encode_strategy.c:get_base_ctx_from_count_mag
Unexecuted instantiation: global_motion.c:get_base_ctx_from_count_mag
Unexecuted instantiation: gop_structure.c:get_base_ctx_from_count_mag
Unexecuted instantiation: interp_search.c:get_base_ctx_from_count_mag
Unexecuted instantiation: motion_search_facade.c:get_base_ctx_from_count_mag
Unexecuted instantiation: partition_search.c:get_base_ctx_from_count_mag
Unexecuted instantiation: partition_strategy.c:get_base_ctx_from_count_mag
Unexecuted instantiation: nonrd_pickmode.c:get_base_ctx_from_count_mag
145
146
static INLINE int get_br_ctx_2d(const uint8_t *const levels,
147
                                const int c,  // raster order
148
3.15M
                                const int bwl) {
149
3.15M
  assert(c > 0);
150
3.15M
  const int row = c >> bwl;
151
3.15M
  const int col = c - (row << bwl);
152
3.15M
  const int stride = (1 << bwl) + TX_PAD_HOR;
153
3.15M
  const int pos = row * stride + col;
154
3.15M
  int mag = AOMMIN(levels[pos + 1], MAX_BASE_BR_RANGE) +
155
3.15M
            AOMMIN(levels[pos + stride], MAX_BASE_BR_RANGE) +
156
3.15M
            AOMMIN(levels[pos + 1 + stride], MAX_BASE_BR_RANGE);
157
3.15M
  mag = AOMMIN((mag + 1) >> 1, 6);
158
  //((row | col) < 2) is equivalent to ((row < 2) && (col < 2))
159
3.15M
  if ((row | col) < 2) return mag + 7;
160
2.76M
  return mag + 14;
161
3.15M
}
decodetxb.c:get_br_ctx_2d
Line
Count
Source
148
3.15M
                                const int bwl) {
149
3.15M
  assert(c > 0);
150
3.15M
  const int row = c >> bwl;
151
3.15M
  const int col = c - (row << bwl);
152
3.15M
  const int stride = (1 << bwl) + TX_PAD_HOR;
153
3.15M
  const int pos = row * stride + col;
154
3.15M
  int mag = AOMMIN(levels[pos + 1], MAX_BASE_BR_RANGE) +
155
3.15M
            AOMMIN(levels[pos + stride], MAX_BASE_BR_RANGE) +
156
3.15M
            AOMMIN(levels[pos + 1 + stride], MAX_BASE_BR_RANGE);
157
3.15M
  mag = AOMMIN((mag + 1) >> 1, 6);
158
  //((row | col) < 2) is equivalent to ((row < 2) && (col < 2))
159
3.15M
  if ((row | col) < 2) return mag + 7;
160
2.76M
  return mag + 14;
161
3.15M
}
Unexecuted instantiation: av1_cx_iface.c:get_br_ctx_2d
Unexecuted instantiation: av1_quantize.c:get_br_ctx_2d
Unexecuted instantiation: bitstream.c:get_br_ctx_2d
Unexecuted instantiation: encodemv.c:get_br_ctx_2d
Unexecuted instantiation: encoder.c:get_br_ctx_2d
Unexecuted instantiation: encoder_utils.c:get_br_ctx_2d
Unexecuted instantiation: encodetxb.c:get_br_ctx_2d
Unexecuted instantiation: ethread.c:get_br_ctx_2d
Unexecuted instantiation: firstpass.c:get_br_ctx_2d
Unexecuted instantiation: global_motion_facade.c:get_br_ctx_2d
Unexecuted instantiation: level.c:get_br_ctx_2d
Unexecuted instantiation: lookahead.c:get_br_ctx_2d
Unexecuted instantiation: mcomp.c:get_br_ctx_2d
Unexecuted instantiation: mv_prec.c:get_br_ctx_2d
Unexecuted instantiation: palette.c:get_br_ctx_2d
Unexecuted instantiation: pass2_strategy.c:get_br_ctx_2d
Unexecuted instantiation: pickcdef.c:get_br_ctx_2d
Unexecuted instantiation: picklpf.c:get_br_ctx_2d
Unexecuted instantiation: pickrst.c:get_br_ctx_2d
Unexecuted instantiation: ratectrl.c:get_br_ctx_2d
Unexecuted instantiation: rd.c:get_br_ctx_2d
Unexecuted instantiation: rdopt.c:get_br_ctx_2d
Unexecuted instantiation: segmentation.c:get_br_ctx_2d
Unexecuted instantiation: speed_features.c:get_br_ctx_2d
Unexecuted instantiation: superres_scale.c:get_br_ctx_2d
Unexecuted instantiation: svc_layercontext.c:get_br_ctx_2d
Unexecuted instantiation: temporal_filter.c:get_br_ctx_2d
Unexecuted instantiation: thirdpass.c:get_br_ctx_2d
Unexecuted instantiation: tokenize.c:get_br_ctx_2d
Unexecuted instantiation: tpl_model.c:get_br_ctx_2d
Unexecuted instantiation: tx_search.c:get_br_ctx_2d
Unexecuted instantiation: txb_rdopt.c:get_br_ctx_2d
Unexecuted instantiation: intra_mode_search.c:get_br_ctx_2d
Unexecuted instantiation: var_based_part.c:get_br_ctx_2d
Unexecuted instantiation: av1_noise_estimate.c:get_br_ctx_2d
Unexecuted instantiation: entropy.c:get_br_ctx_2d
Unexecuted instantiation: entropymode.c:get_br_ctx_2d
Unexecuted instantiation: txb_common.c:get_br_ctx_2d
Unexecuted instantiation: aq_complexity.c:get_br_ctx_2d
Unexecuted instantiation: aq_cyclicrefresh.c:get_br_ctx_2d
Unexecuted instantiation: aq_variance.c:get_br_ctx_2d
Unexecuted instantiation: allintra_vis.c:get_br_ctx_2d
Unexecuted instantiation: compound_type.c:get_br_ctx_2d
Unexecuted instantiation: context_tree.c:get_br_ctx_2d
Unexecuted instantiation: encodeframe.c:get_br_ctx_2d
Unexecuted instantiation: encodeframe_utils.c:get_br_ctx_2d
Unexecuted instantiation: encodemb.c:get_br_ctx_2d
Unexecuted instantiation: encode_strategy.c:get_br_ctx_2d
Unexecuted instantiation: global_motion.c:get_br_ctx_2d
Unexecuted instantiation: gop_structure.c:get_br_ctx_2d
Unexecuted instantiation: interp_search.c:get_br_ctx_2d
Unexecuted instantiation: motion_search_facade.c:get_br_ctx_2d
Unexecuted instantiation: partition_search.c:get_br_ctx_2d
Unexecuted instantiation: partition_strategy.c:get_br_ctx_2d
Unexecuted instantiation: nonrd_pickmode.c:get_br_ctx_2d
162
163
static AOM_FORCE_INLINE int get_br_ctx_eob(const int c,  // raster order
164
                                           const int bwl,
165
130k
                                           const TX_CLASS tx_class) {
166
130k
  const int row = c >> bwl;
167
130k
  const int col = c - (row << bwl);
168
130k
  if (c == 0) return 0;
169
30.2k
  if ((tx_class == TX_CLASS_2D && row < 2 && col < 2) ||
170
28.7k
      (tx_class == TX_CLASS_HORIZ && col == 0) ||
171
28.6k
      (tx_class == TX_CLASS_VERT && row == 0))
172
1.57k
    return 7;
173
28.6k
  return 14;
174
30.2k
}
decodetxb.c:get_br_ctx_eob
Line
Count
Source
165
89.8k
                                           const TX_CLASS tx_class) {
166
89.8k
  const int row = c >> bwl;
167
89.8k
  const int col = c - (row << bwl);
168
89.8k
  if (c == 0) return 0;
169
28.9k
  if ((tx_class == TX_CLASS_2D && row < 2 && col < 2) ||
170
27.4k
      (tx_class == TX_CLASS_HORIZ && col == 0) ||
171
27.3k
      (tx_class == TX_CLASS_VERT && row == 0))
172
1.57k
    return 7;
173
27.3k
  return 14;
174
28.9k
}
Unexecuted instantiation: av1_cx_iface.c:get_br_ctx_eob
Unexecuted instantiation: av1_quantize.c:get_br_ctx_eob
Unexecuted instantiation: bitstream.c:get_br_ctx_eob
Unexecuted instantiation: encodemv.c:get_br_ctx_eob
Unexecuted instantiation: encoder.c:get_br_ctx_eob
Unexecuted instantiation: encoder_utils.c:get_br_ctx_eob
Unexecuted instantiation: encodetxb.c:get_br_ctx_eob
Unexecuted instantiation: ethread.c:get_br_ctx_eob
Unexecuted instantiation: firstpass.c:get_br_ctx_eob
Unexecuted instantiation: global_motion_facade.c:get_br_ctx_eob
Unexecuted instantiation: level.c:get_br_ctx_eob
Unexecuted instantiation: lookahead.c:get_br_ctx_eob
Unexecuted instantiation: mcomp.c:get_br_ctx_eob
Unexecuted instantiation: mv_prec.c:get_br_ctx_eob
Unexecuted instantiation: palette.c:get_br_ctx_eob
Unexecuted instantiation: pass2_strategy.c:get_br_ctx_eob
Unexecuted instantiation: pickcdef.c:get_br_ctx_eob
Unexecuted instantiation: picklpf.c:get_br_ctx_eob
Unexecuted instantiation: pickrst.c:get_br_ctx_eob
Unexecuted instantiation: ratectrl.c:get_br_ctx_eob
Unexecuted instantiation: rd.c:get_br_ctx_eob
Unexecuted instantiation: rdopt.c:get_br_ctx_eob
Unexecuted instantiation: segmentation.c:get_br_ctx_eob
Unexecuted instantiation: speed_features.c:get_br_ctx_eob
Unexecuted instantiation: superres_scale.c:get_br_ctx_eob
Unexecuted instantiation: svc_layercontext.c:get_br_ctx_eob
Unexecuted instantiation: temporal_filter.c:get_br_ctx_eob
Unexecuted instantiation: thirdpass.c:get_br_ctx_eob
Unexecuted instantiation: tokenize.c:get_br_ctx_eob
Unexecuted instantiation: tpl_model.c:get_br_ctx_eob
Unexecuted instantiation: tx_search.c:get_br_ctx_eob
txb_rdopt.c:get_br_ctx_eob
Line
Count
Source
165
40.6k
                                           const TX_CLASS tx_class) {
166
40.6k
  const int row = c >> bwl;
167
40.6k
  const int col = c - (row << bwl);
168
40.6k
  if (c == 0) return 0;
169
1.32k
  if ((tx_class == TX_CLASS_2D && row < 2 && col < 2) ||
170
1.32k
      (tx_class == TX_CLASS_HORIZ && col == 0) ||
171
1.32k
      (tx_class == TX_CLASS_VERT && row == 0))
172
0
    return 7;
173
1.32k
  return 14;
174
1.32k
}
Unexecuted instantiation: intra_mode_search.c:get_br_ctx_eob
Unexecuted instantiation: var_based_part.c:get_br_ctx_eob
Unexecuted instantiation: av1_noise_estimate.c:get_br_ctx_eob
Unexecuted instantiation: entropy.c:get_br_ctx_eob
Unexecuted instantiation: entropymode.c:get_br_ctx_eob
Unexecuted instantiation: txb_common.c:get_br_ctx_eob
Unexecuted instantiation: aq_complexity.c:get_br_ctx_eob
Unexecuted instantiation: aq_cyclicrefresh.c:get_br_ctx_eob
Unexecuted instantiation: aq_variance.c:get_br_ctx_eob
Unexecuted instantiation: allintra_vis.c:get_br_ctx_eob
Unexecuted instantiation: compound_type.c:get_br_ctx_eob
Unexecuted instantiation: context_tree.c:get_br_ctx_eob
Unexecuted instantiation: encodeframe.c:get_br_ctx_eob
Unexecuted instantiation: encodeframe_utils.c:get_br_ctx_eob
Unexecuted instantiation: encodemb.c:get_br_ctx_eob
Unexecuted instantiation: encode_strategy.c:get_br_ctx_eob
Unexecuted instantiation: global_motion.c:get_br_ctx_eob
Unexecuted instantiation: gop_structure.c:get_br_ctx_eob
Unexecuted instantiation: interp_search.c:get_br_ctx_eob
Unexecuted instantiation: motion_search_facade.c:get_br_ctx_eob
Unexecuted instantiation: partition_search.c:get_br_ctx_eob
Unexecuted instantiation: partition_strategy.c:get_br_ctx_eob
Unexecuted instantiation: nonrd_pickmode.c:get_br_ctx_eob
175
176
static AOM_FORCE_INLINE int get_br_ctx(const uint8_t *const levels,
177
                                       const int c,  // raster order
178
501k
                                       const int bwl, const TX_CLASS tx_class) {
179
501k
  const int row = c >> bwl;
180
501k
  const int col = c - (row << bwl);
181
501k
  const int stride = (1 << bwl) + TX_PAD_HOR;
182
501k
  const int pos = row * stride + col;
183
501k
  int mag = levels[pos + 1];
184
501k
  mag += levels[pos + stride];
185
501k
  switch (tx_class) {
186
479k
    case TX_CLASS_2D:
187
479k
      mag += levels[pos + stride + 1];
188
479k
      mag = AOMMIN((mag + 1) >> 1, 6);
189
479k
      if (c == 0) return mag;
190
59.1k
      if ((row < 2) && (col < 2)) return mag + 7;
191
52.5k
      break;
192
52.5k
    case TX_CLASS_HORIZ:
193
14.5k
      mag += levels[pos + 2];
194
14.5k
      mag = AOMMIN((mag + 1) >> 1, 6);
195
14.5k
      if (c == 0) return mag;
196
12.8k
      if (col == 0) return mag + 7;
197
7.91k
      break;
198
7.91k
    case TX_CLASS_VERT:
199
7.31k
      mag += levels[pos + (stride << 1)];
200
7.31k
      mag = AOMMIN((mag + 1) >> 1, 6);
201
7.31k
      if (c == 0) return mag;
202
6.39k
      if (row == 0) return mag + 7;
203
3.74k
      break;
204
3.74k
    default: break;
205
501k
  }
206
207
64.1k
  return mag + 14;
208
501k
}
decodetxb.c:get_br_ctx
Line
Count
Source
178
429k
                                       const int bwl, const TX_CLASS tx_class) {
179
429k
  const int row = c >> bwl;
180
429k
  const int col = c - (row << bwl);
181
429k
  const int stride = (1 << bwl) + TX_PAD_HOR;
182
429k
  const int pos = row * stride + col;
183
429k
  int mag = levels[pos + 1];
184
429k
  mag += levels[pos + stride];
185
429k
  switch (tx_class) {
186
408k
    case TX_CLASS_2D:
187
408k
      mag += levels[pos + stride + 1];
188
408k
      mag = AOMMIN((mag + 1) >> 1, 6);
189
408k
      if (c == 0) return mag;
190
0
      if ((row < 2) && (col < 2)) return mag + 7;
191
0
      break;
192
14.5k
    case TX_CLASS_HORIZ:
193
14.5k
      mag += levels[pos + 2];
194
14.5k
      mag = AOMMIN((mag + 1) >> 1, 6);
195
14.5k
      if (c == 0) return mag;
196
12.8k
      if (col == 0) return mag + 7;
197
7.91k
      break;
198
7.91k
    case TX_CLASS_VERT:
199
7.31k
      mag += levels[pos + (stride << 1)];
200
7.31k
      mag = AOMMIN((mag + 1) >> 1, 6);
201
7.31k
      if (c == 0) return mag;
202
6.39k
      if (row == 0) return mag + 7;
203
3.74k
      break;
204
3.74k
    default: break;
205
429k
  }
206
207
11.6k
  return mag + 14;
208
429k
}
Unexecuted instantiation: av1_cx_iface.c:get_br_ctx
Unexecuted instantiation: av1_quantize.c:get_br_ctx
Unexecuted instantiation: bitstream.c:get_br_ctx
Unexecuted instantiation: encodemv.c:get_br_ctx
Unexecuted instantiation: encoder.c:get_br_ctx
Unexecuted instantiation: encoder_utils.c:get_br_ctx
encodetxb.c:get_br_ctx
Line
Count
Source
178
5.32k
                                       const int bwl, const TX_CLASS tx_class) {
179
5.32k
  const int row = c >> bwl;
180
5.32k
  const int col = c - (row << bwl);
181
5.32k
  const int stride = (1 << bwl) + TX_PAD_HOR;
182
5.32k
  const int pos = row * stride + col;
183
5.32k
  int mag = levels[pos + 1];
184
5.32k
  mag += levels[pos + stride];
185
5.32k
  switch (tx_class) {
186
5.32k
    case TX_CLASS_2D:
187
5.32k
      mag += levels[pos + stride + 1];
188
5.32k
      mag = AOMMIN((mag + 1) >> 1, 6);
189
5.32k
      if (c == 0) return mag;
190
0
      if ((row < 2) && (col < 2)) return mag + 7;
191
0
      break;
192
0
    case TX_CLASS_HORIZ:
193
0
      mag += levels[pos + 2];
194
0
      mag = AOMMIN((mag + 1) >> 1, 6);
195
0
      if (c == 0) return mag;
196
0
      if (col == 0) return mag + 7;
197
0
      break;
198
0
    case TX_CLASS_VERT:
199
0
      mag += levels[pos + (stride << 1)];
200
0
      mag = AOMMIN((mag + 1) >> 1, 6);
201
0
      if (c == 0) return mag;
202
0
      if (row == 0) return mag + 7;
203
0
      break;
204
0
    default: break;
205
5.32k
  }
206
207
0
  return mag + 14;
208
5.32k
}
Unexecuted instantiation: ethread.c:get_br_ctx
Unexecuted instantiation: firstpass.c:get_br_ctx
Unexecuted instantiation: global_motion_facade.c:get_br_ctx
Unexecuted instantiation: level.c:get_br_ctx
Unexecuted instantiation: lookahead.c:get_br_ctx
Unexecuted instantiation: mcomp.c:get_br_ctx
Unexecuted instantiation: mv_prec.c:get_br_ctx
Unexecuted instantiation: palette.c:get_br_ctx
Unexecuted instantiation: pass2_strategy.c:get_br_ctx
Unexecuted instantiation: pickcdef.c:get_br_ctx
Unexecuted instantiation: picklpf.c:get_br_ctx
Unexecuted instantiation: pickrst.c:get_br_ctx
Unexecuted instantiation: ratectrl.c:get_br_ctx
Unexecuted instantiation: rd.c:get_br_ctx
Unexecuted instantiation: rdopt.c:get_br_ctx
Unexecuted instantiation: segmentation.c:get_br_ctx
Unexecuted instantiation: speed_features.c:get_br_ctx
Unexecuted instantiation: superres_scale.c:get_br_ctx
Unexecuted instantiation: svc_layercontext.c:get_br_ctx
Unexecuted instantiation: temporal_filter.c:get_br_ctx
Unexecuted instantiation: thirdpass.c:get_br_ctx
Unexecuted instantiation: tokenize.c:get_br_ctx
Unexecuted instantiation: tpl_model.c:get_br_ctx
Unexecuted instantiation: tx_search.c:get_br_ctx
txb_rdopt.c:get_br_ctx
Line
Count
Source
178
66.4k
                                       const int bwl, const TX_CLASS tx_class) {
179
66.4k
  const int row = c >> bwl;
180
66.4k
  const int col = c - (row << bwl);
181
66.4k
  const int stride = (1 << bwl) + TX_PAD_HOR;
182
66.4k
  const int pos = row * stride + col;
183
66.4k
  int mag = levels[pos + 1];
184
66.4k
  mag += levels[pos + stride];
185
66.4k
  switch (tx_class) {
186
66.4k
    case TX_CLASS_2D:
187
66.4k
      mag += levels[pos + stride + 1];
188
66.4k
      mag = AOMMIN((mag + 1) >> 1, 6);
189
66.4k
      if (c == 0) return mag;
190
59.1k
      if ((row < 2) && (col < 2)) return mag + 7;
191
52.5k
      break;
192
52.5k
    case TX_CLASS_HORIZ:
193
0
      mag += levels[pos + 2];
194
0
      mag = AOMMIN((mag + 1) >> 1, 6);
195
0
      if (c == 0) return mag;
196
0
      if (col == 0) return mag + 7;
197
0
      break;
198
0
    case TX_CLASS_VERT:
199
0
      mag += levels[pos + (stride << 1)];
200
0
      mag = AOMMIN((mag + 1) >> 1, 6);
201
0
      if (c == 0) return mag;
202
0
      if (row == 0) return mag + 7;
203
0
      break;
204
0
    default: break;
205
66.4k
  }
206
207
52.5k
  return mag + 14;
208
66.4k
}
Unexecuted instantiation: intra_mode_search.c:get_br_ctx
Unexecuted instantiation: var_based_part.c:get_br_ctx
Unexecuted instantiation: av1_noise_estimate.c:get_br_ctx
Unexecuted instantiation: entropy.c:get_br_ctx
Unexecuted instantiation: entropymode.c:get_br_ctx
Unexecuted instantiation: txb_common.c:get_br_ctx
Unexecuted instantiation: aq_complexity.c:get_br_ctx
Unexecuted instantiation: aq_cyclicrefresh.c:get_br_ctx
Unexecuted instantiation: aq_variance.c:get_br_ctx
Unexecuted instantiation: allintra_vis.c:get_br_ctx
Unexecuted instantiation: compound_type.c:get_br_ctx
Unexecuted instantiation: context_tree.c:get_br_ctx
Unexecuted instantiation: encodeframe.c:get_br_ctx
Unexecuted instantiation: encodeframe_utils.c:get_br_ctx
Unexecuted instantiation: encodemb.c:get_br_ctx
Unexecuted instantiation: encode_strategy.c:get_br_ctx
Unexecuted instantiation: global_motion.c:get_br_ctx
Unexecuted instantiation: gop_structure.c:get_br_ctx
Unexecuted instantiation: interp_search.c:get_br_ctx
Unexecuted instantiation: motion_search_facade.c:get_br_ctx
Unexecuted instantiation: partition_search.c:get_br_ctx
Unexecuted instantiation: partition_strategy.c:get_br_ctx
Unexecuted instantiation: nonrd_pickmode.c:get_br_ctx
209
210
static const uint8_t clip_max3[256] = {
211
  0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
212
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
213
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
214
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
215
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
216
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
217
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
218
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
219
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
220
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
221
};
222
223
static AOM_FORCE_INLINE int get_nz_mag(const uint8_t *const levels,
224
1.93M
                                       const int bwl, const TX_CLASS tx_class) {
225
1.93M
  int mag;
226
227
  // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
228
1.93M
  mag = clip_max3[levels[1]];                         // { 0, 1 }
229
1.93M
  mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR]];  // { 1, 0 }
230
231
1.93M
  if (tx_class == TX_CLASS_2D) {
232
1.49M
    mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR + 1]];          // { 1, 1 }
233
1.49M
    mag += clip_max3[levels[2]];                                    // { 0, 2 }
234
1.49M
    mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]];  // { 2, 0 }
235
1.49M
  } else if (tx_class == TX_CLASS_VERT) {
236
149k
    mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]];  // { 2, 0 }
237
149k
    mag += clip_max3[levels[(3 << bwl) + (3 << TX_PAD_HOR_LOG2)]];  // { 3, 0 }
238
149k
    mag += clip_max3[levels[(4 << bwl) + (4 << TX_PAD_HOR_LOG2)]];  // { 4, 0 }
239
292k
  } else {
240
292k
    mag += clip_max3[levels[2]];  // { 0, 2 }
241
292k
    mag += clip_max3[levels[3]];  // { 0, 3 }
242
292k
    mag += clip_max3[levels[4]];  // { 0, 4 }
243
292k
  }
244
245
1.93M
  return mag;
246
1.93M
}
decodetxb.c:get_nz_mag
Line
Count
Source
224
1.55M
                                       const int bwl, const TX_CLASS tx_class) {
225
1.55M
  int mag;
226
227
  // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
228
1.55M
  mag = clip_max3[levels[1]];                         // { 0, 1 }
229
1.55M
  mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR]];  // { 1, 0 }
230
231
1.55M
  if (tx_class == TX_CLASS_2D) {
232
1.11M
    mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR + 1]];          // { 1, 1 }
233
1.11M
    mag += clip_max3[levels[2]];                                    // { 0, 2 }
234
1.11M
    mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]];  // { 2, 0 }
235
1.11M
  } else if (tx_class == TX_CLASS_VERT) {
236
149k
    mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]];  // { 2, 0 }
237
149k
    mag += clip_max3[levels[(3 << bwl) + (3 << TX_PAD_HOR_LOG2)]];  // { 3, 0 }
238
149k
    mag += clip_max3[levels[(4 << bwl) + (4 << TX_PAD_HOR_LOG2)]];  // { 4, 0 }
239
292k
  } else {
240
292k
    mag += clip_max3[levels[2]];  // { 0, 2 }
241
292k
    mag += clip_max3[levels[3]];  // { 0, 3 }
242
292k
    mag += clip_max3[levels[4]];  // { 0, 4 }
243
292k
  }
244
245
1.55M
  return mag;
246
1.55M
}
Unexecuted instantiation: av1_cx_iface.c:get_nz_mag
Unexecuted instantiation: av1_quantize.c:get_nz_mag
Unexecuted instantiation: bitstream.c:get_nz_mag
Unexecuted instantiation: encodemv.c:get_nz_mag
Unexecuted instantiation: encoder.c:get_nz_mag
Unexecuted instantiation: encoder_utils.c:get_nz_mag
encodetxb.c:get_nz_mag
Line
Count
Source
224
348k
                                       const int bwl, const TX_CLASS tx_class) {
225
348k
  int mag;
226
227
  // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
228
348k
  mag = clip_max3[levels[1]];                         // { 0, 1 }
229
348k
  mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR]];  // { 1, 0 }
230
231
348k
  if (tx_class == TX_CLASS_2D) {
232
348k
    mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR + 1]];          // { 1, 1 }
233
348k
    mag += clip_max3[levels[2]];                                    // { 0, 2 }
234
348k
    mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]];  // { 2, 0 }
235
348k
  } else if (tx_class == TX_CLASS_VERT) {
236
0
    mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]];  // { 2, 0 }
237
0
    mag += clip_max3[levels[(3 << bwl) + (3 << TX_PAD_HOR_LOG2)]];  // { 3, 0 }
238
0
    mag += clip_max3[levels[(4 << bwl) + (4 << TX_PAD_HOR_LOG2)]];  // { 4, 0 }
239
0
  } else {
240
0
    mag += clip_max3[levels[2]];  // { 0, 2 }
241
0
    mag += clip_max3[levels[3]];  // { 0, 3 }
242
0
    mag += clip_max3[levels[4]];  // { 0, 4 }
243
0
  }
244
245
348k
  return mag;
246
348k
}
Unexecuted instantiation: ethread.c:get_nz_mag
Unexecuted instantiation: firstpass.c:get_nz_mag
Unexecuted instantiation: global_motion_facade.c:get_nz_mag
Unexecuted instantiation: level.c:get_nz_mag
Unexecuted instantiation: lookahead.c:get_nz_mag
Unexecuted instantiation: mcomp.c:get_nz_mag
Unexecuted instantiation: mv_prec.c:get_nz_mag
Unexecuted instantiation: palette.c:get_nz_mag
Unexecuted instantiation: pass2_strategy.c:get_nz_mag
Unexecuted instantiation: pickcdef.c:get_nz_mag
Unexecuted instantiation: picklpf.c:get_nz_mag
Unexecuted instantiation: pickrst.c:get_nz_mag
Unexecuted instantiation: ratectrl.c:get_nz_mag
Unexecuted instantiation: rd.c:get_nz_mag
Unexecuted instantiation: rdopt.c:get_nz_mag
Unexecuted instantiation: segmentation.c:get_nz_mag
Unexecuted instantiation: speed_features.c:get_nz_mag
Unexecuted instantiation: superres_scale.c:get_nz_mag
Unexecuted instantiation: svc_layercontext.c:get_nz_mag
Unexecuted instantiation: temporal_filter.c:get_nz_mag
Unexecuted instantiation: thirdpass.c:get_nz_mag
Unexecuted instantiation: tokenize.c:get_nz_mag
Unexecuted instantiation: tpl_model.c:get_nz_mag
Unexecuted instantiation: tx_search.c:get_nz_mag
txb_rdopt.c:get_nz_mag
Line
Count
Source
224
29.5k
                                       const int bwl, const TX_CLASS tx_class) {
225
29.5k
  int mag;
226
227
  // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
228
29.5k
  mag = clip_max3[levels[1]];                         // { 0, 1 }
229
29.5k
  mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR]];  // { 1, 0 }
230
231
29.5k
  if (tx_class == TX_CLASS_2D) {
232
29.5k
    mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR + 1]];          // { 1, 1 }
233
29.5k
    mag += clip_max3[levels[2]];                                    // { 0, 2 }
234
29.5k
    mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]];  // { 2, 0 }
235
29.5k
  } else if (tx_class == TX_CLASS_VERT) {
236
0
    mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]];  // { 2, 0 }
237
0
    mag += clip_max3[levels[(3 << bwl) + (3 << TX_PAD_HOR_LOG2)]];  // { 3, 0 }
238
0
    mag += clip_max3[levels[(4 << bwl) + (4 << TX_PAD_HOR_LOG2)]];  // { 4, 0 }
239
0
  } else {
240
0
    mag += clip_max3[levels[2]];  // { 0, 2 }
241
0
    mag += clip_max3[levels[3]];  // { 0, 3 }
242
0
    mag += clip_max3[levels[4]];  // { 0, 4 }
243
0
  }
244
245
29.5k
  return mag;
246
29.5k
}
Unexecuted instantiation: intra_mode_search.c:get_nz_mag
Unexecuted instantiation: var_based_part.c:get_nz_mag
Unexecuted instantiation: av1_noise_estimate.c:get_nz_mag
Unexecuted instantiation: entropy.c:get_nz_mag
Unexecuted instantiation: entropymode.c:get_nz_mag
Unexecuted instantiation: txb_common.c:get_nz_mag
Unexecuted instantiation: aq_complexity.c:get_nz_mag
Unexecuted instantiation: aq_cyclicrefresh.c:get_nz_mag
Unexecuted instantiation: aq_variance.c:get_nz_mag
Unexecuted instantiation: allintra_vis.c:get_nz_mag
Unexecuted instantiation: compound_type.c:get_nz_mag
Unexecuted instantiation: context_tree.c:get_nz_mag
Unexecuted instantiation: encodeframe.c:get_nz_mag
Unexecuted instantiation: encodeframe_utils.c:get_nz_mag
Unexecuted instantiation: encodemb.c:get_nz_mag
Unexecuted instantiation: encode_strategy.c:get_nz_mag
Unexecuted instantiation: global_motion.c:get_nz_mag
Unexecuted instantiation: gop_structure.c:get_nz_mag
Unexecuted instantiation: interp_search.c:get_nz_mag
Unexecuted instantiation: motion_search_facade.c:get_nz_mag
Unexecuted instantiation: partition_search.c:get_nz_mag
Unexecuted instantiation: partition_strategy.c:get_nz_mag
Unexecuted instantiation: nonrd_pickmode.c:get_nz_mag
247
248
#define NZ_MAP_CTX_0 SIG_COEF_CONTEXTS_2D
249
#define NZ_MAP_CTX_5 (NZ_MAP_CTX_0 + 5)
250
#define NZ_MAP_CTX_10 (NZ_MAP_CTX_0 + 10)
251
252
static const int nz_map_ctx_offset_1d[32] = {
253
  NZ_MAP_CTX_0,  NZ_MAP_CTX_5,  NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
254
  NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
255
  NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
256
  NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
257
  NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
258
  NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
259
  NZ_MAP_CTX_10, NZ_MAP_CTX_10,
260
};
261
262
static AOM_FORCE_INLINE int get_nz_map_ctx_from_stats(
263
    const int stats,
264
    const int coeff_idx,  // raster order
265
1.93M
    const int bwl, const TX_SIZE tx_size, const TX_CLASS tx_class) {
266
  // tx_class == 0(TX_CLASS_2D)
267
1.93M
  if ((tx_class | coeff_idx) == 0) return 0;
268
813k
  int ctx = (stats + 1) >> 1;
269
813k
  ctx = AOMMIN(ctx, 4);
270
813k
  switch (tx_class) {
271
371k
    case TX_CLASS_2D: {
272
      // This is the algorithm to generate av1_nz_map_ctx_offset[][]
273
      //   const int width = tx_size_wide[tx_size];
274
      //   const int height = tx_size_high[tx_size];
275
      //   if (width < height) {
276
      //     if (row < 2) return 11 + ctx;
277
      //   } else if (width > height) {
278
      //     if (col < 2) return 16 + ctx;
279
      //   }
280
      //   if (row + col < 2) return ctx + 1;
281
      //   if (row + col < 4) return 5 + ctx + 1;
282
      //   return 21 + ctx;
283
371k
      return ctx + av1_nz_map_ctx_offset[tx_size][coeff_idx];
284
0
    }
285
292k
    case TX_CLASS_HORIZ: {
286
292k
      const int row = coeff_idx >> bwl;
287
292k
      const int col = coeff_idx - (row << bwl);
288
292k
      return ctx + nz_map_ctx_offset_1d[col];
289
0
    }
290
149k
    case TX_CLASS_VERT: {
291
149k
      const int row = coeff_idx >> bwl;
292
149k
      return ctx + nz_map_ctx_offset_1d[row];
293
0
    }
294
0
    default: break;
295
813k
  }
296
0
  return 0;
297
813k
}
decodetxb.c:get_nz_map_ctx_from_stats
Line
Count
Source
265
1.55M
    const int bwl, const TX_SIZE tx_size, const TX_CLASS tx_class) {
266
  // tx_class == 0(TX_CLASS_2D)
267
1.55M
  if ((tx_class | coeff_idx) == 0) return 0;
268
441k
  int ctx = (stats + 1) >> 1;
269
441k
  ctx = AOMMIN(ctx, 4);
270
441k
  switch (tx_class) {
271
0
    case TX_CLASS_2D: {
272
      // This is the algorithm to generate av1_nz_map_ctx_offset[][]
273
      //   const int width = tx_size_wide[tx_size];
274
      //   const int height = tx_size_high[tx_size];
275
      //   if (width < height) {
276
      //     if (row < 2) return 11 + ctx;
277
      //   } else if (width > height) {
278
      //     if (col < 2) return 16 + ctx;
279
      //   }
280
      //   if (row + col < 2) return ctx + 1;
281
      //   if (row + col < 4) return 5 + ctx + 1;
282
      //   return 21 + ctx;
283
0
      return ctx + av1_nz_map_ctx_offset[tx_size][coeff_idx];
284
0
    }
285
292k
    case TX_CLASS_HORIZ: {
286
292k
      const int row = coeff_idx >> bwl;
287
292k
      const int col = coeff_idx - (row << bwl);
288
292k
      return ctx + nz_map_ctx_offset_1d[col];
289
0
    }
290
149k
    case TX_CLASS_VERT: {
291
149k
      const int row = coeff_idx >> bwl;
292
149k
      return ctx + nz_map_ctx_offset_1d[row];
293
0
    }
294
0
    default: break;
295
441k
  }
296
0
  return 0;
297
441k
}
Unexecuted instantiation: av1_cx_iface.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: av1_quantize.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: bitstream.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: encodemv.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: encoder.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: encoder_utils.c:get_nz_map_ctx_from_stats
encodetxb.c:get_nz_map_ctx_from_stats
Line
Count
Source
265
348k
    const int bwl, const TX_SIZE tx_size, const TX_CLASS tx_class) {
266
  // tx_class == 0(TX_CLASS_2D)
267
348k
  if ((tx_class | coeff_idx) == 0) return 0;
268
342k
  int ctx = (stats + 1) >> 1;
269
342k
  ctx = AOMMIN(ctx, 4);
270
342k
  switch (tx_class) {
271
342k
    case TX_CLASS_2D: {
272
      // This is the algorithm to generate av1_nz_map_ctx_offset[][]
273
      //   const int width = tx_size_wide[tx_size];
274
      //   const int height = tx_size_high[tx_size];
275
      //   if (width < height) {
276
      //     if (row < 2) return 11 + ctx;
277
      //   } else if (width > height) {
278
      //     if (col < 2) return 16 + ctx;
279
      //   }
280
      //   if (row + col < 2) return ctx + 1;
281
      //   if (row + col < 4) return 5 + ctx + 1;
282
      //   return 21 + ctx;
283
342k
      return ctx + av1_nz_map_ctx_offset[tx_size][coeff_idx];
284
0
    }
285
0
    case TX_CLASS_HORIZ: {
286
0
      const int row = coeff_idx >> bwl;
287
0
      const int col = coeff_idx - (row << bwl);
288
0
      return ctx + nz_map_ctx_offset_1d[col];
289
0
    }
290
0
    case TX_CLASS_VERT: {
291
0
      const int row = coeff_idx >> bwl;
292
0
      return ctx + nz_map_ctx_offset_1d[row];
293
0
    }
294
0
    default: break;
295
342k
  }
296
0
  return 0;
297
342k
}
Unexecuted instantiation: ethread.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: firstpass.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: global_motion_facade.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: level.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: lookahead.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: mcomp.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: mv_prec.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: palette.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: pass2_strategy.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: pickcdef.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: picklpf.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: pickrst.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: ratectrl.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: rd.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: rdopt.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: segmentation.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: speed_features.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: superres_scale.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: svc_layercontext.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: temporal_filter.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: thirdpass.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: tokenize.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: tpl_model.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: tx_search.c:get_nz_map_ctx_from_stats
txb_rdopt.c:get_nz_map_ctx_from_stats
Line
Count
Source
265
29.5k
    const int bwl, const TX_SIZE tx_size, const TX_CLASS tx_class) {
266
  // tx_class == 0(TX_CLASS_2D)
267
29.5k
  if ((tx_class | coeff_idx) == 0) return 0;
268
28.6k
  int ctx = (stats + 1) >> 1;
269
28.6k
  ctx = AOMMIN(ctx, 4);
270
28.6k
  switch (tx_class) {
271
28.6k
    case TX_CLASS_2D: {
272
      // This is the algorithm to generate av1_nz_map_ctx_offset[][]
273
      //   const int width = tx_size_wide[tx_size];
274
      //   const int height = tx_size_high[tx_size];
275
      //   if (width < height) {
276
      //     if (row < 2) return 11 + ctx;
277
      //   } else if (width > height) {
278
      //     if (col < 2) return 16 + ctx;
279
      //   }
280
      //   if (row + col < 2) return ctx + 1;
281
      //   if (row + col < 4) return 5 + ctx + 1;
282
      //   return 21 + ctx;
283
28.6k
      return ctx + av1_nz_map_ctx_offset[tx_size][coeff_idx];
284
0
    }
285
0
    case TX_CLASS_HORIZ: {
286
0
      const int row = coeff_idx >> bwl;
287
0
      const int col = coeff_idx - (row << bwl);
288
0
      return ctx + nz_map_ctx_offset_1d[col];
289
0
    }
290
0
    case TX_CLASS_VERT: {
291
0
      const int row = coeff_idx >> bwl;
292
0
      return ctx + nz_map_ctx_offset_1d[row];
293
0
    }
294
0
    default: break;
295
28.6k
  }
296
0
  return 0;
297
28.6k
}
Unexecuted instantiation: intra_mode_search.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: var_based_part.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: av1_noise_estimate.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: entropy.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: entropymode.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: txb_common.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: aq_complexity.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: aq_cyclicrefresh.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: aq_variance.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: allintra_vis.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: compound_type.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: context_tree.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: encodeframe.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: encodeframe_utils.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: encodemb.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: encode_strategy.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: global_motion.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: gop_structure.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: interp_search.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: motion_search_facade.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: partition_search.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: partition_strategy.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: nonrd_pickmode.c:get_nz_map_ctx_from_stats
298
299
typedef aom_cdf_prob (*base_cdf_arr)[CDF_SIZE(4)];
300
typedef aom_cdf_prob (*br_cdf_arr)[CDF_SIZE(BR_CDF_SIZE)];
301
302
1.99M
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
303
1.99M
  if (scan_idx == 0) return 0;
304
1.14M
  if (scan_idx <= (height << bwl) / 8) return 1;
305
630k
  if (scan_idx <= (height << bwl) / 4) return 2;
306
469k
  return 3;
307
630k
}
decodetxb.c:get_lower_levels_ctx_eob
Line
Count
Source
302
1.95M
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
303
1.95M
  if (scan_idx == 0) return 0;
304
1.13M
  if (scan_idx <= (height << bwl) / 8) return 1;
305
628k
  if (scan_idx <= (height << bwl) / 4) return 2;
306
469k
  return 3;
307
628k
}
Unexecuted instantiation: av1_cx_iface.c:get_lower_levels_ctx_eob
Unexecuted instantiation: av1_quantize.c:get_lower_levels_ctx_eob
Unexecuted instantiation: bitstream.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encodemv.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encoder.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encoder_utils.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encodetxb.c:get_lower_levels_ctx_eob
Unexecuted instantiation: ethread.c:get_lower_levels_ctx_eob
Unexecuted instantiation: firstpass.c:get_lower_levels_ctx_eob
Unexecuted instantiation: global_motion_facade.c:get_lower_levels_ctx_eob
Unexecuted instantiation: level.c:get_lower_levels_ctx_eob
Unexecuted instantiation: lookahead.c:get_lower_levels_ctx_eob
Unexecuted instantiation: mcomp.c:get_lower_levels_ctx_eob
Unexecuted instantiation: mv_prec.c:get_lower_levels_ctx_eob
Unexecuted instantiation: palette.c:get_lower_levels_ctx_eob
Unexecuted instantiation: pass2_strategy.c:get_lower_levels_ctx_eob
Unexecuted instantiation: pickcdef.c:get_lower_levels_ctx_eob
Unexecuted instantiation: picklpf.c:get_lower_levels_ctx_eob
Unexecuted instantiation: pickrst.c:get_lower_levels_ctx_eob
Unexecuted instantiation: ratectrl.c:get_lower_levels_ctx_eob
Unexecuted instantiation: rd.c:get_lower_levels_ctx_eob
Unexecuted instantiation: rdopt.c:get_lower_levels_ctx_eob
Unexecuted instantiation: segmentation.c:get_lower_levels_ctx_eob
Unexecuted instantiation: speed_features.c:get_lower_levels_ctx_eob
Unexecuted instantiation: superres_scale.c:get_lower_levels_ctx_eob
Unexecuted instantiation: svc_layercontext.c:get_lower_levels_ctx_eob
Unexecuted instantiation: temporal_filter.c:get_lower_levels_ctx_eob
Unexecuted instantiation: thirdpass.c:get_lower_levels_ctx_eob
Unexecuted instantiation: tokenize.c:get_lower_levels_ctx_eob
Unexecuted instantiation: tpl_model.c:get_lower_levels_ctx_eob
Unexecuted instantiation: tx_search.c:get_lower_levels_ctx_eob
txb_rdopt.c:get_lower_levels_ctx_eob
Line
Count
Source
302
37.4k
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
303
37.4k
  if (scan_idx == 0) return 0;
304
4.10k
  if (scan_idx <= (height << bwl) / 8) return 1;
305
1.99k
  if (scan_idx <= (height << bwl) / 4) return 2;
306
928
  return 3;
307
1.99k
}
Unexecuted instantiation: intra_mode_search.c:get_lower_levels_ctx_eob
Unexecuted instantiation: var_based_part.c:get_lower_levels_ctx_eob
Unexecuted instantiation: av1_noise_estimate.c:get_lower_levels_ctx_eob
Unexecuted instantiation: entropy.c:get_lower_levels_ctx_eob
Unexecuted instantiation: entropymode.c:get_lower_levels_ctx_eob
Unexecuted instantiation: txb_common.c:get_lower_levels_ctx_eob
Unexecuted instantiation: aq_complexity.c:get_lower_levels_ctx_eob
Unexecuted instantiation: aq_cyclicrefresh.c:get_lower_levels_ctx_eob
Unexecuted instantiation: aq_variance.c:get_lower_levels_ctx_eob
Unexecuted instantiation: allintra_vis.c:get_lower_levels_ctx_eob
Unexecuted instantiation: compound_type.c:get_lower_levels_ctx_eob
Unexecuted instantiation: context_tree.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encodeframe.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encodeframe_utils.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encodemb.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encode_strategy.c:get_lower_levels_ctx_eob
Unexecuted instantiation: global_motion.c:get_lower_levels_ctx_eob
Unexecuted instantiation: gop_structure.c:get_lower_levels_ctx_eob
Unexecuted instantiation: interp_search.c:get_lower_levels_ctx_eob
Unexecuted instantiation: motion_search_facade.c:get_lower_levels_ctx_eob
Unexecuted instantiation: partition_search.c:get_lower_levels_ctx_eob
Unexecuted instantiation: partition_strategy.c:get_lower_levels_ctx_eob
Unexecuted instantiation: nonrd_pickmode.c:get_lower_levels_ctx_eob
308
309
static INLINE int get_lower_levels_ctx_2d(const uint8_t *levels, int coeff_idx,
310
30.2M
                                          int bwl, TX_SIZE tx_size) {
311
30.2M
  assert(coeff_idx > 0);
312
30.2M
  int mag;
313
  // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
314
30.2M
  levels = levels + get_padded_idx(coeff_idx, bwl);
315
30.2M
  mag = AOMMIN(levels[1], 3);                                     // { 0, 1 }
316
30.2M
  mag += AOMMIN(levels[(1 << bwl) + TX_PAD_HOR], 3);              // { 1, 0 }
317
30.2M
  mag += AOMMIN(levels[(1 << bwl) + TX_PAD_HOR + 1], 3);          // { 1, 1 }
318
30.2M
  mag += AOMMIN(levels[2], 3);                                    // { 0, 2 }
319
30.2M
  mag += AOMMIN(levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)], 3);  // { 2, 0 }
320
321
30.2M
  const int ctx = AOMMIN((mag + 1) >> 1, 4);
322
30.2M
  return ctx + av1_nz_map_ctx_offset[tx_size][coeff_idx];
323
30.2M
}
decodetxb.c:get_lower_levels_ctx_2d
Line
Count
Source
310
30.2M
                                          int bwl, TX_SIZE tx_size) {
311
30.2M
  assert(coeff_idx > 0);
312
30.2M
  int mag;
313
  // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
314
30.2M
  levels = levels + get_padded_idx(coeff_idx, bwl);
315
30.2M
  mag = AOMMIN(levels[1], 3);                                     // { 0, 1 }
316
30.2M
  mag += AOMMIN(levels[(1 << bwl) + TX_PAD_HOR], 3);              // { 1, 0 }
317
30.2M
  mag += AOMMIN(levels[(1 << bwl) + TX_PAD_HOR + 1], 3);          // { 1, 1 }
318
30.2M
  mag += AOMMIN(levels[2], 3);                                    // { 0, 2 }
319
30.2M
  mag += AOMMIN(levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)], 3);  // { 2, 0 }
320
321
30.2M
  const int ctx = AOMMIN((mag + 1) >> 1, 4);
322
30.2M
  return ctx + av1_nz_map_ctx_offset[tx_size][coeff_idx];
323
30.2M
}
Unexecuted instantiation: av1_cx_iface.c:get_lower_levels_ctx_2d
Unexecuted instantiation: av1_quantize.c:get_lower_levels_ctx_2d
Unexecuted instantiation: bitstream.c:get_lower_levels_ctx_2d
Unexecuted instantiation: encodemv.c:get_lower_levels_ctx_2d
Unexecuted instantiation: encoder.c:get_lower_levels_ctx_2d
Unexecuted instantiation: encoder_utils.c:get_lower_levels_ctx_2d
Unexecuted instantiation: encodetxb.c:get_lower_levels_ctx_2d
Unexecuted instantiation: ethread.c:get_lower_levels_ctx_2d
Unexecuted instantiation: firstpass.c:get_lower_levels_ctx_2d
Unexecuted instantiation: global_motion_facade.c:get_lower_levels_ctx_2d
Unexecuted instantiation: level.c:get_lower_levels_ctx_2d
Unexecuted instantiation: lookahead.c:get_lower_levels_ctx_2d
Unexecuted instantiation: mcomp.c:get_lower_levels_ctx_2d
Unexecuted instantiation: mv_prec.c:get_lower_levels_ctx_2d
Unexecuted instantiation: palette.c:get_lower_levels_ctx_2d
Unexecuted instantiation: pass2_strategy.c:get_lower_levels_ctx_2d
Unexecuted instantiation: pickcdef.c:get_lower_levels_ctx_2d
Unexecuted instantiation: picklpf.c:get_lower_levels_ctx_2d
Unexecuted instantiation: pickrst.c:get_lower_levels_ctx_2d
Unexecuted instantiation: ratectrl.c:get_lower_levels_ctx_2d
Unexecuted instantiation: rd.c:get_lower_levels_ctx_2d
Unexecuted instantiation: rdopt.c:get_lower_levels_ctx_2d
Unexecuted instantiation: segmentation.c:get_lower_levels_ctx_2d
Unexecuted instantiation: speed_features.c:get_lower_levels_ctx_2d
Unexecuted instantiation: superres_scale.c:get_lower_levels_ctx_2d
Unexecuted instantiation: svc_layercontext.c:get_lower_levels_ctx_2d
Unexecuted instantiation: temporal_filter.c:get_lower_levels_ctx_2d
Unexecuted instantiation: thirdpass.c:get_lower_levels_ctx_2d
Unexecuted instantiation: tokenize.c:get_lower_levels_ctx_2d
Unexecuted instantiation: tpl_model.c:get_lower_levels_ctx_2d
Unexecuted instantiation: tx_search.c:get_lower_levels_ctx_2d
Unexecuted instantiation: txb_rdopt.c:get_lower_levels_ctx_2d
Unexecuted instantiation: intra_mode_search.c:get_lower_levels_ctx_2d
Unexecuted instantiation: var_based_part.c:get_lower_levels_ctx_2d
Unexecuted instantiation: av1_noise_estimate.c:get_lower_levels_ctx_2d
Unexecuted instantiation: entropy.c:get_lower_levels_ctx_2d
Unexecuted instantiation: entropymode.c:get_lower_levels_ctx_2d
Unexecuted instantiation: txb_common.c:get_lower_levels_ctx_2d
Unexecuted instantiation: aq_complexity.c:get_lower_levels_ctx_2d
Unexecuted instantiation: aq_cyclicrefresh.c:get_lower_levels_ctx_2d
Unexecuted instantiation: aq_variance.c:get_lower_levels_ctx_2d
Unexecuted instantiation: allintra_vis.c:get_lower_levels_ctx_2d
Unexecuted instantiation: compound_type.c:get_lower_levels_ctx_2d
Unexecuted instantiation: context_tree.c:get_lower_levels_ctx_2d
Unexecuted instantiation: encodeframe.c:get_lower_levels_ctx_2d
Unexecuted instantiation: encodeframe_utils.c:get_lower_levels_ctx_2d
Unexecuted instantiation: encodemb.c:get_lower_levels_ctx_2d
Unexecuted instantiation: encode_strategy.c:get_lower_levels_ctx_2d
Unexecuted instantiation: global_motion.c:get_lower_levels_ctx_2d
Unexecuted instantiation: gop_structure.c:get_lower_levels_ctx_2d
Unexecuted instantiation: interp_search.c:get_lower_levels_ctx_2d
Unexecuted instantiation: motion_search_facade.c:get_lower_levels_ctx_2d
Unexecuted instantiation: partition_search.c:get_lower_levels_ctx_2d
Unexecuted instantiation: partition_strategy.c:get_lower_levels_ctx_2d
Unexecuted instantiation: nonrd_pickmode.c:get_lower_levels_ctx_2d
324
static AOM_FORCE_INLINE int get_lower_levels_ctx(const uint8_t *levels,
325
                                                 int coeff_idx, int bwl,
326
                                                 TX_SIZE tx_size,
327
1.58M
                                                 TX_CLASS tx_class) {
328
1.58M
  const int stats =
329
1.58M
      get_nz_mag(levels + get_padded_idx(coeff_idx, bwl), bwl, tx_class);
330
1.58M
  return get_nz_map_ctx_from_stats(stats, coeff_idx, bwl, tx_size, tx_class);
331
1.58M
}
decodetxb.c:get_lower_levels_ctx
Line
Count
Source
327
1.55M
                                                 TX_CLASS tx_class) {
328
1.55M
  const int stats =
329
1.55M
      get_nz_mag(levels + get_padded_idx(coeff_idx, bwl), bwl, tx_class);
330
1.55M
  return get_nz_map_ctx_from_stats(stats, coeff_idx, bwl, tx_size, tx_class);
331
1.55M
}
Unexecuted instantiation: av1_cx_iface.c:get_lower_levels_ctx
Unexecuted instantiation: av1_quantize.c:get_lower_levels_ctx
Unexecuted instantiation: bitstream.c:get_lower_levels_ctx
Unexecuted instantiation: encodemv.c:get_lower_levels_ctx
Unexecuted instantiation: encoder.c:get_lower_levels_ctx
Unexecuted instantiation: encoder_utils.c:get_lower_levels_ctx
Unexecuted instantiation: encodetxb.c:get_lower_levels_ctx
Unexecuted instantiation: ethread.c:get_lower_levels_ctx
Unexecuted instantiation: firstpass.c:get_lower_levels_ctx
Unexecuted instantiation: global_motion_facade.c:get_lower_levels_ctx
Unexecuted instantiation: level.c:get_lower_levels_ctx
Unexecuted instantiation: lookahead.c:get_lower_levels_ctx
Unexecuted instantiation: mcomp.c:get_lower_levels_ctx
Unexecuted instantiation: mv_prec.c:get_lower_levels_ctx
Unexecuted instantiation: palette.c:get_lower_levels_ctx
Unexecuted instantiation: pass2_strategy.c:get_lower_levels_ctx
Unexecuted instantiation: pickcdef.c:get_lower_levels_ctx
Unexecuted instantiation: picklpf.c:get_lower_levels_ctx
Unexecuted instantiation: pickrst.c:get_lower_levels_ctx
Unexecuted instantiation: ratectrl.c:get_lower_levels_ctx
Unexecuted instantiation: rd.c:get_lower_levels_ctx
Unexecuted instantiation: rdopt.c:get_lower_levels_ctx
Unexecuted instantiation: segmentation.c:get_lower_levels_ctx
Unexecuted instantiation: speed_features.c:get_lower_levels_ctx
Unexecuted instantiation: superres_scale.c:get_lower_levels_ctx
Unexecuted instantiation: svc_layercontext.c:get_lower_levels_ctx
Unexecuted instantiation: temporal_filter.c:get_lower_levels_ctx
Unexecuted instantiation: thirdpass.c:get_lower_levels_ctx
Unexecuted instantiation: tokenize.c:get_lower_levels_ctx
Unexecuted instantiation: tpl_model.c:get_lower_levels_ctx
Unexecuted instantiation: tx_search.c:get_lower_levels_ctx
txb_rdopt.c:get_lower_levels_ctx
Line
Count
Source
327
29.5k
                                                 TX_CLASS tx_class) {
328
29.5k
  const int stats =
329
29.5k
      get_nz_mag(levels + get_padded_idx(coeff_idx, bwl), bwl, tx_class);
330
29.5k
  return get_nz_map_ctx_from_stats(stats, coeff_idx, bwl, tx_size, tx_class);
331
29.5k
}
Unexecuted instantiation: intra_mode_search.c:get_lower_levels_ctx
Unexecuted instantiation: var_based_part.c:get_lower_levels_ctx
Unexecuted instantiation: av1_noise_estimate.c:get_lower_levels_ctx
Unexecuted instantiation: entropy.c:get_lower_levels_ctx
Unexecuted instantiation: entropymode.c:get_lower_levels_ctx
Unexecuted instantiation: txb_common.c:get_lower_levels_ctx
Unexecuted instantiation: aq_complexity.c:get_lower_levels_ctx
Unexecuted instantiation: aq_cyclicrefresh.c:get_lower_levels_ctx
Unexecuted instantiation: aq_variance.c:get_lower_levels_ctx
Unexecuted instantiation: allintra_vis.c:get_lower_levels_ctx
Unexecuted instantiation: compound_type.c:get_lower_levels_ctx
Unexecuted instantiation: context_tree.c:get_lower_levels_ctx
Unexecuted instantiation: encodeframe.c:get_lower_levels_ctx
Unexecuted instantiation: encodeframe_utils.c:get_lower_levels_ctx
Unexecuted instantiation: encodemb.c:get_lower_levels_ctx
Unexecuted instantiation: encode_strategy.c:get_lower_levels_ctx
Unexecuted instantiation: global_motion.c:get_lower_levels_ctx
Unexecuted instantiation: gop_structure.c:get_lower_levels_ctx
Unexecuted instantiation: interp_search.c:get_lower_levels_ctx
Unexecuted instantiation: motion_search_facade.c:get_lower_levels_ctx
Unexecuted instantiation: partition_search.c:get_lower_levels_ctx
Unexecuted instantiation: partition_strategy.c:get_lower_levels_ctx
Unexecuted instantiation: nonrd_pickmode.c:get_lower_levels_ctx
332
333
static INLINE int get_lower_levels_ctx_general(int is_last, int scan_idx,
334
                                               int bwl, int height,
335
                                               const uint8_t *levels,
336
                                               int coeff_idx, TX_SIZE tx_size,
337
11.6k
                                               TX_CLASS tx_class) {
338
11.6k
  if (is_last) {
339
10.9k
    if (scan_idx == 0) return 0;
340
0
    if (scan_idx <= (height << bwl) >> 3) return 1;
341
0
    if (scan_idx <= (height << bwl) >> 2) return 2;
342
0
    return 3;
343
0
  }
344
685
  return get_lower_levels_ctx(levels, coeff_idx, bwl, tx_size, tx_class);
345
11.6k
}
Unexecuted instantiation: decodetxb.c:get_lower_levels_ctx_general
Unexecuted instantiation: av1_cx_iface.c:get_lower_levels_ctx_general
Unexecuted instantiation: av1_quantize.c:get_lower_levels_ctx_general
Unexecuted instantiation: bitstream.c:get_lower_levels_ctx_general
Unexecuted instantiation: encodemv.c:get_lower_levels_ctx_general
Unexecuted instantiation: encoder.c:get_lower_levels_ctx_general
Unexecuted instantiation: encoder_utils.c:get_lower_levels_ctx_general
Unexecuted instantiation: encodetxb.c:get_lower_levels_ctx_general
Unexecuted instantiation: ethread.c:get_lower_levels_ctx_general
Unexecuted instantiation: firstpass.c:get_lower_levels_ctx_general
Unexecuted instantiation: global_motion_facade.c:get_lower_levels_ctx_general
Unexecuted instantiation: level.c:get_lower_levels_ctx_general
Unexecuted instantiation: lookahead.c:get_lower_levels_ctx_general
Unexecuted instantiation: mcomp.c:get_lower_levels_ctx_general
Unexecuted instantiation: mv_prec.c:get_lower_levels_ctx_general
Unexecuted instantiation: palette.c:get_lower_levels_ctx_general
Unexecuted instantiation: pass2_strategy.c:get_lower_levels_ctx_general
Unexecuted instantiation: pickcdef.c:get_lower_levels_ctx_general
Unexecuted instantiation: picklpf.c:get_lower_levels_ctx_general
Unexecuted instantiation: pickrst.c:get_lower_levels_ctx_general
Unexecuted instantiation: ratectrl.c:get_lower_levels_ctx_general
Unexecuted instantiation: rd.c:get_lower_levels_ctx_general
Unexecuted instantiation: rdopt.c:get_lower_levels_ctx_general
Unexecuted instantiation: segmentation.c:get_lower_levels_ctx_general
Unexecuted instantiation: speed_features.c:get_lower_levels_ctx_general
Unexecuted instantiation: superres_scale.c:get_lower_levels_ctx_general
Unexecuted instantiation: svc_layercontext.c:get_lower_levels_ctx_general
Unexecuted instantiation: temporal_filter.c:get_lower_levels_ctx_general
Unexecuted instantiation: thirdpass.c:get_lower_levels_ctx_general
Unexecuted instantiation: tokenize.c:get_lower_levels_ctx_general
Unexecuted instantiation: tpl_model.c:get_lower_levels_ctx_general
Unexecuted instantiation: tx_search.c:get_lower_levels_ctx_general
txb_rdopt.c:get_lower_levels_ctx_general
Line
Count
Source
337
11.6k
                                               TX_CLASS tx_class) {
338
11.6k
  if (is_last) {
339
10.9k
    if (scan_idx == 0) return 0;
340
0
    if (scan_idx <= (height << bwl) >> 3) return 1;
341
0
    if (scan_idx <= (height << bwl) >> 2) return 2;
342
0
    return 3;
343
0
  }
344
685
  return get_lower_levels_ctx(levels, coeff_idx, bwl, tx_size, tx_class);
345
11.6k
}
Unexecuted instantiation: intra_mode_search.c:get_lower_levels_ctx_general
Unexecuted instantiation: var_based_part.c:get_lower_levels_ctx_general
Unexecuted instantiation: av1_noise_estimate.c:get_lower_levels_ctx_general
Unexecuted instantiation: entropy.c:get_lower_levels_ctx_general
Unexecuted instantiation: entropymode.c:get_lower_levels_ctx_general
Unexecuted instantiation: txb_common.c:get_lower_levels_ctx_general
Unexecuted instantiation: aq_complexity.c:get_lower_levels_ctx_general
Unexecuted instantiation: aq_cyclicrefresh.c:get_lower_levels_ctx_general
Unexecuted instantiation: aq_variance.c:get_lower_levels_ctx_general
Unexecuted instantiation: allintra_vis.c:get_lower_levels_ctx_general
Unexecuted instantiation: compound_type.c:get_lower_levels_ctx_general
Unexecuted instantiation: context_tree.c:get_lower_levels_ctx_general
Unexecuted instantiation: encodeframe.c:get_lower_levels_ctx_general
Unexecuted instantiation: encodeframe_utils.c:get_lower_levels_ctx_general
Unexecuted instantiation: encodemb.c:get_lower_levels_ctx_general
Unexecuted instantiation: encode_strategy.c:get_lower_levels_ctx_general
Unexecuted instantiation: global_motion.c:get_lower_levels_ctx_general
Unexecuted instantiation: gop_structure.c:get_lower_levels_ctx_general
Unexecuted instantiation: interp_search.c:get_lower_levels_ctx_general
Unexecuted instantiation: motion_search_facade.c:get_lower_levels_ctx_general
Unexecuted instantiation: partition_search.c:get_lower_levels_ctx_general
Unexecuted instantiation: partition_strategy.c:get_lower_levels_ctx_general
Unexecuted instantiation: nonrd_pickmode.c:get_lower_levels_ctx_general
346
347
2.01M
static INLINE void set_dc_sign(int *cul_level, int dc_val) {
348
2.01M
  if (dc_val < 0)
349
697k
    *cul_level |= 1 << COEFF_CONTEXT_BITS;
350
1.32M
  else if (dc_val > 0)
351
1.05M
    *cul_level += 2 << COEFF_CONTEXT_BITS;
352
2.01M
}
decodetxb.c:set_dc_sign
Line
Count
Source
347
1.95M
static INLINE void set_dc_sign(int *cul_level, int dc_val) {
348
1.95M
  if (dc_val < 0)
349
637k
    *cul_level |= 1 << COEFF_CONTEXT_BITS;
350
1.32M
  else if (dc_val > 0)
351
1.05M
    *cul_level += 2 << COEFF_CONTEXT_BITS;
352
1.95M
}
Unexecuted instantiation: av1_cx_iface.c:set_dc_sign
Unexecuted instantiation: av1_quantize.c:set_dc_sign
Unexecuted instantiation: bitstream.c:set_dc_sign
Unexecuted instantiation: encodemv.c:set_dc_sign
Unexecuted instantiation: encoder.c:set_dc_sign
Unexecuted instantiation: encoder_utils.c:set_dc_sign
encodetxb.c:set_dc_sign
Line
Count
Source
347
60.2k
static INLINE void set_dc_sign(int *cul_level, int dc_val) {
348
60.2k
  if (dc_val < 0)
349
60.2k
    *cul_level |= 1 << COEFF_CONTEXT_BITS;
350
0
  else if (dc_val > 0)
351
0
    *cul_level += 2 << COEFF_CONTEXT_BITS;
352
60.2k
}
Unexecuted instantiation: ethread.c:set_dc_sign
Unexecuted instantiation: firstpass.c:set_dc_sign
Unexecuted instantiation: global_motion_facade.c:set_dc_sign
Unexecuted instantiation: level.c:set_dc_sign
Unexecuted instantiation: lookahead.c:set_dc_sign
Unexecuted instantiation: mcomp.c:set_dc_sign
Unexecuted instantiation: mv_prec.c:set_dc_sign
Unexecuted instantiation: palette.c:set_dc_sign
Unexecuted instantiation: pass2_strategy.c:set_dc_sign
Unexecuted instantiation: pickcdef.c:set_dc_sign
Unexecuted instantiation: picklpf.c:set_dc_sign
Unexecuted instantiation: pickrst.c:set_dc_sign
Unexecuted instantiation: ratectrl.c:set_dc_sign
Unexecuted instantiation: rd.c:set_dc_sign
Unexecuted instantiation: rdopt.c:set_dc_sign
Unexecuted instantiation: segmentation.c:set_dc_sign
Unexecuted instantiation: speed_features.c:set_dc_sign
Unexecuted instantiation: superres_scale.c:set_dc_sign
Unexecuted instantiation: svc_layercontext.c:set_dc_sign
Unexecuted instantiation: temporal_filter.c:set_dc_sign
Unexecuted instantiation: thirdpass.c:set_dc_sign
Unexecuted instantiation: tokenize.c:set_dc_sign
Unexecuted instantiation: tpl_model.c:set_dc_sign
Unexecuted instantiation: tx_search.c:set_dc_sign
Unexecuted instantiation: txb_rdopt.c:set_dc_sign
Unexecuted instantiation: intra_mode_search.c:set_dc_sign
Unexecuted instantiation: var_based_part.c:set_dc_sign
Unexecuted instantiation: av1_noise_estimate.c:set_dc_sign
Unexecuted instantiation: entropy.c:set_dc_sign
Unexecuted instantiation: entropymode.c:set_dc_sign
Unexecuted instantiation: txb_common.c:set_dc_sign
Unexecuted instantiation: aq_complexity.c:set_dc_sign
Unexecuted instantiation: aq_cyclicrefresh.c:set_dc_sign
Unexecuted instantiation: aq_variance.c:set_dc_sign
Unexecuted instantiation: allintra_vis.c:set_dc_sign
Unexecuted instantiation: compound_type.c:set_dc_sign
Unexecuted instantiation: context_tree.c:set_dc_sign
Unexecuted instantiation: encodeframe.c:set_dc_sign
Unexecuted instantiation: encodeframe_utils.c:set_dc_sign
Unexecuted instantiation: encodemb.c:set_dc_sign
Unexecuted instantiation: encode_strategy.c:set_dc_sign
Unexecuted instantiation: global_motion.c:set_dc_sign
Unexecuted instantiation: gop_structure.c:set_dc_sign
Unexecuted instantiation: interp_search.c:set_dc_sign
Unexecuted instantiation: motion_search_facade.c:set_dc_sign
Unexecuted instantiation: partition_search.c:set_dc_sign
Unexecuted instantiation: partition_strategy.c:set_dc_sign
Unexecuted instantiation: nonrd_pickmode.c:set_dc_sign
353
354
static INLINE void get_txb_ctx(const BLOCK_SIZE plane_bsize,
355
                               const TX_SIZE tx_size, const int plane,
356
                               const ENTROPY_CONTEXT *const a,
357
                               const ENTROPY_CONTEXT *const l,
358
17.1M
                               TXB_CTX *const txb_ctx) {
359
17.1M
#define MAX_TX_SIZE_UNIT 16
360
17.1M
  static const int8_t signs[3] = { 0, -1, 1 };
361
17.1M
  static const int8_t dc_sign_contexts[4 * MAX_TX_SIZE_UNIT + 1] = {
362
17.1M
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363
17.1M
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
364
17.1M
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
365
17.1M
  };
366
17.1M
  const int txb_w_unit = tx_size_wide_unit[tx_size];
367
17.1M
  const int txb_h_unit = tx_size_high_unit[tx_size];
368
17.1M
  int dc_sign = 0;
369
17.1M
  int k = 0;
370
371
27.5M
  do {
372
27.5M
    const unsigned int sign = ((uint8_t)a[k]) >> COEFF_CONTEXT_BITS;
373
27.5M
    assert(sign <= 2);
374
27.5M
    dc_sign += signs[sign];
375
27.5M
  } while (++k < txb_w_unit);
376
377
17.1M
  k = 0;
378
27.1M
  do {
379
27.1M
    const unsigned int sign = ((uint8_t)l[k]) >> COEFF_CONTEXT_BITS;
380
27.1M
    assert(sign <= 2);
381
27.1M
    dc_sign += signs[sign];
382
27.1M
  } while (++k < txb_h_unit);
383
384
17.1M
  txb_ctx->dc_sign_ctx = dc_sign_contexts[dc_sign + 2 * MAX_TX_SIZE_UNIT];
385
386
17.1M
  if (plane == 0) {
387
14.0M
    if (plane_bsize == txsize_to_bsize[tx_size]) {
388
1.55M
      txb_ctx->txb_skip_ctx = 0;
389
12.4M
    } else {
390
      // This is the algorithm to generate table skip_contexts[top][left].
391
      //    const int max = AOMMIN(top | left, 4);
392
      //    const int min = AOMMIN(AOMMIN(top, left), 4);
393
      //    if (!max)
394
      //      txb_skip_ctx = 1;
395
      //    else if (!min)
396
      //      txb_skip_ctx = 2 + (max > 3);
397
      //    else if (max <= 3)
398
      //      txb_skip_ctx = 4;
399
      //    else if (min <= 3)
400
      //      txb_skip_ctx = 5;
401
      //    else
402
      //      txb_skip_ctx = 6;
403
12.4M
      static const uint8_t skip_contexts[5][5] = { { 1, 2, 2, 2, 3 },
404
12.4M
                                                   { 2, 4, 4, 4, 5 },
405
12.4M
                                                   { 2, 4, 4, 4, 5 },
406
12.4M
                                                   { 2, 4, 4, 4, 5 },
407
12.4M
                                                   { 3, 5, 5, 5, 6 } };
408
      // For top and left, we only care about which of the following three
409
      // categories they belong to: { 0 }, { 1, 2, 3 }, or { 4, 5, ... }. The
410
      // spec calculates top and left with the Max() function. We can calculate
411
      // an approximate max with bitwise OR because the real max and the
412
      // approximate max belong to the same category.
413
12.4M
      int top = 0;
414
12.4M
      int left = 0;
415
416
12.4M
      k = 0;
417
14.2M
      do {
418
14.2M
        top |= a[k];
419
14.2M
      } while (++k < txb_w_unit);
420
12.4M
      top &= COEFF_CONTEXT_MASK;
421
12.4M
      top = AOMMIN(top, 4);
422
423
12.4M
      k = 0;
424
14.2M
      do {
425
14.2M
        left |= l[k];
426
14.2M
      } while (++k < txb_h_unit);
427
12.4M
      left &= COEFF_CONTEXT_MASK;
428
12.4M
      left = AOMMIN(left, 4);
429
430
12.4M
      txb_ctx->txb_skip_ctx = skip_contexts[top][left];
431
12.4M
    }
432
14.0M
  } else {
433
3.09M
    const int ctx_base = get_entropy_context(tx_size, a, l);
434
3.09M
    const int ctx_offset = (num_pels_log2_lookup[plane_bsize] >
435
3.09M
                            num_pels_log2_lookup[txsize_to_bsize[tx_size]])
436
3.09M
                               ? 10
437
3.09M
                               : 7;
438
3.09M
    txb_ctx->txb_skip_ctx = ctx_base + ctx_offset;
439
3.09M
  }
440
17.1M
#undef MAX_TX_SIZE_UNIT
441
17.1M
}
decodetxb.c:get_txb_ctx
Line
Count
Source
358
3.63M
                               TXB_CTX *const txb_ctx) {
359
3.63M
#define MAX_TX_SIZE_UNIT 16
360
3.63M
  static const int8_t signs[3] = { 0, -1, 1 };
361
3.63M
  static const int8_t dc_sign_contexts[4 * MAX_TX_SIZE_UNIT + 1] = {
362
3.63M
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363
3.63M
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
364
3.63M
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
365
3.63M
  };
366
3.63M
  const int txb_w_unit = tx_size_wide_unit[tx_size];
367
3.63M
  const int txb_h_unit = tx_size_high_unit[tx_size];
368
3.63M
  int dc_sign = 0;
369
3.63M
  int k = 0;
370
371
10.6M
  do {
372
10.6M
    const unsigned int sign = ((uint8_t)a[k]) >> COEFF_CONTEXT_BITS;
373
10.6M
    assert(sign <= 2);
374
10.6M
    dc_sign += signs[sign];
375
10.6M
  } while (++k < txb_w_unit);
376
377
3.63M
  k = 0;
378
10.2M
  do {
379
10.2M
    const unsigned int sign = ((uint8_t)l[k]) >> COEFF_CONTEXT_BITS;
380
10.2M
    assert(sign <= 2);
381
10.2M
    dc_sign += signs[sign];
382
10.2M
  } while (++k < txb_h_unit);
383
384
3.63M
  txb_ctx->dc_sign_ctx = dc_sign_contexts[dc_sign + 2 * MAX_TX_SIZE_UNIT];
385
386
3.63M
  if (plane == 0) {
387
1.74M
    if (plane_bsize == txsize_to_bsize[tx_size]) {
388
846k
      txb_ctx->txb_skip_ctx = 0;
389
896k
    } else {
390
      // This is the algorithm to generate table skip_contexts[top][left].
391
      //    const int max = AOMMIN(top | left, 4);
392
      //    const int min = AOMMIN(AOMMIN(top, left), 4);
393
      //    if (!max)
394
      //      txb_skip_ctx = 1;
395
      //    else if (!min)
396
      //      txb_skip_ctx = 2 + (max > 3);
397
      //    else if (max <= 3)
398
      //      txb_skip_ctx = 4;
399
      //    else if (min <= 3)
400
      //      txb_skip_ctx = 5;
401
      //    else
402
      //      txb_skip_ctx = 6;
403
896k
      static const uint8_t skip_contexts[5][5] = { { 1, 2, 2, 2, 3 },
404
896k
                                                   { 2, 4, 4, 4, 5 },
405
896k
                                                   { 2, 4, 4, 4, 5 },
406
896k
                                                   { 2, 4, 4, 4, 5 },
407
896k
                                                   { 3, 5, 5, 5, 6 } };
408
      // For top and left, we only care about which of the following three
409
      // categories they belong to: { 0 }, { 1, 2, 3 }, or { 4, 5, ... }. The
410
      // spec calculates top and left with the Max() function. We can calculate
411
      // an approximate max with bitwise OR because the real max and the
412
      // approximate max belong to the same category.
413
896k
      int top = 0;
414
896k
      int left = 0;
415
416
896k
      k = 0;
417
2.71M
      do {
418
2.71M
        top |= a[k];
419
2.71M
      } while (++k < txb_w_unit);
420
896k
      top &= COEFF_CONTEXT_MASK;
421
896k
      top = AOMMIN(top, 4);
422
423
896k
      k = 0;
424
2.71M
      do {
425
2.71M
        left |= l[k];
426
2.71M
      } while (++k < txb_h_unit);
427
896k
      left &= COEFF_CONTEXT_MASK;
428
896k
      left = AOMMIN(left, 4);
429
430
896k
      txb_ctx->txb_skip_ctx = skip_contexts[top][left];
431
896k
    }
432
1.89M
  } else {
433
1.89M
    const int ctx_base = get_entropy_context(tx_size, a, l);
434
1.89M
    const int ctx_offset = (num_pels_log2_lookup[plane_bsize] >
435
1.89M
                            num_pels_log2_lookup[txsize_to_bsize[tx_size]])
436
1.89M
                               ? 10
437
1.89M
                               : 7;
438
1.89M
    txb_ctx->txb_skip_ctx = ctx_base + ctx_offset;
439
1.89M
  }
440
3.63M
#undef MAX_TX_SIZE_UNIT
441
3.63M
}
Unexecuted instantiation: av1_cx_iface.c:get_txb_ctx
Unexecuted instantiation: av1_quantize.c:get_txb_ctx
Unexecuted instantiation: bitstream.c:get_txb_ctx
Unexecuted instantiation: encodemv.c:get_txb_ctx
Unexecuted instantiation: encoder.c:get_txb_ctx
Unexecuted instantiation: encoder_utils.c:get_txb_ctx
encodetxb.c:get_txb_ctx
Line
Count
Source
358
896k
                               TXB_CTX *const txb_ctx) {
359
896k
#define MAX_TX_SIZE_UNIT 16
360
896k
  static const int8_t signs[3] = { 0, -1, 1 };
361
896k
  static const int8_t dc_sign_contexts[4 * MAX_TX_SIZE_UNIT + 1] = {
362
896k
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363
896k
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
364
896k
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
365
896k
  };
366
896k
  const int txb_w_unit = tx_size_wide_unit[tx_size];
367
896k
  const int txb_h_unit = tx_size_high_unit[tx_size];
368
896k
  int dc_sign = 0;
369
896k
  int k = 0;
370
371
1.11M
  do {
372
1.11M
    const unsigned int sign = ((uint8_t)a[k]) >> COEFF_CONTEXT_BITS;
373
1.11M
    assert(sign <= 2);
374
1.11M
    dc_sign += signs[sign];
375
1.11M
  } while (++k < txb_w_unit);
376
377
896k
  k = 0;
378
1.11M
  do {
379
1.11M
    const unsigned int sign = ((uint8_t)l[k]) >> COEFF_CONTEXT_BITS;
380
1.11M
    assert(sign <= 2);
381
1.11M
    dc_sign += signs[sign];
382
1.11M
  } while (++k < txb_h_unit);
383
384
896k
  txb_ctx->dc_sign_ctx = dc_sign_contexts[dc_sign + 2 * MAX_TX_SIZE_UNIT];
385
386
896k
  if (plane == 0) {
387
580k
    if (plane_bsize == txsize_to_bsize[tx_size]) {
388
17.9k
      txb_ctx->txb_skip_ctx = 0;
389
562k
    } else {
390
      // This is the algorithm to generate table skip_contexts[top][left].
391
      //    const int max = AOMMIN(top | left, 4);
392
      //    const int min = AOMMIN(AOMMIN(top, left), 4);
393
      //    if (!max)
394
      //      txb_skip_ctx = 1;
395
      //    else if (!min)
396
      //      txb_skip_ctx = 2 + (max > 3);
397
      //    else if (max <= 3)
398
      //      txb_skip_ctx = 4;
399
      //    else if (min <= 3)
400
      //      txb_skip_ctx = 5;
401
      //    else
402
      //      txb_skip_ctx = 6;
403
562k
      static const uint8_t skip_contexts[5][5] = { { 1, 2, 2, 2, 3 },
404
562k
                                                   { 2, 4, 4, 4, 5 },
405
562k
                                                   { 2, 4, 4, 4, 5 },
406
562k
                                                   { 2, 4, 4, 4, 5 },
407
562k
                                                   { 3, 5, 5, 5, 6 } };
408
      // For top and left, we only care about which of the following three
409
      // categories they belong to: { 0 }, { 1, 2, 3 }, or { 4, 5, ... }. The
410
      // spec calculates top and left with the Max() function. We can calculate
411
      // an approximate max with bitwise OR because the real max and the
412
      // approximate max belong to the same category.
413
562k
      int top = 0;
414
562k
      int left = 0;
415
416
562k
      k = 0;
417
562k
      do {
418
562k
        top |= a[k];
419
562k
      } while (++k < txb_w_unit);
420
562k
      top &= COEFF_CONTEXT_MASK;
421
562k
      top = AOMMIN(top, 4);
422
423
562k
      k = 0;
424
562k
      do {
425
562k
        left |= l[k];
426
562k
      } while (++k < txb_h_unit);
427
562k
      left &= COEFF_CONTEXT_MASK;
428
562k
      left = AOMMIN(left, 4);
429
430
562k
      txb_ctx->txb_skip_ctx = skip_contexts[top][left];
431
562k
    }
432
580k
  } else {
433
316k
    const int ctx_base = get_entropy_context(tx_size, a, l);
434
316k
    const int ctx_offset = (num_pels_log2_lookup[plane_bsize] >
435
316k
                            num_pels_log2_lookup[txsize_to_bsize[tx_size]])
436
316k
                               ? 10
437
316k
                               : 7;
438
316k
    txb_ctx->txb_skip_ctx = ctx_base + ctx_offset;
439
316k
  }
440
896k
#undef MAX_TX_SIZE_UNIT
441
896k
}
Unexecuted instantiation: ethread.c:get_txb_ctx
Unexecuted instantiation: firstpass.c:get_txb_ctx
Unexecuted instantiation: global_motion_facade.c:get_txb_ctx
Unexecuted instantiation: level.c:get_txb_ctx
Unexecuted instantiation: lookahead.c:get_txb_ctx
Unexecuted instantiation: mcomp.c:get_txb_ctx
Unexecuted instantiation: mv_prec.c:get_txb_ctx
Unexecuted instantiation: palette.c:get_txb_ctx
Unexecuted instantiation: pass2_strategy.c:get_txb_ctx
Unexecuted instantiation: pickcdef.c:get_txb_ctx
Unexecuted instantiation: picklpf.c:get_txb_ctx
Unexecuted instantiation: pickrst.c:get_txb_ctx
Unexecuted instantiation: ratectrl.c:get_txb_ctx
Unexecuted instantiation: rd.c:get_txb_ctx
Unexecuted instantiation: rdopt.c:get_txb_ctx
Unexecuted instantiation: segmentation.c:get_txb_ctx
Unexecuted instantiation: speed_features.c:get_txb_ctx
Unexecuted instantiation: superres_scale.c:get_txb_ctx
Unexecuted instantiation: svc_layercontext.c:get_txb_ctx
Unexecuted instantiation: temporal_filter.c:get_txb_ctx
Unexecuted instantiation: thirdpass.c:get_txb_ctx
Unexecuted instantiation: tokenize.c:get_txb_ctx
Unexecuted instantiation: tpl_model.c:get_txb_ctx
tx_search.c:get_txb_ctx
Line
Count
Source
358
12.4M
                               TXB_CTX *const txb_ctx) {
359
12.4M
#define MAX_TX_SIZE_UNIT 16
360
12.4M
  static const int8_t signs[3] = { 0, -1, 1 };
361
12.4M
  static const int8_t dc_sign_contexts[4 * MAX_TX_SIZE_UNIT + 1] = {
362
12.4M
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363
12.4M
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
364
12.4M
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
365
12.4M
  };
366
12.4M
  const int txb_w_unit = tx_size_wide_unit[tx_size];
367
12.4M
  const int txb_h_unit = tx_size_high_unit[tx_size];
368
12.4M
  int dc_sign = 0;
369
12.4M
  int k = 0;
370
371
15.4M
  do {
372
15.4M
    const unsigned int sign = ((uint8_t)a[k]) >> COEFF_CONTEXT_BITS;
373
15.4M
    assert(sign <= 2);
374
15.4M
    dc_sign += signs[sign];
375
15.4M
  } while (++k < txb_w_unit);
376
377
12.4M
  k = 0;
378
15.4M
  do {
379
15.4M
    const unsigned int sign = ((uint8_t)l[k]) >> COEFF_CONTEXT_BITS;
380
15.4M
    assert(sign <= 2);
381
15.4M
    dc_sign += signs[sign];
382
15.4M
  } while (++k < txb_h_unit);
383
384
12.4M
  txb_ctx->dc_sign_ctx = dc_sign_contexts[dc_sign + 2 * MAX_TX_SIZE_UNIT];
385
386
12.4M
  if (plane == 0) {
387
11.6M
    if (plane_bsize == txsize_to_bsize[tx_size]) {
388
688k
      txb_ctx->txb_skip_ctx = 0;
389
11.0M
    } else {
390
      // This is the algorithm to generate table skip_contexts[top][left].
391
      //    const int max = AOMMIN(top | left, 4);
392
      //    const int min = AOMMIN(AOMMIN(top, left), 4);
393
      //    if (!max)
394
      //      txb_skip_ctx = 1;
395
      //    else if (!min)
396
      //      txb_skip_ctx = 2 + (max > 3);
397
      //    else if (max <= 3)
398
      //      txb_skip_ctx = 4;
399
      //    else if (min <= 3)
400
      //      txb_skip_ctx = 5;
401
      //    else
402
      //      txb_skip_ctx = 6;
403
11.0M
      static const uint8_t skip_contexts[5][5] = { { 1, 2, 2, 2, 3 },
404
11.0M
                                                   { 2, 4, 4, 4, 5 },
405
11.0M
                                                   { 2, 4, 4, 4, 5 },
406
11.0M
                                                   { 2, 4, 4, 4, 5 },
407
11.0M
                                                   { 3, 5, 5, 5, 6 } };
408
      // For top and left, we only care about which of the following three
409
      // categories they belong to: { 0 }, { 1, 2, 3 }, or { 4, 5, ... }. The
410
      // spec calculates top and left with the Max() function. We can calculate
411
      // an approximate max with bitwise OR because the real max and the
412
      // approximate max belong to the same category.
413
11.0M
      int top = 0;
414
11.0M
      int left = 0;
415
416
11.0M
      k = 0;
417
11.0M
      do {
418
11.0M
        top |= a[k];
419
11.0M
      } while (++k < txb_w_unit);
420
11.0M
      top &= COEFF_CONTEXT_MASK;
421
11.0M
      top = AOMMIN(top, 4);
422
423
11.0M
      k = 0;
424
11.0M
      do {
425
11.0M
        left |= l[k];
426
11.0M
      } while (++k < txb_h_unit);
427
11.0M
      left &= COEFF_CONTEXT_MASK;
428
11.0M
      left = AOMMIN(left, 4);
429
430
11.0M
      txb_ctx->txb_skip_ctx = skip_contexts[top][left];
431
11.0M
    }
432
11.6M
  } else {
433
792k
    const int ctx_base = get_entropy_context(tx_size, a, l);
434
792k
    const int ctx_offset = (num_pels_log2_lookup[plane_bsize] >
435
792k
                            num_pels_log2_lookup[txsize_to_bsize[tx_size]])
436
792k
                               ? 10
437
792k
                               : 7;
438
792k
    txb_ctx->txb_skip_ctx = ctx_base + ctx_offset;
439
792k
  }
440
12.4M
#undef MAX_TX_SIZE_UNIT
441
12.4M
}
Unexecuted instantiation: txb_rdopt.c:get_txb_ctx
Unexecuted instantiation: intra_mode_search.c:get_txb_ctx
Unexecuted instantiation: var_based_part.c:get_txb_ctx
Unexecuted instantiation: av1_noise_estimate.c:get_txb_ctx
Unexecuted instantiation: entropy.c:get_txb_ctx
Unexecuted instantiation: entropymode.c:get_txb_ctx
Unexecuted instantiation: txb_common.c:get_txb_ctx
Unexecuted instantiation: aq_complexity.c:get_txb_ctx
Unexecuted instantiation: aq_cyclicrefresh.c:get_txb_ctx
Unexecuted instantiation: aq_variance.c:get_txb_ctx
Unexecuted instantiation: allintra_vis.c:get_txb_ctx
Unexecuted instantiation: compound_type.c:get_txb_ctx
Unexecuted instantiation: context_tree.c:get_txb_ctx
Unexecuted instantiation: encodeframe.c:get_txb_ctx
Unexecuted instantiation: encodeframe_utils.c:get_txb_ctx
encodemb.c:get_txb_ctx
Line
Count
Source
358
100k
                               TXB_CTX *const txb_ctx) {
359
100k
#define MAX_TX_SIZE_UNIT 16
360
100k
  static const int8_t signs[3] = { 0, -1, 1 };
361
100k
  static const int8_t dc_sign_contexts[4 * MAX_TX_SIZE_UNIT + 1] = {
362
100k
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363
100k
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
364
100k
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
365
100k
  };
366
100k
  const int txb_w_unit = tx_size_wide_unit[tx_size];
367
100k
  const int txb_h_unit = tx_size_high_unit[tx_size];
368
100k
  int dc_sign = 0;
369
100k
  int k = 0;
370
371
315k
  do {
372
315k
    const unsigned int sign = ((uint8_t)a[k]) >> COEFF_CONTEXT_BITS;
373
315k
    assert(sign <= 2);
374
315k
    dc_sign += signs[sign];
375
315k
  } while (++k < txb_w_unit);
376
377
100k
  k = 0;
378
312k
  do {
379
312k
    const unsigned int sign = ((uint8_t)l[k]) >> COEFF_CONTEXT_BITS;
380
312k
    assert(sign <= 2);
381
312k
    dc_sign += signs[sign];
382
312k
  } while (++k < txb_h_unit);
383
384
100k
  txb_ctx->dc_sign_ctx = dc_sign_contexts[dc_sign + 2 * MAX_TX_SIZE_UNIT];
385
386
100k
  if (plane == 0) {
387
5.04k
    if (plane_bsize == txsize_to_bsize[tx_size]) {
388
5.04k
      txb_ctx->txb_skip_ctx = 0;
389
5.04k
    } else {
390
      // This is the algorithm to generate table skip_contexts[top][left].
391
      //    const int max = AOMMIN(top | left, 4);
392
      //    const int min = AOMMIN(AOMMIN(top, left), 4);
393
      //    if (!max)
394
      //      txb_skip_ctx = 1;
395
      //    else if (!min)
396
      //      txb_skip_ctx = 2 + (max > 3);
397
      //    else if (max <= 3)
398
      //      txb_skip_ctx = 4;
399
      //    else if (min <= 3)
400
      //      txb_skip_ctx = 5;
401
      //    else
402
      //      txb_skip_ctx = 6;
403
0
      static const uint8_t skip_contexts[5][5] = { { 1, 2, 2, 2, 3 },
404
0
                                                   { 2, 4, 4, 4, 5 },
405
0
                                                   { 2, 4, 4, 4, 5 },
406
0
                                                   { 2, 4, 4, 4, 5 },
407
0
                                                   { 3, 5, 5, 5, 6 } };
408
      // For top and left, we only care about which of the following three
409
      // categories they belong to: { 0 }, { 1, 2, 3 }, or { 4, 5, ... }. The
410
      // spec calculates top and left with the Max() function. We can calculate
411
      // an approximate max with bitwise OR because the real max and the
412
      // approximate max belong to the same category.
413
0
      int top = 0;
414
0
      int left = 0;
415
416
0
      k = 0;
417
0
      do {
418
0
        top |= a[k];
419
0
      } while (++k < txb_w_unit);
420
0
      top &= COEFF_CONTEXT_MASK;
421
0
      top = AOMMIN(top, 4);
422
423
0
      k = 0;
424
0
      do {
425
0
        left |= l[k];
426
0
      } while (++k < txb_h_unit);
427
0
      left &= COEFF_CONTEXT_MASK;
428
0
      left = AOMMIN(left, 4);
429
430
0
      txb_ctx->txb_skip_ctx = skip_contexts[top][left];
431
0
    }
432
95.7k
  } else {
433
95.7k
    const int ctx_base = get_entropy_context(tx_size, a, l);
434
95.7k
    const int ctx_offset = (num_pels_log2_lookup[plane_bsize] >
435
95.7k
                            num_pels_log2_lookup[txsize_to_bsize[tx_size]])
436
95.7k
                               ? 10
437
95.7k
                               : 7;
438
95.7k
    txb_ctx->txb_skip_ctx = ctx_base + ctx_offset;
439
95.7k
  }
440
100k
#undef MAX_TX_SIZE_UNIT
441
100k
}
Unexecuted instantiation: encode_strategy.c:get_txb_ctx
Unexecuted instantiation: global_motion.c:get_txb_ctx
Unexecuted instantiation: gop_structure.c:get_txb_ctx
Unexecuted instantiation: interp_search.c:get_txb_ctx
Unexecuted instantiation: motion_search_facade.c:get_txb_ctx
Unexecuted instantiation: partition_search.c:get_txb_ctx
Unexecuted instantiation: partition_strategy.c:get_txb_ctx
Unexecuted instantiation: nonrd_pickmode.c:get_txb_ctx
442
443
#endif  // AOM_AV1_COMMON_TXB_COMMON_H_