Coverage Report

Created: 2026-05-23 07:06

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_decodeframe.c:get_segment_id
Unexecuted instantiation: vp9_pred_common.c:get_segment_id
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_decodemv.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
40
41
120k
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
120k
  const MODE_INFO *const above_mi = xd->above_mi;
43
120k
  const MODE_INFO *const left_mi = xd->left_mi;
44
120k
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
120k
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
120k
  return above_sip + left_sip;
48
120k
}
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_context_seg_id
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_context_seg_id
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
vp9_decodemv.c:vp9_get_pred_context_seg_id
Line
Count
Source
41
120k
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
120k
  const MODE_INFO *const above_mi = xd->above_mi;
43
120k
  const MODE_INFO *const left_mi = xd->left_mi;
44
120k
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
120k
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
120k
  return above_sip + left_sip;
48
120k
}
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
49
50
static INLINE vpx_prob vp9_get_pred_prob_seg_id(const struct segmentation *seg,
51
120k
                                                const MACROBLOCKD *xd) {
52
120k
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
120k
}
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_prob_seg_id
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_prob_seg_id
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
vp9_decodemv.c:vp9_get_pred_prob_seg_id
Line
Count
Source
51
120k
                                                const MACROBLOCKD *xd) {
52
120k
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
120k
}
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
54
55
78.9M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
78.9M
  const MODE_INFO *const above_mi = xd->above_mi;
57
78.9M
  const MODE_INFO *const left_mi = xd->left_mi;
58
78.9M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
78.9M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
78.9M
  return above_skip + left_skip;
61
78.9M
}
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_skip_context
Unexecuted instantiation: vp9_pred_common.c:vp9_get_skip_context
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
8.90M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
8.90M
  const MODE_INFO *const above_mi = xd->above_mi;
57
8.90M
  const MODE_INFO *const left_mi = xd->left_mi;
58
8.90M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
8.90M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
8.90M
  return above_skip + left_skip;
61
8.90M
}
vp9_decodemv.c:vp9_get_skip_context
Line
Count
Source
55
5.97M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
5.97M
  const MODE_INFO *const above_mi = xd->above_mi;
57
5.97M
  const MODE_INFO *const left_mi = xd->left_mi;
58
5.97M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
5.97M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
5.97M
  return above_skip + left_skip;
61
5.97M
}
vp9_bitstream.c:vp9_get_skip_context
Line
Count
Source
55
2.14M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
2.14M
  const MODE_INFO *const above_mi = xd->above_mi;
57
2.14M
  const MODE_INFO *const left_mi = xd->left_mi;
58
2.14M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
2.14M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
2.14M
  return above_skip + left_skip;
61
2.14M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_context
vp9_rdopt.c:vp9_get_skip_context
Line
Count
Source
55
61.9M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
61.9M
  const MODE_INFO *const above_mi = xd->above_mi;
57
61.9M
  const MODE_INFO *const left_mi = xd->left_mi;
58
61.9M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
61.9M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
61.9M
  return above_skip + left_skip;
61
61.9M
}
Unexecuted instantiation: vp9_pickmode.c:vp9_get_skip_context
62
63
static INLINE vpx_prob vp9_get_skip_prob(const VP9_COMMON *cm,
64
64.0M
                                         const MACROBLOCKD *xd) {
65
64.0M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
64.0M
}
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_skip_prob
Unexecuted instantiation: vp9_pred_common.c:vp9_get_skip_prob
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
Unexecuted instantiation: vp9_decodemv.c:vp9_get_skip_prob
vp9_bitstream.c:vp9_get_skip_prob
Line
Count
Source
64
2.14M
                                         const MACROBLOCKD *xd) {
65
2.14M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
2.14M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_prob
vp9_rdopt.c:vp9_get_skip_prob
Line
Count
Source
64
61.9M
                                         const MACROBLOCKD *xd) {
65
61.9M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
61.9M
}
Unexecuted instantiation: vp9_pickmode.c:vp9_get_skip_prob
67
68
// Returns a context number for the given MB prediction signal
69
52.9M
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
52.9M
  const MODE_INFO *const left_mi = xd->left_mi;
75
52.9M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
52.9M
  const MODE_INFO *const above_mi = xd->above_mi;
77
52.9M
  const int above_type =
78
52.9M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
52.9M
  if (left_type == above_type)
