1 /* 2 * Copyright (c) 2021, 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_EXTERNAL_PARTITION_H_ 13 #define AOM_AV1_ENCODER_EXTERNAL_PARTITION_H_ 14 15 #include <stdbool.h> 16 17 #include "aom/aom_codec.h" 18 #include "aom/aom_external_partition.h" 19 #include "config/aom_config.h" 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 /*!\cond */ 25 26 typedef struct ExtPartController { 27 int ready; 28 int test_mode; 29 aom_ext_part_config_t config; 30 aom_ext_part_model_t model; 31 aom_ext_part_funcs_t funcs; 32 } ExtPartController; 33 34 aom_codec_err_t av1_ext_part_create(aom_ext_part_funcs_t funcs, 35 aom_ext_part_config_t config, 36 ExtPartController *ext_part_controller); 37 38 aom_codec_err_t av1_ext_part_delete(ExtPartController *ext_part_controller); 39 40 bool av1_ext_part_get_partition_decision(ExtPartController *ext_part_controller, 41 aom_partition_decision_t *decision); 42 43 bool av1_ext_part_send_features(ExtPartController *ext_part_controller, 44 const aom_partition_features_t *features); 45 46 #if CONFIG_PARTITION_SEARCH_ORDER 47 bool av1_ext_part_send_partition_stats(ExtPartController *ext_part_controller, 48 const aom_partition_stats_t *stats); 49 50 aom_ext_part_decision_mode_t av1_get_ext_part_decision_mode( 51 const ExtPartController *ext_part_controller); 52 #endif // CONFIG_PARTITION_SEARCH_ORDER 53 54 /*!\endcond */ 55 #ifdef __cplusplus 56 } // extern "C" 57 #endif 58 59 #endif // AOM_AV1_ENCODER_EXTERNAL_PARTITION_H_ 60