Coverage Report

Created: 2026-07-25 07:52

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
107k
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
107k
  const MODE_INFO *const above_mi = xd->above_mi;
43
107k
  const MODE_INFO *const left_mi = xd->left_mi;
44
107k
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
107k
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
107k
  return above_sip + left_sip;
48
107k
}
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
107k
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
107k
  const MODE_INFO *const above_mi = xd->above_mi;
43
107k
  const MODE_INFO *const left_mi = xd->left_mi;
44
107k
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
107k
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
107k
  return above_sip + left_sip;
48
107k
}
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
107k
                                                const MACROBLOCKD *xd) {
52
107k
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
107k
}
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
107k
                                                const MACROBLOCKD *xd) {
52
107k
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
107k
}
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
53.4M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
53.4M
  const MODE_INFO *const above_mi = xd->above_mi;
57
53.4M
  const MODE_INFO *const left_mi = xd->left_mi;
58
53.4M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
53.4M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
53.4M
  return above_skip + left_skip;
61
53.4M
}
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
5.77M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
5.77M
  const MODE_INFO *const above_mi = xd->above_mi;
57
5.77M
  const MODE_INFO *const left_mi = xd->left_mi;
58
5.77M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
5.77M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
5.77M
  return above_skip + left_skip;
61
5.77M
}
vp9_decodemv.c:vp9_get_skip_context
Line
Count
Source
55
5.14M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
5.14M
  const MODE_INFO *const above_mi = xd->above_mi;
57
5.14M
  const MODE_INFO *const left_mi = xd->left_mi;
58
5.14M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
5.14M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
5.14M
  return above_skip + left_skip;
61
5.14M
}
vp9_bitstream.c:vp9_get_skip_context
Line
Count
Source
55
1.37M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
1.37M
  const MODE_INFO *const above_mi = xd->above_mi;
57
1.37M
  const MODE_INFO *const left_mi = xd->left_mi;
58
1.37M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
1.37M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
1.37M
  return above_skip + left_skip;
61
1.37M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_context
vp9_rdopt.c:vp9_get_skip_context
Line
Count
Source
55
41.1M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
41.1M
  const MODE_INFO *const above_mi = xd->above_mi;
57
41.1M
  const MODE_INFO *const left_mi = xd->left_mi;
58
41.1M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
41.1M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
41.1M
  return above_skip + left_skip;
61
41.1M
}
Unexecuted instantiation: vp9_pickmode.c:vp9_get_skip_context
62
63
static INLINE vpx_prob vp9_get_skip_prob(const VP9_COMMON *cm,
64
42.4M
                                         const MACROBLOCKD *xd) {
65
42.4M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
42.4M
}
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.37M
                                         const MACROBLOCKD *xd) {
65
1.37M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
1.37M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_prob
vp9_rdopt.c:vp9_get_skip_prob
Line
Count
Source
64
41.1M
                                         const MACROBLOCKD *xd) {
65
41.1M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
41.1M
}
Unexecuted instantiation: vp9_pickmode.c:vp9_get_skip_prob
67
68
// Returns a context number for the given MB prediction signal
69
32.2M
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
32.2M
  const MODE_INFO *const left_mi = xd->left_mi;
75
32.2M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
32.2M
  const MODE_INFO *const above_mi = xd->above_mi;
77
32.2M
  const int above_type =
78
32.2M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
32.2M
  if (left_type == above_type)
81
21.1M
    return left_type;
82
11.1M
  else if (left_type == SWITCHABLE_FILTERS)
83
4.99M
    return above_type;
84
6.13M
  else if (above_type == SWITCHABLE_FILTERS)
85
4.87M
    return left_type;
86
1.26M
  else
87
1.26M
    return SWITCHABLE_FILTERS;
88
32.2M
}
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
30.1M
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
30.1M
  const MODE_INFO *const left_mi = xd->left_mi;
75
30.1M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
30.1M
  const MODE_INFO *const above_mi = xd->above_mi;
77
30.1M
  const int above_type =
