Coverage Report

Created: 2026-04-01 07:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/aom/av1/common/cfl.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
3
 *
4
 * This source code is subject to the terms of the BSD 2 Clause License and
5
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6
 * was not distributed with this source code in the LICENSE file, you can
7
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8
 * Media Patent License 1.0 was not distributed with this source code in the
9
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10
 */
11
12
#ifndef AOM_AV1_COMMON_CFL_H_
13
#define AOM_AV1_COMMON_CFL_H_
14
15
#include "av1/common/av1_common_int.h"
16
#include "av1/common/blockd.h"
17
18
// Can we use CfL for the current block?
19
25.5M
static inline CFL_ALLOWED_TYPE is_cfl_allowed(const MACROBLOCKD *xd) {
20
25.5M
  const MB_MODE_INFO *mbmi = xd->mi[0];
21
25.5M
  const BLOCK_SIZE bsize = mbmi->bsize;
22
25.5M
  assert(bsize < BLOCK_SIZES_ALL);
23
25.5M
  if (xd->lossless[mbmi->segment_id]) {
24
    // In lossless, CfL is available when the partition size is equal to the
25
    // transform size.
26
208k
    const int ssx = xd->plane[AOM_PLANE_U].subsampling_x;
27
208k
    const int ssy = xd->plane[AOM_PLANE_U].subsampling_y;
28
208k
    const int plane_bsize = get_plane_block_size(bsize, ssx, ssy);
29
208k
    return (CFL_ALLOWED_TYPE)(plane_bsize == BLOCK_4X4);
30
208k
  }
31
  // Spec: CfL is available to luma partitions lesser than or equal to 32x32
32
25.3M
  return (CFL_ALLOWED_TYPE)(block_size_wide[bsize] <= 32 &&
33
24.6M
                            block_size_high[bsize] <= 32);
34
25.5M
}
Unexecuted instantiation: decodeframe.c:is_cfl_allowed
decodemv.c:is_cfl_allowed
Line
Count
Source
19
13.0M
static inline CFL_ALLOWED_TYPE is_cfl_allowed(const MACROBLOCKD *xd) {
20
13.0M
  const MB_MODE_INFO *mbmi = xd->mi[0];
21
13.0M
  const BLOCK_SIZE bsize = mbmi->bsize;
22
13.0M
  assert(bsize < BLOCK_SIZES_ALL);
23
13.0M
  if (xd->lossless[mbmi->segment_id]) {
24
    // In lossless, CfL is available when the partition size is equal to the
25
    // transform size.
26
160k
    const int ssx = xd->plane[AOM_PLANE_U].subsampling_x;
27
160k
    const int ssy = xd->plane[AOM_PLANE_U].subsampling_y;
28
160k
    const int plane_bsize = get_plane_block_size(bsize, ssx, ssy);
29
160k
    return (CFL_ALLOWED_TYPE)(plane_bsize == BLOCK_4X4);
30
160k
  }
31
  // Spec: CfL is available to luma partitions lesser than or equal to 32x32
32
12.8M
  return (CFL_ALLOWED_TYPE)(block_size_wide[bsize] <= 32 &&
33
12.2M
                            block_size_high[bsize] <= 32);
34
13.0M
}
Unexecuted instantiation: av1_cx_iface.c:is_cfl_allowed
Unexecuted instantiation: allintra_vis.c:is_cfl_allowed
Unexecuted instantiation: bitstream.c:is_cfl_allowed
Unexecuted instantiation: encodeframe.c:is_cfl_allowed
Unexecuted instantiation: encodeframe_utils.c:is_cfl_allowed
Unexecuted instantiation: encodemb.c:is_cfl_allowed
Unexecuted instantiation: encoder.c:is_cfl_allowed
Unexecuted instantiation: encoder_utils.c:is_cfl_allowed
Unexecuted instantiation: encodetxb.c:is_cfl_allowed
Unexecuted instantiation: ethread.c:is_cfl_allowed
Unexecuted instantiation: firstpass.c:is_cfl_allowed
Unexecuted instantiation: global_motion_facade.c:is_cfl_allowed
Unexecuted instantiation: mcomp.c:is_cfl_allowed
Unexecuted instantiation: palette.c:is_cfl_allowed
Unexecuted instantiation: partition_search.c:is_cfl_allowed
Unexecuted instantiation: partition_strategy.c:is_cfl_allowed
Unexecuted instantiation: rd.c:is_cfl_allowed
Unexecuted instantiation: rdopt.c:is_cfl_allowed
Unexecuted instantiation: nonrd_pickmode.c:is_cfl_allowed
Unexecuted instantiation: nonrd_opt.c:is_cfl_allowed
Unexecuted instantiation: speed_features.c:is_cfl_allowed
Unexecuted instantiation: superres_scale.c:is_cfl_allowed
Unexecuted instantiation: svc_layercontext.c:is_cfl_allowed
Unexecuted instantiation: temporal_filter.c:is_cfl_allowed
Unexecuted instantiation: tokenize.c:is_cfl_allowed
Unexecuted instantiation: tpl_model.c:is_cfl_allowed
Unexecuted instantiation: tx_search.c:is_cfl_allowed
Unexecuted instantiation: intra_mode_search.c:is_cfl_allowed
Unexecuted instantiation: var_based_part.c:is_cfl_allowed
cfl.c:is_cfl_allowed
Line
Count
Source
19
6.24M
static inline CFL_ALLOWED_TYPE is_cfl_allowed(const MACROBLOCKD *xd) {
20
6.24M
  const MB_MODE_INFO *mbmi = xd->mi[0];
21
6.24M
  const BLOCK_SIZE bsize = mbmi->bsize;
22
6.24M
  assert(bsize < BLOCK_SIZES_ALL);
23
6.24M
  if (xd->lossless[mbmi->segment_id]) {
24
    // In lossless, CfL is available when the partition size is equal to the
25
    // transform size.
26
24.2k
    const int ssx = xd->plane[AOM_PLANE_U].subsampling_x;
27
24.2k
    const int ssy = xd->plane[AOM_PLANE_U].subsampling_y;
28
24.2k
    const int plane_bsize = get_plane_block_size(bsize, ssx, ssy);
29
24.2k
    return (CFL_ALLOWED_TYPE)(plane_bsize == BLOCK_4X4);
30
24.2k
  }
31
  // Spec: CfL is available to luma partitions lesser than or equal to 32x32
32
6.22M
  return (CFL_ALLOWED_TYPE)(block_size_wide[bsize] <= 32 &&
33
6.22M
                            block_size_high[bsize] <= 32);
34
6.24M
}
reconintra.c:is_cfl_allowed
Line
Count
Source
19
6.24M
static inline CFL_ALLOWED_TYPE is_cfl_allowed(const MACROBLOCKD *xd) {
20
6.24M
  const MB_MODE_INFO *mbmi = xd->mi[0];
21
6.24M
  const BLOCK_SIZE bsize = mbmi->bsize;
22
6.24M
  assert(bsize < BLOCK_SIZES_ALL);
23
6.24M
  if (xd->lossless[mbmi->segment_id]) {
24
    // In lossless, CfL is available when the partition size is equal to the
25
    // transform size.
26
24.2k
    const int ssx = xd->plane[AOM_PLANE_U].subsampling_x;
27
24.2k
    const int ssy = xd->plane[AOM_PLANE_U].subsampling_y;
28
24.2k
    const int plane_bsize = get_plane_block_size(bsize, ssx, ssy);
29
24.2k
    return (CFL_ALLOWED_TYPE)(plane_bsize == BLOCK_4X4);
30
24.2k
  }
31
  // Spec: CfL is available to luma partitions lesser than or equal to 32x32
32
6.22M
  return (CFL_ALLOWED_TYPE)(block_size_wide[bsize] <= 32 &&
33
6.22M
                            block_size_high[bsize] <= 32);
34
6.24M
}
Unexecuted instantiation: compound_type.c:is_cfl_allowed
Unexecuted instantiation: encode_strategy.c:is_cfl_allowed
Unexecuted instantiation: interp_search.c:is_cfl_allowed
Unexecuted instantiation: motion_search_facade.c:is_cfl_allowed
35
36
// Do we need to save the luma pixels from the current block,
37
// for a possible future CfL prediction?
38
static inline CFL_ALLOWED_TYPE store_cfl_required(const AV1_COMMON *cm,
39
47.5M
                                                  const MACROBLOCKD *xd) {
40
47.5M
  const MB_MODE_INFO *mbmi = xd->mi[0];
41
42
47.5M
  if (cm->seq_params->monochrome) return CFL_DISALLOWED;
43
44
47.4M
  if (!xd->is_chroma_ref) {
45
    // For non-chroma-reference blocks, we should always store the luma pixels,
46
    // in case the corresponding chroma-reference block uses CfL.
47
    // Note that this can only happen for block sizes which are <8 on
48
    // their shortest side, as otherwise they would be chroma reference
49
    // blocks.
50
2.81M
    return CFL_ALLOWED;
51
2.81M
  }
52
53
  // If this block has chroma information, we know whether we're
54
  // actually going to perform a CfL prediction
55
44.6M
  return (CFL_ALLOWED_TYPE)(!is_inter_block(mbmi) &&
56
44.4M
                            mbmi->uv_mode == UV_CFL_PRED);
57
47.4M
}
decodeframe.c:store_cfl_required
Line
Count
Source
39
33.1M
                                                  const MACROBLOCKD *xd) {
40
33.1M
  const MB_MODE_INFO *mbmi = xd->mi[0];
41
42
33.1M
  if (cm->seq_params->monochrome) return CFL_DISALLOWED;
43
44
33.1M
  if (!xd->is_chroma_ref) {
45
    // For non-chroma-reference blocks, we should always store the luma pixels,
46
    // in case the corresponding chroma-reference block uses CfL.
47
    // Note that this can only happen for block sizes which are <8 on
48
    // their shortest side, as otherwise they would be chroma reference
49
    // blocks.
50
1.53M
    return CFL_ALLOWED;
51
1.53M
  }
52
53
  // If this block has chroma information, we know whether we're
54
  // actually going to perform a CfL prediction
55
31.5M
  return (CFL_ALLOWED_TYPE)(!is_inter_block(mbmi) &&
56
31.4M
                            mbmi->uv_mode == UV_CFL_PRED);
57
33.1M
}
decodemv.c:store_cfl_required
Line
Count
Source
39
14.3M
                                                  const MACROBLOCKD *xd) {
40
14.3M
  const MB_MODE_INFO *mbmi = xd->mi[0];
41
42
14.3M
  if (cm->seq_params->monochrome) return CFL_DISALLOWED;
43
44
14.3M
  if (!xd->is_chroma_ref) {
45
    // For non-chroma-reference blocks, we should always store the luma pixels,
46
    // in case the corresponding chroma-reference block uses CfL.
47
    // Note that this can only happen for block sizes which are <8 on
48
    // their shortest side, as otherwise they would be chroma reference
49
    // blocks.
50
1.27M
    return CFL_ALLOWED;
51
1.27M
  }
52
53
  // If this block has chroma information, we know whether we're
54
  // actually going to perform a CfL prediction
55
13.0M
  return (CFL_ALLOWED_TYPE)(!is_inter_block(mbmi) &&
56
13.0M
                            mbmi->uv_mode == UV_CFL_PRED);
57
14.3M
}
Unexecuted instantiation: av1_cx_iface.c:store_cfl_required
Unexecuted instantiation: allintra_vis.c:store_cfl_required
Unexecuted instantiation: bitstream.c:store_cfl_required
Unexecuted instantiation: encodeframe.c:store_cfl_required
Unexecuted instantiation: encodeframe_utils.c:store_cfl_required
Unexecuted instantiation: encodemb.c:store_cfl_required
Unexecuted instantiation: encoder.c:store_cfl_required
Unexecuted instantiation: encoder_utils.c:store_cfl_required
Unexecuted instantiation: encodetxb.c:store_cfl_required
Unexecuted instantiation: ethread.c:store_cfl_required
Unexecuted instantiation: firstpass.c:store_cfl_required
Unexecuted instantiation: global_motion_facade.c:store_cfl_required
Unexecuted instantiation: mcomp.c:store_cfl_required
Unexecuted instantiation: palette.c:store_cfl_required
Unexecuted instantiation: partition_search.c:store_cfl_required
Unexecuted instantiation: partition_strategy.c:store_cfl_required
Unexecuted instantiation: rd.c:store_cfl_required
Unexecuted instantiation: rdopt.c:store_cfl_required
Unexecuted instantiation: nonrd_pickmode.c:store_cfl_required
Unexecuted instantiation: nonrd_opt.c:store_cfl_required
Unexecuted instantiation: speed_features.c:store_cfl_required
Unexecuted instantiation: superres_scale.c:store_cfl_required
Unexecuted instantiation: svc_layercontext.c:store_cfl_required
Unexecuted instantiation: temporal_filter.c:store_cfl_required
Unexecuted instantiation: tokenize.c:store_cfl_required
Unexecuted instantiation: tpl_model.c:store_cfl_required
Unexecuted instantiation: tx_search.c:store_cfl_required
Unexecuted instantiation: intra_mode_search.c:store_cfl_required
Unexecuted instantiation: var_based_part.c:store_cfl_required
Unexecuted instantiation: cfl.c:store_cfl_required
Unexecuted instantiation: reconintra.c:store_cfl_required
Unexecuted instantiation: compound_type.c:store_cfl_required
Unexecuted instantiation: encode_strategy.c:store_cfl_required
Unexecuted instantiation: interp_search.c:store_cfl_required
Unexecuted instantiation: motion_search_facade.c:store_cfl_required
58
59
748M
static inline int get_scaled_luma_q0(int alpha_q3, int16_t pred_buf_q3) {
60
748M
  int scaled_luma_q6 = alpha_q3 * pred_buf_q3;
61
748M
  return ROUND_POWER_OF_TWO_SIGNED(scaled_luma_q6, 6);
62
748M
}
Unexecuted instantiation: decodeframe.c:get_scaled_luma_q0
Unexecuted instantiation: decodemv.c:get_scaled_luma_q0
Unexecuted instantiation: av1_cx_iface.c:get_scaled_luma_q0
Unexecuted instantiation: allintra_vis.c:get_scaled_luma_q0
Unexecuted instantiation: bitstream.c:get_scaled_luma_q0
Unexecuted instantiation: encodeframe.c:get_scaled_luma_q0
Unexecuted instantiation: encodeframe_utils.c:get_scaled_luma_q0
Unexecuted instantiation: encodemb.c:get_scaled_luma_q0
Unexecuted instantiation: encoder.c:get_scaled_luma_q0
Unexecuted instantiation: encoder_utils.c:get_scaled_luma_q0
Unexecuted instantiation: encodetxb.c:get_scaled_luma_q0
Unexecuted instantiation: ethread.c:get_scaled_luma_q0
Unexecuted instantiation: firstpass.c:get_scaled_luma_q0
Unexecuted instantiation: global_motion_facade.c:get_scaled_luma_q0
Unexecuted instantiation: mcomp.c:get_scaled_luma_q0
Unexecuted instantiation: palette.c:get_scaled_luma_q0
Unexecuted instantiation: partition_search.c:get_scaled_luma_q0
Unexecuted instantiation: partition_strategy.c:get_scaled_luma_q0
Unexecuted instantiation: rd.c:get_scaled_luma_q0
Unexecuted instantiation: rdopt.c:get_scaled_luma_q0
Unexecuted instantiation: nonrd_pickmode.c:get_scaled_luma_q0
Unexecuted instantiation: nonrd_opt.c:get_scaled_luma_q0
Unexecuted instantiation: speed_features.c:get_scaled_luma_q0
Unexecuted instantiation: superres_scale.c:get_scaled_luma_q0
Unexecuted instantiation: svc_layercontext.c:get_scaled_luma_q0
Unexecuted instantiation: temporal_filter.c:get_scaled_luma_q0
Unexecuted instantiation: tokenize.c:get_scaled_luma_q0
Unexecuted instantiation: tpl_model.c:get_scaled_luma_q0
Unexecuted instantiation: tx_search.c:get_scaled_luma_q0
Unexecuted instantiation: intra_mode_search.c:get_scaled_luma_q0
Unexecuted instantiation: var_based_part.c:get_scaled_luma_q0
cfl.c:get_scaled_luma_q0
Line
Count
Source
59
748M
static inline int get_scaled_luma_q0(int alpha_q3, int16_t pred_buf_q3) {
60
748M
  int scaled_luma_q6 = alpha_q3 * pred_buf_q3;
61
748M
  return ROUND_POWER_OF_TWO_SIGNED(scaled_luma_q6, 6);
62
748M
}
Unexecuted instantiation: reconintra.c:get_scaled_luma_q0
Unexecuted instantiation: compound_type.c:get_scaled_luma_q0
Unexecuted instantiation: encode_strategy.c:get_scaled_luma_q0
Unexecuted instantiation: interp_search.c:get_scaled_luma_q0
Unexecuted instantiation: motion_search_facade.c:get_scaled_luma_q0
63
64
6.24M
static inline CFL_PRED_TYPE get_cfl_pred_type(int plane) {
65
6.24M
  assert(plane > 0);
66
6.24M
  return (CFL_PRED_TYPE)(plane - 1);
67
6.24M
}
Unexecuted instantiation: decodeframe.c:get_cfl_pred_type
Unexecuted instantiation: decodemv.c:get_cfl_pred_type
Unexecuted instantiation: av1_cx_iface.c:get_cfl_pred_type
Unexecuted instantiation: allintra_vis.c:get_cfl_pred_type
Unexecuted instantiation: bitstream.c:get_cfl_pred_type
Unexecuted instantiation: encodeframe.c:get_cfl_pred_type
Unexecuted instantiation: encodeframe_utils.c:get_cfl_pred_type
Unexecuted instantiation: encodemb.c:get_cfl_pred_type
Unexecuted instantiation: encoder.c:get_cfl_pred_type
Unexecuted instantiation: encoder_utils.c:get_cfl_pred_type
Unexecuted instantiation: encodetxb.c:get_cfl_pred_type
Unexecuted instantiation: ethread.c:get_cfl_pred_type
Unexecuted instantiation: firstpass.c:get_cfl_pred_type
Unexecuted instantiation: global_motion_facade.c:get_cfl_pred_type
Unexecuted instantiation: mcomp.c:get_cfl_pred_type
Unexecuted instantiation: palette.c:get_cfl_pred_type
Unexecuted instantiation: partition_search.c:get_cfl_pred_type
Unexecuted instantiation: partition_strategy.c:get_cfl_pred_type
Unexecuted instantiation: rd.c:get_cfl_pred_type
Unexecuted instantiation: rdopt.c:get_cfl_pred_type
Unexecuted instantiation: nonrd_pickmode.c:get_cfl_pred_type
Unexecuted instantiation: nonrd_opt.c:get_cfl_pred_type
Unexecuted instantiation: speed_features.c:get_cfl_pred_type
Unexecuted instantiation: superres_scale.c:get_cfl_pred_type
Unexecuted instantiation: svc_layercontext.c:get_cfl_pred_type
Unexecuted instantiation: temporal_filter.c:get_cfl_pred_type
Unexecuted instantiation: tokenize.c:get_cfl_pred_type
Unexecuted instantiation: tpl_model.c:get_cfl_pred_type
Unexecuted instantiation: tx_search.c:get_cfl_pred_type
Unexecuted instantiation: intra_mode_search.c:get_cfl_pred_type
Unexecuted instantiation: var_based_part.c:get_cfl_pred_type
Unexecuted instantiation: cfl.c:get_cfl_pred_type
reconintra.c:get_cfl_pred_type
Line
Count
Source
64
6.24M
static inline CFL_PRED_TYPE get_cfl_pred_type(int plane) {
65
6.24M
  assert(plane > 0);
66
6.24M
  return (CFL_PRED_TYPE)(plane - 1);
67
6.24M
}
Unexecuted instantiation: compound_type.c:get_cfl_pred_type
Unexecuted instantiation: encode_strategy.c:get_cfl_pred_type
Unexecuted instantiation: interp_search.c:get_cfl_pred_type
Unexecuted instantiation: motion_search_facade.c:get_cfl_pred_type
68
69
74.1k
static inline void clear_cfl_dc_pred_cache_flags(CFL_CTX *cfl) {
70
74.1k
  cfl->use_dc_pred_cache = false;
71
74.1k
  cfl->dc_pred_is_cached[CFL_PRED_U] = false;
72
74.1k
  cfl->dc_pred_is_cached[CFL_PRED_V] = false;
73
74.1k
}
Unexecuted instantiation: decodeframe.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: decodemv.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: av1_cx_iface.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: allintra_vis.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: bitstream.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: encodeframe.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: encodeframe_utils.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: encodemb.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: encoder.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: encoder_utils.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: encodetxb.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: ethread.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: firstpass.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: global_motion_facade.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: mcomp.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: palette.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: partition_search.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: partition_strategy.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: rd.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: rdopt.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: nonrd_pickmode.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: nonrd_opt.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: speed_features.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: superres_scale.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: svc_layercontext.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: temporal_filter.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: tokenize.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: tpl_model.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: tx_search.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: intra_mode_search.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: var_based_part.c:clear_cfl_dc_pred_cache_flags
cfl.c:clear_cfl_dc_pred_cache_flags
Line
Count
Source
69
74.1k
static inline void clear_cfl_dc_pred_cache_flags(CFL_CTX *cfl) {
70
74.1k
  cfl->use_dc_pred_cache = false;
71
74.1k
  cfl->dc_pred_is_cached[CFL_PRED_U] = false;
72
  cfl->dc_pred_is_cached[CFL_PRED_V] = false;
73
74.1k
}
Unexecuted instantiation: reconintra.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: compound_type.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: encode_strategy.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: interp_search.c:clear_cfl_dc_pred_cache_flags
Unexecuted instantiation: motion_search_facade.c:clear_cfl_dc_pred_cache_flags
74
75
void av1_cfl_predict_block(MACROBLOCKD *const xd, uint8_t *dst, int dst_stride,
76
                           TX_SIZE tx_size, int plane);