81
34.9M
    return left_type;
82
17.9M
  else if (left_type == SWITCHABLE_FILTERS)
83
7.94M
    return above_type;
84
9.96M
  else if (above_type == SWITCHABLE_FILTERS)
85
7.85M
    return left_type;
86
2.10M
  else
87
2.10M
    return SWITCHABLE_FILTERS;
88
52.9M
}
Unexecuted instantiation: vp9_decodeframe.c:get_pred_context_switchable_interp
Unexecuted instantiation: vp9_pred_common.c:get_pred_context_switchable_interp
vp9_rd.c:get_pred_context_switchable_interp
Line
Count
Source
69
50.3M
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
50.3M
  const MODE_INFO *const left_mi = xd->left_mi;
75
50.3M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
50.3M
  const MODE_INFO *const above_mi = xd->above_mi;
77
50.3M
  const int above_type =
78
50.3M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
50.3M
  if (left_type == above_type)
81
33.7M
    return left_type;
82
16.5M
  else if (left_type == SWITCHABLE_FILTERS)
83
7.56M
    return above_type;
84
8.98M
  else if (above_type == SWITCHABLE_FILTERS)
85
7.38M
    return left_type;
86
1.60M
  else
87
1.60M
    return SWITCHABLE_FILTERS;
88
50.3M
}
Unexecuted instantiation: vp9_segmentation.c:get_pred_context_switchable_interp
Unexecuted instantiation: vp9_tokenize.c:get_pred_context_switchable_interp
vp9_decodemv.c:get_pred_context_switchable_interp
Line
Count
Source
69
2.06M
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.06M
  const MODE_INFO *const left_mi = xd->left_mi;
75
2.06M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
2.06M
  const MODE_INFO *const above_mi = xd->above_mi;
77
2.06M
  const int above_type =
78
2.06M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
2.06M
  if (left_type == above_type)
81
957k
    return left_type;
82
1.10M
  else if (left_type == SWITCHABLE_FILTERS)
83
304k
    return above_type;
84
802k
  else if (above_type == SWITCHABLE_FILTERS)
85
366k
    return left_type;
86
435k
  else
87
435k
    return SWITCHABLE_FILTERS;
88
2.06M
}
vp9_bitstream.c:get_pred_context_switchable_interp
Line
Count
Source
69
226k
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
226k
  const MODE_INFO *const left_mi = xd->left_mi;
75
226k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
226k
  const MODE_INFO *const above_mi = xd->above_mi;
77
226k
  const int above_type =
78
226k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
226k
  if (left_type == above_type)
81
112k
    return left_type;
82
113k
  else if (left_type == SWITCHABLE_FILTERS)
83
32.9k
    return above_type;
84
80.5k
  else if (above_type == SWITCHABLE_FILTERS)
85
44.9k
    return left_type;
86
35.5k
  else
87
35.5k
    return SWITCHABLE_FILTERS;
88
226k
}
vp9_encodeframe.c:get_pred_context_switchable_interp
Line
Count
Source
69
291k
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
291k
  const MODE_INFO *const left_mi = xd->left_mi;
75
291k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
291k
  const MODE_INFO *const above_mi = xd->above_mi;
77
291k
  const int above_type =
78
291k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
291k
  if (left_type == above_type)
81
153k
    return left_type;
82
137k
  else if (left_type == SWITCHABLE_FILTERS)
83
42.8k
    return above_type;
84
95.0k
  else if (above_type == SWITCHABLE_FILTERS)
85
59.4k
    return left_type;
86
35.5k
  else
87
35.5k
    return SWITCHABLE_FILTERS;
88
291k
}
Unexecuted instantiation: vp9_rdopt.c:get_pred_context_switchable_interp
Unexecuted instantiation: vp9_pickmode.c:get_pred_context_switchable_interp
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
14.9M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
14.9M
  const MODE_INFO *const above_mi = xd->above_mi;
99
14.9M
  const MODE_INFO *const left_mi = xd->left_mi;
100
14.9M
  const int has_above = !!above_mi;
101
14.9M
  const int has_left = !!left_mi;
102
103
14.9M
  if (has_above && has_left) {  // both edges available
104
10.2M
    const int above_intra = !is_inter_block(above_mi);
105
10.2M
    const int left_intra = !is_inter_block(left_mi);
106
10.2M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
10.2M
  } else if (has_above || has_left) {  // one edge available
108
4.07M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
4.07M
  }
