Coverage Report

Created: 2025-08-28 07:12

/src/libvpx/vp9/common/vp9_pred_common.h
Line
Count
Source (jump to first uncovered line)
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
117k
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
117k
  const MODE_INFO *const above_mi = xd->above_mi;
43
117k
  const MODE_INFO *const left_mi = xd->left_mi;
44
117k
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
117k
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
117k
  return above_sip + left_sip;
48
117k
}
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
117k
static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
42
117k
  const MODE_INFO *const above_mi = xd->above_mi;
43
117k
  const MODE_INFO *const left_mi = xd->left_mi;
44
117k
  const int above_sip = (above_mi != NULL) ? above_mi->seg_id_predicted : 0;
45
117k
  const int left_sip = (left_mi != NULL) ? left_mi->seg_id_predicted : 0;
46
47
117k
  return above_sip + left_sip;
48
117k
}
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
117k
                                                const MACROBLOCKD *xd) {
52
117k
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
117k
}
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
117k
                                                const MACROBLOCKD *xd) {
52
117k
  return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
53
117k
}
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
75.6M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
75.6M
  const MODE_INFO *const above_mi = xd->above_mi;
57
75.6M
  const MODE_INFO *const left_mi = xd->left_mi;
58
75.6M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
75.6M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
75.6M
  return above_skip + left_skip;
61
75.6M
}
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.26M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
8.26M
  const MODE_INFO *const above_mi = xd->above_mi;
57
8.26M
  const MODE_INFO *const left_mi = xd->left_mi;
58
8.26M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
8.26M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
8.26M
  return above_skip + left_skip;
61
8.26M
}
vp9_decodemv.c:vp9_get_skip_context
Line
Count
Source
55
4.27M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
4.27M
  const MODE_INFO *const above_mi = xd->above_mi;
57
4.27M
  const MODE_INFO *const left_mi = xd->left_mi;
58
4.27M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
4.27M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
4.27M
  return above_skip + left_skip;
61
4.27M
}
vp9_bitstream.c:vp9_get_skip_context
Line
Count
Source
55
1.98M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
1.98M
  const MODE_INFO *const above_mi = xd->above_mi;
57
1.98M
  const MODE_INFO *const left_mi = xd->left_mi;
58
1.98M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
1.98M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
1.98M
  return above_skip + left_skip;
61
1.98M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_context
vp9_rdopt.c:vp9_get_skip_context
Line
Count
Source
55
61.1M
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
56
61.1M
  const MODE_INFO *const above_mi = xd->above_mi;
57
61.1M
  const MODE_INFO *const left_mi = xd->left_mi;
58
61.1M
  const int above_skip = (above_mi != NULL) ? above_mi->skip : 0;
59
61.1M
  const int left_skip = (left_mi != NULL) ? left_mi->skip : 0;
60
61.1M
  return above_skip + left_skip;
61
61.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
63.1M
                                         const MACROBLOCKD *xd) {
65
63.1M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
63.1M
}
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.98M
                                         const MACROBLOCKD *xd) {
65
1.98M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
1.98M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_skip_prob
vp9_rdopt.c:vp9_get_skip_prob
Line
Count
Source
64
61.1M
                                         const MACROBLOCKD *xd) {
65
61.1M
  return cm->fc->skip_probs[vp9_get_skip_context(xd)];
66
61.1M
}
Unexecuted instantiation: vp9_pickmode.c:vp9_get_skip_prob
67
68
// Returns a context number for the given MB prediction signal
69
52.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
52.1M
  const MODE_INFO *const left_mi = xd->left_mi;
75
52.1M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
52.1M
  const MODE_INFO *const above_mi = xd->above_mi;
77
52.1M
  const int above_type =
78
52.1M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
52.1M
  if (left_type == above_type)
81
35.7M
    return left_type;
82
16.4M
  else if (left_type == SWITCHABLE_FILTERS)
83
7.16M
    return above_type;
84
9.25M
  else if (above_type == SWITCHABLE_FILTERS)
85
7.30M
    return left_type;
86
1.95M
  else
87
1.95M
    return SWITCHABLE_FILTERS;