77
78
void cfl_store_block(MACROBLOCKD *const xd, BLOCK_SIZE bsize, TX_SIZE tx_size);
79
80
void cfl_store_tx(MACROBLOCKD *const xd, int row, int col, TX_SIZE tx_size,
81
                  BLOCK_SIZE bsize);
82
83
void cfl_store_dc_pred(MACROBLOCKD *const xd, const uint8_t *input,
84
                       CFL_PRED_TYPE pred_plane, int width);
85
86
void cfl_load_dc_pred(MACROBLOCKD *const xd, uint8_t *dst, int dst_stride,
87
                      TX_SIZE tx_size, CFL_PRED_TYPE pred_plane);
88
89
// Allows the CFL_SUBSAMPLE function to switch types depending on the bitdepth.
90
#define CFL_lbd_TYPE uint8_t *cfl_type
91
#define CFL_hbd_TYPE uint16_t *cfl_type
92
93
// Declare a size-specific wrapper for the size-generic function. The compiler
94
// will inline the size generic function in here, the advantage is that the size
95
// will be constant allowing for loop unrolling and other constant propagated
96
// goodness.
97
#define CFL_SUBSAMPLE(arch, sub, bd, width, height)                       \
98
  void cfl_subsample_##bd##_##sub##_##width##x##height##_##arch(          \