78
30.1M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
30.1M
  if (left_type == above_type)
81
20.1M
    return left_type;
82
9.98M
  else if (left_type == SWITCHABLE_FILTERS)
83
4.68M
    return above_type;
84
5.30M
  else if (above_type == SWITCHABLE_FILTERS)
85
4.45M
    return left_type;
86
856k
  else
87
856k
    return SWITCHABLE_FILTERS;
88
30.1M
}
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
1.84M
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.84M
  const MODE_INFO *const left_mi = xd->left_mi;
75
1.84M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
1.84M
  const MODE_INFO *const above_mi = xd->above_mi;
77
1.84M
  const int above_type =
78
1.84M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
1.84M
  if (left_type == above_type)
81
834k
    return left_type;
82
1.00M
  else if (left_type == SWITCHABLE_FILTERS)
83
271k
    return above_type;
84
738k
  else if (above_type == SWITCHABLE_FILTERS)
85
364k
    return left_type;
86
373k
  else
87
373k
    return SWITCHABLE_FILTERS;
88
1.84M
}
vp9_bitstream.c:get_pred_context_switchable_interp
Line
Count
Source
69
116k
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
116k
  const MODE_INFO *const left_mi = xd->left_mi;
75
116k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
116k
  const MODE_INFO *const above_mi = xd->above_mi;
77
116k
  const int above_type =
78
116k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
116k
  if (left_type == above_type)
81
57.0k
    return left_type;
82
59.6k
  else if (left_type == SWITCHABLE_FILTERS)
83
18.5k
    return above_type;
84
41.1k
  else if (above_type == SWITCHABLE_FILTERS)
85
22.7k
    return left_type;
86
18.3k
  else
87
18.3k
    return SWITCHABLE_FILTERS;
88
116k
}
vp9_encodeframe.c:get_pred_context_switchable_interp
Line
Count
Source
69
157k
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
157k
  const MODE_INFO *const left_mi = xd->left_mi;
75
157k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
157k
  const MODE_INFO *const above_mi = xd->above_mi;
77
157k
  const int above_type =
78
157k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
157k
  if (left_type == above_type)
81
81.9k
    return left_type;
82
75.4k
  else if (left_type == SWITCHABLE_FILTERS)
83
25.1k
    return above_type;
84
50.2k
  else if (above_type == SWITCHABLE_FILTERS)
85
31.9k
    return left_type;
86
18.3k
  else
87
18.3k
    return SWITCHABLE_FILTERS;
88
157k
}
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
10.2M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
10.2M
  const MODE_INFO *const above_mi = xd->above_mi;
99
10.2M
  const MODE_INFO *const left_mi = xd->left_mi;
100
10.2M
  const int has_above = !!above_mi;
101
10.2M
  const int has_left = !!left_mi;
102
103
10.2M
  if (has_above && has_left) {  // both edges available
104
6.84M
    const int above_intra = !is_inter_block(above_mi);
105
6.84M
    const int left_intra = !is_inter_block(left_mi);
106
6.84M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
6.84M
  } else if (has_above || has_left) {  // one edge available
108
3.01M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
3.01M
  }
110
407k
  return 0;
111
10.2M
}
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.23M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
4.23M
  const MODE_INFO *const above_mi = xd->above_mi;
99
4.23M
  const MODE_INFO *const left_mi = xd->left_mi;
100
4.23M
  const int has_above = !!above_mi;
101
4.23M
  const int has_left = !!left_mi;
102
103
4.23M
  if (has_above && has_left) {  // both edges available
104
2.91M
    const int above_intra = !is_inter_block(above_mi);
105
2.91M
    const int left_intra = !is_inter_block(left_mi);
106
2.91M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
2.91M
  } else if (has_above || has_left) {  // one edge available
108
1.27M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.27M
  }
110
44.5k
  return 0;
111
4.23M
}
vp9_bitstream.c:get_intra_inter_context
Line
Count
Source
97
870k
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
870k
  const MODE_INFO *const above_mi = xd->above_mi;