88
52.1M
}
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
49.8M
static INLINE int get_pred_context_switchable_interp(const MACROBLOCKD *xd) {
70
  // Note:
71
  // The mode info data structure has a one element border above and to the
72
  // left of the entries corresponding to real macroblocks.
73
  // The prediction flags in these dummy entries are initialized to 0.
74
49.8M
  const MODE_INFO *const left_mi = xd->left_mi;
75
49.8M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
49.8M
  const MODE_INFO *const above_mi = xd->above_mi;
77
49.8M
  const int above_type =
78
49.8M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
49.8M
  if (left_type == above_type)
81
34.5M
    return left_type;
82
15.2M
  else if (left_type == SWITCHABLE_FILTERS)
83
6.83M
    return above_type;
84
8.38M
  else if (above_type == SWITCHABLE_FILTERS)
85
6.92M
    return left_type;
86
1.46M
  else
87
1.46M
    return SWITCHABLE_FILTERS;
88
49.8M
}
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.88M
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.88M
  const MODE_INFO *const left_mi = xd->left_mi;
75
1.88M
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
1.88M
  const MODE_INFO *const above_mi = xd->above_mi;
77
1.88M
  const int above_type =
78
1.88M
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
1.88M
  if (left_type == above_type)
81
905k
    return left_type;
82
975k
  else if (left_type == SWITCHABLE_FILTERS)
83
273k
    return above_type;
84
702k
  else if (above_type == SWITCHABLE_FILTERS)
85
281k
    return left_type;
86
420k
  else
87
420k
    return SWITCHABLE_FILTERS;
88
1.88M
}
vp9_bitstream.c:get_pred_context_switchable_interp
Line
Count
Source
69
202k
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
202k
  const MODE_INFO *const left_mi = xd->left_mi;
75
202k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
202k
  const MODE_INFO *const above_mi = xd->above_mi;
77
202k
  const int above_type =
78
202k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
202k
  if (left_type == above_type)
81
98.9k
    return left_type;
82
103k
  else if (left_type == SWITCHABLE_FILTERS)
83
27.2k
    return above_type;
84
75.9k
  else if (above_type == SWITCHABLE_FILTERS)
85
41.7k
    return left_type;
86
34.2k
  else
87
34.2k
    return SWITCHABLE_FILTERS;
88
202k
}
vp9_encodeframe.c:get_pred_context_switchable_interp
Line
Count
Source
69
253k
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
253k
  const MODE_INFO *const left_mi = xd->left_mi;
75
253k
  const int left_type = left_mi ? left_mi->interp_filter : SWITCHABLE_FILTERS;
76
253k
  const MODE_INFO *const above_mi = xd->above_mi;
77
253k
  const int above_type =
78
253k
      above_mi ? above_mi->interp_filter : SWITCHABLE_FILTERS;
79
80
253k
  if (left_type == above_type)
81
129k
    return left_type;
82
123k
  else if (left_type == SWITCHABLE_FILTERS)
83
34.2k
    return above_type;
84
89.1k
  else if (above_type == SWITCHABLE_FILTERS)
85
54.8k
    return left_type;
86
34.2k
  else
87
34.2k
    return SWITCHABLE_FILTERS;
88
253k
}
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
12.8M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
12.8M
  const MODE_INFO *const above_mi = xd->above_mi;
99
12.8M
  const MODE_INFO *const left_mi = xd->left_mi;
100
12.8M
  const int has_above = !!above_mi;
101
12.8M
  const int has_left = !!left_mi;
102
103
12.8M
  if (has_above && has_left) {  // both edges available
104
8.86M
    const int above_intra = !is_inter_block(above_mi);
105
8.86M
    const int left_intra = !is_inter_block(left_mi);
106
8.86M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
8.86M
  } else if (has_above || has_left) {  // one edge available
108
3.54M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
3.54M
  }
110
452k
  return 0;
111
12.8M
}
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
3.55M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
3.55M
  const MODE_INFO *const above_mi = xd->above_mi;
99
3.55M
  const MODE_INFO *const left_mi = xd->left_mi;
100
3.55M
  const int has_above = !!above_mi;
101
3.55M
  const int has_left = !!left_mi;
102
103
3.55M
  if (has_above && has_left) {  // both edges available
104
2.49M
    const int above_intra = !is_inter_block(above_mi);
105
2.49M
    const int left_intra = !is_inter_block(left_mi);
106
2.49M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
2.49M
  } else if (has_above || has_left) {  // one edge available
108
994k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
994k
  }
110
65.5k
  return 0;
111
3.55M
}
vp9_bitstream.c:get_intra_inter_context
Line
Count
Source
97
1.33M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
1.33M
  const MODE_INFO *const above_mi = xd->above_mi;
99
1.33M
  const MODE_INFO *const left_mi = xd->left_mi;
100
1.33M
  const int has_above = !!above_mi;