99
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3);      \
100
  void cfl_subsample_##bd##_##sub##_##width##x##height##_##arch(          \
101
6.51M
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
6.51M
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
6.51M
                                               output_q3, width, height); \
104
6.51M
  }
cfl_subsample_lbd_420_4x4_c
Line
Count
Source
101
467k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
467k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
467k
                                               output_q3, width, height); \
104
467k
  }
cfl_subsample_lbd_420_8x8_c
Line
Count
Source
101
474k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
474k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
474k
                                               output_q3, width, height); \
104
474k
  }
cfl_subsample_lbd_420_16x16_c
Line
Count
Source
101
45.2k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
45.2k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
45.2k
                                               output_q3, width, height); \
104
45.2k
  }
cfl_subsample_lbd_420_32x32_c
Line
Count
Source
101
15.2k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
15.2k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
15.2k
                                               output_q3, width, height); \
104
15.2k
  }
cfl_subsample_lbd_420_4x8_c
Line
Count
Source
101
107k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
107k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
107k
                                               output_q3, width, height); \
104
107k
  }
cfl_subsample_lbd_420_8x4_c
Line
Count
Source
101
159k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
159k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
159k
                                               output_q3, width, height); \
104
159k
  }
cfl_subsample_lbd_420_8x16_c
Line
Count
Source
101
28.4k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
28.4k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
28.4k
                                               output_q3, width, height); \
