12#ifndef AOM_AV1_ENCODER_PARTITION_SEARCH_H_
13#define AOM_AV1_ENCODER_PARTITION_SEARCH_H_
15#include "config/aom_config.h"
19#include "av1/encoder/encodeframe.h"
20#include "av1/encoder/tokenize.h"
22void av1_set_offsets_without_segment_id(
const AV1_COMP *
const cpi,
23 const TileInfo *
const tile,
25 int mi_col, BLOCK_SIZE bsize);
26void av1_set_offsets(
const AV1_COMP *
const cpi,
const TileInfo *
const tile,
31 int mi_col, BLOCK_SIZE bsize,
int *rate,
32 int64_t *dist,
int do_recon, PC_TREE *pc_tree);
35 TokenExtra **tp,
int mi_row,
int mi_col,
36 BLOCK_SIZE bsize, PC_TREE *pc_tree);
37#if CONFIG_RT_ML_PARTITIONING
38void av1_nonrd_pick_partition(
AV1_COMP *cpi, ThreadData *td,
39 TileDataEnc *tile_data, TokenExtra **tp,
40 int mi_row,
int mi_col, BLOCK_SIZE bsize,
41 RD_STATS *rd_cost,
int do_recon, int64_t best_rd,
45#if CONFIG_PARTITION_SEARCH_ORDER
46void av1_reset_part_sf(PARTITION_SPEED_FEATURES *part_sf);
47void av1_reset_sf_for_ext_part(
AV1_COMP *
const cpi);
48bool av1_rd_partition_search(
AV1_COMP *
const cpi, ThreadData *td,
49 TileDataEnc *tile_data, TokenExtra **tp,
50 SIMPLE_MOTION_DATA_TREE *sms_root,
int mi_row,
51 int mi_col, BLOCK_SIZE bsize,
52 RD_STATS *best_rd_cost);
56 TileDataEnc *tile_data, TokenExtra **tp,
int mi_row,
57 int mi_col, BLOCK_SIZE bsize, RD_STATS *rd_cost,
58 RD_STATS best_rdc, PC_TREE *pc_tree,
59 SIMPLE_MOTION_DATA_TREE *sms_tree, int64_t *none_rd,
60 SB_MULTI_PASS_MODE multi_pass_mode,
61 RD_RECT_PART_WIN_INFO *rect_part_win_info);
63static inline void set_cb_offsets(uint16_t *cb_offset,
64 const uint16_t cb_offset_y,
65 const uint16_t cb_offset_uv) {
66 cb_offset[PLANE_TYPE_Y] = cb_offset_y;
67 cb_offset[PLANE_TYPE_UV] = cb_offset_uv;
70static inline void update_cb_offsets(
MACROBLOCK *x,
const BLOCK_SIZE bsize,
71 const int subsampling_x,
72 const int subsampling_y) {
73 x->
cb_offset[PLANE_TYPE_Y] += block_size_wide[bsize] * block_size_high[bsize];
75 const BLOCK_SIZE plane_bsize =
76 get_plane_block_size(bsize, subsampling_x, subsampling_y);
77 assert(plane_bsize != BLOCK_INVALID);
79 block_size_wide[plane_bsize] * block_size_high[plane_bsize];
struct macroblock MACROBLOCK
Encoder's parameters related to the current coding block.
Declares top-level encoder structures and functions.
void av1_nonrd_use_partition(AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, MB_MODE_INFO **mib, TokenExtra **tp, int mi_row, int mi_col, BLOCK_SIZE bsize, PC_TREE *pc_tree)
AV1 block partition application (minimal RD search).
Definition partition_search.c:2947
void av1_rd_use_partition(AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, MB_MODE_INFO **mib, TokenExtra **tp, int mi_row, int mi_col, BLOCK_SIZE bsize, int *rate, int64_t *dist, int do_recon, PC_TREE *pc_tree)
AV1 block partition search (partition estimation and partial search).
Definition partition_search.c:1754
bool av1_rd_pick_partition(AV1_COMP *const cpi, ThreadData *td, TileDataEnc *tile_data, TokenExtra **tp, int mi_row, int mi_col, BLOCK_SIZE bsize, RD_STATS *rd_cost, RD_STATS best_rdc, PC_TREE *pc_tree, SIMPLE_MOTION_DATA_TREE *sms_tree, int64_t *none_rd, SB_MULTI_PASS_MODE multi_pass_mode, RD_RECT_PART_WIN_INFO *rect_part_win_info)
AV1 block partition search (full search).
Definition partition_search.c:5480
Top level encoder structure.
Definition encoder.h:2878
Stores the prediction/txfm mode of the current coding block.
Definition blockd.h:222
MACROBLOCKD e_mbd
Decoder's view of current coding block.
Definition block.h:896
uint16_t cb_offset[PLANE_TYPES]
Offset of current coding block's coeff buffer relative to the sb.
Definition block.h:934
bool is_chroma_ref
Definition blockd.h:601