Coverage Report

Created: 2026-05-30 06:10

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/svt-av1/Source/Lib/Codec/coefficients.h
Line
Count
Source
1
/*
2
* Copyright(c) 2019 Intel Corporation
3
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
4
*
5
* This source code is subject to the terms of the BSD 2 Clause License and
6
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
7
* was not distributed with this source code in the LICENSE file, you can
8
* obtain it at https://www.aomedia.org/license/software-license. If the Alliance for Open
9
* Media Patent License 1.0 was not distributed with this source code in the
10
* PATENTS file, you can obtain it at https://www.aomedia.org/license/patent-license.
11
*/
12
13
#ifndef EbCoefficients_h
14
#define EbCoefficients_h
15
16
#include "definitions.h"
17
#include "coefficients.h"
18
#include "cabac_context_model.h"
19
20
#ifdef __cplusplus
21
extern "C" {
22
#endif
23
24
#define NZ_MAP_CTX_0 SIG_COEF_CONTEXTS_2D
25
#define NZ_MAP_CTX_5 (NZ_MAP_CTX_0 + 5)
26
#define NZ_MAP_CTX_10 (NZ_MAP_CTX_0 + 10)
27
28
static const int nz_map_ctx_offset_1d[32] = {
29
    NZ_MAP_CTX_0,  NZ_MAP_CTX_5,  NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
30
    NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
31
    NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
32
    NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
33
    NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10, NZ_MAP_CTX_10,
34
};
35
36
extern const ScanOrder eb_av1_scan_orders[TX_SIZES_ALL][3];
37
extern const int       tx_type_to_scan_index[TX_TYPES];
38
39
1.43M
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
40
1.43M
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
41
1.43M
}
Unexecuted instantiation: enc_handle.c:get_scan_order
Unexecuted instantiation: av1me.c:get_scan_order
Unexecuted instantiation: enc_cdef.c:get_scan_order
Unexecuted instantiation: enc_dec_process.c:get_scan_order
Unexecuted instantiation: enc_inter_prediction.c:get_scan_order
Unexecuted instantiation: enc_intra_prediction.c:get_scan_order
Unexecuted instantiation: enc_mode_config.c:get_scan_order
Unexecuted instantiation: entropy_coding.c:get_scan_order
full_loop.c:get_scan_order
Line
Count
Source
39
1.42M
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
40
1.42M
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
41
1.42M
}
Unexecuted instantiation: initial_rc_process.c:get_scan_order
Unexecuted instantiation: inv_transforms.c:get_scan_order
Unexecuted instantiation: md_rate_estimation.c:get_scan_order
Unexecuted instantiation: mode_decision.c:get_scan_order
Unexecuted instantiation: md_config_process.c:get_scan_order
Unexecuted instantiation: motion_estimation.c:get_scan_order
Unexecuted instantiation: pcs.c:get_scan_order
Unexecuted instantiation: product_coding_loop.c:get_scan_order
Unexecuted instantiation: rc_aq.c:get_scan_order
Unexecuted instantiation: rc_process.c:get_scan_order
rd_cost.c:get_scan_order
Line
Count
Source
39
12.4k
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
40
12.4k
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
41
12.4k
}
Unexecuted instantiation: resource_coordination_process.c:get_scan_order
Unexecuted instantiation: src_ops_process.c:get_scan_order
Unexecuted instantiation: transforms.c:get_scan_order
Unexecuted instantiation: encode_txb_ref_c.c:get_scan_order
Unexecuted instantiation: coding_loop.c:get_scan_order
Unexecuted instantiation: coefficients.c:get_scan_order
Unexecuted instantiation: deblocking_filter.c:get_scan_order
Unexecuted instantiation: firstpass.c:get_scan_order
Unexecuted instantiation: mcomp.c:get_scan_order
42
43
static const int32_t tx_size_2d[TX_SIZES_ALL + 1] = {
44
    16, 64, 256, 1024, 4096, 32, 32, 128, 128, 512, 512, 2048, 2048, 64, 64, 256, 256, 1024, 1024,
45
};
46
47
0
static inline int32_t av1_get_tx_scale(const TxSize tx_size) {
48
0
    const int32_t pels = tx_size_2d[tx_size];
49
0
    // Largest possible pels is 4096 (64x64).
50
0
    return (pels > 256) + (pels > 1024);
51
0
}
Unexecuted instantiation: enc_handle.c:av1_get_tx_scale
Unexecuted instantiation: av1me.c:av1_get_tx_scale
Unexecuted instantiation: enc_cdef.c:av1_get_tx_scale
Unexecuted instantiation: enc_dec_process.c:av1_get_tx_scale
Unexecuted instantiation: enc_inter_prediction.c:av1_get_tx_scale
Unexecuted instantiation: enc_intra_prediction.c:av1_get_tx_scale
Unexecuted instantiation: enc_mode_config.c:av1_get_tx_scale
Unexecuted instantiation: entropy_coding.c:av1_get_tx_scale
Unexecuted instantiation: full_loop.c:av1_get_tx_scale
Unexecuted instantiation: initial_rc_process.c:av1_get_tx_scale
Unexecuted instantiation: inv_transforms.c:av1_get_tx_scale
Unexecuted instantiation: md_rate_estimation.c:av1_get_tx_scale
Unexecuted instantiation: mode_decision.c:av1_get_tx_scale
Unexecuted instantiation: md_config_process.c:av1_get_tx_scale
Unexecuted instantiation: motion_estimation.c:av1_get_tx_scale
Unexecuted instantiation: pcs.c:av1_get_tx_scale
Unexecuted instantiation: product_coding_loop.c:av1_get_tx_scale
Unexecuted instantiation: rc_aq.c:av1_get_tx_scale
Unexecuted instantiation: rc_process.c:av1_get_tx_scale
Unexecuted instantiation: rd_cost.c:av1_get_tx_scale
Unexecuted instantiation: resource_coordination_process.c:av1_get_tx_scale
Unexecuted instantiation: src_ops_process.c:av1_get_tx_scale
Unexecuted instantiation: transforms.c:av1_get_tx_scale
Unexecuted instantiation: encode_txb_ref_c.c:av1_get_tx_scale
Unexecuted instantiation: coding_loop.c:av1_get_tx_scale
Unexecuted instantiation: coefficients.c:av1_get_tx_scale
Unexecuted instantiation: deblocking_filter.c:av1_get_tx_scale
Unexecuted instantiation: firstpass.c:av1_get_tx_scale
Unexecuted instantiation: mcomp.c:av1_get_tx_scale
52
53
extern const int8_t* eb_av1_nz_map_ctx_offset[19];
54
55
1.79k
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
56
1.79k
    if (scan_idx == 0) {
57
1.79k
        return 0;
58
1.79k
    }