104
28.4k
  }
cfl_subsample_lbd_420_16x8_c
Line
Count
Source
101
39.2k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
39.2k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
39.2k
                                               output_q3, width, height); \
104
39.2k
  }
cfl_subsample_lbd_420_16x32_c
Line
Count
Source
101
14.6k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
14.6k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
14.6k
                                               output_q3, width, height); \
104
14.6k
  }
cfl_subsample_lbd_420_32x16_c
Line
Count
Source
101
10.2k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
10.2k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
10.2k
                                               output_q3, width, height); \
104
10.2k
  }
cfl_subsample_lbd_420_4x16_c
Line
Count
Source
101
135k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
135k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
135k
                                               output_q3, width, height); \
104
135k
  }
cfl_subsample_lbd_420_16x4_c
Line
Count
Source
101
75.3k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
75.3k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
75.3k
                                               output_q3, width, height); \
104
75.3k
  }
cfl_subsample_lbd_420_8x32_c
Line
Count
Source
101
12.9k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
12.9k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
12.9k
                                               output_q3, width, height); \
104
12.9k
  }
cfl_subsample_lbd_420_32x8_c
Line
Count
Source
101
14.2k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
14.2k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
14.2k
                                               output_q3, width, height); \
104
14.2k
  }
cfl_subsample_lbd_422_4x4_c
Line
Count
Source
101
1.06k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
1.06k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
1.06k
                                               output_q3, width, height); \
104
1.06k
  }
cfl_subsample_lbd_422_8x8_c
Line
Count
Source
101
369
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
369
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
369
                                               output_q3, width, height); \
104
369
  }
cfl_subsample_lbd_422_16x16_c
Line
Count
Source
101
97
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
97
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
97
                                               output_q3, width, height); \
104
97
  }
cfl_subsample_lbd_422_32x32_c
Line
Count
Source
101
100
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
100
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
100
                                               output_q3, width, height); \
104
100
  }
Unexecuted instantiation: cfl_subsample_lbd_422_4x8_c
cfl_subsample_lbd_422_8x4_c
Line
Count
Source
101
92
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
92
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
92
                                               output_q3, width, height); \
104
92
  }
Unexecuted instantiation: cfl_subsample_lbd_422_8x16_c
cfl_subsample_lbd_422_16x8_c
Line
Count
Source
101
71
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
71
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
71
                                               output_q3, width, height); \
104
71
  }
Unexecuted instantiation: cfl_subsample_lbd_422_16x32_c
cfl_subsample_lbd_422_32x16_c
Line
Count
Source
101
65
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
65
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
65
                                               output_q3, width, height); \
104
65
  }
Unexecuted instantiation: cfl_subsample_lbd_422_4x16_c
cfl_subsample_lbd_422_16x4_c
Line
Count
Source
101
75
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
75
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
75
                                               output_q3, width, height); \
104
75
  }
Unexecuted instantiation: cfl_subsample_lbd_422_8x32_c
cfl_subsample_lbd_422_32x8_c
Line
Count
Source
101
974
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
974
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
974
                                               output_q3, width, height); \
104
974
  }
cfl_subsample_lbd_444_4x4_c
Line
Count
Source
101
360k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
360k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
360k
                                               output_q3, width, height); \
104
360k
  }
cfl_subsample_lbd_444_8x8_c
Line
Count
Source
101
527k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
527k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
527k
                                               output_q3, width, height); \
104
527k
  }
cfl_subsample_lbd_444_16x16_c
Line
Count
Source
101
97.7k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
97.7k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
97.7k
                                               output_q3, width, height); \
104
97.7k
  }
cfl_subsample_lbd_444_32x32_c
Line
Count
Source
101
40.4k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
40.4k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
40.4k
                                               output_q3, width, height); \
104
40.4k
  }
cfl_subsample_lbd_444_4x8_c
Line
Count
Source
101
77.1k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
77.1k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
77.1k
                                               output_q3, width, height); \
104
77.1k
  }
cfl_subsample_lbd_444_8x4_c
Line
Count
Source
101
106k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
106k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
106k
                                               output_q3, width, height); \
104
106k
  }
cfl_subsample_lbd_444_8x16_c
Line
Count
Source
101
84.6k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
84.6k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
84.6k
                                               output_q3, width, height); \
104
84.6k
  }
cfl_subsample_lbd_444_16x8_c
Line
Count
Source
101
101k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
101k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
101k
                                               output_q3, width, height); \
104
101k
  }
cfl_subsample_lbd_444_16x32_c
Line
Count
Source
101
32.9k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
32.9k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
32.9k
                                               output_q3, width, height); \
104
32.9k
  }
cfl_subsample_lbd_444_32x16_c
Line
Count
Source
101
24.7k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
24.7k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
24.7k
                                               output_q3, width, height); \
104
24.7k
  }
cfl_subsample_lbd_444_4x16_c
Line
Count
Source
101
57.5k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
57.5k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
57.5k
                                               output_q3, width, height); \
104
57.5k
  }
cfl_subsample_lbd_444_16x4_c
Line
Count
Source
101
78.3k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
78.3k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
78.3k
                                               output_q3, width, height); \
104
78.3k
  }
cfl_subsample_lbd_444_8x32_c
Line
Count
Source
101
64.4k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
64.4k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
64.4k
                                               output_q3, width, height); \
104
64.4k
  }