101
1.33M
  const int has_left = !!left_mi;
102
103
1.33M
  if (has_above && has_left) {  // both edges available
104
952k
    const int above_intra = !is_inter_block(above_mi);
105
952k
    const int left_intra = !is_inter_block(left_mi);
106
952k
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
952k
  } else if (has_above || has_left) {  // one edge available
108
339k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
339k
  }
110
41.7k
  return 0;
111
1.33M
}
vp9_encodeframe.c:get_intra_inter_context
Line
Count
Source
97
1.33M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
1.33M
  const MODE_INFO *const above_mi = xd->above_mi;
99
1.33M
  const MODE_INFO *const left_mi = xd->left_mi;
100
1.33M
  const int has_above = !!above_mi;
101
1.33M
  const int has_left = !!left_mi;
102
103
1.33M
  if (has_above && has_left) {  // both edges available
104
952k
    const int above_intra = !is_inter_block(above_mi);
105
952k
    const int left_intra = !is_inter_block(left_mi);
106
952k
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
952k
  } else if (has_above || has_left) {  // one edge available
108
339k
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
339k
  }
110
41.7k
  return 0;
111
1.33M
}
vp9_rdopt.c:get_intra_inter_context
Line
Count
Source
97
6.63M
static INLINE int get_intra_inter_context(const MACROBLOCKD *xd) {
98
6.63M
  const MODE_INFO *const above_mi = xd->above_mi;
99
6.63M
  const MODE_INFO *const left_mi = xd->left_mi;
100
6.63M
  const int has_above = !!above_mi;
101
6.63M
  const int has_left = !!left_mi;
102
103
6.63M
  if (has_above && has_left) {  // both edges available
104
4.46M
    const int above_intra = !is_inter_block(above_mi);
105
4.46M
    const int left_intra = !is_inter_block(left_mi);
106
4.46M
    return left_intra && above_intra ? 3 : left_intra || above_intra;
107
4.46M
  } else if (has_above || has_left) {  // one edge available
108
1.86M
    return 2 * !is_inter_block(has_above ? above_mi : left_mi);
109
1.86M
  }
110
303k
  return 0;
111
6.63M
}
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.97M
                                                const MACROBLOCKD *xd) {
115
7.97M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
7.97M
}
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.33M
                                                const MACROBLOCKD *xd) {
115
1.33M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
1.33M
}
Unexecuted instantiation: vp9_encodeframe.c:vp9_get_intra_inter_prob
vp9_rdopt.c:vp9_get_intra_inter_prob
Line
Count
Source
114
6.63M
                                                const MACROBLOCKD *xd) {
115
6.63M
  return cm->fc->intra_inter_prob[get_intra_inter_context(xd)];
116
6.63M
}
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.13M
                                                       const MACROBLOCKD *xd) {
138
7.13M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
7.13M
}
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
497k
                                                       const MACROBLOCKD *xd) {
138
497k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
497k
}
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.63M
                                                       const MACROBLOCKD *xd) {
138
6.63M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
139
6.63M
}
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.81M
                                                       const MACROBLOCKD *xd) {
145
6.81M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
6.81M
}
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
180k
                                                       const MACROBLOCKD *xd) {
145
180k
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
180k
}
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.63M
                                                       const MACROBLOCKD *xd) {
145
6.63M
  return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
146
6.63M
}
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
31.3M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
31.3M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
31.3M
  const MODE_INFO *const above_mi = xd->above_mi;
159
31.3M
  const MODE_INFO *const left_mi = xd->left_mi;
160
31.3M
  const int has_above = !!above_mi;
161
31.3M
  const int has_left = !!left_mi;
162
31.3M
  int above_ctx =
163
31.3M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
31.3M
  int left_ctx =
165
31.3M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
31.3M
  if (!has_left) left_ctx = above_ctx;
167
168
31.3M
  if (!has_above) above_ctx = left_ctx;
169
170
31.3M
  return (above_ctx + left_ctx) > max_tx_size;
171
31.3M
}
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
765k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
765k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
765k
  const MODE_INFO *const above_mi = xd->above_mi;
159
765k
  const MODE_INFO *const left_mi = xd->left_mi;
160
765k
  const int has_above = !!above_mi;
161
765k
  const int has_left = !!left_mi;
162
765k
  int above_ctx =
163
765k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
765k
  int left_ctx =
165
765k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
765k
  if (!has_left) left_ctx = above_ctx;
167
168
765k
  if (!has_above) above_ctx = left_ctx;
