Coverage Report

Created: 2025-07-18 06:30

/src/libvpx/vp9/common/vp9_scan.h
Line
Count
Source (jump to first uncovered line)
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
143M
#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
71.7M
                                   const uint8_t *token_cache, int c) {
37
71.7M
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
71.7M
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
71.7M
         1;
40
71.7M
}
Unexecuted instantiation: vp9_decodeframe.c:get_coef_context
vp9_detokenize.c:get_coef_context
Line
Count
Source
36
71.7M
                                   const uint8_t *token_cache, int c) {
37
71.7M
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
71.7M
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
71.7M
         1;
40
71.7M
}
Unexecuted instantiation: vp9_decoder.c:get_coef_context
Unexecuted instantiation: vp9_scan.c:get_coef_context
41
42
static INLINE const ScanOrder *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
43
0
                                        PLANE_TYPE type, int block_idx) {
44
0
  const MODE_INFO *const mi = xd->mi[0];
45
0
46
0
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
0
    return &vp9_default_scan_orders[tx_size];
48
0
  } else {
49
0
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
0
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
0
  }
52
0
}
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
53
54
#ifdef __cplusplus
55
}  // extern "C"
56
#endif
57
58
#endif  // VPX_VP9_COMMON_VP9_SCAN_H_