cfl_subsample_lbd_444_32x8_c
Line
Count
Source
101
40.4k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
40.4k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
40.4k
                                               output_q3, width, height); \
104
40.4k
  }
cfl_subsample_hbd_420_4x4_c
Line
Count
Source
101
547k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
547k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
547k
                                               output_q3, width, height); \
104
547k
  }
cfl_subsample_hbd_420_8x8_c
Line
Count
Source
101
665k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
665k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
665k
                                               output_q3, width, height); \
104
665k
  }
cfl_subsample_hbd_420_16x16_c
Line
Count
Source
101
78.9k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
78.9k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
78.9k
                                               output_q3, width, height); \
104
78.9k
  }
cfl_subsample_hbd_420_32x32_c
Line
Count
Source
101
26.9k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
26.9k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
26.9k
                                               output_q3, width, height); \
104
26.9k
  }
cfl_subsample_hbd_420_4x8_c
Line
Count
Source
101
193k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
193k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
193k
                                               output_q3, width, height); \
104
193k
  }
cfl_subsample_hbd_420_8x4_c
Line
Count
Source
101
270k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
270k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
270k
                                               output_q3, width, height); \
104
270k
  }
cfl_subsample_hbd_420_8x16_c
Line
Count
Source
101
56.7k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
56.7k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
56.7k
                                               output_q3, width, height); \
104
56.7k
  }
cfl_subsample_hbd_420_16x8_c
Line
Count
Source
101
79.7k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
79.7k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
79.7k
                                               output_q3, width, height); \
104
79.7k
  }
cfl_subsample_hbd_420_16x32_c
Line
Count
Source
101
21.6k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
21.6k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
21.6k
                                               output_q3, width, height); \
104
21.6k
  }
cfl_subsample_hbd_420_32x16_c
Line
Count
Source
101
19.0k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
19.0k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
19.0k
                                               output_q3, width, height); \
104
19.0k
  }
cfl_subsample_hbd_420_4x16_c
Line
Count
Source
101
182k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
182k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
182k
                                               output_q3, width, height); \
104
182k
  }
cfl_subsample_hbd_420_16x4_c
Line
Count
Source
101
172k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
172k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
172k
                                               output_q3, width, height); \
104
172k
  }
cfl_subsample_hbd_420_8x32_c
Line
Count
Source
101
26.8k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
26.8k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
26.8k
                                               output_q3, width, height); \
104
26.8k
  }
cfl_subsample_hbd_420_32x8_c
Line
Count
Source
101
29.4k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
29.4k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
29.4k
                                               output_q3, width, height); \
104
29.4k
  }
cfl_subsample_hbd_422_4x4_c
Line
Count
Source
101
1.71k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
1.71k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
1.71k
                                               output_q3, width, height); \
104
1.71k
  }
cfl_subsample_hbd_422_8x8_c
Line
Count
Source
101
677
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
677
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
677
                                               output_q3, width, height); \
104
677
  }
cfl_subsample_hbd_422_16x16_c
Line
Count
Source
101
2.11k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
2.11k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
2.11k
                                               output_q3, width, height); \
104
2.11k
  }
cfl_subsample_hbd_422_32x32_c
Line
Count
Source
101
51
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
51
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
51
                                               output_q3, width, height); \
104
51
  }
Unexecuted instantiation: cfl_subsample_hbd_422_4x8_c
cfl_subsample_hbd_422_8x4_c
Line
Count
Source
101
143
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
143
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
143
                                               output_q3, width, height); \
104
143
  }
Unexecuted instantiation: cfl_subsample_hbd_422_8x16_c
cfl_subsample_hbd_422_16x8_c
Line
Count
Source
101
163
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
163
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
163
                                               output_q3, width, height); \
104
163
  }
Unexecuted instantiation: cfl_subsample_hbd_422_16x32_c
cfl_subsample_hbd_422_32x16_c
Line
Count
Source
101
2.01k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
2.01k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
2.01k
                                               output_q3, width, height); \
104
2.01k
  }
Unexecuted instantiation: cfl_subsample_hbd_422_4x16_c
cfl_subsample_hbd_422_16x4_c
Line
Count
Source
101
123
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
123
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
123
                                               output_q3, width, height); \
104
123
  }
Unexecuted instantiation: cfl_subsample_hbd_422_8x32_c
cfl_subsample_hbd_422_32x8_c
Line
Count
Source
101
59
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
59
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
59
                                               output_q3, width, height); \
104
59
  }
cfl_subsample_hbd_444_4x4_c
Line
Count
Source
101
209k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
209k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
209k
                                               output_q3, width, height); \
104
209k
  }
cfl_subsample_hbd_444_8x8_c
Line
Count
Source
101
278k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
278k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
278k
                                               output_q3, width, height); \
104
278k
  }
cfl_subsample_hbd_444_16x16_c
Line
Count
Source
101
34.1k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
34.1k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
34.1k
                                               output_q3, width, height); \
104
34.1k
  }
cfl_subsample_hbd_444_32x32_c
Line
Count
Source
101
21.8k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
21.8k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
21.8k
                                               output_q3, width, height); \
104
21.8k
  }
cfl_subsample_hbd_444_4x8_c
Line
Count
Source
101
29.4k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
29.4k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
29.4k
                                               output_q3, width, height); \
104
29.4k
  }
cfl_subsample_hbd_444_8x4_c
Line
Count
Source
101
44.7k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
44.7k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
44.7k
                                               output_q3, width, height); \
104
44.7k
  }
cfl_subsample_hbd_444_8x16_c
Line
Count
Source
101
32.9k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
32.9k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
32.9k
                                               output_q3, width, height); \
104
32.9k
  }
cfl_subsample_hbd_444_16x8_c
Line
Count
Source
101
30.7k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
30.7k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
30.7k
                                               output_q3, width, height); \
104
30.7k
  }
cfl_subsample_hbd_444_16x32_c
Line
Count
Source
101
19.6k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
19.6k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
19.6k
                                               output_q3, width, height); \
104
19.6k
  }
cfl_subsample_hbd_444_32x16_c
Line
Count
Source
101
13.1k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
13.1k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
13.1k
                                               output_q3, width, height); \
104
13.1k
  }
cfl_subsample_hbd_444_4x16_c
Line
Count
Source
101
20.5k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
20.5k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
20.5k
                                               output_q3, width, height); \
104
20.5k
  }
cfl_subsample_hbd_444_16x4_c
Line
Count
Source
101
23.1k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
23.1k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
23.1k
                                               output_q3, width, height); \
104
23.1k
  }
cfl_subsample_hbd_444_8x32_c
Line
Count
Source
101
72.3k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
72.3k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
72.3k
                                               output_q3, width, height); \
104
72.3k
  }
cfl_subsample_hbd_444_32x8_c
Line
Count
Source
101
14.2k
      const CFL_##bd##_TYPE, int input_stride, uint16_t *output_q3) {     \
102
14.2k
    cfl_luma_subsampling_##sub##_##bd##_##arch(cfl_type, input_stride,    \
103
14.2k
                                               output_q3, width, height); \
104
14.2k
  }
105
106
// Declare size-specific wrappers for all valid CfL sizes.
107
#define CFL_SUBSAMPLE_FUNCTIONS(arch, sub, bd)                            \
108
  CFL_SUBSAMPLE(arch, sub, bd, 4, 4)                                      \
109
  CFL_SUBSAMPLE(arch, sub, bd, 8, 8)                                      \
110
  CFL_SUBSAMPLE(arch, sub, bd, 16, 16)                                    \
111
  CFL_SUBSAMPLE(arch, sub, bd, 32, 32)                                    \
