Coverage Report

Created: 2025-12-31 07:57

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
101k
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
101k
  const MODE_INFO *const above_mi = xd->above_mi;
43
101k
  const MODE_INFO *const left_mi = xd->left_mi;
44
101k
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
101k
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
101k
  return above_sip + left_sip;
48
101k
}
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
101k
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
101k
  const MODE_INFO *const above_mi = xd->above_mi;
43
101k
  const MODE_INFO *const left_mi = xd->left_mi;
44
101k
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
101k
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
101k
  return above_sip + left_sip;
48
101k
}
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
101k
                                                const MACROBLOCKD *xd) {
52
101k
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
101k
}
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
101k
                                                const MACROBLOCKD *xd) {
52
101k
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
101k
}
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
74.8M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
74.8M
  const MODE_INFO *const above_mi = xd->above_mi;
57
74.8M
  const MODE_INFO *const left_mi = xd->left_mi;
58
74.8M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
74.8M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
74.8M
  return above_skip + left_skip;
61
74.8M
}
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.16M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
8.16M
  const MODE_INFO *const above_mi = xd->above_mi;
57
8.16M
  const MODE_INFO *const left_mi = xd->left_mi;
58
8.16M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
8.16M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
8.16M
  return above_skip + left_skip;
61
8.16M
}
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
1.95M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
1.95M
  const MODE_INFO *const above_mi = xd->above_mi;
57
1.95M
  const MODE_INFO *const left_mi = xd->left_mi;
58
1.95M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
1.95M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
1.95M
  return above_skip + left_skip;
61
1.95M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_context
vp9_rdopt.c:vp9_get_skip_context
Line
Count
Source
55
58.7M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
58.7M
  const MODE_INFO *const above_mi = xd->above_mi;
57
58.7M
  const MODE_INFO *const left_mi = xd->left_mi;
58
58.7M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
58.7M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
58.7M
  return above_skip + left_skip;
61
58.7M
}
Unexecuted instantiation: vp9_pickmode.c:vp9_get_skip_context
62
63
static INLINE vpx_prob vp9_get_skip_prob(const VP9_COMMON *cm,
64
60.6M
                                         const MACROBLOCKD *xd) {
65
60.6M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
60.6M
}
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
1.95M
                                         const MACROBLOCKD *xd) {
65
1.95M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
1.95M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_prob
vp9_rdopt.c:vp9_get_skip_prob
Line
Count
Source
64
58.7M
                                         const MACROBLOCKD *xd) {
65
58.7M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
58.7M
}
Unexecuted instantiation: vp9_pickmode.c:vp9_get_skip_prob
67
68
// Returns a context number for the given MB prediction signal
69
49.4M
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
49.4M
  const MODE_INFO *const left_mi = xd->left_mi;
75
49.4M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
49.4M
  const MODE_INFO *const above_mi = xd->above_mi;
77
49.4M
  const int above_type =
78
49.4M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
49.4M
  if (left_type == above_type)
81
32.5M
    return left_type;
82
16.9M
  else if (left_type == SWITCHABLE_FILTERS)
83
7.47M
    return above_type;
84
9.46M
  else if (above_type == SWITCHABLE_FILTERS)
85
7.37M
    return left_type;
86
2.08M
  else
87
2.08M
    return SWITCHABLE_FILTERS;
88
49.4M
}
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
46.5M
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
46.5M
  const MODE_INFO *const left_mi = xd->left_mi;
75
46.5M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
46.5M
  const MODE_INFO *const above_mi = xd->above_mi;
77
46.5M
  const int above_type =
78
46.5M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
46.5M
  if (left_type == above_type)
81
31.1M
    return left_type;
82
15.4M
  else if (left_type == SWITCHABLE_FILTERS)
83
7.04M
    return above_type;
84
8.36M
  else if (above_type == SWITCHABLE_FILTERS)
85
6.87M
    return left_type;