59
0
    if (scan_idx <= (height << bwl) / 8) {
60
0
        return 1;
61
0
    }
62
0
    if (scan_idx <= (height << bwl) / 4) {
63
0
        return 2;
64
0
    }
65
0
    return 3;
66
0
}
Unexecuted instantiation: enc_handle.c:get_lower_levels_ctx_eob
Unexecuted instantiation: av1me.c:get_lower_levels_ctx_eob
Unexecuted instantiation: enc_cdef.c:get_lower_levels_ctx_eob
Unexecuted instantiation: enc_dec_process.c:get_lower_levels_ctx_eob
Unexecuted instantiation: enc_inter_prediction.c:get_lower_levels_ctx_eob
Unexecuted instantiation: enc_intra_prediction.c:get_lower_levels_ctx_eob
Unexecuted instantiation: enc_mode_config.c:get_lower_levels_ctx_eob
Unexecuted instantiation: entropy_coding.c:get_lower_levels_ctx_eob
full_loop.c:get_lower_levels_ctx_eob
Line
Count
Source
55
1.79k
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
56
1.79k
    if (scan_idx == 0) {
57
1.79k
        return 0;
58
1.79k
    }
59
0
    if (scan_idx <= (height << bwl) / 8) {
60
0
        return 1;
61
0
    }