112
  CFL_SUBSAMPLE(arch, sub, bd, 4, 8)                                      \
113
  CFL_SUBSAMPLE(arch, sub, bd, 8, 4)                                      \
114
  CFL_SUBSAMPLE(arch, sub, bd, 8, 16)                                     \
115
  CFL_SUBSAMPLE(arch, sub, bd, 16, 8)                                     \
116
  CFL_SUBSAMPLE(arch, sub, bd, 16, 32)                                    \
117
  CFL_SUBSAMPLE(arch, sub, bd, 32, 16)                                    \
118
  CFL_SUBSAMPLE(arch, sub, bd, 4, 16)                                     \
119
  CFL_SUBSAMPLE(arch, sub, bd, 16, 4)                                     \
120
  CFL_SUBSAMPLE(arch, sub, bd, 8, 32)                                     \
121
  CFL_SUBSAMPLE(arch, sub, bd, 32, 8)                                     \
122
  cfl_subsample_##bd##_fn cfl_get_luma_subsampling_##sub##_##bd##_##arch( \
123
6.51M
      TX_SIZE tx_size) {                                                  \
124
6.51M
    CFL_SUBSAMPLE_FUNCTION_ARRAY(arch, sub, bd)                           \
125
6.51M
    return subfn_##sub[tx_size];                                          \
126
6.51M
  }
127
128
// Declare an architecture-specific array of function pointers for size-specific
129
// wrappers.
130
#define CFL_SUBSAMPLE_FUNCTION_ARRAY(arch, sub, bd)                           \
131
6.51M
  static const cfl_subsample_##bd##_fn subfn_##sub[TX_SIZES_ALL] = {          \
132
6.51M
    cfl_subsample_##bd##_##sub##_4x4_##arch,   /* 4x4 */                      \
133
6.51M
    cfl_subsample_##bd##_##sub##_8x8_##arch,   /* 8x8 */                      \
134
6.51M
    cfl_subsample_##bd##_##sub##_16x16_##arch, /* 16x16 */                    \
135
6.51M
    cfl_subsample_##bd##_##sub##_32x32_##arch, /* 32x32 */                    \
136
6.51M
    NULL,                                      /* 64x64 (invalid CFL size) */ \
137
6.51M
    cfl_subsample_##bd##_##sub##_4x8_##arch,   /* 4x8 */                      \
138
6.51M
    cfl_subsample_##bd##_##sub##_8x4_##arch,   /* 8x4 */                      \
139
6.51M
    cfl_subsample_##bd##_##sub##_8x16_##arch,  /* 8x16 */                     \
140
6.51M
    cfl_subsample_##bd##_##sub##_16x8_##arch,  /* 16x8 */                     \
141
6.51M
    cfl_subsample_##bd##_##sub##_16x32_##arch, /* 16x32 */                    \
142
6.51M
    cfl_subsample_##bd##_##sub##_32x16_##arch, /* 32x16 */                    \
143
6.51M
    NULL,                                      /* 32x64 (invalid CFL size) */ \
144
6.51M
    NULL,                                      /* 64x32 (invalid CFL size) */ \
145
6.51M
    cfl_subsample_##bd##_##sub##_4x16_##arch,  /* 4x16  */                    \
146
6.51M
    cfl_subsample_##bd##_##sub##_16x4_##arch,  /* 16x4  */                    \
147
6.51M
    cfl_subsample_##bd##_##sub##_8x32_##arch,  /* 8x32  */                    \
148
6.51M
    cfl_subsample_##bd##_##sub##_32x8_##arch,  /* 32x8  */                    \
149
6.51M
    NULL,                                      /* 16x64 (invalid CFL size) */ \
150
6.51M
    NULL,                                      /* 64x16 (invalid CFL size) */ \
151
6.51M
  };
152
153
// The RTCD script does not support passing in an array, so we wrap it in this
154
// function.
155
#if CONFIG_AV1_HIGHBITDEPTH
156
#define CFL_GET_SUBSAMPLE_FUNCTION(arch)  \
157
  CFL_SUBSAMPLE_FUNCTIONS(arch, 420, lbd) \
158
  CFL_SUBSAMPLE_FUNCTIONS(arch, 422, lbd) \
159
  CFL_SUBSAMPLE_FUNCTIONS(arch, 444, lbd) \
160
  CFL_SUBSAMPLE_FUNCTIONS(arch, 420, hbd) \
161
  CFL_SUBSAMPLE_FUNCTIONS(arch, 422, hbd) \
162
  CFL_SUBSAMPLE_FUNCTIONS(arch, 444, hbd)
163
#else
164
#define CFL_GET_SUBSAMPLE_FUNCTION(arch)  \
165
  CFL_SUBSAMPLE_FUNCTIONS(arch, 420, lbd) \
166
  CFL_SUBSAMPLE_FUNCTIONS(arch, 422, lbd) \
167
  CFL_SUBSAMPLE_FUNCTIONS(arch, 444, lbd)
168
#endif
169
170
// Declare a size-specific wrapper for the size-generic function. The compiler
171
// will inline the size generic function in here, the advantage is that the size
172
// will be constant allowing for loop unrolling and other constant propagated
173
// goodness.
174
#define CFL_SUB_AVG_X(arch, width, height, round_offset, num_pel_log2)       \
175
  void cfl_subtract_average_##width##x##height##_##arch(const uint16_t *src, \
176
                                                        int16_t *dst);       \
177
  void cfl_subtract_average_##width##x##height##_##arch(const uint16_t *src, \
178
3.12M
                                                        int16_t *dst) {      \
179
3.12M
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
3.12M
                            num_pel_log2);                                   \
181
3.12M
  }
cfl_subtract_average_4x4_c
Line
Count
Source
178
662k
                                                        int16_t *dst) {      \
179
662k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
662k
                            num_pel_log2);                                   \
181
662k
  }
cfl_subtract_average_4x8_c
Line
Count
Source
178
335k
                                                        int16_t *dst) {      \
179
335k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
335k
                            num_pel_log2);                                   \
181
335k
  }
cfl_subtract_average_4x16_c
Line
Count
Source
178
153k
                                                        int16_t *dst) {      \
179
153k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
153k
                            num_pel_log2);                                   \
181
153k
  }
cfl_subtract_average_8x4_c
Line
Count
Source
178
347k
                                                        int16_t *dst) {      \
179
347k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
347k
                            num_pel_log2);                                   \
181
347k
  }
cfl_subtract_average_8x8_c
Line
Count
Source
178
432k
                                                        int16_t *dst) {      \
179
432k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
432k
                            num_pel_log2);                                   \
181
432k
  }
cfl_subtract_average_8x16_c
Line
Count
Source
178
190k
                                                        int16_t *dst) {      \
179
190k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
190k
                            num_pel_log2);                                   \
181
190k
  }
cfl_subtract_average_8x32_c
Line
Count
Source
178
149k
                                                        int16_t *dst) {      \
179
149k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
149k
                            num_pel_log2);                                   \
181
149k
  }
cfl_subtract_average_16x4_c
Line
Count
Source
178
187k
                                                        int16_t *dst) {      \
179
187k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
187k
                            num_pel_log2);                                   \
181
187k
  }
cfl_subtract_average_16x8_c
Line
Count
Source
178
203k
                                                        int16_t *dst) {      \
179
203k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
203k
                            num_pel_log2);                                   \
181
203k
  }
cfl_subtract_average_16x16_c
Line
Count
Source
178
211k
                                                        int16_t *dst) {      \
179
211k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
211k
                            num_pel_log2);                                   \
181
211k
  }
