AOMedia AV1 Codec: Partition Search

| AOMedia AV1 Codec

Functions
Partition Search
Encoder Algorithm

## Functions
static void | encode_nonrd_sb (AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, TokenExtra **tp, const int mi_row, const int mi_col, const int seg_skip)
| Encode a superblock (minimal RD search involved) More...
static void | encode_rd_sb (AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, TokenExtra **tp, const int mi_row, const int mi_col, const int seg_skip)
| Encode a superblock (RD-search-based) More...
static void | encode_sb_row (AV1_COMP *cpi, ThreadData *td, TileDataEnc *tile_data, int mi_row, TokenExtra **tp)
| Encode a superblock row by breaking it into superblocks. More...
void | av1_encode_sb_row (AV1_COMP *cpi, ThreadData *td, int tile_row, int tile_col, int mi_row)
| Encode a superblock row.
void | av1_encode_tile (AV1_COMP *cpi, ThreadData *td, int tile_row, int tile_col)
| Encode a tile.
static void | encode_tiles (AV1_COMP *cpi)
| Break one frame into tiles and encode the tiles. More...
static void | pick_sb_modes (AV1_COMP *const cpi, TileDataEnc *tile_data, MACROBLOCK *const x, int mi_row, int mi_col, RD_STATS *rd_cost, PARTITION_TYPE partition, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx, RD_STATS best_rd)
| Interface for AV1 mode search for an individual coding block. More...
static void | encode_b (const AV1_COMP *const cpi, TileDataEnc *tile_data, ThreadData *td, TokenExtra **tp, int mi_row, int mi_col, RUN_TYPE dry_run, BLOCK_SIZE bsize, PARTITION_TYPE partition, PICK_MODE_CONTEXT *const ctx, int *rate)
| Reconstructs an individual coding block. More...
static void | encode_sb (const AV1_COMP *const cpi, ThreadData *td, TileDataEnc *tile_data, TokenExtra **tp, int mi_row, int mi_col, RUN_TYPE dry_run, BLOCK_SIZE bsize, PC_TREE *pc_tree, int *rate)
| Reconstructs a partition (may contain multiple coding blocks) More...
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). More...
static void | pick_sb_modes_nonrd (AV1_COMP *const cpi, TileDataEnc *tile_data, MACROBLOCK *const x, int mi_row, int mi_col, RD_STATS *rd_cost, BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx)
| Top level function to pick block mode for non-RD optimized case. More...
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). More...
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). More...

## Detailed Description

For and overview of the partition search see Block Partition Search

## Function Documentation

## ◆ encode_nonrd_sb()

static void encode_nonrd_sb | ( | AV1_COMP * | cpi,
|  | ThreadData * | td,
|  | TileDataEnc * | tile_data,
|  | TokenExtra ** | tp,
|  | const int | mi_row,
|  | const int | mi_col,
|  | const int | seg_skip
| ) |  |
| inlinestatic

Encode a superblock (minimal RD search involved)

Encodes the superblock by a pre-determined partition pattern, only minor rd-based searches are allowed to adjust the initial pattern. It is only used by realtime encoding.

References av1_choose_var_based_partitioning(), av1_nonrd_use_partition(), AV1_COMP::common, AV1Common::current_frame, CommonModeInfoParams::mi_grid_base, AV1Common::mi_params, SPEED_FEATURES::part_sf, AV1_COMP::partition_search_skippable_frame, SPEED_FEATURES::rt_sf, AV1Common::seq_params, AV1_COMP::sf, AV1_COMP::source, and AV1_COMP::svc.

Referenced by encode_sb_row().

## ◆ encode_rd_sb()

static void encode_rd_sb | ( | AV1_COMP * | cpi,
|  | ThreadData * | td,
|  | TileDataEnc * | tile_data,
|  | TokenExtra ** | tp,
|  | const int | mi_row,
|  | const int | mi_col,
|  | const int | seg_skip
| ) |  |
| inlinestatic