62
0
    if (scan_idx <= (height << bwl) / 4) {
63
0
        return 2;
64
0
    }
65
0
    return 3;
66
0
}
Unexecuted instantiation: initial_rc_process.c:get_lower_levels_ctx_eob
Unexecuted instantiation: inv_transforms.c:get_lower_levels_ctx_eob
Unexecuted instantiation: md_rate_estimation.c:get_lower_levels_ctx_eob
Unexecuted instantiation: mode_decision.c:get_lower_levels_ctx_eob
Unexecuted instantiation: md_config_process.c:get_lower_levels_ctx_eob
Unexecuted instantiation: motion_estimation.c:get_lower_levels_ctx_eob
Unexecuted instantiation: pcs.c:get_lower_levels_ctx_eob
Unexecuted instantiation: product_coding_loop.c:get_lower_levels_ctx_eob
Unexecuted instantiation: rc_aq.c:get_lower_levels_ctx_eob
Unexecuted instantiation: rc_process.c:get_lower_levels_ctx_eob
Unexecuted instantiation: rd_cost.c:get_lower_levels_ctx_eob
Unexecuted instantiation: resource_coordination_process.c:get_lower_levels_ctx_eob
Unexecuted instantiation: src_ops_process.c:get_lower_levels_ctx_eob
Unexecuted instantiation: transforms.c:get_lower_levels_ctx_eob
Unexecuted instantiation: encode_txb_ref_c.c:get_lower_levels_ctx_eob
Unexecuted instantiation: coding_loop.c:get_lower_levels_ctx_eob
Unexecuted instantiation: coefficients.c:get_lower_levels_ctx_eob
Unexecuted instantiation: deblocking_filter.c:get_lower_levels_ctx_eob
67
68
static AOM_FORCE_INLINE int get_br_ctx_eob(const int c, // raster order
69
19.6k
                                           const int bwl, const TxClass tx_class) {
70
19.6k
    const int row = c >> bwl;
71
19.6k
    const int col = c - (row << bwl);
72
19.6k
    if (c == 0) {
73
19.6k
        return 0;
74
19.6k
    }
75
0
    if ((tx_class == TX_CLASS_2D && row < 2 && col < 2) || (tx_class == TX_CLASS_HORIZ && col == 0) ||
76
0
        (tx_class == TX_CLASS_VERT && row == 0)) {
77
0
        return 7;
78
0
    }
79
0
    return 14;
80
0
}
Unexecuted instantiation: enc_handle.c:get_br_ctx_eob
Unexecuted instantiation: av1me.c:get_br_ctx_eob
Unexecuted instantiation: enc_cdef.c:get_br_ctx_eob
Unexecuted instantiation: enc_dec_process.c:get_br_ctx_eob
Unexecuted instantiation: enc_inter_prediction.c:get_br_ctx_eob
Unexecuted instantiation: enc_intra_prediction.c:get_br_ctx_eob
Unexecuted instantiation: enc_mode_config.c:get_br_ctx_eob
Unexecuted instantiation: entropy_coding.c:get_br_ctx_eob
full_loop.c:get_br_ctx_eob
Line
Count
Source
69
19.6k
                                           const int bwl, const TxClass tx_class) {
70
19.6k
    const int row = c >> bwl;
71
19.6k
    const int col = c - (row << bwl);
72
19.6k
    if (c == 0) {
73
19.6k
        return 0;
74
19.6k
    }
75
0
    if ((tx_class == TX_CLASS_2D && row < 2 && col < 2) || (tx_class == TX_CLASS_HORIZ && col == 0) ||
76
0
        (tx_class == TX_CLASS_VERT && row == 0)) {
77
0
        return 7;
78
0
    }
79
0
    return 14;
80
0
}
Unexecuted instantiation: initial_rc_process.c:get_br_ctx_eob
Unexecuted instantiation: inv_transforms.c:get_br_ctx_eob
Unexecuted instantiation: md_rate_estimation.c:get_br_ctx_eob
Unexecuted instantiation: mode_decision.c:get_br_ctx_eob
Unexecuted instantiation: md_config_process.c:get_br_ctx_eob
Unexecuted instantiation: motion_estimation.c:get_br_ctx_eob
Unexecuted instantiation: pcs.c:get_br_ctx_eob
Unexecuted instantiation: product_coding_loop.c:get_br_ctx_eob
Unexecuted instantiation: rc_aq.c:get_br_ctx_eob
Unexecuted instantiation: rc_process.c:get_br_ctx_eob
Unexecuted instantiation: rd_cost.c:get_br_ctx_eob
Unexecuted instantiation: resource_coordination_process.c:get_br_ctx_eob
Unexecuted instantiation: src_ops_process.c:get_br_ctx_eob
Unexecuted instantiation: transforms.c:get_br_ctx_eob
Unexecuted instantiation: encode_txb_ref_c.c:get_br_ctx_eob
Unexecuted instantiation: coding_loop.c:get_br_ctx_eob
Unexecuted instantiation: coefficients.c:get_br_ctx_eob
Unexecuted instantiation: deblocking_filter.c:get_br_ctx_eob
81
82
static AOM_FORCE_INLINE int get_br_ctx(const uint8_t* const levels,
83
                                       const int            c, // raster order
84
0
                                       const int bwl, const TxClass tx_class) {
85
0
    const int row    = c >> bwl;
86
0
    const int col    = c - (row << bwl);
87
0
    const int stride = (1 << bwl) + TX_PAD_HOR;
88
0
    const int pos    = row * stride + col;
89
0
    int       mag    = levels[pos + 1];
90
0
    mag += levels[pos + stride];
91
0
    switch (tx_class) {
92
0
    case TX_CLASS_2D:
93
0
        mag += levels[pos + stride + 1];
94
0
        mag = AOMMIN((mag + 1) >> 1, 6);
95
0
        if (c == 0) {
96
0
            return mag;
97
0
        }
98
0
        if ((row < 2) && (col < 2)) {
99
0
            return mag + 7;
100
0
        }
101
0
        break;
102
0
    case TX_CLASS_HORIZ:
103
0
        mag += levels[pos + 2];
104
0
        mag = AOMMIN((mag + 1) >> 1, 6);
105
0
        if (c == 0) {
106
0
            return mag;
107
0
        }
108
0
        if (col == 0) {
109
0
            return mag + 7;
110
0
        }
111
0
        break;
112
0
    case TX_CLASS_VERT:
113
0
        mag += levels[pos + (stride << 1)];
114
0
        mag = AOMMIN((mag + 1) >> 1, 6);
115
0
        if (c == 0) {
116
0
            return mag;
117
0
        }
118
0
        if (row == 0) {
119
0
            return mag + 7;
120
0
        }
121
0
        break;
122
0
    default:
123
0
        break;
124
0
    }
125
0
    return mag + 14;
126
0
}
Unexecuted instantiation: enc_handle.c:get_br_ctx
Unexecuted instantiation: av1me.c:get_br_ctx
Unexecuted instantiation: enc_cdef.c:get_br_ctx
Unexecuted instantiation: enc_dec_process.c:get_br_ctx
Unexecuted instantiation: enc_inter_prediction.c:get_br_ctx
Unexecuted instantiation: enc_intra_prediction.c:get_br_ctx
Unexecuted instantiation: enc_mode_config.c:get_br_ctx
Unexecuted instantiation: entropy_coding.c:get_br_ctx
Unexecuted instantiation: full_loop.c:get_br_ctx
Unexecuted instantiation: initial_rc_process.c:get_br_ctx
Unexecuted instantiation: inv_transforms.c:get_br_ctx
Unexecuted instantiation: md_rate_estimation.c:get_br_ctx
Unexecuted instantiation: mode_decision.c:get_br_ctx
Unexecuted instantiation: md_config_process.c:get_br_ctx
Unexecuted instantiation: motion_estimation.c:get_br_ctx
Unexecuted instantiation: pcs.c:get_br_ctx
Unexecuted instantiation: product_coding_loop.c:get_br_ctx
Unexecuted instantiation: rc_aq.c:get_br_ctx
Unexecuted instantiation: rc_process.c:get_br_ctx
Unexecuted instantiation: rd_cost.c:get_br_ctx
Unexecuted instantiation: resource_coordination_process.c:get_br_ctx
Unexecuted instantiation: src_ops_process.c:get_br_ctx
Unexecuted instantiation: transforms.c:get_br_ctx
Unexecuted instantiation: encode_txb_ref_c.c:get_br_ctx
Unexecuted instantiation: coding_loop.c:get_br_ctx
Unexecuted instantiation: coefficients.c:get_br_ctx
Unexecuted instantiation: deblocking_filter.c:get_br_ctx
127
128
46
static INLINE int get_padded_idx(const int idx, const int bwl) {
129
46
    return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
130
46
}
Unexecuted instantiation: enc_handle.c:get_padded_idx
Unexecuted instantiation: av1me.c:get_padded_idx
Unexecuted instantiation: enc_cdef.c:get_padded_idx
Unexecuted instantiation: enc_dec_process.c:get_padded_idx
Unexecuted instantiation: enc_inter_prediction.c:get_padded_idx
Unexecuted instantiation: enc_intra_prediction.c:get_padded_idx
Unexecuted instantiation: enc_mode_config.c:get_padded_idx
Unexecuted instantiation: entropy_coding.c:get_padded_idx
full_loop.c:get_padded_idx
Line
Count
Source
128
46
static INLINE int get_padded_idx(const int idx, const int bwl) {
129
46
    return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
130
46
}
Unexecuted instantiation: initial_rc_process.c:get_padded_idx
Unexecuted instantiation: inv_transforms.c:get_padded_idx
Unexecuted instantiation: md_rate_estimation.c:get_padded_idx
Unexecuted instantiation: mode_decision.c:get_padded_idx
Unexecuted instantiation: md_config_process.c:get_padded_idx
Unexecuted instantiation: motion_estimation.c:get_padded_idx
Unexecuted instantiation: pcs.c:get_padded_idx
Unexecuted instantiation: product_coding_loop.c:get_padded_idx
Unexecuted instantiation: rc_aq.c:get_padded_idx
Unexecuted instantiation: rc_process.c:get_padded_idx
Unexecuted instantiation: rd_cost.c:get_padded_idx
Unexecuted instantiation: resource_coordination_process.c:get_padded_idx
Unexecuted instantiation: src_ops_process.c:get_padded_idx
Unexecuted instantiation: transforms.c:get_padded_idx
Unexecuted instantiation: encode_txb_ref_c.c:get_padded_idx
Unexecuted instantiation: coding_loop.c:get_padded_idx
Unexecuted instantiation: coefficients.c:get_padded_idx
Unexecuted instantiation: deblocking_filter.c:get_padded_idx
131
132
0
static AOM_FORCE_INLINE int get_nz_mag(const uint8_t* const levels, const int bwl, const TxClass tx_class) {
133
0
    int mag;
134
0
#define CLIP_MAX3(x) ((x > 3) ? 3 : x)
135
    // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
136
0
    mag = CLIP_MAX3(levels[1]); // { 0, 1 }
137
0
    mag += CLIP_MAX3(levels[(1 << bwl) + TX_PAD_HOR]); // { 1, 0 }
138
139
0
    if (tx_class == TX_CLASS_2D) {
140
0
        mag += CLIP_MAX3(levels[(1 << bwl) + TX_PAD_HOR + 1]); // { 1, 1 }
141
0
        mag += CLIP_MAX3(levels[2]); // { 0, 2 }
142
0
        mag += CLIP_MAX3(levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]); // { 2, 0 }
143
0
    } else if (tx_class == TX_CLASS_VERT) {
144
0
        mag += CLIP_MAX3(levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]); // { 2, 0 }