cfl_subtract_average_16x32_c
Line
Count
Source
178
61.0k
                                                        int16_t *dst) {      \
179
61.0k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
61.0k
                            num_pel_log2);                                   \
181
61.0k
  }
cfl_subtract_average_32x8_c
Line
Count
Source
178
65.5k
                                                        int16_t *dst) {      \
179
65.5k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
65.5k
                            num_pel_log2);                                   \
181
65.5k
  }
cfl_subtract_average_32x16_c
Line
Count
Source
178
45.8k
                                                        int16_t *dst) {      \
179
45.8k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
45.8k
                            num_pel_log2);                                   \
181
45.8k
  }
cfl_subtract_average_32x32_c
Line
Count
Source
178
75.7k
                                                        int16_t *dst) {      \
179
75.7k
    subtract_average_##arch(src, dst, width, height, round_offset,           \
180
75.7k
                            num_pel_log2);                                   \
181
75.7k
  }
182
183
// Declare size-specific wrappers for all valid CfL sizes.
184
#define CFL_SUB_AVG_FN(arch)                                              \
185
  CFL_SUB_AVG_X(arch, 4, 4, 8, 4)                                         \
186
  CFL_SUB_AVG_X(arch, 4, 8, 16, 5)                                        \
187
  CFL_SUB_AVG_X(arch, 4, 16, 32, 6)                                       \
188
  CFL_SUB_AVG_X(arch, 8, 4, 16, 5)                                        \
189
  CFL_SUB_AVG_X(arch, 8, 8, 32, 6)                                        \
190
  CFL_SUB_AVG_X(arch, 8, 16, 64, 7)                                       \
191
  CFL_SUB_AVG_X(arch, 8, 32, 128, 8)                                      \
192
  CFL_SUB_AVG_X(arch, 16, 4, 32, 6)                                       \
193
  CFL_SUB_AVG_X(arch, 16, 8, 64, 7)                                       \
194
  CFL_SUB_AVG_X(arch, 16, 16, 128, 8)                                     \
195
  CFL_SUB_AVG_X(arch, 16, 32, 256, 9)                                     \
196
  CFL_SUB_AVG_X(arch, 32, 8, 128, 8)                                      \
197
  CFL_SUB_AVG_X(arch, 32, 16, 256, 9)                                     \
198
  CFL_SUB_AVG_X(arch, 32, 32, 512, 10)                                    \
199
  cfl_subtract_average_fn cfl_get_subtract_average_fn_##arch(             \
200
3.12M
      TX_SIZE tx_size) {                                                  \
201
3.12M
    static const cfl_subtract_average_fn sub_avg[TX_SIZES_ALL] = {        \
202
3.12M
      cfl_subtract_average_4x4_##arch,   /* 4x4 */                        \
203
3.12M
      cfl_subtract_average_8x8_##arch,   /* 8x8 */                        \
204
3.12M
      cfl_subtract_average_16x16_##arch, /* 16x16 */                      \
205
3.12M
      cfl_subtract_average_32x32_##arch, /* 32x32 */                      \
206
3.12M
      NULL,                              /* 64x64 (invalid CFL size) */   \
207
3.12M
      cfl_subtract_average_4x8_##arch,   /* 4x8 */                        \
208
3.12M
      cfl_subtract_average_8x4_##arch,   /* 8x4 */                        \
209
3.12M
      cfl_subtract_average_8x16_##arch,  /* 8x16 */                       \
210
3.12M
      cfl_subtract_average_16x8_##arch,  /* 16x8 */                       \
211
3.12M
      cfl_subtract_average_16x32_##arch, /* 16x32 */                      \
212
3.12M
      cfl_subtract_average_32x16_##arch, /* 32x16 */                      \
213
3.12M
      NULL,                              /* 32x64 (invalid CFL size) */   \
214
3.12M
      NULL,                              /* 64x32 (invalid CFL size) */   \
215
3.12M
      cfl_subtract_average_4x16_##arch,  /* 4x16 (invalid CFL size) */    \
216
3.12M
      cfl_subtract_average_16x4_##arch,  /* 16x4 (invalid CFL size) */    \
217
3.12M
      cfl_subtract_average_8x32_##arch,  /* 8x32 (invalid CFL size) */    \
218
3.12M
      cfl_subtract_average_32x8_##arch,  /* 32x8 (invalid CFL size) */    \
219
3.12M
      NULL,                              /* 16x64 (invalid CFL size) */   \
220
3.12M
      NULL,                              /* 64x16 (invalid CFL size) */   \
221
3.12M
    };                                                                    \
222
3.12M
    /* Modulo TX_SIZES_ALL to ensure that an attacker won't be able to */ \
223
3.12M
    /* index the function pointer array out of bounds. */                 \
224
3.12M
    return sub_avg[tx_size % TX_SIZES_ALL];                               \
225
3.12M
  }
226
227
#define CFL_PREDICT_lbd(arch, width, height)                                   \
228
  void cfl_predict_lbd_##width##x##height##_##arch(                            \
229
      const int16_t *pred_buf_q3, uint8_t *dst, int dst_stride, int alpha_q3); \
230
  void cfl_predict_lbd_##width##x##height##_##arch(                            \
231
      const int16_t *pred_buf_q3, uint8_t *dst, int dst_stride,                \
232
3.51M
      int alpha_q3) {                                                          \
233
3.51M
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
3.51M
                           height);                                            \
235
3.51M
  }
cfl_predict_lbd_4x4_c
Line
Count
Source
232
664k
      int alpha_q3) {                                                          \
233
664k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
664k
                           height);                                            \
235
664k
  }
cfl_predict_lbd_4x8_c
Line
Count
Source
232
336k
      int alpha_q3) {                                                          \
233
336k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
336k
                           height);                                            \
235
336k
  }
cfl_predict_lbd_4x16_c
Line
Count
Source
232
177k
      int alpha_q3) {                                                          \
233
177k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
177k
                           height);                                            \
235
177k
  }
cfl_predict_lbd_8x4_c
Line
Count
Source
232
342k
      int alpha_q3) {                                                          \
233
342k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
342k
                           height);                                            \
235
342k
  }
cfl_predict_lbd_8x8_c
Line
Count
Source
232
531k
      int alpha_q3) {                                                          \
233
531k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
531k
                           height);                                            \
235
531k
  }
cfl_predict_lbd_8x16_c
Line
Count
Source
232
239k
      int alpha_q3) {                                                          \
233
239k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
239k
                           height);                                            \
235
239k
  }
cfl_predict_lbd_8x32_c
Line
Count
Source
232
140k
      int alpha_q3) {                                                          \
233
140k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
140k
                           height);                                            \
235
140k
  }
cfl_predict_lbd_16x4_c
Line
Count
Source
232
228k
      int alpha_q3) {                                                          \
233
228k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
228k
                           height);                                            \
235
228k
  }
cfl_predict_lbd_16x8_c
Line
Count
Source
232
274k
      int alpha_q3) {                                                          \
233
274k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
274k
                           height);                                            \
235
274k
  }
cfl_predict_lbd_16x16_c
Line
Count
Source
232
255k
      int alpha_q3) {                                                          \
233
255k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
255k
                           height);                                            \
235
255k
  }
cfl_predict_lbd_16x32_c
Line
Count
Source
232
77.3k
      int alpha_q3) {                                                          \
233
77.3k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
77.3k
                           height);                                            \
235
77.3k
  }
cfl_predict_lbd_32x8_c
Line
Count
Source
232
93.6k
      int alpha_q3) {                                                          \
233
93.6k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
93.6k
                           height);                                            \
235
93.6k
  }
