Coverage Report

Created: 2025-06-22 08:04

/src/aom/av1/common/cdef_block.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_CDEF_BLOCK_H_
13
#define AOM_AV1_COMMON_CDEF_BLOCK_H_
14
15
#include "aom_dsp/odintrin.h"
16
17
22.1k
#define CDEF_BLOCKSIZE 64
18
#define CDEF_BLOCKSIZE_LOG2 6
19
#define CDEF_NBLOCKS ((1 << MAX_SB_SIZE_LOG2) / 8)
20
#define CDEF_SB_SHIFT (MAX_SB_SIZE_LOG2 - CDEF_BLOCKSIZE_LOG2)
21
22
/* We need to buffer two vertical lines. */
23
1.63M
#define CDEF_VBORDER (2)
24
/* We only need to buffer three horizontal pixels too, but let's align to
25
   16 bytes (8 x 16 bits) to make vectorization easier. */
26
1.17M
#define CDEF_HBORDER (8)
27
#define CDEF_BSTRIDE \
28
6.05M
  ALIGN_POWER_OF_TWO((1 << MAX_SB_SIZE_LOG2) + 2 * CDEF_HBORDER, 3)
29
30
133M
#define CDEF_VERY_LARGE (0x4000)
31
#define CDEF_INBUF_SIZE \
32
7.76k
  (CDEF_BSTRIDE * ((1 << MAX_SB_SIZE_LOG2) + 2 * CDEF_VBORDER))
33
34
extern const int cdef_pri_taps[2][2];
35
extern const int cdef_sec_taps[2];
36
extern const int (*const cdef_directions)[2];
37
38
typedef struct {
39
  uint8_t by;
40
  uint8_t bx;
41
} cdef_list;
42
43
typedef void (*cdef_filter_block_func)(void *dest, int dstride,
44
                                       const uint16_t *in, int pri_strength,
45
                                       int sec_strength, int dir,
46
                                       int pri_damping, int sec_damping,
47
                                       int coeff_shift, int block_width,
48
                                       int block_height);
49
50
void av1_cdef_filter_fb(uint8_t *dst8, uint16_t *dst16, int dstride,
51
                        const uint16_t *in, int xdec, int ydec,
52
                        int dir[CDEF_NBLOCKS][CDEF_NBLOCKS], int *dirinit,
53
                        int var[CDEF_NBLOCKS][CDEF_NBLOCKS], int pli,
54
                        cdef_list *dlist, int cdef_count, int level,
55
                        int sec_strength, int damping, int coeff_shift);
56
57
static inline void fill_rect(uint16_t *dst, int dstride, int v, int h,
58
364k
                             uint16_t x) {
59
5.85M
  for (int i = 0; i < v; i++) {
60
50.3M
    for (int j = 0; j < h; j++) {
61
44.8M
      dst[i * dstride + j] = x;
62
44.8M
    }
63
5.49M
  }
64
364k
}
Unexecuted instantiation: av1_dx_iface.c:fill_rect
Unexecuted instantiation: decodeframe.c:fill_rect
Unexecuted instantiation: decodemv.c:fill_rect
Unexecuted instantiation: decoder.c:fill_rect
Unexecuted instantiation: decodetxb.c:fill_rect
Unexecuted instantiation: detokenize.c:fill_rect
Unexecuted instantiation: obu.c:fill_rect
Unexecuted instantiation: av1_cx_iface.c:fill_rect
Unexecuted instantiation: allintra_vis.c:fill_rect
Unexecuted instantiation: av1_quantize.c:fill_rect
Unexecuted instantiation: bitstream.c:fill_rect
Unexecuted instantiation: context_tree.c:fill_rect
Unexecuted instantiation: encodeframe.c:fill_rect
Unexecuted instantiation: encodeframe_utils.c:fill_rect
Unexecuted instantiation: encodemb.c:fill_rect
Unexecuted instantiation: encodemv.c:fill_rect
Unexecuted instantiation: encoder.c:fill_rect
Unexecuted instantiation: encoder_utils.c:fill_rect
Unexecuted instantiation: encodetxb.c:fill_rect
Unexecuted instantiation: ethread.c:fill_rect
Unexecuted instantiation: firstpass.c:fill_rect
Unexecuted instantiation: global_motion_facade.c:fill_rect
Unexecuted instantiation: level.c:fill_rect
Unexecuted instantiation: lookahead.c:fill_rect
Unexecuted instantiation: mcomp.c:fill_rect
Unexecuted instantiation: mv_prec.c:fill_rect
Unexecuted instantiation: palette.c:fill_rect
Unexecuted instantiation: partition_search.c:fill_rect
Unexecuted instantiation: partition_strategy.c:fill_rect
Unexecuted instantiation: pass2_strategy.c:fill_rect
Unexecuted instantiation: pickcdef.c:fill_rect
Unexecuted instantiation: picklpf.c:fill_rect
Unexecuted instantiation: pickrst.c:fill_rect
Unexecuted instantiation: ratectrl.c:fill_rect
Unexecuted instantiation: rd.c:fill_rect
Unexecuted instantiation: rdopt.c:fill_rect
Unexecuted instantiation: nonrd_pickmode.c:fill_rect
Unexecuted instantiation: nonrd_opt.c:fill_rect
Unexecuted instantiation: segmentation.c:fill_rect
Unexecuted instantiation: speed_features.c:fill_rect
Unexecuted instantiation: superres_scale.c:fill_rect
Unexecuted instantiation: svc_layercontext.c:fill_rect
Unexecuted instantiation: temporal_filter.c:fill_rect
Unexecuted instantiation: tokenize.c:fill_rect
Unexecuted instantiation: tpl_model.c:fill_rect
Unexecuted instantiation: tx_search.c:fill_rect
Unexecuted instantiation: txb_rdopt.c:fill_rect
Unexecuted instantiation: intra_mode_search.c:fill_rect
Unexecuted instantiation: var_based_part.c:fill_rect
Unexecuted instantiation: av1_noise_estimate.c:fill_rect
Unexecuted instantiation: alloccommon.c:fill_rect
cdef.c:fill_rect
Line
Count
Source
58
364k
                             uint16_t x) {
59
5.85M
  for (int i = 0; i < v; i++) {
60
50.3M
    for (int j = 0; j < h; j++) {
61
44.8M
      dst[i * dstride + j] = x;
62
44.8M
    }
63
5.49M
  }
64
364k
}
Unexecuted instantiation: cdef_block.c:fill_rect
Unexecuted instantiation: restoration.c:fill_rect
Unexecuted instantiation: thread_common.c:fill_rect
Unexecuted instantiation: aq_complexity.c:fill_rect
Unexecuted instantiation: aq_cyclicrefresh.c:fill_rect
Unexecuted instantiation: aq_variance.c:fill_rect
Unexecuted instantiation: compound_type.c:fill_rect
Unexecuted instantiation: encode_strategy.c:fill_rect
Unexecuted instantiation: global_motion.c:fill_rect
Unexecuted instantiation: gop_structure.c:fill_rect
Unexecuted instantiation: interp_search.c:fill_rect
Unexecuted instantiation: motion_search_facade.c:fill_rect
65
#endif  // AOM_AV1_COMMON_CDEF_BLOCK_H_