• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 /*!\cond */
24 
25 typedef struct ExtPartController {
26   int ready;
27   int test_mode;
28   aom_ext_part_config_t config;
29   aom_ext_part_model_t model;
30   aom_ext_part_funcs_t funcs;
31 } ExtPartController;
32 
33 aom_codec_err_t av1_ext_part_create(aom_ext_part_funcs_t funcs,
34                                     aom_ext_part_config_t config,
35                                     ExtPartController *ext_part_controller);
36 
37 aom_codec_err_t av1_ext_part_init(ExtPartController *ext_part_controller);
38 
39 aom_codec_err_t av1_ext_part_delete(ExtPartController *ext_part_controller);
40 
41 bool av1_ext_part_get_partition_decision(ExtPartController *ext_part_controller,
42                                          aom_partition_decision_t *decision);
43 
44 bool av1_ext_part_send_partition_stats(ExtPartController *ext_part_controller,
45                                        const aom_partition_stats_t *stats);
46 
47 bool av1_ext_part_send_features(ExtPartController *ext_part_controller,
48                                 const aom_partition_features_t *features);
49 
50 aom_ext_part_decision_mode_t av1_get_ext_part_decision_mode(
51     const ExtPartController *ext_part_controller);
52 
53 /*!\endcond */
54 #ifdef __cplusplus
55 }  // extern "C"
56 #endif
57 
58 #endif  // AOM_AV1_ENCODER_EXTERNAL_PARTITION_H_
59