Coverage Report

Created: 2026-01-16 07:48

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libvpx/vp9/common/vp9_scan.h
Line
Count
Source
1
/*
2
 *  Copyright (c) 2013 The WebM project authors. All Rights Reserved.
3
 *
4
 *  Use of this source code is governed by a BSD-style license
5
 *  that can be found in the LICENSE file in the root of the source
6
 *  tree. An additional intellectual property rights grant can be found
7
 *  in the file PATENTS.  All contributing project authors may
8
 *  be found in the AUTHORS file in the root of the source tree.
9
 */
10
11
#ifndef VPX_VP9_COMMON_VP9_SCAN_H_
12
#define VPX_VP9_COMMON_VP9_SCAN_H_
13
14
#include "vpx/vpx_integer.h"
15
#include "vpx_ports/mem.h"
16
17
#include "vp9/common/vp9_enums.h"
18
#include "vp9/common/vp9_blockd.h"
19
20
#ifdef __cplusplus
21
extern "C" {
22
#endif
23
24
11.5G
#define MAX_NEIGHBORS 2
25
26
typedef struct ScanOrder {
27
  const int16_t *scan;
28
  const int16_t *iscan;
29
  const int16_t *neighbors;
30
} ScanOrder;
31
32
extern const ScanOrder vp9_default_scan_orders[TX_SIZES];
33
extern const ScanOrder vp9_scan_orders[TX_SIZES][TX_TYPES];
34
35
static INLINE int get_coef_context(const int16_t *neighbors,
36
5.76G
                                   const uint8_t *token_cache, int c) {
37
5.76G
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
5.76G
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
5.76G
         1;
40
5.76G
}
Unexecuted instantiation: vp9_decodeframe.c:get_coef_context
vp9_detokenize.c:get_coef_context
Line
Count
Source
36
151M
                                   const uint8_t *token_cache, int c) {
37
151M
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
151M
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
151M
         1;
40
151M
}
Unexecuted instantiation: vp9_decoder.c:get_coef_context
Unexecuted instantiation: vp9_scan.c:get_coef_context
Unexecuted instantiation: vp9_quantize.c:get_coef_context
vp9_tokenize.c:get_coef_context
Line
Count
Source
36
136M
                                   const uint8_t *token_cache, int c) {
37
136M
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
136M
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
136M
         1;
40
136M
}
Unexecuted instantiation: vp9_tpl_model.c:get_coef_context
Unexecuted instantiation: vp9_quantize_sse2.c:get_coef_context
Unexecuted instantiation: vp9_quantize_ssse3.c:get_coef_context
Unexecuted instantiation: vp9_quantize_avx2.c:get_coef_context
Unexecuted instantiation: quantize.c:get_coef_context
Unexecuted instantiation: quantize_sse2.c:get_coef_context
Unexecuted instantiation: quantize_ssse3.c:get_coef_context
Unexecuted instantiation: quantize_avx.c:get_coef_context
Unexecuted instantiation: quantize_avx2.c:get_coef_context
Unexecuted instantiation: highbd_quantize_intrin_sse2.c:get_coef_context
Unexecuted instantiation: highbd_quantize_intrin_avx2.c:get_coef_context
vp9_encodemb.c:get_coef_context
Line
Count
Source
36
1.18G
                                   const uint8_t *token_cache, int c) {
37
1.18G
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
1.18G
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
1.18G
         1;
40
1.18G
}
vp9_rdopt.c:get_coef_context
Line
Count
Source
36
4.28G
                                   const uint8_t *token_cache, int c) {
37
4.28G
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
4.28G
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
4.28G
         1;
40
4.28G
}
Unexecuted instantiation: vp9_pickmode.c:get_coef_context
41
42
static INLINE const ScanOrder *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
43
300M
                                        PLANE_TYPE type, int block_idx) {
44
300M
  const MODE_INFO *const mi = xd->mi[0];
45
46
300M
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
236M
    return &vp9_default_scan_orders[tx_size];
48
236M
  } else {
49
64.1M
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
64.1M
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
64.1M
  }
52
300M
}
Unexecuted instantiation: vp9_decodeframe.c:get_scan
Unexecuted instantiation: vp9_detokenize.c:get_scan
Unexecuted instantiation: vp9_decoder.c:get_scan
Unexecuted instantiation: vp9_scan.c:get_scan
Unexecuted instantiation: vp9_quantize.c:get_scan
vp9_tokenize.c:get_scan
Line
Count
Source
43
10.6M
                                        PLANE_TYPE type, int block_idx) {
44
10.6M
  const MODE_INFO *const mi = xd->mi[0];
45
46
10.6M
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
6.57M
    return &vp9_default_scan_orders[tx_size];
48
6.57M
  } else {
49
4.10M
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
4.10M
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
4.10M
  }
52
10.6M
}
Unexecuted instantiation: vp9_tpl_model.c:get_scan
Unexecuted instantiation: vp9_quantize_sse2.c:get_scan
Unexecuted instantiation: vp9_quantize_ssse3.c:get_scan
Unexecuted instantiation: vp9_quantize_avx2.c:get_scan
Unexecuted instantiation: quantize.c:get_scan
Unexecuted instantiation: quantize_sse2.c:get_scan
Unexecuted instantiation: quantize_ssse3.c:get_scan
Unexecuted instantiation: quantize_avx.c:get_scan
Unexecuted instantiation: quantize_avx2.c:get_scan
Unexecuted instantiation: highbd_quantize_intrin_sse2.c:get_scan
Unexecuted instantiation: highbd_quantize_intrin_avx2.c:get_scan
vp9_encodemb.c:get_scan
Line
Count
Source
43
30.7M
                                        PLANE_TYPE type, int block_idx) {
44
30.7M
  const MODE_INFO *const mi = xd->mi[0];
45
46
30.7M
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
24.8M
    return &vp9_default_scan_orders[tx_size];
48
24.8M
  } else {
49
5.94M
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
5.94M
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
5.94M
  }
52
30.7M
}
vp9_rdopt.c:get_scan
Line
Count
Source
43
258M
                                        PLANE_TYPE type, int block_idx) {
44
258M
  const MODE_INFO *const mi = xd->mi[0];
45
46
258M
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
204M
    return &vp9_default_scan_orders[tx_size];
48
204M
  } else {
49
54.1M
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
54.1M
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
54.1M
  }
52
258M
}
Unexecuted instantiation: vp9_pickmode.c:get_scan
53
54
#ifdef __cplusplus
55
}  // extern "C"
56
#endif
57
58
#endif  // VPX_VP9_COMMON_VP9_SCAN_H_