99
870k
  const MODE_INFO *const left_mi = xd->left_mi;
100
870k
  const int has_above = !!above_mi;
101
870k
  const int has_left = !!left_mi;
102
103
870k
  if (has_above && has_left) {  // both edges available
104
587k
    const int above_intra = !is_inter_block(above_mi);
105
587k
    const int left_intra = !is_inter_block(left_mi);
106
587k
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
587k
  } else if (has_above || has_left) {  // one edge available
108
238k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
238k
  }
110
44.1k
  return 0;
111
870k
}
vp9_encodeframe.c:get_intra_inter_context
Line
Count
Source
97
870k
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
870k
  const MODE_INFO *const above_mi = xd->above_mi;
99
870k
  const MODE_INFO *const left_mi = xd->left_mi;
100
870k
  const int has_above = !!above_mi;
101
870k
  const int has_left = !!left_mi;
102
103
870k
  if (has_above && has_left) {  // both edges available
104
587k
    const int above_intra = !is_inter_block(above_mi);
105
587k
    const int left_intra = !is_inter_block(left_mi);
106
587k
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
587k
  } else if (has_above || has_left) {  // one edge available
108
238k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
238k
  }
110
44.1k
  return 0;
111
870k
}
vp9_rdopt.c:get_intra_inter_context
Line
Count
Source
97
4.28M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
4.28M
  const MODE_INFO *const above_mi = xd->above_mi;
99
4.28M
  const MODE_INFO *const left_mi = xd->left_mi;
100
4.28M
  const int has_above = !!above_mi;
101
4.28M
  const int has_left = !!left_mi;
102
103
4.28M
  if (has_above && has_left) {  // both edges available
104
2.74M
    const int above_intra = !is_inter_block(above_mi);
105
2.74M
    const int left_intra = !is_inter_block(left_mi);
106
2.74M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
2.74M
  } else if (has_above || has_left) {  // one edge available
108
1.26M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.26M
  }
110
274k
  return 0;
111
4.28M
}
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
5.15M
                                                const MACROBLOCKD *xd) {
115
5.15M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
5.15M
}
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
870k
                                                const MACROBLOCKD *xd) {
115
870k
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
870k
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_intra_inter_prob
vp9_rdopt.c:vp9_get_intra_inter_prob
Line
Count
Source
114
4.28M
                                                const MACROBLOCKD *xd) {
115
4.28M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
4.28M
}
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
4.64M
                                                       const MACROBLOCKD *xd) {
138
4.64M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
4.64M
}
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
358k
                                                       const MACROBLOCKD *xd) {
138
358k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
358k
}
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
4.28M
                                                       const MACROBLOCKD *xd) {
138
4.28M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
4.28M
}
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
4.40M
                                                       const MACROBLOCKD *xd) {
145
4.40M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
4.40M
}
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
120k
                                                       const MACROBLOCKD *xd) {
145
120k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
120k
}
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
4.28M
                                                       const MACROBLOCKD *xd) {
145
4.28M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
4.28M
}
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
24.1M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
24.1M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
24.1M
  const MODE_INFO *const above_mi = xd->above_mi;
159
24.1M
  const MODE_INFO *const left_mi = xd->left_mi;
160
24.1M
  const int has_above = !!above_mi;
161
24.1M
  const int has_left = !!left_mi;
162
24.1M
  int above_ctx =
163
24.1M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
24.1M
  int left_ctx =
165
24.1M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
24.1M
  if (!has_left) left_ctx = above_ctx;
167
168
24.1M
  if (!has_above) above_ctx = left_ctx;
169
170
24.1M
  return (above_ctx + left_ctx) > max_tx_size;
171
24.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.51M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
1.51M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
1.51M
  const MODE_INFO *const above_mi = xd->above_mi;
159
1.51M
  const MODE_INFO *const left_mi = xd->left_mi;
160
1.51M
  const int has_above = !!above_mi;
161
1.51M
  const int has_left = !!left_mi;
162
1.51M
  int above_ctx =