Encode a superblock (RD-search-based)

Conducts partition search for a superblock, based on rate-distortion costs, from scratch or adjusting from a pre-calculated partition pattern.

References av1_choose_var_based_partitioning(), av1_rd_pick_partition(), av1_rd_use_partition(), CommonTileParams::cols, AV1_COMP::common, SPEED_FEATURES::inter_sf, CommonModeInfoParams::mi_grid_base, AV1Common::mi_params, AV1_COMP::oxcf, SPEED_FEATURES::part_sf, AV1_COMP::partition_search_skippable_frame, macroblock::rdmult, CommonTileParams::rows, macroblock::sb_enc, AV1Common::seq_params, AV1_COMP::sf, AV1Common::tiles, and SuperBlockEnc::tpl_data_count.

Referenced by encode_sb_row().

## ◆ encode_sb_row()

static void encode_sb_row | ( | AV1_COMP * | cpi,
|  | ThreadData * | td,
|  | TileDataEnc * | tile_data,
|  | int | mi_row,
|  | TokenExtra ** | tp
| ) |  |
| inlinestatic

Encode a superblock row by breaking it into superblocks.

Do partition and mode search for an sb row: one row of superblocks filling up the width of the current tile.

References av1_get_cb_coeff_buffer(), CommonQuantParams::base_qindex, macroblock::color_sensitivity, AV1_COMP::common, macroblock::content_state_sb, FeatureFlags::cur_frame_force_integer_mv, macroblockd::cur_frame_force_integer_mv, macroblockd::current_base_qindex, AV1Common::delta_q_info, macroblock::e_mbd, MultiThreadInfo::enc_row_mt, AV1_COMP::enc_seg, encode_nonrd_sb(), encode_rd_sb(), AV1Common::features, AV1Common::last_frame_seg_map, EncSegmentationInfo::map, AV1Common::mi_params, AV1_COMP::mt_info, AV1_COMP::oxcf, AV1Common::quant_params, macroblock::row_ctx, MultiThreadInfo::row_mt_enabled, SPEED_FEATURES::rt_sf, AV1Common::seg, AV1Common::seq_params, AV1_COMP::sf, macroblock::source_variance, AV1EncRowMultiThreadInfo::sync_read_ptr, AV1EncRowMultiThreadInfo::sync_write_ptr, and macroblockd::tile_ctx.

Referenced by av1_encode_sb_row().

## ◆ encode_tiles()

static void encode_tiles | ( | AV1_COMP * | cpi | ) |
| inlinestatic

Break one frame into tiles and encode the tiles.

Parameters

  [in] | cpi | Top-level encoder structure

References AV1_COMP::allocated_tiles, av1_accumulate_cyclic_refresh_counters(), av1_encode_tile(), av1_init_cyclic_refresh_counters(), CommonTileParams::cols, AV1_COMP::common, AV1_COMP::cyclic_refresh, AV1_COMP::deltaq_used, AV1_COMP::intrabc_used, AV1_COMP::oxcf, CommonTileParams::rows, SPEED_FEATURES::rt_sf, AV1_COMP::sf, AV1_COMP::td, AV1_COMP::tile_data, and AV1Common::tiles.

Referenced by encode_frame_internal().

## ◆ pick_sb_modes()

static void pick_sb_modes | ( | AV1_COMP *const | cpi,
|  | TileDataEnc * | tile_data,
|  | MACROBLOCK *const | x,
|  | int | mi_row,
|  | int | mi_col,
|  | RD_STATS * | rd_cost,
|  | PARTITION_TYPE | partition,
|  | BLOCK_SIZE | bsize,
|  | PICK_MODE_CONTEXT * | ctx,
|  | RD_STATS | best_rd
| ) |  |
| static

Interface for AV1 mode search for an individual coding block.

Searches prediction modes, transform, and coefficient coding modes for an individual coding block. This function is the top-level interface that directs the encoder to the proper mode search function, among these implemented for inter/intra + rd/non-rd + non-skip segment/skip segment.