86
1.49M
  else
87
1.49M
    return SWITCHABLE_FILTERS;
88
46.5M
}
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.42M
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.42M
  const MODE_INFO *const left_mi = xd->left_mi;
75
2.42M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
2.42M
  const MODE_INFO *const above_mi = xd->above_mi;
77
2.42M
  const int above_type =
78
2.42M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
2.42M
  if (left_type == above_type)
81
1.14M
    return left_type;
82
1.28M
  else if (left_type == SWITCHABLE_FILTERS)
83
356k
    return above_type;
84
923k
  else if (above_type == SWITCHABLE_FILTERS)
85
399k
    return left_type;
86
524k
  else
87
524k
    return SWITCHABLE_FILTERS;
88
2.42M
}
vp9_bitstream.c:get_pred_context_switchable_interp
Line
Count
Source
69
214k
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
214k
  const MODE_INFO *const left_mi = xd->left_mi;
75
214k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
214k
  const MODE_INFO *const above_mi = xd->above_mi;
77
214k
  const int above_type =
78
214k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
214k
  if (left_type == above_type)
81
104k
    return left_type;
82
109k
  else if (left_type == SWITCHABLE_FILTERS)
83
31.5k
    return above_type;
84
78.2k
  else if (above_type == SWITCHABLE_FILTERS)
85
44.1k
    return left_type;
86
34.1k
  else
87
34.1k
    return SWITCHABLE_FILTERS;
88
214k
}
vp9_encodeframe.c:get_pred_context_switchable_interp
Line
Count
Source
69
272k
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
272k
  const MODE_INFO *const left_mi = xd->left_mi;
75
272k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
272k
  const MODE_INFO *const above_mi = xd->above_mi;
77
272k
  const int above_type =
78
272k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
272k
  if (left_type == above_type)
81
140k
    return left_type;
82
131k
  else if (left_type == SWITCHABLE_FILTERS)
83
40.1k
    return above_type;
84
91.6k
  else if (above_type == SWITCHABLE_FILTERS)
85
57.5k
    return left_type;
86
34.1k
  else
87
34.1k
    return SWITCHABLE_FILTERS;
88
272k
}
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
13.9M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
13.9M
  const MODE_INFO *const above_mi = xd->above_mi;
99
13.9M
  const MODE_INFO *const left_mi = xd->left_mi;
100
13.9M
  const int has_above = !!above_mi;
101
13.9M
  const int has_left = !!left_mi;
102
103
13.9M
  if (has_above && has_left) {  // both edges available
104
9.72M
    const int above_intra = !is_inter_block(above_mi);
105
9.72M
    const int left_intra = !is_inter_block(left_mi);
106
9.72M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
9.72M
  } else if (has_above || has_left) {  // one edge available
108
3.75M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
3.75M
  }
110
466k
  return 0;
111
13.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
5.03M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
5.03M
  const MODE_INFO *const above_mi = xd->above_mi;
99
5.03M
  const MODE_INFO *const left_mi = xd->left_mi;
100
5.03M
  const int has_above = !!above_mi;
101
5.03M
  const int has_left = !!left_mi;
102
103
5.03M
  if (has_above && has_left) {  // both edges available
104
3.73M
    const int above_intra = !is_inter_block(above_mi);
105
3.73M
    const int left_intra = !is_inter_block(left_mi);
106
3.73M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
3.73M
  } else if (has_above || has_left) {  // one edge available
108
1.25M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.25M
  }
110
48.2k
  return 0;
111
5.03M
}
vp9_bitstream.c:get_intra_inter_context
Line
Count
Source
97
1.28M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
1.28M
  const MODE_INFO *const above_mi = xd->above_mi;
99
1.28M
  const MODE_INFO *const left_mi = xd->left_mi;
100
1.28M
  const int has_above = !!above_mi;
101
1.28M
  const int has_left = !!left_mi;
