Coverage Report

Created: 2026-05-16 06:41

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.27M
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
40
1.27M
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
41
1.27M
}
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
entropy_coding.c:get_scan_order
Line
Count
Source
39
23.8k
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
40
23.8k
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
41
23.8k
}
full_loop.c:get_scan_order
Line
Count
Source
39
1.23M
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
40
1.23M
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
41
1.23M
}
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
10.9k
static inline const ScanOrder* get_scan_order(const int tx_size, const int tx_type) {
40
10.9k
    return &eb_av1_scan_orders[tx_size][tx_type_to_scan_index[tx_type]];
41
10.9k
}
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.57k
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
56
1.57k
    if (scan_idx == 0) {
57
1.57k
        return 0;
58
1.57k
    }
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.57k
static INLINE int get_lower_levels_ctx_eob(int bwl, int height, int scan_idx) {
56
1.57k
    if (scan_idx == 0) {
57
1.57k
        return 0;
58
1.57k
    }
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
17.4k
                                           const int bwl, const TxClass tx_class) {
70
17.4k
    const int row = c >> bwl;
71
17.4k
    const int col = c - (row << bwl);
72
17.4k
    if (c == 0) {
73
17.4k
        return 0;
74
17.4k
    }
75
1
    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
1
    return 14;
80
1
}
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
17.4k
                                           const int bwl, const TxClass tx_class) {
70
17.4k
    const int row = c >> bwl;
71
17.4k
    const int col = c - (row << bwl);
72
17.4k
    if (c == 0) {
73
17.4k
        return 0;
74
17.4k
    }
75
1
    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
1
    return 14;
80
1
}
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
static const uint8_t clip_max3[256] = {
129
    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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
130
    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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
131
    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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
132
    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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
133
    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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
134
    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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
135
    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, 3, 3, 3, 3, 3, 3, 3, 3};
136
137
80
static INLINE int get_padded_idx(const int idx, const int bwl) {
138
80
    return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
139
80
}
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
137
80
static INLINE int get_padded_idx(const int idx, const int bwl) {
138
80
    return idx + ((idx >> bwl) << TX_PAD_HOR_LOG2);
139
80
}
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
140
141
0
static AOM_FORCE_INLINE int get_nz_mag(const uint8_t* const levels, const int bwl, const TxClass tx_class) {
142
0
    int mag;
143
144
    // Note: AOMMIN(level, 3) is useless for decoder since level < 3.
145
0
    mag = clip_max3[levels[1]]; // { 0, 1 }
146
0
    mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR]]; // { 1, 0 }
147
148
0
    if (tx_class == TX_CLASS_2D) {
149
0
        mag += clip_max3[levels[(1 << bwl) + TX_PAD_HOR + 1]]; // { 1, 1 }
150
0
        mag += clip_max3[levels[2]]; // { 0, 2 }
151
0
        mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]]; // { 2, 0 }
152
0
    } else if (tx_class == TX_CLASS_VERT) {
153
0
        mag += clip_max3[levels[(2 << bwl) + (2 << TX_PAD_HOR_LOG2)]]; // { 2, 0 }
154
0
        mag += clip_max3[levels[(3 << bwl) + (3 << TX_PAD_HOR_LOG2)]]; // { 3, 0 }
155
0
        mag += clip_max3[levels[(4 << bwl) + (4 << TX_PAD_HOR_LOG2)]]; // { 4, 0 }
156
0
    } else {
157
0
        mag += clip_max3[levels[2]]; // { 0, 2 }
158
0
        mag += clip_max3[levels[3]]; // { 0, 3 }
159
0
        mag += clip_max3[levels[4]]; // { 0, 4 }
160
0
    }
161
162
0
    return mag;
163
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
164
165
static AOM_FORCE_INLINE int get_nz_map_ctx_from_stats(const int stats,
166
                                                      const int coeff_idx, // raster order
167
0
                                                      const int bwl, const TxSize tx_size, const TxClass tx_class) {
168
    // tx_class == 0(TX_CLASS_2D)
169
0
    if ((tx_class | coeff_idx) == 0) {
170
0
        return 0;
171
0
    }
172
0
    int ctx = (stats + 1) >> 1;
173
0
    ctx     = AOMMIN(ctx, 4);
174
0
    switch (tx_class) {
175
0
    case TX_CLASS_2D: {
176
        // This is the algorithm to generate eb_av1_nz_map_ctx_offset[][]
177
        //   const int width = tx_size_wide[tx_size];
178
        //   const int height = tx_size_high[tx_size];
179
        //   if (width < height) {
180
        //     if (row < 2) return 11 + ctx;
181
        //   } else if (width > height) {
182
        //     if (col < 2) return 16 + ctx;
183
        //   }
184
        //   if (row + col < 2) return ctx + 1;
185
        //   if (row + col < 4) return 5 + ctx + 1;
186
        //   return 21 + ctx;
187
0
        return ctx + eb_av1_nz_map_ctx_offset[tx_size][coeff_idx];
188
0
    }
189
0
    case TX_CLASS_HORIZ: {
190
0
        const int row = coeff_idx >> bwl;
191
0
        const int col = coeff_idx - (row << bwl);
192
0
        return ctx + nz_map_ctx_offset_1d[col];
193
0
    }
194
0
    case TX_CLASS_VERT: {
195
0
        const int row = coeff_idx >> bwl;
196
0
        return ctx + nz_map_ctx_offset_1d[row];
197
0
    }
198
0
    default:
199
0
        break;
200
0
    }
201
0
    return 0;
202
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
203
204
static AOM_FORCE_INLINE int get_lower_levels_ctx(const uint8_t* levels, int coeff_idx, int bwl, TxSize tx_size,
205
0
                                                 TxClass tx_class) {
206
0
    const int stats = get_nz_mag(levels + get_padded_idx(coeff_idx, bwl), bwl, tx_class);
207
0
    return get_nz_map_ctx_from_stats(stats, coeff_idx, bwl, tx_size, tx_class);
208
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
209
210
#ifdef __cplusplus
211
}
212
#endif
213
214
#endif // EbCoefficients_h