110
555k
  return 0;
111
14.9M
}
Unexecuted instantiation: vp9_decodeframe.c:get_intra_inter_context
Unexecuted instantiation: vp9_pred_common.c:get_intra_inter_context
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_decodemv.c:get_intra_inter_context
Line
Count
Source
97
4.93M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
4.93M
  const MODE_INFO *const above_mi = xd->above_mi;
99
4.93M
  const MODE_INFO *const left_mi = xd->left_mi;
100
4.93M
  const int has_above = !!above_mi;
101
4.93M
  const int has_left = !!left_mi;
102
103
4.93M
  if (has_above && has_left) {  // both edges available
104
3.60M
    const int above_intra = !is_inter_block(above_mi);
105
3.60M
    const int left_intra = !is_inter_block(left_mi);
106
3.60M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
3.60M
  } else if (has_above || has_left) {  // one edge available
108
1.28M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.28M
  }
110
44.6k
  return 0;
111
4.93M
}
vp9_bitstream.c:get_intra_inter_context
Line
Count
Source
97
1.46M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
1.46M
  const MODE_INFO *const above_mi = xd->above_mi;
99
1.46M
  const MODE_INFO *const left_mi = xd->left_mi;
100
1.46M
  const int has_above = !!above_mi;
101
1.46M
  const int has_left = !!left_mi;
102
103
1.46M
  if (has_above && has_left) {  // both edges available
104
1.02M
    const int above_intra = !is_inter_block(above_mi);
105
1.02M
    const int left_intra = !is_inter_block(left_mi);
106
1.02M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
1.02M
  } else if (has_above || has_left) {  // one edge available
108
385k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
385k
  }
110
60.9k
  return 0;
111
1.46M
}
vp9_encodeframe.c:get_intra_inter_context
Line
Count
Source
97
1.46M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
1.46M
  const MODE_INFO *const above_mi = xd->above_mi;
99
1.46M
  const MODE_INFO *const left_mi = xd->left_mi;
100
1.46M
  const int has_above = !!above_mi;
101
1.46M
  const int has_left = !!left_mi;
102
103
1.46M
  if (has_above && has_left) {  // both edges available
104
1.02M
    const int above_intra = !is_inter_block(above_mi);
105
1.02M
    const int left_intra = !is_inter_block(left_mi);
106
1.02M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
1.02M
  } else if (has_above || has_left) {  // one edge available
108
385k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
385k
  }
110
60.9k
  return 0;
111
1.46M
}
vp9_rdopt.c:get_intra_inter_context
Line
Count
Source
97
7.03M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
7.03M
  const MODE_INFO *const above_mi = xd->above_mi;
99
7.03M
  const MODE_INFO *const left_mi = xd->left_mi;
100
7.03M
  const int has_above = !!above_mi;
101
7.03M
  const int has_left = !!left_mi;
102
103
7.03M
  if (has_above && has_left) {  // both edges available
104
4.63M
    const int above_intra = !is_inter_block(above_mi);
105
4.63M
    const int left_intra = !is_inter_block(left_mi);
106
4.63M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
4.63M
  } else if (has_above || has_left) {  // one edge available
108
2.01M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
2.01M
  }
110
388k
  return 0;