cfl_predict_lbd_32x16_c
Line
Count
Source
232
58.3k
      int alpha_q3) {                                                          \
233
58.3k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
58.3k
                           height);                                            \
235
58.3k
  }
cfl_predict_lbd_32x32_c
Line
Count
Source
232
99.1k
      int alpha_q3) {                                                          \
233
99.1k
    cfl_predict_lbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, width,      \
234
99.1k
                           height);                                            \
235
99.1k
  }
236
237
#if CONFIG_AV1_HIGHBITDEPTH
238
#define CFL_PREDICT_hbd(arch, width, height)                                   \
239
  void cfl_predict_hbd_##width##x##height##_##arch(                            \
240
      const int16_t *pred_buf_q3, uint16_t *dst, int dst_stride, int alpha_q3, \
241
      int bd);                                                                 \
242
  void cfl_predict_hbd_##width##x##height##_##arch(                            \
243
      const int16_t *pred_buf_q3, uint16_t *dst, int dst_stride, int alpha_q3, \
244
2.72M
      int bd) {                                                                \
245
2.72M
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
2.72M
                           height);                                            \
247
2.72M
  }
cfl_predict_hbd_4x4_c
Line
Count
Source
244
659k
      int bd) {                                                                \
245
659k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
659k
                           height);                                            \
247
659k
  }
cfl_predict_hbd_4x8_c
Line
Count
Source
244
334k
      int bd) {                                                                \
245
334k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
334k
                           height);                                            \
247
334k
  }
cfl_predict_hbd_4x16_c
Line
Count
Source
244
129k
      int bd) {                                                                \
245
129k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
129k
                           height);                                            \
247
129k
  }
cfl_predict_hbd_8x4_c
Line
Count
Source
244
353k
      int bd) {                                                                \
245
353k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
353k
                           height);                                            \
247
353k
  }
cfl_predict_hbd_8x8_c
Line
Count
Source
244
333k
      int bd) {                                                                \
245
333k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
333k
                           height);                                            \
247
333k
  }
cfl_predict_hbd_8x16_c
Line
Count
Source
244
141k
      int bd) {                                                                \
245
141k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
141k
                           height);                                            \
247
141k
  }
cfl_predict_hbd_8x32_c
Line
Count
Source
244
159k
      int bd) {                                                                \
245
159k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
159k
                           height);                                            \
247
159k
  }
cfl_predict_hbd_16x4_c
Line
Count
Source
244
147k
      int bd) {                                                                \
245
147k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
147k
                           height);                                            \
247
147k
  }
cfl_predict_hbd_16x8_c
Line
Count
Source
244
133k
      int bd) {                                                                \
245
133k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
133k
                           height);                                            \
247
133k
  }
cfl_predict_hbd_16x16_c
Line
Count
Source
244
168k
      int bd) {                                                                \
245
168k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
168k
                           height);                                            \
247
168k
  }
cfl_predict_hbd_16x32_c
Line
Count
Source
244
44.7k
      int bd) {                                                                \
245
44.7k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
44.7k
                           height);                                            \
247
44.7k
  }
cfl_predict_hbd_32x8_c
Line
Count
Source
244
37.4k
      int bd) {                                                                \
245
37.4k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
37.4k
                           height);                                            \
247
37.4k
  }
cfl_predict_hbd_32x16_c
Line
Count
Source
244
33.3k
      int bd) {                                                                \
245
33.3k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
33.3k
                           height);                                            \
247
33.3k
  }
cfl_predict_hbd_32x32_c
Line
Count
Source
244
52.2k
      int bd) {                                                                \
245
52.2k
    cfl_predict_hbd_##arch(pred_buf_q3, dst, dst_stride, alpha_q3, bd, width,  \
246
52.2k
                           height);                                            \
247
52.2k
  }
248
#endif
249
250
// This wrapper exists because clang format does not like calling macros with
251
// lowercase letters.
252
#define CFL_PREDICT_X(arch, width, height, bd) \
253
  CFL_PREDICT_##bd(arch, width, height)
254
255
#define CFL_PREDICT_FN(arch, bd)                                            \
256
  CFL_PREDICT_X(arch, 4, 4, bd)                                             \
257
  CFL_PREDICT_X(arch, 4, 8, bd)                                             \
258
  CFL_PREDICT_X(arch, 4, 16, bd)                                            \
259
  CFL_PREDICT_X(arch, 8, 4, bd)                                             \
260
  CFL_PREDICT_X(arch, 8, 8, bd)                                             \
261
  CFL_PREDICT_X(arch, 8, 16, bd)                                            \
262
  CFL_PREDICT_X(arch, 8, 32, bd)                                            \
263
  CFL_PREDICT_X(arch, 16, 4, bd)                                            \
264
  CFL_PREDICT_X(arch, 16, 8, bd)                                            \
265
  CFL_PREDICT_X(arch, 16, 16, bd)                                           \
266
  CFL_PREDICT_X(arch, 16, 32, bd)                                           \
267
  CFL_PREDICT_X(arch, 32, 8, bd)                                            \
268
  CFL_PREDICT_X(arch, 32, 16, bd)                                           \
269
  CFL_PREDICT_X(arch, 32, 32, bd)                                           \
270
6.24M
  cfl_predict_##bd##_fn cfl_get_predict_##bd##_fn_##arch(TX_SIZE tx_size) { \
271
6.24M
    static const cfl_predict_##bd##_fn pred[TX_SIZES_ALL] = {               \
272
6.24M
      cfl_predict_##bd##_4x4_##arch,   /* 4x4 */                            \
273
6.24M
      cfl_predict_##bd##_8x8_##arch,   /* 8x8 */                            \
274
6.24M
      cfl_predict_##bd##_16x16_##arch, /* 16x16 */                          \
275
6.24M
      cfl_predict_##bd##_32x32_##arch, /* 32x32 */                          \
276
6.24M
      NULL,                            /* 64x64 (invalid CFL size) */       \
277
6.24M
      cfl_predict_##bd##_4x8_##arch,   /* 4x8 */                            \
278
6.24M
      cfl_predict_##bd##_8x4_##arch,   /* 8x4 */                            \
279
6.24M
      cfl_predict_##bd##_8x16_##arch,  /* 8x16 */                           \
280
6.24M
      cfl_predict_##bd##_16x8_##arch,  /* 16x8 */                           \
281
6.24M
      cfl_predict_##bd##_16x32_##arch, /* 16x32 */                          \
282
6.24M
      cfl_predict_##bd##_32x16_##arch, /* 32x16 */                          \
283
6.24M
      NULL,                            /* 32x64 (invalid CFL size) */       \
284
6.24M
      NULL,                            /* 64x32 (invalid CFL size) */       \
285
6.24M
      cfl_predict_##bd##_4x16_##arch,  /* 4x16  */                          \
286
6.24M
      cfl_predict_##bd##_16x4_##arch,  /* 16x4  */                          \
287
6.24M
      cfl_predict_##bd##_8x32_##arch,  /* 8x32  */                          \
288
6.24M
      cfl_predict_##bd##_32x8_##arch,  /* 32x8  */                          \
289
6.24M
      NULL,                            /* 16x64 (invalid CFL size) */       \
290
6.24M
      NULL,                            /* 64x16 (invalid CFL size) */       \
291
6.24M
    };                                                                      \
292
6.24M
    /* Modulo TX_SIZES_ALL to ensure that an attacker won't be able to */   \
293
6.24M
    /* index the function pointer array out of bounds. */                   \
294
6.24M
    return pred[tx_size % TX_SIZES_ALL];                                    \
295
6.24M
  }
296
297
#endif  // AOM_AV1_COMMON_CFL_H_