Coverage Report

Created: 2026-07-30 06:27

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 ScanOrder eb_av1_scan_orders[TX_SIZES_ALL][3];
37
void             svt_aom_init_iscan(void);
38
extern const int tx_type_to_scan_index[TX_TYPES];
39
40
989k
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
41
989k
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
42
989k
}
Unexecuted instantiation: enc_handle.c:get_scan_order
Unexecuted instantiation: av1me.c:get_scan_order
Unexecuted instantiation: coefficients.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
40
989k
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
41
989k
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
42
989k
}
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
Unexecuted instantiation: rd_cost.c:get_scan_order
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: deblocking_filter.c:get_scan_order
Unexecuted instantiation: firstpass.c:get_scan_order
Unexecuted instantiation: mcomp.c:get_scan_order
43
44
static const int32_t tx_size_2d[TX_SIZES_ALL + 1] = {
45
    16, 64, 256, 1024, 4096, 32, 32, 128, 128, 512, 512, 2048, 2048, 64, 64, 256, 256, 1024, 1024,
46
};
47
48
0
static inline int32_t av1_get_tx_scale(const TxSize tx_size) {
49
0
    const int32_t pels = tx_size_2d[tx_size];
50
0
    // Largest possible pels is 4096 (64x64).
51
0
    return (pels > 256) + (pels > 1024);
52
0
}
Unexecuted instantiation: enc_handle.c:av1_get_tx_scale
Unexecuted instantiation: av1me.c:av1_get_tx_scale
Unexecuted instantiation: coefficients.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: deblocking_filter.c:av1_get_tx_scale
Unexecuted instantiation: firstpass.c:av1_get_tx_scale
Unexecuted instantiation: mcomp.c:av1_get_tx_scale
53
54
extern const int8_t* eb_av1_nz_map_ctx_offset[19];
55
56
1.72k
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
57
1.72k
    if (scan_idx == 0) {
58
1.72k
        return 0;
59
1.72k
    }
60
0
    if (scan_idx <= (height << bwl) / 8) {
61
0
        return 1;
62
0
    }
63
0
    if (scan_idx <= (height << bwl) / 4) {
64
0
        return 2;
65
0
    }
66
0
    return 3;
67
0
}
Unexecuted instantiation: enc_handle.c:get_lower_levels_ctx_eob
Unexecuted instantiation: av1me.c:get_lower_levels_ctx_eob
Unexecuted instantiation: coefficients.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
56
1.72k
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
57
1.72k
    if (scan_idx == 0) {
58
1.72k
        return 0;
59
1.72k
    }
60
0
    if (scan_idx <= (height << bwl) / 8) {
61
0
        return 1;
62
0
    }
63
0
    if (scan_idx <= (height << bwl) / 4) {
64
0
        return 2;
65
0
    }
66
0
    return 3;