Parameters

  [in] | cpi | Top-level encoder structure
  [in] | tile_data | Pointer to struct holding adaptive data/contexts/models for the tile during encoding
  [in] | x | Pointer to structure holding all the data for the current macroblock
  [in] | mi_row | Row coordinate of the block in a step size of MI_SIZE
  [in] | mi_col | Column coordinate of the block in a step size of MI_SIZE
  [in] | rd_cost | Pointer to structure holding rate and distortion stats for the current block
  [in] | partition | Partition mode of the parent block
  [in] | bsize | Current block size
  [in] | ctx | Pointer to structure holding coding contexts and chosen modes for the current block
  [in] | best_rd | Upper bound of rd cost of a valid partition

Returns
  Nothing is returned. Instead, the chosen modes and contexts necessary for reconstruction are stored in ctx, the rate-distortion stats are stored in rd_cost. If no valid mode leading to rd_cost <= best_rd, the status will be signalled by an INT64_MAX rd_cost->rdcost.

References av1_rd_pick_inter_mode(), av1_rd_pick_intra_mode_sb(), macroblockd::bd, MB_MODE_INFO::bsize, macroblock_plane::coeff, AV1_COMP::common, macroblock_plane::dqcoeff, macroblock::e_mbd, macroblock_plane::eobs, macroblock::errorperbit, macroblockd::mi, AV1_COMP::oxcf, MB_MODE_INFO::partition, macroblockd::plane, macroblock::plane, macroblock_plane::qcoeff, macroblock::rdmult, AV1Common::seg, MB_MODE_INFO::segment_id, MB_MODE_INFO::skip_mode, MB_MODE_INFO::skip_txfm, macroblock::source_variance, macroblock_plane::src, macroblockd::tx_type_map, TxfmSearchInfo::tx_type_map_, macroblockd::tx_type_map_stride, macroblock_plane::txb_entropy_ctx, and macroblock::txfm_search_info.

Referenced by av1_rd_use_partition().

## ◆ encode_b()

static void encode_b | ( | const AV1_COMP *const | cpi,
|  | TileDataEnc * | tile_data,
|  | ThreadData * | td,
|  | TokenExtra ** | tp,
|  | int | mi_row,
|  | int | mi_col,
|  | RUN_TYPE | dry_run,
|  | BLOCK_SIZE | bsize,
|  | PARTITION_TYPE | partition,
|  | PICK_MODE_CONTEXT *const | ctx,
|  | int * | rate
| ) |  |
| static

Reconstructs an individual coding block.

Reconstructs an individual coding block by applying the chosen modes stored in ctx, also updates mode counts and entropy models.

Parameters

  [in] | cpi | Top-level encoder structure
  [in] | tile_data | Pointer to struct holding adaptive data/contexts/models for the tile during encoding
  [in] | td | Pointer to thread data
  [in] | tp | Pointer to the starting token
  [in] | mi_row | Row coordinate of the block in a step size of MI_SIZE
  [in] | mi_col | Column coordinate of the block in a step size of MI_SIZE
  [in] | dry_run | A code indicating whether it is part of the final pass for reconstructing the superblock
  [in] | bsize | Current block size
  [in] | partition | Partition mode of the parent block
  [in] | ctx | Pointer to structure holding coding contexts and the chosen modes for the current block
  [in] | rate | Pointer to the total rate for the current block

Returns
  Nothing is returned. Instead, reconstructions (w/o in-loop filters) will be updated in the pixel buffers in td->mb.e_mbd. Also, the chosen modes will be stored in the MB_MODE_INFO buffer td->mb.e_mbd.mi[0].