102
103
1.28M
  if (has_above && has_left) {  // both edges available
104
900k
    const int above_intra = !is_inter_block(above_mi);
105
900k
    const int left_intra = !is_inter_block(left_mi);
106
900k
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
900k
  } else if (has_above || has_left) {  // one edge available
108
338k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
338k
  }
110
48.9k
  return 0;
111
1.28M
}
vp9_encodeframe.c:get_intra_inter_context
Line
Count
Source
97
1.28M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
1.28M
  const MODE_INFO *const above_mi = xd->above_mi;
99
1.28M
  const MODE_INFO *const left_mi = xd->left_mi;
100
1.28M
  const int has_above = !!above_mi;
101
1.28M
  const int has_left = !!left_mi;
102
103
1.28M
  if (has_above && has_left) {  // both edges available
104
900k
    const int above_intra = !is_inter_block(above_mi);
105
900k
    const int left_intra = !is_inter_block(left_mi);
106
900k
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
900k
  } else if (has_above || has_left) {  // one edge available
108
338k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
338k
  }
110
48.9k
  return 0;
111
1.28M
}
vp9_rdopt.c:get_intra_inter_context
Line
Count
Source
97
6.33M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
6.33M
  const MODE_INFO *const above_mi = xd->above_mi;
99
6.33M
  const MODE_INFO *const left_mi = xd->left_mi;
100
6.33M
  const int has_above = !!above_mi;
101
6.33M
  const int has_left = !!left_mi;
102
103
6.33M
  if (has_above && has_left) {  // both edges available
104
4.19M
    const int above_intra = !is_inter_block(above_mi);
105
4.19M
    const int left_intra = !is_inter_block(left_mi);
106
4.19M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
4.19M
  } 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
320k
  return 0;
111
6.33M
}
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
7.62M
                                                const MACROBLOCKD *xd) {
115
7.62M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
7.62M
}
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.28M
                                                const MACROBLOCKD *xd) {
115
1.28M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
1.28M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_intra_inter_prob
vp9_rdopt.c:vp9_get_intra_inter_prob
Line
Count
Source
114
6.33M
                                                const MACROBLOCKD *xd) {
115
6.33M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
6.33M
}
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
6.88M
                                                       const MACROBLOCKD *xd) {
138
6.88M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
6.88M
}
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
548k
                                                       const MACROBLOCKD *xd) {
138
548k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
548k
}
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
6.33M
                                                       const MACROBLOCKD *xd) {
138
6.33M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
6.33M
}
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
6.53M
                                                       const MACROBLOCKD *xd) {
145
6.53M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
6.53M
}
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
197k
                                                       const MACROBLOCKD *xd) {
145
197k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
197k
}
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
6.33M
                                                       const MACROBLOCKD *xd) {
145
6.33M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
6.33M
}
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
32.0M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
32.0M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
32.0M
  const MODE_INFO *const above_mi = xd->above_mi;
159
32.0M
  const MODE_INFO *const left_mi = xd->left_mi;
160
32.0M
  const int has_above = !!above_mi;
161
32.0M
  const int has_left = !!left_mi;
162
32.0M
  int above_ctx =
163
32.0M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
32.0M
  int left_ctx =
165
32.0M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
32.0M
  if (!has_left) left_ctx = above_ctx;
167
168
32.0M
  if (!has_above) above_ctx = left_ctx;
169
170
32.0M
  return (above_ctx + left_ctx) > max_tx_size;
171
32.0M
}
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.31M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
1.31M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
1.31M
  const MODE_INFO *const above_mi = xd->above_mi;
159
1.31M
  const MODE_INFO *const left_mi = xd->left_mi;
160
1.31M
  const int has_above = !!above_mi;
161
1.31M
  const int has_left = !!left_mi;
162
1.31M
  int above_ctx =
163
1.31M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
1.31M
  int left_ctx =
165
1.31M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
1.31M
  if (!has_left) left_ctx = above_ctx;