67
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: deblocking_filter.c:get_lower_levels_ctx_eob
68
69
static AOM_FORCE_INLINE int get_br_ctx_eob(const int c, // raster order
70
18.3k
                                           const int bwl, const TxClass tx_class) {
71
18.3k
    const int row = c >> bwl;
72
18.3k
    const int col = c - (row << bwl);
73
18.3k
    if (c == 0) {
74
18.3k
        return 0;
75
18.3k
    }
76
0
    if ((tx_class == TX_CLASS_2D && row < 2 && col < 2) || (tx_class == TX_CLASS_HORIZ && col == 0) ||
77
0
        (tx_class == TX_CLASS_VERT && row == 0)) {
78
0
        return 7;
79
0
    }
80
0
    return 14;
81
0
}
Unexecuted instantiation: enc_handle.c:get_br_ctx_eob
Unexecuted instantiation: av1me.c:get_br_ctx_eob
Unexecuted instantiation: coefficients.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
70
18.3k
                                           const int bwl, const TxClass tx_class) {
71
18.3k
    const int row = c >> bwl;
72
18.3k
    const int col = c - (row << bwl);
73
18.3k
    if (c == 0) {
74
18.3k
        return 0;
75
18.3k
    }
76
0
    if ((tx_class == TX_CLASS_2D && row < 2 && col < 2) || (tx_class == TX_CLASS_HORIZ && col == 0) ||
77
0
        (tx_class == TX_CLASS_VERT && row == 0)) {
78
0
        return 7;
79
0
    }
80
0
    return 14;
81
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: deblocking_filter.c:get_br_ctx_eob
82
83
static AOM_FORCE_INLINE int get_br_ctx(const uint8_t* const levels,
84
                                       const int            c, // raster order
85
0
                                       const int bwl, const TxClass tx_class) {
86
0
    const int row    = c >> bwl;
87
0
    const int col    = c - (row << bwl);
88
0
    const int stride = (1 << bwl) + TX_PAD_HOR;
89
0
    const int pos    = row * stride + col;
90
0
    int       mag    = levels[pos + 1];
91
0
    mag += levels[pos + stride];
92
0
    switch (tx_class) {
93
0
    case TX_CLASS_2D:
94
0
        mag += levels[pos + stride + 1];
95
0
        mag = AOMMIN((mag + 1) >> 1, 6);
96
0
        if (c == 0) {
97
0
            return mag;
98
0
        }
99
0
        if ((row < 2) && (col < 2)) {
100
0
            return mag + 7;
101
0
        }
102
0
        break;
103
0
    case TX_CLASS_HORIZ:
104
0
        mag += levels[pos + 2];
105
0
        mag = AOMMIN((mag + 1) >> 1, 6);
106
0
        if (c == 0) {
107
0
            return mag;
108
0
        }
109
0
        if (col == 0) {
110
0
            return mag + 7;
111
0
        }
112
0
        break;
113
0
    case TX_CLASS_VERT:
114
0
        mag += levels[pos + (stride << 1)];
115
0
        mag = AOMMIN((mag + 1) >> 1, 6);
116
0
        if (c == 0) {
117
0
            return mag;
118
0
        }
119
0
        if (row == 0) {
120
0
            return mag + 7;
121
0
        }
122
0
        break;
123
0
    default:
124
0
        break;
125
0
    }
126
0
    return mag + 14;
127
0
}
Unexecuted instantiation: enc_handle.c:get_br_ctx
Unexecuted instantiation: av1me.c:get_br_ctx
Unexecuted instantiation: coefficients.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: deblocking_filter.c:get_br_ctx
128
129
64
static INLINE int get_padded_idx(const int idx, const int bwl) {
130
64
    return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
131
64
}
Unexecuted instantiation: enc_handle.c:get_padded_idx
Unexecuted instantiation: av1me.c:get_padded_idx
Unexecuted instantiation: coefficients.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
129
64
static INLINE int get_padded_idx(const int idx, const int bwl) {
130
64
    return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
131
64
}
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: deblocking_filter.c:get_padded_idx
132
133
0
static AOM_FORCE_INLINE int get_nz_mag(const uint8_t* const levels, const int bwl, const TxClass tx_class) {
134
0
    int mag;
135
0
#define CLIP_MAX3(x) ((x > 3) ? 3 : x)
136
    // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
137
0
    mag = CLIP_MAX3(levels[1]); // { 0, 1 }
138
0
    mag += CLIP_MAX3(levels[(1 << bwl) + TX_PAD_HOR]); // { 1, 0 }
139
140
0
    if (tx_class == TX_CLASS_2D) {
141
0
        mag += CLIP_MAX3(levels[(1 << bwl) + TX_PAD_HOR + 1]); // { 1, 1 }
142
0
        mag += CLIP_MAX3(levels[2]); // { 0, 2 }
143
0
        mag += CLIP_MAX3(levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]); // { 2, 0 }
144
0
    } else if (tx_class == TX_CLASS_VERT) {
145
0
        mag += CLIP_MAX3(levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]); // { 2, 0 }
146
0
        mag += CLIP_MAX3(levels[(3 << bwl) + (3 << TX_PAD_HOR_LOG2)]); // { 3, 0 }
147
0
        mag += CLIP_MAX3(levels[(4 << bwl) + (4 << TX_PAD_HOR_LOG2)]); // { 4, 0 }
148
0
    } else {
149
0
        mag += CLIP_MAX3(levels[2]); // { 0, 2 }
150
0
        mag += CLIP_MAX3(levels[3]); // { 0, 3 }
151
0
        mag += CLIP_MAX3(levels[4]); // { 0, 4 }
152
0
    }