145
0
        mag += CLIP_MAX3(levels[(3 << bwl) + (3 << TX_PAD_HOR_LOG2)]); // { 3, 0 }
146
0
        mag += CLIP_MAX3(levels[(4 << bwl) + (4 << TX_PAD_HOR_LOG2)]); // { 4, 0 }
147
0
    } else {
148
0
        mag += CLIP_MAX3(levels[2]); // { 0, 2 }
149
0
        mag += CLIP_MAX3(levels[3]); // { 0, 3 }
150
0
        mag += CLIP_MAX3(levels[4]); // { 0, 4 }
151
0
    }
152
0
#undef CLIP_MAX3
153
0
    return mag;
154
0
}
Unexecuted instantiation: enc_handle.c:get_nz_mag
Unexecuted instantiation: av1me.c:get_nz_mag
Unexecuted instantiation: enc_cdef.c:get_nz_mag
Unexecuted instantiation: enc_dec_process.c:get_nz_mag
Unexecuted instantiation: enc_inter_prediction.c:get_nz_mag
Unexecuted instantiation: enc_intra_prediction.c:get_nz_mag
Unexecuted instantiation: enc_mode_config.c:get_nz_mag
Unexecuted instantiation: entropy_coding.c:get_nz_mag
Unexecuted instantiation: full_loop.c:get_nz_mag
Unexecuted instantiation: initial_rc_process.c:get_nz_mag
Unexecuted instantiation: inv_transforms.c:get_nz_mag
Unexecuted instantiation: md_rate_estimation.c:get_nz_mag
Unexecuted instantiation: mode_decision.c:get_nz_mag
Unexecuted instantiation: md_config_process.c:get_nz_mag
Unexecuted instantiation: motion_estimation.c:get_nz_mag
Unexecuted instantiation: pcs.c:get_nz_mag
Unexecuted instantiation: product_coding_loop.c:get_nz_mag
Unexecuted instantiation: rc_aq.c:get_nz_mag
Unexecuted instantiation: rc_process.c:get_nz_mag
Unexecuted instantiation: rd_cost.c:get_nz_mag
Unexecuted instantiation: resource_coordination_process.c:get_nz_mag
Unexecuted instantiation: src_ops_process.c:get_nz_mag
Unexecuted instantiation: transforms.c:get_nz_mag
Unexecuted instantiation: encode_txb_ref_c.c:get_nz_mag
Unexecuted instantiation: coding_loop.c:get_nz_mag
Unexecuted instantiation: coefficients.c:get_nz_mag
Unexecuted instantiation: deblocking_filter.c:get_nz_mag
155
156
static AOM_FORCE_INLINE int get_nz_map_ctx_from_stats(const int stats,
157
                                                      const int coeff_idx, // raster order
158
0
                                                      const int bwl, const TxSize tx_size, const TxClass tx_class) {
159
    // tx_class == 0(TX_CLASS_2D)
160
0
    if ((tx_class | coeff_idx) == 0) {
161
0
        return 0;
162
0
    }
163
0
    int ctx = (stats + 1) >> 1;
164
0
    ctx     = AOMMIN(ctx, 4);
165
0
    switch (tx_class) {
166
0
    case TX_CLASS_2D: {
167
        // This is the algorithm to generate eb_av1_nz_map_ctx_offset[][]
168
        //   const int width = tx_size_wide[tx_size];
169
        //   const int height = tx_size_high[tx_size];
170
        //   if (width < height) {
171
        //     if (row < 2) return 11 + ctx;
172
        //   } else if (width > height) {
173
        //     if (col < 2) return 16 + ctx;
174
        //   }
175
        //   if (row + col < 2) return ctx + 1;
176
        //   if (row + col < 4) return 5 + ctx + 1;
177
        //   return 21 + ctx;
178
0
        return ctx + eb_av1_nz_map_ctx_offset[tx_size][coeff_idx];
179
0
    }
180
0
    case TX_CLASS_HORIZ: {
181
0
        const int row = coeff_idx >> bwl;
182
0
        const int col = coeff_idx - (row << bwl);
183
0
        return ctx + nz_map_ctx_offset_1d[col];
184
0
    }
185
0
    case TX_CLASS_VERT: {
186
0
        const int row = coeff_idx >> bwl;
187
0
        return ctx + nz_map_ctx_offset_1d[row];
188
0
    }
189
0
    default:
190
0
        break;
191
0
    }
192
0
    return 0;
193
0
}
Unexecuted instantiation: enc_handle.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: av1me.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: enc_cdef.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: enc_dec_process.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: enc_inter_prediction.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: enc_intra_prediction.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: enc_mode_config.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: entropy_coding.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: full_loop.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: initial_rc_process.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: inv_transforms.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: md_rate_estimation.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: mode_decision.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: md_config_process.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: motion_estimation.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: pcs.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: product_coding_loop.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: rc_aq.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: rc_process.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: rd_cost.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: resource_coordination_process.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: src_ops_process.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: transforms.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: encode_txb_ref_c.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: coding_loop.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: coefficients.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: deblocking_filter.c:get_nz_map_ctx_from_stats
194
195
static AOM_FORCE_INLINE int get_lower_levels_ctx(const uint8_t* levels, int coeff_idx, int bwl, TxSize tx_size,
196
0
                                                 TxClass tx_class) {
197
0
    const int stats = get_nz_mag(levels + get_padded_idx(coeff_idx, bwl), bwl, tx_class);
198
0
    return get_nz_map_ctx_from_stats(stats, coeff_idx, bwl, tx_size, tx_class);
199
0
}
Unexecuted instantiation: enc_handle.c:get_lower_levels_ctx
Unexecuted instantiation: av1me.c:get_lower_levels_ctx
Unexecuted instantiation: enc_cdef.c:get_lower_levels_ctx
Unexecuted instantiation: enc_dec_process.c:get_lower_levels_ctx
Unexecuted instantiation: enc_inter_prediction.c:get_lower_levels_ctx
Unexecuted instantiation: enc_intra_prediction.c:get_lower_levels_ctx
Unexecuted instantiation: enc_mode_config.c:get_lower_levels_ctx
Unexecuted instantiation: entropy_coding.c:get_lower_levels_ctx
Unexecuted instantiation: full_loop.c:get_lower_levels_ctx
Unexecuted instantiation: initial_rc_process.c:get_lower_levels_ctx
Unexecuted instantiation: inv_transforms.c:get_lower_levels_ctx
Unexecuted instantiation: md_rate_estimation.c:get_lower_levels_ctx
Unexecuted instantiation: mode_decision.c:get_lower_levels_ctx
Unexecuted instantiation: md_config_process.c:get_lower_levels_ctx
Unexecuted instantiation: motion_estimation.c:get_lower_levels_ctx
Unexecuted instantiation: pcs.c:get_lower_levels_ctx
Unexecuted instantiation: product_coding_loop.c:get_lower_levels_ctx
Unexecuted instantiation: rc_aq.c:get_lower_levels_ctx
Unexecuted instantiation: rc_process.c:get_lower_levels_ctx
Unexecuted instantiation: rd_cost.c:get_lower_levels_ctx
Unexecuted instantiation: resource_coordination_process.c:get_lower_levels_ctx
Unexecuted instantiation: src_ops_process.c:get_lower_levels_ctx
Unexecuted instantiation: transforms.c:get_lower_levels_ctx
Unexecuted instantiation: encode_txb_ref_c.c:get_lower_levels_ctx
Unexecuted instantiation: coding_loop.c:get_lower_levels_ctx
Unexecuted instantiation: coefficients.c:get_lower_levels_ctx
Unexecuted instantiation: deblocking_filter.c:get_lower_levels_ctx
200
201
#ifdef __cplusplus
202
}
203
#endif
204
205
#endif // EbCoefficients_h