References FeatureFlags::allow_warped_motion, MB_MODE_INFO_EXT_FRAME::cb_offset, macroblock::cb_offset, AV1_COMP::common, MB_MODE_INFO::comp_group_idx, MB_MODE_INFO::compound_idx, macroblockd::current_base_qindex, AV1Common::current_frame, MB_MODE_INFO::current_qindex, MB_MODE_INFO::delta_lf, macroblockd::delta_lf, MB_MODE_INFO::delta_lf_from_base, macroblockd::delta_lf_from_base, AV1Common::delta_q_info, macroblock::e_mbd, AV1Common::features, macroblockd::global_motion, SPEED_FEATURES::inter_sf, MB_MODE_INFO::interinter_comp, macroblock::mbmi_ext, macroblock::mbmi_ext_frame, macroblockd::mi, MB_MODE_INFO::motion_mode, MB_MODE_INFO::partition, macroblock::rdmult, MB_MODE_INFO::ref_frame, AV1Common::seg, MB_MODE_INFO::segment_id, AV1Common::seq_params, AV1_COMP::sf, MB_MODE_INFO::skip_mode, MB_MODE_INFO::skip_txfm, and FeatureFlags::switchable_motion_mode.

Referenced by encode_sb().

## ◆ encode_sb()

static void encode_sb | ( | const AV1_COMP *const | cpi,
|  | ThreadData * | td,
|  | TileDataEnc * | tile_data,
|  | TokenExtra ** | tp,
|  | int | mi_row,
|  | int | mi_col,
|  | RUN_TYPE | dry_run,
|  | BLOCK_SIZE | bsize,
|  | PC_TREE * | pc_tree,
|  | int * | rate
| ) |  |
| static

Reconstructs a partition (may contain multiple coding blocks)

Reconstructs a sub-partition of the superblock by applying the chosen modes and partition trees stored in pc_tree.

Parameters

  [in] | cpi | Top-level encoder structure
  [in] | td | Pointer to thread data
  [in] | tile_data | Pointer to struct holding adaptive data/contexts/models for the tile during encoding
  [in] | tp | Pointer to the starting token
  [in] | mi_row | Row coordinate of the block in a step size of MI_SIZE
  [in] | mi_col | Column coordinate of the block in a step size of MI_SIZE
  [in] | dry_run | A code indicating whether it is part of the final pass for reconstructing the superblock
  [in] | bsize | Current block size
  [in] | pc_tree | Pointer to the PC_TREE node storing the picked partitions and mode info for the current block
  [in] | rate | Pointer to the total rate for the current block

Returns
  Nothing is returned. Instead, reconstructions (w/o in-loop filters) will be updated in the pixel buffers in td->mb.e_mbd.

References AV1_COMP::common, macroblock::e_mbd, encode_b(), CommonModeInfoParams::mi_cols, AV1Common::mi_params, CommonModeInfoParams::mi_rows, and macroblockd::tile_ctx.

Referenced by av1_rd_pick_partition(), and av1_rd_use_partition().

## ◆ av1_rd_use_partition()

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).

Encode the block by applying pre-calculated partition patterns that are represented by coding block sizes stored in the mbmi array. Minor partition adjustments are tested and applied if they lead to lower rd costs. The partition types are limited to a basic set: none, horz, vert, and split.

Parameters

  [in] | cpi | Top-level encoder structure
  [in] | td | Pointer to thread data
  [in] | tile_data | Pointer to struct holding adaptive data/contexts/models for the tile during encoding
  [in] | mib | Array representing MB_MODE_INFO pointers for mi blocks starting from the first pixel of the current block
  [in] | tp | Pointer to the starting token
  [in] | mi_row | Row coordinate of the block in a step size of MI_SIZE
  [in] | mi_col | Column coordinate of the block in a step size of MI_SIZE
  [in] | bsize | Current block size
  [in] | rate | Pointer to the final rate for encoding the current block
  [in] | dist | Pointer to the final distortion of the current block
  [in] | do_recon | Whether the reconstruction function needs to be run, either for finalizing a superblock or providing reference for future sub-partitions
  [in] | pc_tree | Pointer to the PC_TREE node holding the picked partitions and mode info for the current block

