Coverage Report

Created: 2024-09-06 07:53

/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
8.91G
#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
4.45G
                                   const uint8_t *token_cache, int c) {
37
4.45G
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
4.45G
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
4.45G
         1;
40
4.45G
}
Unexecuted instantiation: vp9_quantize.c:get_coef_context
vp9_tokenize.c:get_coef_context
Line
Count
Source
36
125M
                                   const uint8_t *token_cache, int c) {
37
125M
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
125M
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
125M
         1;
40
125M
}
Unexecuted instantiation: vp9_tpl_model.c:get_coef_context
Unexecuted instantiation: vp9_scan.c:get_coef_context
vp9_encodemb.c:get_coef_context
Line
Count
Source
36
641M
                                   const uint8_t *token_cache, int c) {
37
641M
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
641M
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
641M
         1;
40
641M
}
vp9_rdopt.c:get_coef_context
Line
Count
Source
36
3.69G
                                   const uint8_t *token_cache, int c) {
37
3.69G
  return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
38
3.69G
          token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >>
39
3.69G
         1;
40
3.69G
}
Unexecuted instantiation: vp9_pickmode.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
41
42
static INLINE const ScanOrder *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
43
227M
                                        PLANE_TYPE type, int block_idx) {
44
227M
  const MODE_INFO *const mi = xd->mi[0];
45
46
227M
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
179M
    return &vp9_default_scan_orders[tx_size];
48
179M
  } else {
49
47.6M
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
47.6M
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
47.6M
  }
52
227M
}
Unexecuted instantiation: vp9_quantize.c:get_scan
vp9_tokenize.c:get_scan
Line
Count
Source
43
9.90M
                                        PLANE_TYPE type, int block_idx) {
44
9.90M
  const MODE_INFO *const mi = xd->mi[0];
45
46
9.90M
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
6.16M
    return &vp9_default_scan_orders[tx_size];
48
6.16M
  } else {
49
3.73M
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
3.73M
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
3.73M
  }
52
9.90M
}
Unexecuted instantiation: vp9_tpl_model.c:get_scan
Unexecuted instantiation: vp9_scan.c:get_scan
vp9_encodemb.c:get_scan
Line
Count
Source
43
15.3M
                                        PLANE_TYPE type, int block_idx) {
44
15.3M
  const MODE_INFO *const mi = xd->mi[0];
45
46
15.3M
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
12.2M
    return &vp9_default_scan_orders[tx_size];
48
12.2M
  } else {
49
3.09M
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
3.09M
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
3.09M
  }
52
15.3M
}
vp9_rdopt.c:get_scan
Line
Count
Source
43
202M
                                        PLANE_TYPE type, int block_idx) {
44
202M
  const MODE_INFO *const mi = xd->mi[0];
45
46
202M
  if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
47
161M
    return &vp9_default_scan_orders[tx_size];
48
161M
  } else {
49
40.8M
    const PREDICTION_MODE mode = get_y_mode(mi, block_idx);
50
40.8M
    return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]];
51
40.8M
  }
52
202M
}
Unexecuted instantiation: vp9_pickmode.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
53
54
#ifdef __cplusplus
55
}  // extern "C"
56
#endif
57
58
#endif  // VPX_VP9_COMMON_VP9_SCAN_H_