167
168
1.31M
  if (!has_above) above_ctx = left_ctx;
169
170
1.31M
  return (above_ctx + left_ctx) > max_tx_size;
171
1.31M
}
vp9_bitstream.c:get_tx_size_context
Line
Count
Source
156
468k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
468k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
468k
  const MODE_INFO *const above_mi = xd->above_mi;
159
468k
  const MODE_INFO *const left_mi = xd->left_mi;
160
468k
  const int has_above = !!above_mi;
161
468k
  const int has_left = !!left_mi;
162
468k
  int above_ctx =
163
468k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
468k
  int left_ctx =
165
468k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
468k
  if (!has_left) left_ctx = above_ctx;
167
168
468k
  if (!has_above) above_ctx = left_ctx;
169
170
468k
  return (above_ctx + left_ctx) > max_tx_size;
171
468k
}
vp9_encodeframe.c:get_tx_size_context
Line
Count
Source
156
526k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
526k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
526k
  const MODE_INFO *const above_mi = xd->above_mi;
159
526k
  const MODE_INFO *const left_mi = xd->left_mi;
160
526k
  const int has_above = !!above_mi;
161
526k
  const int has_left = !!left_mi;
162
526k
  int above_ctx =
163
526k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
526k
  int left_ctx =
165
526k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
526k
  if (!has_left) left_ctx = above_ctx;
167
168
526k
  if (!has_above) above_ctx = left_ctx;
169
170
526k
  return (above_ctx + left_ctx) > max_tx_size;
171
526k
}
vp9_rdopt.c:get_tx_size_context
Line
Count
Source
156
29.7M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
29.7M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
29.7M
  const MODE_INFO *const above_mi = xd->above_mi;
159
29.7M
  const MODE_INFO *const left_mi = xd->left_mi;
160
29.7M
  const int has_above = !!above_mi;
161
29.7M
  const int has_left = !!left_mi;
162
29.7M
  int above_ctx =
163
29.7M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
29.7M
  int left_ctx =
165
29.7M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
29.7M
  if (!has_left) left_ctx = above_ctx;
167
168
29.7M
  if (!has_above) above_ctx = left_ctx;
169
170
29.7M
  return (above_ctx + left_ctx) > max_tx_size;
171
29.7M
}
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.14M
                                           const struct tx_probs *tx_probs) {
175
2.14M
  switch (max_tx_size) {
176
1.21M
    case TX_8X8: return tx_probs->p8x8[ctx];
177
474k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
456k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
2.14M
  }
181
2.14M
}
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
366k
                                           const struct tx_probs *tx_probs) {
175
366k
  switch (max_tx_size) {
176
122k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
122k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
122k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
366k
  }
181
366k
}
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.31M
                                           const struct tx_probs *tx_probs) {
175
1.31M
  switch (max_tx_size) {
176
722k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
295k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
294k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
1.31M
  }
181
1.31M
}
vp9_bitstream.c:get_tx_probs
Line
Count
Source
174
468k
                                           const struct tx_probs *tx_probs) {
175
468k
  switch (max_tx_size) {
176
372k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
56.8k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
39.6k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
468k
  }
181
468k
}
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.31M
                                          struct tx_counts *tx_counts) {
185
1.31M
  switch (max_tx_size) {
186
878k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
248k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
191k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
1.31M
  }
191
1.31M
}
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
792k
                                          struct tx_counts *tx_counts) {
185
792k
  switch (max_tx_size) {
186
466k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
185k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
140k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
792k
  }
191
792k
}
Unexecuted instantiation: vp9_bitstream.c:get_tx_counts
vp9_encodeframe.c:get_tx_counts
Line
Count
Source
184
526k
                                          struct tx_counts *tx_counts) {
185
526k
  switch (max_tx_size) {
186
411k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
62.8k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
51.8k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
526k
  }
191
526k
}
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_