Returns
  Nothing is returned. The pc_tree struct is modified to store the picked partition and modes. The rate and dist are also updated with those corresponding to the best partition found.

References AV1Common::above_contexts, macroblockd::above_txfm_context, av1_rd_use_partition(), CommonQuantParams::base_qindex, MB_MODE_INFO::bsize, macroblock::cb_offset, AV1_COMP::common, macroblock::e_mbd, encode_sb(), macroblockd::left_txfm_context, macroblockd::left_txfm_context_buffer, macroblock::mb_energy, CommonModeInfoParams::mi_cols, AV1Common::mi_params, CommonModeInfoParams::mi_rows, CommonModeInfoParams::mi_stride, macroblock::mode_costs, SPEED_FEATURES::part_sf, ModeCosts::partition_cost, pick_sb_modes(), AV1Common::quant_params, macroblock::rdmult, AV1Common::seq_params, AV1_COMP::sf, CommonContexts::txfm, and AV1_COMP::vaq_refresh.

Referenced by av1_rd_use_partition(), and encode_rd_sb().

## ◆ pick_sb_modes_nonrd()

static void pick_sb_modes_nonrd | ( | AV1_COMP *const | cpi,
|  | TileDataEnc * | tile_data,
|  | MACROBLOCK *const | x,
|  | int | mi_row,
|  | int | mi_col,
|  | RD_STATS * | rd_cost,
|  | BLOCK_SIZE | bsize,
|  | PICK_MODE_CONTEXT * | ctx
| ) |  |
| static

Top level function to pick block mode for non-RD optimized case.

Searches prediction modes, transform, and coefficient coding modes for an individual coding block. This function is the top-level function that is used for non-RD optimized mode search (controlled by `cpi->sf.rt_sf.use_nonrd_pick_mode`). Depending on frame type it calls inter/skip/hybrid-intra mode search functions

Parameters

  [in] | cpi | Top-level encoder structure
  [in] | tile_data | Pointer to struct holding adaptive data/contexts/models for the tile during encoding
  [in] | x | Pointer to structure holding all the data for the current macroblock
  [in] | mi_row | Row coordinate of the block in a step size of MI_SIZE
  [in] | mi_col | Column coordinate of the block in a step size of MI_SIZE
  [in] | rd_cost | Pointer to structure holding rate and distortion stats for the current block
  [in] | bsize | Current block size
  [in] | ctx | Pointer to structure holding coding contexts and chosen modes for the current block

Returns
  Nothing is returned. Instead, the chosen modes and contexts necessary for reconstruction are stored in ctx, the rate-distortion stats are stored in rd_cost. If no valid mode leading to rd_cost <= best_rd, the status will be signalled by an INT64_MAX rd_cost->rdcost.

References av1_nonrd_pick_inter_mode_sb(), macroblockd::bd, macroblock_plane::coeff, AV1_COMP::common, macroblock_plane::dqcoeff, macroblock::e_mbd, MultiThreadInfo::enc_row_mt, macroblock_plane::eobs, macroblock::errorperbit, hybrid_intra_mode_search(), macroblockd::mi, AV1_COMP::mt_info, AV1_COMP::oxcf, macroblockd::plane, macroblock::plane, macroblock_plane::qcoeff, macroblock::rdmult, AV1Common::seg, MB_MODE_INFO::segment_id, AV1Common::seq_params, macroblock::source_variance, macroblock_plane::src, macroblockd::tx_type_map, TxfmSearchInfo::tx_type_map_, macroblockd::tx_type_map_stride, macroblock_plane::txb_entropy_ctx, and macroblock::txfm_search_info.

Referenced by av1_nonrd_use_partition().

## ◆ av1_nonrd_use_partition()

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).

Encode the block by applying pre-calculated partition patterns that are represented by coding block sizes stored in the mbmi array. The only partition adjustment allowed is merging leaf split nodes if it leads to a lower rd cost. The partition types are limited to a basic set: none, horz, vert, and split. This function is only used in the real-time mode.