111
7.03M
}
Unexecuted instantiation: vp9_pickmode.c:get_intra_inter_context
112
113
static INLINE vpx_prob vp9_get_intra_inter_prob(const VP9_COMMON *cm,
114
8.50M
                                                const MACROBLOCKD *xd) {
115
8.50M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
8.50M
}
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_intra_inter_prob
Unexecuted instantiation: vp9_pred_common.c:vp9_get_intra_inter_prob
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
Unexecuted instantiation: vp9_decodemv.c:vp9_get_intra_inter_prob
vp9_bitstream.c:vp9_get_intra_inter_prob
Line
Count
Source
114
1.46M
                                                const MACROBLOCKD *xd) {
115
1.46M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
1.46M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_intra_inter_prob
vp9_rdopt.c:vp9_get_intra_inter_prob
Line
Count
Source
114
7.03M
                                                const MACROBLOCKD *xd) {
115
7.03M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
7.03M
}
Unexecuted instantiation: vp9_pickmode.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_decodeframe.c:vp9_get_reference_mode_prob
Unexecuted instantiation: vp9_pred_common.c:vp9_get_reference_mode_prob
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_decodemv.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
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_decodeframe.c:vp9_get_pred_prob_comp_ref_p
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_prob_comp_ref_p
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_decodemv.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
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
7.65M
                                                       const MACROBLOCKD *xd) {
138
7.65M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
7.65M
}
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_prob_single_ref_p1
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_prob_single_ref_p1
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
Unexecuted instantiation: vp9_decodemv.c:vp9_get_pred_prob_single_ref_p1
vp9_bitstream.c:vp9_get_pred_prob_single_ref_p1
Line
Count
Source
137
616k
                                                       const MACROBLOCKD *xd) {
138
616k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
616k
}
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
7.03M
                                                       const MACROBLOCKD *xd) {
138
7.03M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
7.03M
}
Unexecuted instantiation: vp9_pickmode.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
7.26M
                                                       const MACROBLOCKD *xd) {
145
7.26M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
7.26M
}
Unexecuted instantiation: vp9_decodeframe.c:vp9_get_pred_prob_single_ref_p2
Unexecuted instantiation: vp9_pred_common.c:vp9_get_pred_prob_single_ref_p2
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
Unexecuted instantiation: vp9_decodemv.c:vp9_get_pred_prob_single_ref_p2
vp9_bitstream.c:vp9_get_pred_prob_single_ref_p2
Line
Count
Source
144
224k
                                                       const MACROBLOCKD *xd) {
145
224k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
224k
}
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
7.03M
                                                       const MACROBLOCKD *xd) {
145
7.03M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
7.03M
}
Unexecuted instantiation: vp9_pickmode.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
33.1M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
33.1M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
33.1M
  const MODE_INFO *const above_mi = xd->above_mi;
159
33.1M
  const MODE_INFO *const left_mi = xd->left_mi;
160
33.1M
  const int has_above = !!above_mi;
161
33.1M
  const int has_left = !!left_mi;
162
33.1M
  int above_ctx =
163
33.1M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
33.1M
  int left_ctx =
165
33.1M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
33.1M
  if (!has_left) left_ctx = above_ctx;
167
168
33.1M
  if (!has_above) above_ctx = left_ctx;
169
170
33.1M
  return (above_ctx + left_ctx) > max_tx_size;
171
33.1M
}
Unexecuted instantiation: vp9_decodeframe.c:get_tx_size_context
Unexecuted instantiation: vp9_pred_common.c:get_tx_size_context
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_decodemv.c:get_tx_size_context
Line
Count
Source
156
1.63M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
1.63M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
1.63M
  const MODE_INFO *const above_mi = xd->above_mi;
159
1.63M
  const MODE_INFO *const left_mi = xd->left_mi;
160
1.63M
  const int has_above = !!above_mi;
161
1.63M
  const int has_left = !!left_mi;
162
1.63M
  int above_ctx =
163
1.63M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
1.63M
  int left_ctx =
165
1.63M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
1.63M
  if (!has_left) left_ctx = above_ctx;
167
168
1.63M
  if (!has_above) above_ctx = left_ctx;
169
170
1.63M
  return (above_ctx + left_ctx) > max_tx_size;
171
1.63M
}
vp9_bitstream.c:get_tx_size_context
Line
Count
Source
156
470k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
470k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
470k
  const MODE_INFO *const above_mi = xd->above_mi;
159
470k
  const MODE_INFO *const left_mi = xd->left_mi;
160
470k
  const int has_above = !!above_mi;
161
470k
  const int has_left = !!left_mi;
162
470k
  int above_ctx =
163
470k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
470k
  int left_ctx =
165
470k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
470k
  if (!has_left) left_ctx = above_ctx;
167
168
470k
  if (!has_above) above_ctx = left_ctx;
169
170
470k
  return (above_ctx + left_ctx) > max_tx_size;
171
470k
}
vp9_encodeframe.c:get_tx_size_context
Line
Count
Source
156
535k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
535k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
535k
  const MODE_INFO *const above_mi = xd->above_mi;
159
535k
  const MODE_INFO *const left_mi = xd->left_mi;
160
535k
  const int has_above = !!above_mi;
161
535k
  const int has_left = !!left_mi;
162
535k
  int above_ctx =