153
0
#undef CLIP_MAX3
154
0
    return mag;
155
0
}
Unexecuted instantiation: enc_handle.c:get_nz_mag
Unexecuted instantiation: av1me.c:get_nz_mag
Unexecuted instantiation: coefficients.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: deblocking_filter.c:get_nz_mag
156
157
static AOM_FORCE_INLINE int get_nz_map_ctx_from_stats(const int stats,
158
                                                      const int coeff_idx, // raster order
159
0
                                                      const int bwl, const TxSize tx_size, const TxClass tx_class) {
160
    // tx_class == 0(TX_CLASS_2D)
161
0
    if ((tx_class | coeff_idx) == 0) {
162
0
        return 0;
163
0
    }
164
0
    int ctx = (stats + 1) >> 1;
165
0
    ctx     = AOMMIN(ctx, 4);
166
0
    switch (tx_class) {
167
0
    case TX_CLASS_2D: {
168
        // This is the algorithm to generate eb_av1_nz_map_ctx_offset[][]
169
        //   const int width = tx_size_wide[tx_size];
170
        //   const int height = tx_size_high[tx_size];
171
        //   if (width < height) {
172
        //     if (row < 2) return 11 + ctx;
173
        //   } else if (width > height) {
174
        //     if (col < 2) return 16 + ctx;
175
        //   }
176
        //   if (row + col < 2) return ctx + 1;
177
        //   if (row + col < 4) return 5 + ctx + 1;
178
        //   return 21 + ctx;
179
0
        return ctx + eb_av1_nz_map_ctx_offset[tx_size][coeff_idx];
180
0
    }
181
0
    case TX_CLASS_HORIZ: {
182
0
        const int row = coeff_idx >> bwl;
183
0
        const int col = coeff_idx - (row << bwl);
184
0
        return ctx + nz_map_ctx_offset_1d[col];
185
0
    }
186
0
    case TX_CLASS_VERT: {
187
0
        const int row = coeff_idx >> bwl;
188
0
        return ctx + nz_map_ctx_offset_1d[row];
189
0
    }
190
0
    default:
191
0
        break;
192
0
    }
193
0
    return 0;
194
0
}
Unexecuted instantiation: enc_handle.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: av1me.c:get_nz_map_ctx_from_stats
Unexecuted instantiation: coefficients.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: deblocking_filter.c:get_nz_map_ctx_from_stats
195
196
static AOM_FORCE_INLINE int get_lower_levels_ctx(const uint8_t* levels, int coeff_idx, int bwl, TxSize tx_size,
197
0
                                                 TxClass tx_class) {
198
0
    const int stats = get_nz_mag(levels + get_padded_idx(coeff_idx, bwl), bwl, tx_class);
199
0
    return get_nz_map_ctx_from_stats(stats, coeff_idx, bwl, tx_size, tx_class);
200
0
}
Unexecuted instantiation: enc_handle.c:get_lower_levels_ctx
Unexecuted instantiation: av1me.c:get_lower_levels_ctx
Unexecuted instantiation: coefficients.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: deblocking_filter.c:get_lower_levels_ctx
201
202
#ifdef __cplusplus
203
}
204
#endif
205
206
#endif // EbCoefficients_h