/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.54G | #define MAX_NEIGHBORS 2 |
25 | 1.83G | #define MAX_SCAN_VALUE 1024 |
26 | | |
27 | | typedef struct ScanOrder { |
28 | | const int16_t *scan; |
29 | | const int16_t *iscan; |
30 | | const int16_t *neighbors; |
31 | | } ScanOrder; |
32 | | |
33 | | extern const ScanOrder vp9_default_scan_orders[TX_SIZES]; |
34 | | extern const ScanOrder vp9_scan_orders[TX_SIZES][TX_TYPES]; |
35 | | |
36 | | // The return value is at most the maximum value in token_cache. |
37 | | // If N is the maximum value in token_cache, the function returns |
38 | | // (1 + val1 + val2) >> 1, where val1 and val2 are at most N. |
39 | | // The result of this expression is also at most N. |
40 | | static INLINE int get_coef_context(const int16_t *neighbors, |
41 | 4.27G | const uint8_t *token_cache, int c) { |
42 | 4.27G | return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] + |
43 | 4.27G | token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> |
44 | 4.27G | 1; |
45 | 4.27G | } Unexecuted instantiation: vp9_decodeframe.c:get_coef_context vp9_detokenize.c:get_coef_context Line | Count | Source | 41 | 159M | const uint8_t *token_cache, int c) { | 42 | 159M | return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] + | 43 | 159M | token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> | 44 | 159M | 1; | 45 | 159M | } |
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 | 41 | 87.3M | const uint8_t *token_cache, int c) { | 42 | 87.3M | return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] + | 43 | 87.3M | token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> | 44 | 87.3M | 1; | 45 | 87.3M | } |
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 | 41 | 921M | const uint8_t *token_cache, int c) { | 42 | 921M | return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] + | 43 | 921M | token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> | 44 | 921M | 1; | 45 | 921M | } |
vp9_rdopt.c:get_coef_context Line | Count | Source | 41 | 3.10G | const uint8_t *token_cache, int c) { | 42 | 3.10G | return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] + | 43 | 3.10G | token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> | 44 | 3.10G | 1; | 45 | 3.10G | } |
Unexecuted instantiation: vp9_pickmode.c:get_coef_context |
46 | | |
47 | | static INLINE const ScanOrder *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size, |
48 | 196M | PLANE_TYPE type, int block_idx) { |
49 | 196M | const MODE_INFO *const mi = xd->mi[0]; |
50 | | |
51 | 196M | if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) { |
52 | 152M | return &vp9_default_scan_orders[tx_size]; |
53 | 152M | } else { |
54 | 44.0M | const PREDICTION_MODE mode = get_y_mode(mi, block_idx); |
55 | 44.0M | return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]]; |
56 | 44.0M | } |
57 | 196M | } 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 Line | Count | Source | 48 | 7.22M | PLANE_TYPE type, int block_idx) { | 49 | 7.22M | const MODE_INFO *const mi = xd->mi[0]; | 50 | | | 51 | 7.22M | if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) { | 52 | 4.49M | return &vp9_default_scan_orders[tx_size]; | 53 | 4.49M | } else { | 54 | 2.72M | const PREDICTION_MODE mode = get_y_mode(mi, block_idx); | 55 | 2.72M | return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]]; | 56 | 2.72M | } | 57 | 7.22M | } |
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 Line | Count | Source | 48 | 23.2M | PLANE_TYPE type, int block_idx) { | 49 | 23.2M | const MODE_INFO *const mi = xd->mi[0]; | 50 | | | 51 | 23.2M | if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) { | 52 | 18.2M | return &vp9_default_scan_orders[tx_size]; | 53 | 18.2M | } else { | 54 | 4.99M | const PREDICTION_MODE mode = get_y_mode(mi, block_idx); | 55 | 4.99M | return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]]; | 56 | 4.99M | } | 57 | 23.2M | } |
Line | Count | Source | 48 | 165M | PLANE_TYPE type, int block_idx) { | 49 | 165M | const MODE_INFO *const mi = xd->mi[0]; | 50 | | | 51 | 165M | if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) { | 52 | 129M | return &vp9_default_scan_orders[tx_size]; | 53 | 129M | } else { | 54 | 36.3M | const PREDICTION_MODE mode = get_y_mode(mi, block_idx); | 55 | 36.3M | return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]]; | 56 | 36.3M | } | 57 | 165M | } |
Unexecuted instantiation: vp9_pickmode.c:get_scan |
58 | | |
59 | | #ifdef __cplusplus |
60 | | } // extern "C" |
61 | | #endif |
62 | | |
63 | | #endif // VPX_VP9_COMMON_VP9_SCAN_H_ |