Parameters

  [in] | cpi | Top-level encoder structure
  [in] | td | Pointer to thread data
  [in] | tile_data | Pointer to struct holding adaptive data/contexts/models for the tile during encoding
  [in] | mib | Array representing MB_MODE_INFO pointers for mi blocks starting from the first pixel of the current block
  [in] | tp | Pointer to the starting token
  [in] | mi_row | Row coordinate of the block in a step size of MI_SIZE
  [in] | mi_col | Column coordinate of the block in a step size of MI_SIZE
  [in] | bsize | Current block size
  [in] | pc_tree | Pointer to the PC_TREE node holding the picked partitions and mode info for the current block

Returns
  Nothing is returned. The pc_tree struct is modified to store the picked partition and modes.

References AV1Common::above_contexts, macroblockd::above_txfm_context, av1_nonrd_use_partition(), MB_MODE_INFO::bsize, AV1_COMP::common, macroblock::e_mbd, macroblockd::left_txfm_context, macroblockd::left_txfm_context_buffer, CommonModeInfoParams::mi_cols, AV1Common::mi_params, CommonModeInfoParams::mi_rows, CommonModeInfoParams::mi_stride, macroblock::mode_costs, ModeCosts::partition_cost, pick_sb_modes_nonrd(), macroblock::rdmult, SPEED_FEATURES::rt_sf, AV1_COMP::sf, and CommonContexts::txfm.

Referenced by av1_nonrd_use_partition(), and encode_nonrd_sb().

## ◆ av1_rd_pick_partition()

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).

Searches for the best partition pattern for a block based on the rate-distortion cost, and returns a bool value to indicate whether a valid partition pattern is found. The partition can recursively go down to the smallest block size.

Parameters

  [in] | cpi | Top-level encoder structure
  [in] | td | Pointer to thread data
  [in] | tile_data | Pointer to struct holding adaptive data/contexts/models for the tile during encoding
  [in] | tp | Pointer to the starting token
  [in] | mi_row | Row coordinate of the block in a step size of MI_SIZE
  [in] | mi_col | Column coordinate of the block in a step size of MI_SIZE
  [in] | bsize | Current block size
  [in] | rd_cost | Pointer to the final rd cost of the block
  [in] | best_rdc | Upper bound of rd cost of a valid partition
  [in] | pc_tree | Pointer to the PC_TREE node storing the picked partitions and mode info for the current block
  [in] | sms_tree | Pointer to struct holding simple motion search data for the current block
  [in] | none_rd | Pointer to the rd cost in the case of not splitting the current block
  [in] | multi_pass_mode | SB_SINGLE_PASS/SB_DRY_PASS/SB_WET_PASS
  [in] | rect_part_win_info | Pointer to struct storing whether horz/vert partition outperforms previously tested partitions

Returns
  A bool value is returned indicating if a valid partition is found. The pc_tree struct is modified to store the picked partition and modes. The rd_cost struct is also updated with the RD stats corresponding to the best partition found.

References AV1Common::above_contexts, macroblockd::above_txfm_context, macroblockd::bd, TxfmSearchInfo::blk_skip, macroblock::cb_offset, AV1_COMP::common, AV1Common::current_frame, macroblock::e_mbd, encode_sb(), AV1_COMP::gf_frame_index, AV1_COMP::gf_group, macroblockd::left_txfm_context, macroblockd::left_txfm_context_buffer, macroblock::mb_energy, macroblock::must_find_valid_partition, AV1_COMP::oxcf, SPEED_FEATURES::part_sf, macroblock::plane, macroblock::rdmult, macroblock::sb_enc, AV1Common::seq_params, AV1_COMP::sf, AV1_COMP::source, macroblock_plane::src, CommonContexts::txfm, macroblock::txfm_search_info, and AV1_COMP::vaq_refresh.

Referenced by encode_rd_sb().