Coverage Report

Created: 2022-08-24 06:17

/src/aom/av1/encoder/partition_search.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2020, 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_ENCODER_PARTITION_SEARCH_H_
13
#define AOM_AV1_ENCODER_PARTITION_SEARCH_H_
14
15
#include "av1/encoder/block.h"
16
#include "av1/encoder/encoder.h"
17
#include "av1/encoder/encodeframe.h"
18
#include "av1/encoder/tokenize.h"
19
20
void av1_set_offsets_without_segment_id(const AV1_COMP *const cpi,
21
                                        const TileInfo *const tile,
22
                                        MACROBLOCK *const x, int mi_row,
23
                                        int mi_col, BLOCK_SIZE bsize);
24
void av1_set_offsets(const AV1_COMP *const cpi, const TileInfo *const tile,
25
                     MACROBLOCK *const x, int mi_row, int mi_col,
26
                     BLOCK_SIZE bsize);
27
void av1_rd_use_partition(AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data,
28
                          MB_MODE_INFO **mib, TokenExtra **tp, int mi_row,
29
                          int mi_col, BLOCK_SIZE bsize, int *rate,
30
                          int64_t *dist, int do_recon, PC_TREE *pc_tree);
31
void av1_nonrd_use_partition(AV1_COMP *cpi, ThreadData *td,
32
                             TileDataEnc *tile_data, MB_MODE_INFO **mib,
33
                             TokenExtra **tp, int mi_row, int mi_col,
34
                             BLOCK_SIZE bsize, PC_TREE *pc_tree);
35
#if CONFIG_RT_ML_PARTITIONING
36
void av1_nonrd_pick_partition(AV1_COMP *cpi, ThreadData *td,
37
                              TileDataEnc *tile_data, TokenExtra **tp,
38
                              int mi_row, int mi_col, BLOCK_SIZE bsize,
39
                              RD_STATS *rd_cost, int do_recon, int64_t best_rd,
40
                              PC_TREE *pc_tree);
41
#endif
42
void av1_reset_part_sf(PARTITION_SPEED_FEATURES *part_sf);
43
void av1_reset_sf_for_ext_part(AV1_COMP *const cpi);
44
45
bool av1_rd_partition_search(AV1_COMP *const cpi, ThreadData *td,
46
                             TileDataEnc *tile_data, TokenExtra **tp,
47
                             SIMPLE_MOTION_DATA_TREE *sms_root, int mi_row,
48
                             int mi_col, BLOCK_SIZE bsize,
49
                             RD_STATS *best_rd_cost);
50
bool av1_rd_pick_partition(AV1_COMP *const cpi, ThreadData *td,
51
                           TileDataEnc *tile_data, TokenExtra **tp, int mi_row,
52
                           int mi_col, BLOCK_SIZE bsize, RD_STATS *rd_cost,
53
                           RD_STATS best_rdc, PC_TREE *pc_tree,
54
                           SIMPLE_MOTION_DATA_TREE *sms_tree, int64_t *none_rd,
55
                           SB_MULTI_PASS_MODE multi_pass_mode,
56
                           RD_RECT_PART_WIN_INFO *rect_part_win_info);
57
58
static AOM_INLINE void set_cb_offsets(uint16_t *cb_offset,
59
                                      const uint16_t cb_offset_y,
60
23.5k
                                      const uint16_t cb_offset_uv) {
61
23.5k
  cb_offset[PLANE_TYPE_Y] = cb_offset_y;
62
23.5k
  cb_offset[PLANE_TYPE_UV] = cb_offset_uv;
63
23.5k
}
Unexecuted instantiation: encodeframe.c:set_cb_offsets
partition_search.c:set_cb_offsets
Line
Count
Source
60
23.5k
                                      const uint16_t cb_offset_uv) {
61
23.5k
  cb_offset[PLANE_TYPE_Y] = cb_offset_y;
62
23.5k
  cb_offset[PLANE_TYPE_UV] = cb_offset_uv;
63
23.5k
}
Unexecuted instantiation: partition_strategy.c:set_cb_offsets
64
65
static AOM_INLINE void update_cb_offsets(MACROBLOCK *x, const BLOCK_SIZE bsize,
66
                                         const int subsampling_x,
67
11.8k
                                         const int subsampling_y) {
68
11.8k
  x->cb_offset[PLANE_TYPE_Y] += block_size_wide[bsize] * block_size_high[bsize];
69
11.8k
  if (x->e_mbd.is_chroma_ref) {
70
11.8k
    const BLOCK_SIZE plane_bsize =
71
11.8k
        get_plane_block_size(bsize, subsampling_x, subsampling_y);
72
11.8k
    assert(plane_bsize != BLOCK_INVALID);
73
11.8k
    x->cb_offset[PLANE_TYPE_UV] +=
74
11.8k
        block_size_wide[plane_bsize] * block_size_high[plane_bsize];
75
11.8k
  }
76
11.8k
}
Unexecuted instantiation: encodeframe.c:update_cb_offsets
partition_search.c:update_cb_offsets
Line
Count
Source
67
11.8k
                                         const int subsampling_y) {
68
11.8k
  x->cb_offset[PLANE_TYPE_Y] += block_size_wide[bsize] * block_size_high[bsize];
69
11.8k
  if (x->e_mbd.is_chroma_ref) {
70
11.8k
    const BLOCK_SIZE plane_bsize =
71
11.8k
        get_plane_block_size(bsize, subsampling_x, subsampling_y);
72
11.8k
    assert(plane_bsize != BLOCK_INVALID);
73
11.8k
    x->cb_offset[PLANE_TYPE_UV] +=
74
11.8k
        block_size_wide[plane_bsize] * block_size_high[plane_bsize];
75
11.8k
  }
76
11.8k
}
Unexecuted instantiation: partition_strategy.c:update_cb_offsets
77
78
#endif  // AOM_AV1_ENCODER_PARTITION_SEARCH_H_