163
535k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
535k
  int left_ctx =
165
535k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
535k
  if (!has_left) left_ctx = above_ctx;
167
168
535k
  if (!has_above) above_ctx = left_ctx;
169
170
535k
  return (above_ctx + left_ctx) > max_tx_size;
171
535k
}
vp9_rdopt.c:get_tx_size_context
Line
Count
Source
156
30.4M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
30.4M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
30.4M
  const MODE_INFO *const above_mi = xd->above_mi;
159
30.4M
  const MODE_INFO *const left_mi = xd->left_mi;
160
30.4M
  const int has_above = !!above_mi;
161
30.4M
  const int has_left = !!left_mi;
162
30.4M
  int above_ctx =
163
30.4M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
30.4M
  int left_ctx =
165
30.4M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
30.4M
  if (!has_left) left_ctx = above_ctx;
167
168
30.4M
  if (!has_above) above_ctx = left_ctx;
169
170
30.4M
  return (above_ctx + left_ctx) > max_tx_size;
171
30.4M
}
Unexecuted instantiation: vp9_pickmode.c:get_tx_size_context
172
173
static INLINE const vpx_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx,
174
2.55M
                                           const struct tx_probs *tx_probs) {
175
2.55M
  switch (max_tx_size) {
176
1.44M
    case TX_8X8: return tx_probs->p8x8[ctx];
177
581k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
526k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
2.55M
  }
181
2.55M
}
Unexecuted instantiation: vp9_decodeframe.c:get_tx_probs
Unexecuted instantiation: vp9_pred_common.c:get_tx_probs
vp9_rd.c:get_tx_probs
Line
Count
Source
174
451k
                                           const struct tx_probs *tx_probs) {
175
451k
  switch (max_tx_size) {
176
150k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
150k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
150k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
451k
  }
181
451k
}
Unexecuted instantiation: vp9_segmentation.c:get_tx_probs
Unexecuted instantiation: vp9_tokenize.c:get_tx_probs
vp9_decodemv.c:get_tx_probs
Line
Count
Source
174
1.63M
                                           const struct tx_probs *tx_probs) {
175
1.63M
  switch (max_tx_size) {
176
925k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
371k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
335k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
1.63M
  }
181
1.63M
}
vp9_bitstream.c:get_tx_probs
Line
Count
Source
174
470k
                                           const struct tx_probs *tx_probs) {
175
470k
  switch (max_tx_size) {
176
369k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
60.1k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
40.5k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
470k
  }
181
470k
}
Unexecuted instantiation: vp9_encodeframe.c:get_tx_probs
Unexecuted instantiation: vp9_rdopt.c:get_tx_probs
Unexecuted instantiation: vp9_pickmode.c:get_tx_probs
182
183
static INLINE unsigned int *get_tx_counts(TX_SIZE max_tx_size, int ctx,
184
1.32M
                                          struct tx_counts *tx_counts) {
185
1.32M
  switch (max_tx_size) {
186
881k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
242k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
206k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
1.32M
  }
191
1.32M
}
Unexecuted instantiation: vp9_decodeframe.c:get_tx_counts
Unexecuted instantiation: vp9_pred_common.c:get_tx_counts
Unexecuted instantiation: vp9_rd.c:get_tx_counts
Unexecuted instantiation: vp9_segmentation.c:get_tx_counts
Unexecuted instantiation: vp9_tokenize.c:get_tx_counts
vp9_decodemv.c:get_tx_counts
Line
Count
Source
184
793k
                                          struct tx_counts *tx_counts) {
185
793k
  switch (max_tx_size) {
186
466k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
175k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
151k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
793k
  }
191
793k
}
Unexecuted instantiation: vp9_bitstream.c:get_tx_counts
vp9_encodeframe.c:get_tx_counts
Line
Count
Source
184
535k
                                          struct tx_counts *tx_counts) {
185
535k
  switch (max_tx_size) {
186
414k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
66.6k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
54.2k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
535k
  }
191
535k
}
Unexecuted instantiation: vp9_rdopt.c:get_tx_counts
Unexecuted instantiation: vp9_pickmode.c:get_tx_counts
192
193
#ifdef __cplusplus
194
}  // extern "C"
195
#endif
196
197
#endif  // VPX_VP9_COMMON_VP9_PRED_COMMON_H_