Coverage Report

Created: 2026-08-13 06:47

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libvpx/vp9/common/vp9_pred_common.h
Line
Count
Source
1
/*
2
 *  Copyright (c) 2012 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_PRED_COMMON_H_
12
#define VPX_VP9_COMMON_VP9_PRED_COMMON_H_
13
14
#include "vp9/common/vp9_blockd.h"
15
#include "vp9/common/vp9_onyxc_int.h"
16
#include "vpx_dsp/vpx_dsp_common.h"
17
18
#ifdef __cplusplus
19
extern "C" {
20
#endif
21
22
static INLINE int get_segment_id(const VP9_COMMON *cm,
23
                                 const uint8_t *segment_ids, BLOCK_SIZE bsize,
24
0
                                 int mi_row, int mi_col) {
25
0
  const int mi_offset = mi_row * cm->mi_cols + mi_col;
26
0
  const int bw = num_8x8_blocks_wide_lookup[bsize];
27
0
  const int bh = num_8x8_blocks_high_lookup[bsize];
28
0
  const int xmis = VPXMIN(cm->mi_cols - mi_col, bw);
29
0
  const int ymis = VPXMIN(cm->mi_rows - mi_row, bh);
30
0
  int x, y, segment_id = MAX_SEGMENTS;
31
32
0
  for (y = 0; y < ymis; ++y)
33
0
    for (x = 0; x < xmis; ++x)
34
0
      segment_id =
35
0
          VPXMIN(segment_id, segment_ids[mi_offset + y * cm->mi_cols + x]);
36
37
0
  assert(segment_id >= 0 && segment_id < MAX_SEGMENTS);
38
0
  return segment_id;
39
0
}
Unexecuted instantiation: vp9_rd.c:get_segment_id
Unexecuted instantiation: vp9_segmentation.c:get_segment_id
Unexecuted instantiation: vp9_tokenize.c:get_segment_id
Unexecuted instantiation: vp9_bitstream.c:get_segment_id
Unexecuted instantiation: vp9_encodeframe.c:get_segment_id
Unexecuted instantiation: vp9_rdopt.c:get_segment_id
Unexecuted instantiation: vp9_pickmode.c:get_segment_id
Unexecuted instantiation: vp9_pred_common.c:get_segment_id
Unexecuted instantiation: vp9_decodeframe.c:get_segment_id
Unexecuted instantiation: vp9_decodemv.c:get_segment_id
40
41
2.77M
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
2.77M
  const MODE_INFO *const above_mi = xd->above_mi;
43
2.77M
  const MODE_INFO *const left_mi = xd->left_mi;
44
2.77M
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
2.77M
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
2.77M
  return above_sip + left_sip;
48
2.77M
}
Unexecuted instantiation: vp9_rd.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_segmentation.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_tokenize.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_bitstream.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_rdopt.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_pickmode.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_context_seg_id
vp9_decodemv.c:vp9_get_pred_context_seg_id
Line
Count
Source
41
2.77M
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
2.77M
  const MODE_INFO *const above_mi = xd->above_mi;
43
2.77M
  const MODE_INFO *const left_mi = xd->left_mi;
44
2.77M
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
2.77M
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
2.77M
  return above_sip + left_sip;
48
2.77M
}
49
50
static INLINE vpx_prob vp9_get_pred_prob_seg_id(const struct segmentation *seg,
51
2.77M
                                                const MACROBLOCKD *xd) {
52
2.77M
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
2.77M
}
Unexecuted instantiation: vp9_rd.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_segmentation.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_tokenize.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_bitstream.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_rdopt.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_pickmode.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_prob_seg_id
vp9_decodemv.c:vp9_get_pred_prob_seg_id
Line
Count
Source
51
2.77M
                                                const MACROBLOCKD *xd) {
52
2.77M
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
2.77M
}
54
55
115M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
115M
  const MODE_INFO *const above_mi = xd->above_mi;
57
115M
  const MODE_INFO *const left_mi = xd->left_mi;
58
115M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
115M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
115M
  return above_skip + left_skip;
61
115M
}
Unexecuted instantiation: vp9_rd.c:vp9_get_skip_context
Unexecuted instantiation: vp9_segmentation.c:vp9_get_skip_context
vp9_tokenize.c:vp9_get_skip_context
Line
Count
Source
55
7.01M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
7.01M
  const MODE_INFO *const above_mi = xd->above_mi;
57
7.01M
  const MODE_INFO *const left_mi = xd->left_mi;
58
7.01M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
7.01M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
7.01M
  return above_skip + left_skip;
61
7.01M
}
vp9_bitstream.c:vp9_get_skip_context
Line
Count
Source
55
3.31M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
3.31M
  const MODE_INFO *const above_mi = xd->above_mi;
57
3.31M
  const MODE_INFO *const left_mi = xd->left_mi;
58
3.31M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
3.31M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
3.31M
  return above_skip + left_skip;
61
3.31M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_context
vp9_rdopt.c:vp9_get_skip_context
Line
Count
Source
55
54.9M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
54.9M
  const MODE_INFO *const above_mi = xd->above_mi;
57
54.9M
  const MODE_INFO *const left_mi = xd->left_mi;
58
54.9M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
54.9M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
54.9M
  return above_skip + left_skip;
61
54.9M
}
vp9_pickmode.c:vp9_get_skip_context
Line
Count
Source
55
21.7M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
21.7M
  const MODE_INFO *const above_mi = xd->above_mi;
57
21.7M
  const MODE_INFO *const left_mi = xd->left_mi;
58
21.7M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
21.7M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
21.7M
  return above_skip + left_skip;
61
21.7M
}
Unexecuted instantiation: vp9_pred_common.c:vp9_get_skip_context
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_skip_context
vp9_decodemv.c:vp9_get_skip_context
Line
Count
Source
55
28.0M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
28.0M
  const MODE_INFO *const above_mi = xd->above_mi;
57
28.0M
  const MODE_INFO *const left_mi = xd->left_mi;
58
28.0M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
28.0M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
28.0M
  return above_skip + left_skip;
61
28.0M
}
62
63
static INLINE vpx_prob vp9_get_skip_prob(const VP9_COMMON *cm,
64
79.9M
                                         const MACROBLOCKD *xd) {
65
79.9M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
79.9M
}
Unexecuted instantiation: vp9_rd.c:vp9_get_skip_prob
Unexecuted instantiation: vp9_segmentation.c:vp9_get_skip_prob
Unexecuted instantiation: vp9_tokenize.c:vp9_get_skip_prob
vp9_bitstream.c:vp9_get_skip_prob
Line
Count
Source
64
3.31M
                                         const MACROBLOCKD *xd) {
65
3.31M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
3.31M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_prob
vp9_rdopt.c:vp9_get_skip_prob
Line
Count
Source
64
54.9M
                                         const MACROBLOCKD *xd) {
65
54.9M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
54.9M
}
vp9_pickmode.c:vp9_get_skip_prob
Line
Count
Source
64
21.7M
                                         const MACROBLOCKD *xd) {
65
21.7M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
21.7M
}
Unexecuted instantiation: vp9_pred_common.c:vp9_get_skip_prob
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_skip_prob
Unexecuted instantiation: vp9_decodemv.c:vp9_get_skip_prob
67
68
// Returns a context number for the given MB prediction signal
69
60.8M
static INLINE int get_pred_context_switchable_interp(const MACROBLOCKD *xd) {
70
  // Note:
71
  // The mode info data structure has a one element border above and to the
72
  // left of the entries corresponding to real macroblocks.
73
  // The prediction flags in these dummy entries are initialized to 0.
74
60.8M
  const MODE_INFO *const left_mi = xd->left_mi;
75
60.8M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
60.8M
  const MODE_INFO *const above_mi = xd->above_mi;
77
60.8M
  const int above_type =
78
60.8M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
60.8M
  if (left_type == above_type)
81
37.2M
    return left_type;
82
23.5M
  else if (left_type == SWITCHABLE_FILTERS)
83
10.0M
    return above_type;
84
13.4M
  else if (above_type == SWITCHABLE_FILTERS)
85
11.2M
    return left_type;
86
2.26M
  else
87
2.26M
    return SWITCHABLE_FILTERS;
88
60.8M
}
vp9_rd.c:get_pred_context_switchable_interp
Line
Count
Source
69
56.0M
static INLINE int get_pred_context_switchable_interp(const MACROBLOCKD *xd) {
70
  // Note:
71
  // The mode info data structure has a one element border above and to the
72
  // left of the entries corresponding to real macroblocks.
73
  // The prediction flags in these dummy entries are initialized to 0.
74
56.0M
  const MODE_INFO *const left_mi = xd->left_mi;
75
56.0M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
56.0M
  const MODE_INFO *const above_mi = xd->above_mi;
77
56.0M
  const int above_type =
78
56.0M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
56.0M
  if (left_type == above_type)
81
34.4M
    return left_type;
82
21.6M
  else if (left_type == SWITCHABLE_FILTERS)
83
9.53M
    return above_type;
84
12.1M
  else if (above_type == SWITCHABLE_FILTERS)
85
10.4M
    return left_type;
86
1.61M
  else
87
1.61M
    return SWITCHABLE_FILTERS;
88
56.0M
}
Unexecuted instantiation: vp9_segmentation.c:get_pred_context_switchable_interp
Unexecuted instantiation: vp9_tokenize.c:get_pred_context_switchable_interp
vp9_bitstream.c:get_pred_context_switchable_interp
Line
Count
Source
69
464k
static INLINE int get_pred_context_switchable_interp(const MACROBLOCKD *xd) {
70
  // Note:
71
  // The mode info data structure has a one element border above and to the
72
  // left of the entries corresponding to real macroblocks.
73
  // The prediction flags in these dummy entries are initialized to 0.
74
464k
  const MODE_INFO *const left_mi = xd->left_mi;
75
464k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
464k
  const MODE_INFO *const above_mi = xd->above_mi;
77
464k
  const int above_type =
78
464k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
464k
  if (left_type == above_type)
81
224k
    return left_type;
82
240k
  else if (left_type == SWITCHABLE_FILTERS)
83
76.6k
    return above_type;
84
163k
  else if (above_type == SWITCHABLE_FILTERS)
85
114k
    return left_type;
86
49.4k
  else
87
49.4k
    return SWITCHABLE_FILTERS;
88
464k
}
vp9_encodeframe.c:get_pred_context_switchable_interp
Line
Count
Source
69
1.47M
static INLINE int get_pred_context_switchable_interp(const MACROBLOCKD *xd) {
70
  // Note:
71
  // The mode info data structure has a one element border above and to the
72
  // left of the entries corresponding to real macroblocks.
73
  // The prediction flags in these dummy entries are initialized to 0.
74
1.47M
  const MODE_INFO *const left_mi = xd->left_mi;
75
1.47M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
1.47M
  const MODE_INFO *const above_mi = xd->above_mi;
77
1.47M
  const int above_type =
78
1.47M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
1.47M
  if (left_type == above_type)
81
809k
    return left_type;
82
662k
  else if (left_type == SWITCHABLE_FILTERS)
83
256k
    return above_type;
84
406k
  else if (above_type == SWITCHABLE_FILTERS)
85
356k
    return left_type;
86
49.4k
  else
87
49.4k
    return SWITCHABLE_FILTERS;
88
1.47M
}
Unexecuted instantiation: vp9_rdopt.c:get_pred_context_switchable_interp
Unexecuted instantiation: vp9_pickmode.c:get_pred_context_switchable_interp
Unexecuted instantiation: vp9_pred_common.c:get_pred_context_switchable_interp
Unexecuted instantiation: vp9_decodeframe.c:get_pred_context_switchable_interp
vp9_decodemv.c:get_pred_context_switchable_interp
Line
Count
Source
69
2.80M
static INLINE int get_pred_context_switchable_interp(const MACROBLOCKD *xd) {
70
  // Note:
71
  // The mode info data structure has a one element border above and to the
72
  // left of the entries corresponding to real macroblocks.
73
  // The prediction flags in these dummy entries are initialized to 0.
74
2.80M
  const MODE_INFO *const left_mi = xd->left_mi;
75
2.80M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
2.80M
  const MODE_INFO *const above_mi = xd->above_mi;
77
2.80M
  const int above_type =
78
2.80M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
2.80M
  if (left_type == above_type)
81
1.78M
    return left_type;
82
1.02M
  else if (left_type == SWITCHABLE_FILTERS)
83
214k
    return above_type;
84
811k
  else if (above_type == SWITCHABLE_FILTERS)
85
258k
    return left_type;
86
552k
  else
87
552k
    return SWITCHABLE_FILTERS;
88
2.80M
}
89
90
// The mode info data structure has a one element border above and to the
91
// left of the entries corresponding to real macroblocks.
92
// The prediction flags in these dummy entries are initialized to 0.
93
// 0 - inter/inter, inter/--, --/inter, --/--
94
// 1 - intra/inter, inter/intra
95
// 2 - intra/--, --/intra
96
// 3 - intra/intra
97
39.8M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
39.8M
  const MODE_INFO *const above_mi = xd->above_mi;
99
39.8M
  const MODE_INFO *const left_mi = xd->left_mi;
100
39.8M
  const int has_above = !!above_mi;
101
39.8M
  const int has_left = !!left_mi;
102
103
39.8M
  if (has_above && has_left) {  // both edges available
104
29.6M
    const int above_intra = !is_inter_block(above_mi);
105
29.6M
    const int left_intra = !is_inter_block(left_mi);
106
29.6M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
29.6M
  } else if (has_above || has_left) {  // one edge available
108
8.03M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
8.03M
  }
110
2.15M
  return 0;
111
39.8M
}
Unexecuted instantiation: vp9_rd.c:get_intra_inter_context
Unexecuted instantiation: vp9_segmentation.c:get_intra_inter_context
Unexecuted instantiation: vp9_tokenize.c:get_intra_inter_context
vp9_bitstream.c:get_intra_inter_context
Line
Count
Source
97
2.99M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
2.99M
  const MODE_INFO *const above_mi = xd->above_mi;
99
2.99M
  const MODE_INFO *const left_mi = xd->left_mi;
100
2.99M
  const int has_above = !!above_mi;
101
2.99M
  const int has_left = !!left_mi;
102
103
2.99M
  if (has_above && has_left) {  // both edges available
104
1.41M
    const int above_intra = !is_inter_block(above_mi);
105
1.41M
    const int left_intra = !is_inter_block(left_mi);
106
1.41M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
1.58M
  } else if (has_above || has_left) {  // one edge available
108
1.16M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.16M
  }
110
415k
  return 0;
111
2.99M
}
vp9_encodeframe.c:get_intra_inter_context
Line
Count
Source
97
2.99M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
2.99M
  const MODE_INFO *const above_mi = xd->above_mi;
99
2.99M
  const MODE_INFO *const left_mi = xd->left_mi;
100
2.99M
  const int has_above = !!above_mi;
101
2.99M
  const int has_left = !!left_mi;
102
103
2.99M
  if (has_above && has_left) {  // both edges available
104
1.41M
    const int above_intra = !is_inter_block(above_mi);
105
1.41M
    const int left_intra = !is_inter_block(left_mi);
106
1.41M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
1.58M
  } else if (has_above || has_left) {  // one edge available
108
1.16M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.16M
  }
110
415k
  return 0;
111
2.99M
}
vp9_rdopt.c:get_intra_inter_context
Line
Count
Source
97
5.67M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
5.67M
  const MODE_INFO *const above_mi = xd->above_mi;
99
5.67M
  const MODE_INFO *const left_mi = xd->left_mi;
100
5.67M
  const int has_above = !!above_mi;
101
5.67M
  const int has_left = !!left_mi;
102
103
5.67M
  if (has_above && has_left) {  // both edges available
104
2.15M
    const int above_intra = !is_inter_block(above_mi);
105
2.15M
    const int left_intra = !is_inter_block(left_mi);
106
2.15M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
3.52M
  } else if (has_above || has_left) {  // one edge available
108
2.62M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
2.62M
  }
110
902k
  return 0;
111
5.67M
}
vp9_pickmode.c:get_intra_inter_context
Line
Count
Source
97
3.69M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
3.69M
  const MODE_INFO *const above_mi = xd->above_mi;
99
3.69M
  const MODE_INFO *const left_mi = xd->left_mi;
100
3.69M
  const int has_above = !!above_mi;
101
3.69M
  const int has_left = !!left_mi;
102
103
3.69M
  if (has_above && has_left) {  // both edges available
104
2.12M
    const int above_intra = !is_inter_block(above_mi);
105
2.12M
    const int left_intra = !is_inter_block(left_mi);
106
2.12M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
2.12M
  } else if (has_above || has_left) {  // one edge available
108
1.24M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.24M
  }
110
324k
  return 0;
111
3.69M
}
Unexecuted instantiation: vp9_pred_common.c:get_intra_inter_context
Unexecuted instantiation: vp9_decodeframe.c:get_intra_inter_context
vp9_decodemv.c:get_intra_inter_context
Line
Count
Source
97
24.4M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
24.4M
  const MODE_INFO *const above_mi = xd->above_mi;
99
24.4M
  const MODE_INFO *const left_mi = xd->left_mi;
100
24.4M
  const int has_above = !!above_mi;
101
24.4M
  const int has_left = !!left_mi;
102
103
24.4M
  if (has_above && has_left) {  // both edges available
104
22.5M
    const int above_intra = !is_inter_block(above_mi);
105
22.5M
    const int left_intra = !is_inter_block(left_mi);
106
22.5M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
22.5M
  } else if (has_above || has_left) {  // one edge available
108
1.82M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.82M
  }
110
97.4k
  return 0;
111
24.4M
}
112
113
static INLINE vpx_prob vp9_get_intra_inter_prob(const VP9_COMMON *cm,
114
12.3M
                                                const MACROBLOCKD *xd) {
115
12.3M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
12.3M
}
Unexecuted instantiation: vp9_rd.c:vp9_get_intra_inter_prob
Unexecuted instantiation: vp9_segmentation.c:vp9_get_intra_inter_prob
Unexecuted instantiation: vp9_tokenize.c:vp9_get_intra_inter_prob
vp9_bitstream.c:vp9_get_intra_inter_prob
Line
Count
Source
114
2.99M
                                                const MACROBLOCKD *xd) {
115
2.99M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
2.99M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_intra_inter_prob
vp9_rdopt.c:vp9_get_intra_inter_prob
Line
Count
Source
114
5.67M
                                                const MACROBLOCKD *xd) {
115
5.67M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
5.67M
}
vp9_pickmode.c:vp9_get_intra_inter_prob
Line
Count
Source
114
3.69M
                                                const MACROBLOCKD *xd) {
115
3.69M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
3.69M
}
Unexecuted instantiation: vp9_pred_common.c:vp9_get_intra_inter_prob
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_intra_inter_prob
Unexecuted instantiation: vp9_decodemv.c:vp9_get_intra_inter_prob
117
118
int vp9_get_reference_mode_context(const VP9_COMMON *cm, const MACROBLOCKD *xd);
119
120
static INLINE vpx_prob vp9_get_reference_mode_prob(const VP9_COMMON *cm,
121
0
                                                   const MACROBLOCKD *xd) {
122
0
  return cm->fc->comp_inter_prob[vp9_get_reference_mode_context(cm, xd)];
123
0
}
Unexecuted instantiation: vp9_rd.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_segmentation.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_tokenize.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_bitstream.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_rdopt.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_pickmode.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_pred_common.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_decodemv.c:vp9_get_reference_mode_prob
124
125
int vp9_get_pred_context_comp_ref_p(const VP9_COMMON *cm,
126
                                    const MACROBLOCKD *xd);
127
128
static INLINE vpx_prob vp9_get_pred_prob_comp_ref_p(const VP9_COMMON *cm,
129
0
                                                    const MACROBLOCKD *xd) {
130
0
  const int pred_context = vp9_get_pred_context_comp_ref_p(cm, xd);
131
0
  return cm->fc->comp_ref_prob[pred_context];
132
0
}
Unexecuted instantiation: vp9_rd.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_segmentation.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_tokenize.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_bitstream.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_rdopt.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_pickmode.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_decodemv.c:vp9_get_pred_prob_comp_ref_p
133
134
int vp9_get_pred_context_single_ref_p1(const MACROBLOCKD *xd);
135
136
static INLINE vpx_prob vp9_get_pred_prob_single_ref_p1(const VP9_COMMON *cm,
137
11.1M
                                                       const MACROBLOCKD *xd) {
138
11.1M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
11.1M
}
Unexecuted instantiation: vp9_rd.c:vp9_get_pred_prob_single_ref_p1
Unexecuted instantiation: vp9_segmentation.c:vp9_get_pred_prob_single_ref_p1
Unexecuted instantiation: vp9_tokenize.c:vp9_get_pred_prob_single_ref_p1
vp9_bitstream.c:vp9_get_pred_prob_single_ref_p1
Line
Count
Source
137
1.79M
                                                       const MACROBLOCKD *xd) {
138
1.79M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
1.79M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_pred_prob_single_ref_p1
vp9_rdopt.c:vp9_get_pred_prob_single_ref_p1
Line
Count
Source
137
5.67M
                                                       const MACROBLOCKD *xd) {
138
5.67M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
5.67M
}
vp9_pickmode.c:vp9_get_pred_prob_single_ref_p1
Line
Count
Source
137
3.69M
                                                       const MACROBLOCKD *xd) {
138
3.69M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
3.69M
}
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_prob_single_ref_p1
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_prob_single_ref_p1
Unexecuted instantiation: vp9_decodemv.c:vp9_get_pred_prob_single_ref_p1
140
141
int vp9_get_pred_context_single_ref_p2(const MACROBLOCKD *xd);
142
143
static INLINE vpx_prob vp9_get_pred_prob_single_ref_p2(const VP9_COMMON *cm,
144
10.0M
                                                       const MACROBLOCKD *xd) {
145
10.0M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
10.0M
}
Unexecuted instantiation: vp9_rd.c:vp9_get_pred_prob_single_ref_p2
Unexecuted instantiation: vp9_segmentation.c:vp9_get_pred_prob_single_ref_p2
Unexecuted instantiation: vp9_tokenize.c:vp9_get_pred_prob_single_ref_p2
vp9_bitstream.c:vp9_get_pred_prob_single_ref_p2
Line
Count
Source
144
705k
                                                       const MACROBLOCKD *xd) {
145
705k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
705k
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_pred_prob_single_ref_p2
vp9_rdopt.c:vp9_get_pred_prob_single_ref_p2
Line
Count
Source
144
5.67M
                                                       const MACROBLOCKD *xd) {
145
5.67M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
5.67M
}
vp9_pickmode.c:vp9_get_pred_prob_single_ref_p2
Line
Count
Source
144
3.69M
                                                       const MACROBLOCKD *xd) {
145
3.69M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
3.69M
}
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_prob_single_ref_p2
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_prob_single_ref_p2
Unexecuted instantiation: vp9_decodemv.c:vp9_get_pred_prob_single_ref_p2
147
148
int vp9_compound_reference_allowed(const VP9_COMMON *cm);
149
150
void vp9_setup_compound_reference_mode(VP9_COMMON *cm);
151
152
// Returns a context number for the given MB prediction signal
153
// The mode info data structure has a one element border above and to the
154
// left of the entries corresponding to real blocks.
155
// The prediction flags in these dummy entries are initialized to 0.
156
42.0M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
42.0M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
42.0M
  const MODE_INFO *const above_mi = xd->above_mi;
159
42.0M
  const MODE_INFO *const left_mi = xd->left_mi;
160
42.0M
  const int has_above = !!above_mi;
161
42.0M
  const int has_left = !!left_mi;
162
42.0M
  int above_ctx =
163
42.0M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
42.0M
  int left_ctx =
165
42.0M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
42.0M
  if (!has_left) left_ctx = above_ctx;
167
168
42.0M
  if (!has_above) above_ctx = left_ctx;
169
170
42.0M
  return (above_ctx + left_ctx) > max_tx_size;
171
42.0M
}
Unexecuted instantiation: vp9_rd.c:get_tx_size_context
Unexecuted instantiation: vp9_segmentation.c:get_tx_size_context
Unexecuted instantiation: vp9_tokenize.c:get_tx_size_context
vp9_bitstream.c:get_tx_size_context
Line
Count
Source
156
1.90M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
1.90M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
1.90M
  const MODE_INFO *const above_mi = xd->above_mi;
159
1.90M
  const MODE_INFO *const left_mi = xd->left_mi;
160
1.90M
  const int has_above = !!above_mi;
161
1.90M
  const int has_left = !!left_mi;
162
1.90M
  int above_ctx =
163
1.90M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
1.90M
  int left_ctx =
165
1.90M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
1.90M
  if (!has_left) left_ctx = above_ctx;
167
168
1.90M
  if (!has_above) above_ctx = left_ctx;
169
170
1.90M
  return (above_ctx + left_ctx) > max_tx_size;
171
1.90M
}
vp9_encodeframe.c:get_tx_size_context
Line
Count
Source
156
2.24M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
2.24M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
2.24M
  const MODE_INFO *const above_mi = xd->above_mi;
159
2.24M
  const MODE_INFO *const left_mi = xd->left_mi;
160
2.24M
  const int has_above = !!above_mi;
161
2.24M
  const int has_left = !!left_mi;
162
2.24M
  int above_ctx =
163
2.24M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
2.24M
  int left_ctx =
165
2.24M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
2.24M
  if (!has_left) left_ctx = above_ctx;
167
168
2.24M
  if (!has_above) above_ctx = left_ctx;
169
170
2.24M
  return (above_ctx + left_ctx) > max_tx_size;
171
2.24M
}
vp9_rdopt.c:get_tx_size_context
Line
Count
Source
156
33.3M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
33.3M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
33.3M
  const MODE_INFO *const above_mi = xd->above_mi;
159
33.3M
  const MODE_INFO *const left_mi = xd->left_mi;
160
33.3M
  const int has_above = !!above_mi;
161
33.3M
  const int has_left = !!left_mi;
162
33.3M
  int above_ctx =
163
33.3M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
33.3M
  int left_ctx =
165
33.3M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
33.3M
  if (!has_left) left_ctx = above_ctx;
167
168
33.3M
  if (!has_above) above_ctx = left_ctx;
169
170
33.3M
  return (above_ctx + left_ctx) > max_tx_size;
171
33.3M
}
Unexecuted instantiation: vp9_pickmode.c:get_tx_size_context
Unexecuted instantiation: vp9_pred_common.c:get_tx_size_context
Unexecuted instantiation: vp9_decodeframe.c:get_tx_size_context
vp9_decodemv.c:get_tx_size_context
Line
Count
Source
156
4.54M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
4.54M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
4.54M
  const MODE_INFO *const above_mi = xd->above_mi;
159
4.54M
  const MODE_INFO *const left_mi = xd->left_mi;
160
4.54M
  const int has_above = !!above_mi;
161
4.54M
  const int has_left = !!left_mi;
162
4.54M
  int above_ctx =
163
4.54M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
4.54M
  int left_ctx =
165
4.54M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
4.54M
  if (!has_left) left_ctx = above_ctx;
167
168
4.54M
  if (!has_above) above_ctx = left_ctx;
169
170
4.54M
  return (above_ctx + left_ctx) > max_tx_size;
171
4.54M
}
172
173
static INLINE const vpx_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx,
174
7.92M
                                           const struct tx_probs *tx_probs) {
175
7.92M
  switch (max_tx_size) {
176
3.87M
    case TX_8X8: return tx_probs->p8x8[ctx];
177
2.08M
    case TX_16X16: return tx_probs->p16x16[ctx];
178
1.96M
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
7.92M
  }
181
7.92M
}
vp9_rd.c:get_tx_probs
Line
Count
Source
174
1.47M
                                           const struct tx_probs *tx_probs) {
175
1.47M
  switch (max_tx_size) {
176
490k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
490k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
490k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
1.47M
  }
181
1.47M
}
Unexecuted instantiation: vp9_segmentation.c:get_tx_probs
Unexecuted instantiation: vp9_tokenize.c:get_tx_probs
vp9_bitstream.c:get_tx_probs
Line
Count
Source
174
1.90M
                                           const struct tx_probs *tx_probs) {
175
1.90M
  switch (max_tx_size) {
176
1.46M
    case TX_8X8: return tx_probs->p8x8[ctx];
177
419k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
22.2k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
1.90M
  }
181
1.90M
}
Unexecuted instantiation: vp9_encodeframe.c:get_tx_probs
Unexecuted instantiation: vp9_rdopt.c:get_tx_probs
Unexecuted instantiation: vp9_pickmode.c:get_tx_probs
Unexecuted instantiation: vp9_pred_common.c:get_tx_probs
Unexecuted instantiation: vp9_decodeframe.c:get_tx_probs
vp9_decodemv.c:get_tx_probs
Line
Count
Source
174
4.54M
                                           const struct tx_probs *tx_probs) {
175
4.54M
  switch (max_tx_size) {
176
1.92M
    case TX_8X8: return tx_probs->p8x8[ctx];
177
1.17M
    case TX_16X16: return tx_probs->p16x16[ctx];
178
1.45M
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
4.54M
  }
181
4.54M
}
182
183
static INLINE unsigned int *get_tx_counts(TX_SIZE max_tx_size, int ctx,
184
5.79M
                                          struct tx_counts *tx_counts) {
185
5.79M
  switch (max_tx_size) {
186
3.43M
    case TX_8X8: return tx_counts->p8x8[ctx];
187
1.44M
    case TX_16X16: return tx_counts->p16x16[ctx];
188
911k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
5.79M
  }
191
5.79M
}
Unexecuted instantiation: vp9_rd.c:get_tx_counts
Unexecuted instantiation: vp9_segmentation.c:get_tx_counts
Unexecuted instantiation: vp9_tokenize.c:get_tx_counts
Unexecuted instantiation: vp9_bitstream.c:get_tx_counts
vp9_encodeframe.c:get_tx_counts
Line
Count
Source
184
2.24M
                                          struct tx_counts *tx_counts) {
185
2.24M
  switch (max_tx_size) {
186
1.75M
    case TX_8X8: return tx_counts->p8x8[ctx];
187
456k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
33.6k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
2.24M
  }
191
2.24M
}
Unexecuted instantiation: vp9_rdopt.c:get_tx_counts
Unexecuted instantiation: vp9_pickmode.c:get_tx_counts
Unexecuted instantiation: vp9_pred_common.c:get_tx_counts
Unexecuted instantiation: vp9_decodeframe.c:get_tx_counts
vp9_decodemv.c:get_tx_counts
Line
Count
Source
184
3.54M
                                          struct tx_counts *tx_counts) {
185
3.54M
  switch (max_tx_size) {
186
1.67M
    case TX_8X8: return tx_counts->p8x8[ctx];
187
992k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
877k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
3.54M
  }
191
3.54M
}
192
193
#ifdef __cplusplus
194
}  // extern "C"
195
#endif
196
197
#endif  // VPX_VP9_COMMON_VP9_PRED_COMMON_H_