| /* |
| * Copyright (c) 2020, Alliance for Open Media. All rights reserved |
| * |
| * This source code is subject to the terms of the BSD 2 Clause License and |
| * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
| * was not distributed with this source code in the LICENSE file, you can |
| * obtain it at www.aomedia.org/license/software. If the Alliance for Open |
| * Media Patent License 1.0 was not distributed with this source code in the |
| * PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
| */ |
| |
| #ifndef AOM_AV1_ENCODER_PARTITION_SEARCH_H_ |
| #define AOM_AV1_ENCODER_PARTITION_SEARCH_H_ |
| |
| #include "av1/encoder/block.h" |
| #include "av1/encoder/encoder.h" |
| #include "av1/encoder/encodeframe_utils.h" |
| #include "av1/encoder/tokenize.h" |
| |
| 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, |
| PARTITION_TREE *ptree); |
| |
| #if !CONFIG_REALTIME_ONLY |
| // This function attempts to set all mode info entries in a given superblock |
| // to the same block partition size. |
| // However, at the bottom and right borders of the image the requested size |
| // may not be allowed in which case this code attempts to choose the largest |
| // allowable partition. |
| void av1_set_fixed_partitioning(AV1_COMP *cpi, const TileInfo *const tile, |
| MB_MODE_INFO **mib, int mi_row, int mi_col, |
| BLOCK_SIZE bsize); |
| |
| 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); |
| |
| 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, BLOCK_SIZE max_sq_part, |
| BLOCK_SIZE min_sq_part, 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); |
| #endif // !CONFIG_REALTIME_ONLY |
| #endif // AOM_AV1_ENCODER_PARTITION_SEARCH_H_ |