169
170
765k
  return (above_ctx + left_ctx) > max_tx_size;
171
765k
}
vp9_bitstream.c:get_tx_size_context
Line
Count
Source
156
444k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
444k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
444k
  const MODE_INFO *const above_mi = xd->above_mi;
159
444k
  const MODE_INFO *const left_mi = xd->left_mi;
160
444k
  const int has_above = !!above_mi;
161
444k
  const int has_left = !!left_mi;
162
444k
  int above_ctx =
163
444k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
444k
  int left_ctx =
165
444k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
444k
  if (!has_left) left_ctx = above_ctx;
167
168
444k
  if (!has_above) above_ctx = left_ctx;
169
170
444k
  return (above_ctx + left_ctx) > max_tx_size;
171
444k
}
vp9_encodeframe.c:get_tx_size_context
Line
Count
Source
156
505k
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
505k
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
505k
  const MODE_INFO *const above_mi = xd->above_mi;
159
505k
  const MODE_INFO *const left_mi = xd->left_mi;
160
505k
  const int has_above = !!above_mi;
161
505k
  const int has_left = !!left_mi;
162
505k
  int above_ctx =
163
505k
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
505k
  int left_ctx =
165
505k
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
505k
  if (!has_left) left_ctx = above_ctx;
167
168
505k
  if (!has_above) above_ctx = left_ctx;
169
170
505k
  return (above_ctx + left_ctx) > max_tx_size;
171
505k
}
vp9_rdopt.c:get_tx_size_context
Line
Count
Source
156
29.5M
static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
157
29.5M
  const int max_tx_size = max_txsize_lookup[xd->mi[0]->sb_type];
158
29.5M
  const MODE_INFO *const above_mi = xd->above_mi;
159
29.5M
  const MODE_INFO *const left_mi = xd->left_mi;
160
29.5M
  const int has_above = !!above_mi;
161
29.5M
  const int has_left = !!left_mi;
162
29.5M
  int above_ctx =
163
29.5M
      (has_above && !above_mi->skip) ? (int)above_mi->tx_size : max_tx_size;
164
29.5M
  int left_ctx =
165
29.5M
      (has_left && !left_mi->skip) ? (int)left_mi->tx_size : max_tx_size;
166
29.5M
  if (!has_left) left_ctx = above_ctx;
167
168
29.5M
  if (!has_above) above_ctx = left_ctx;
169
170
29.5M
  return (above_ctx + left_ctx) > max_tx_size;
171
29.5M
}
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
1.52M
                                           const struct tx_probs *tx_probs) {
175
1.52M
  switch (max_tx_size) {
176
872k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
322k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
334k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
1.52M
  }
181
1.52M
}
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
318k
                                           const struct tx_probs *tx_probs) {
175
318k
  switch (max_tx_size) {
176
106k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
106k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
106k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
318k
  }
181
318k
}
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
765k
                                           const struct tx_probs *tx_probs) {
175
765k
  switch (max_tx_size) {
176
417k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
160k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
187k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
765k
  }
181
765k
}
vp9_bitstream.c:get_tx_probs
Line
Count
Source
174
444k
                                           const struct tx_probs *tx_probs) {
175
444k
  switch (max_tx_size) {
176
348k
    case TX_8X8: return tx_probs->p8x8[ctx];
177
55.7k
    case TX_16X16: return tx_probs->p16x16[ctx];
178
40.0k
    case TX_32X32: return tx_probs->p32x32[ctx];
179
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
180
444k
  }
181
444k
}
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
990k
                                          struct tx_counts *tx_counts) {
185
990k
  switch (max_tx_size) {
186
667k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
166k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
155k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
990k
  }
191
990k
}
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
484k
                                          struct tx_counts *tx_counts) {
185
484k
  switch (max_tx_size) {
186
279k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
104k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
100k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
484k
  }
191
484k
}
Unexecuted instantiation: vp9_bitstream.c:get_tx_counts
vp9_encodeframe.c:get_tx_counts
Line
Count
Source
184
505k
                                          struct tx_counts *tx_counts) {
185
505k
  switch (max_tx_size) {
186
388k
    case TX_8X8: return tx_counts->p8x8[ctx];
187
62.3k
    case TX_16X16: return tx_counts->p16x16[ctx];
188
55.3k
    case TX_32X32: return tx_counts->p32x32[ctx];
189
0
    default: assert(0 && "Invalid max_tx_size."); return NULL;
190
505k
  }
191
505k
}
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_