163
1.51M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
1.51M
  int left_ctx =
165
1.51M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
1.51M
  if (!has_left) left_ctx = above_ctx;
167
168
1.51M
  if (!has_above) above_ctx = left_ctx;
169
170
1.51M
  return (above_ctx + left_ctx) > max_tx_size;
171
1.51M
}
vp9_bitstream.c:get_tx_size_context
Line
Count
Source
156
325k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
325k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
325k
  const MODE_INFO *const above_mi = xd->above_mi;
159
325k
  const MODE_INFO *const left_mi = xd->left_mi;
160
325k
  const int has_above = !!above_mi;
161
325k
  const int has_left = !!left_mi;
162
325k
  int above_ctx =
163
325k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
325k
  int left_ctx =
165
325k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
325k
  if (!has_left) left_ctx = above_ctx;
167
168
325k
  if (!has_above) above_ctx = left_ctx;
169
170
325k
  return (above_ctx + left_ctx) > max_tx_size;
171
325k
}
vp9_encodeframe.c:get_tx_size_context
Line
Count
Source
156
382k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
382k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
382k
  const MODE_INFO *const above_mi = xd->above_mi;
159
382k
  const MODE_INFO *const left_mi = xd->left_mi;
160
382k
  const int has_above = !!above_mi;
161
382k
  const int has_left = !!left_mi;
162
382k
  int above_ctx =
163
382k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
382k
  int left_ctx =
165
382k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
382k
  if (!has_left) left_ctx = above_ctx;
167
168
382k
  if (!has_above) above_ctx = left_ctx;
169
170
382k
  return (above_ctx + left_ctx) > max_tx_size;
171
382k
}
vp9_rdopt.c:get_tx_size_context
Line
Count
Source
156
21.9M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
21.9M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
21.9M
  const MODE_INFO *const above_mi = xd->above_mi;
159
21.9M
  const MODE_INFO *const left_mi = xd->left_mi;
160
21.9M
  const int has_above = !!above_mi;
161
21.9M
  const int has_left = !!left_mi;
162
21.9M
  int above_ctx =
163
21.9M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
21.9M
  int left_ctx =
165
21.9M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
21.9M
  if (!has_left) left_ctx = above_ctx;
167
168
21.9M
  if (!has_above) above_ctx = left_ctx;
169
170
21.9M
  return (above_ctx + left_ctx) > max_tx_size;
171
21.9M
}
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.17M
                                           const struct tx_probs *tx_probs) {
175
2.17M
  switch (max_tx_size) {
176
1.22M
    case TX_8X8: return tx_probs->p8x8[ctx];
177
497k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
449k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
2.17M
  }
181
2.17M
}
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
335k
                                           const struct tx_probs *tx_probs) {
175
335k
  switch (max_tx_size) {
176
111k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
111k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
111k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
335k
  }
181
335k
}
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.51M
                                           const struct tx_probs *tx_probs) {
175
1.51M
  switch (max_tx_size) {
176
865k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
343k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
307k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
1.51M
  }
181
1.51M
}
vp9_bitstream.c:get_tx_probs
Line
Count
Source
174
325k
                                           const struct tx_probs *tx_probs) {
175
325k
  switch (max_tx_size) {
176
252k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
42.5k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
30.2k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
325k
  }
181
325k
}
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.21M
                                          struct tx_counts *tx_counts) {
185
1.21M
  switch (max_tx_size) {
186
776k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
234k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
204k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
1.21M
  }
191
1.21M
}
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
832k
                                          struct tx_counts *tx_counts) {
185
832k
  switch (max_tx_size) {
186
487k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
185k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
159k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
832k
  }
191
832k
}
Unexecuted instantiation: vp9_bitstream.c:get_tx_counts
vp9_encodeframe.c:get_tx_counts
Line
Count
Source
184
382k
                                          struct tx_counts *tx_counts) {
185
382k
  switch (max_tx_size) {
186
288k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
48.4k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
45.1k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
382k
  }
191
382k
}
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_