AOMedia Codec SDK
aomcx.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, 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 #ifndef AOM_AOMCX_H_
12 #define AOM_AOMCX_H_
13 
19 #include "aom/aom.h"
20 #include "aom/aom_encoder.h"
21 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
36 extern aom_codec_iface_t aom_codec_av1_cx_algo;
37 extern aom_codec_iface_t *aom_codec_av1_cx(void);
40 /*
41  * Algorithm Flags
42  */
43 
50 #define AOM_EFLAG_NO_REF_LAST (1 << 16)
51 
57 #define AOM_EFLAG_NO_REF_LAST2 (1 << 17)
58 
64 #define AOM_EFLAG_NO_REF_LAST3 (1 << 18)
65 
71 #define AOM_EFLAG_NO_REF_GF (1 << 19)
72 
79 #define AOM_EFLAG_NO_REF_ARF (1 << 20)
80 
86 #define AOM_EFLAG_NO_REF_BWD (1 << 21)
87 
93 #define AOM_EFLAG_NO_REF_ARF2 (1 << 22)
94 
100 #define AOM_EFLAG_NO_UPD_LAST (1 << 23)
101 
107 #define AOM_EFLAG_NO_UPD_GF (1 << 24)
108 
114 #define AOM_EFLAG_NO_UPD_ARF (1 << 25)
115 
120 #define AOM_EFLAG_NO_UPD_ENTROPY (1 << 26)
121 
126 #define AOM_EFLAG_NO_REF_FRAME_MVS (1 << 27)
127 
132 #define AOM_EFLAG_ERROR_RESILIENT (1 << 28)
133 
138 #define AOM_EFLAG_SET_S_FRAME (1 << 29)
139 
144 #define AOM_EFLAG_SET_PRIMARY_REF_NONE (1 << 30)
145 
157 
161 
165 
169 
173 
183 
187 
191 
195 
199 
205 
212 
216 
220 
224 
232 
245 
249 
262 
275 
288 
309 
327 
339 
349 
359 
370 
383 
389 
396 
403 
425 
451 
473 
482 
488 
494 
498 
505 
511 
518 
522 
531 
537 
550 
560 
571 
585 
599 
612 
625 
638 
651 
666 
675 
687 
699 
711 
719 
731 
740 
749 
758 
766 
775 
782 
796  AV1E_SET_TILE_LOOPFILTER_H,
797 
811 
823 
833 
840 
846 
853 
857 };
858 
863 typedef enum aom_scaling_mode_1d {
864  AOME_NORMAL = 0,
865  AOME_FOURFIVE = 1,
866  AOME_THREEFIVE = 2,
867  AOME_ONETWO = 3
869 
877 #define AOM_MAX_SEGMENTS 8
878 
886 typedef struct aom_roi_map {
888  unsigned char *roi_map;
889  unsigned int rows;
890  unsigned int cols;
895 } aom_roi_map_t;
896 
903 typedef struct aom_active_map {
905  unsigned char *active_map;
906  unsigned int rows;
907  unsigned int cols;
909 
915 typedef struct aom_scaling_mode {
919 
921 typedef enum {
922  AOM_CONTENT_DEFAULT,
923  AOM_CONTENT_SCREEN,
924  AOM_CONTENT_INVALID
926 
928 typedef enum {
929  AOM_TIMING_UNSPECIFIED,
930  AOM_TIMING_EQUAL,
931  AOM_TIMING_DEC_MODEL
933 
939 typedef enum {
940  AOM_TUNE_PSNR,
941  AOM_TUNE_SSIM,
942  AOM_TUNE_CDEF_DIST,
943  AOM_TUNE_DAALA_DIST
945 
955 #define AOM_CTRL_AOME_USE_REFERENCE
957 #define AOM_CTRL_AOME_SET_ROI_MAP
959 #define AOM_CTRL_AOME_SET_ACTIVEMAP
961 #define AOM_CTRL_AOME_SET_SCALEMODE
962 
964 #define AOM_CTRL_AOME_SET_SPATIAL_LAYER_ID
965 
967 #define AOM_CTRL_AOME_SET_CPUUSED
969 #define AOM_CTRL_AOME_SET_DEVSF
971 #define AOM_CTRL_AOME_SET_ENABLEAUTOALTREF
972 
974 #define AOM_CTRL_AOME_SET_ENABLEAUTOBWDREF
975 
977 #define AOM_CTRL_AOME_SET_SHARPNESS
979 #define AOM_CTRL_AOME_SET_STATIC_THRESHOLD
980 
982 #define AOM_CTRL_AOME_SET_ARNR_MAXFRAMES
984 #define AOM_CTRL_AOME_SET_ARNR_STRENGTH
985 AOM_CTRL_USE_TYPE(AOME_SET_TUNING, int) /* aom_tune_metric */
986 #define AOM_CTRL_AOME_SET_TUNING
988 #define AOM_CTRL_AOME_SET_CQ_LEVEL
989 
991 #define AOM_CTRL_AV1E_SET_TILE_COLUMNS
993 #define AOM_CTRL_AV1E_SET_TILE_ROWS
994 
996 #define AOM_CTRL_AV1E_SET_TILE_DEPENDENT_ROWS
997 
999 #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER_V
1000 AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER_H, int)
1001 #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER_H
1003 #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER
1004 
1006 #define AOM_CTRL_AOME_GET_LAST_QUANTIZER
1008 #define AOM_CTRL_AOME_GET_LAST_QUANTIZER_64
1009 
1011 #define AOM_CTRL_AOME_SET_MAX_INTRA_BITRATE_PCT
1012 AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTER_BITRATE_PCT, unsigned int)
1013 #define AOM_CTRL_AOME_SET_MAX_INTER_BITRATE_PCT
1014 
1016 #define AOME_CTRL_AOME_SET_NUMBER_SPATIAL_LAYERS
1017 
1019 #define AOM_CTRL_AV1E_SET_GF_CBR_BOOST_PCT
1020 
1021 AOM_CTRL_USE_TYPE(AV1E_SET_LOSSLESS, unsigned int)
1022 #define AOM_CTRL_AV1E_SET_LOSSLESS
1023 
1025 #define AOM_CTRL_AV1E_SET_ENABLE_CDEF
1026 
1028 #define AOM_CTRL_AV1E_SET_ENABLE_RESTORATION
1029 
1031 #define AOM_CTRL_AV1E_SET_DISABLE_TRELLIS_QUANT
1032 
1034 #define AOM_CTRL_AV1E_SET_ENABLE_QM
1035 
1037 #define AOM_CTRL_AV1E_SET_ENABLE_DIST_8X8
1038 
1039 AOM_CTRL_USE_TYPE(AV1E_SET_QM_MIN, unsigned int)
1040 #define AOM_CTRL_AV1E_SET_QM_MIN
1041 
1042 AOM_CTRL_USE_TYPE(AV1E_SET_QM_MAX, unsigned int)
1043 #define AOM_CTRL_AV1E_SET_QM_MAX
1044 
1045 AOM_CTRL_USE_TYPE(AV1E_SET_QM_Y, unsigned int)
1046 #define AOM_CTRL_AV1E_SET_QM_Y
1047 
1048 AOM_CTRL_USE_TYPE(AV1E_SET_QM_U, unsigned int)
1049 #define AOM_CTRL_AV1E_SET_QM_U
1050 
1051 AOM_CTRL_USE_TYPE(AV1E_SET_QM_V, unsigned int)
1052 #define AOM_CTRL_AV1E_SET_QM_V
1053 
1054 AOM_CTRL_USE_TYPE(AV1E_SET_NUM_TG, unsigned int)
1055 #define AOM_CTRL_AV1E_SET_NUM_TG
1056 AOM_CTRL_USE_TYPE(AV1E_SET_MTU, unsigned int)
1057 #define AOM_CTRL_AV1E_SET_MTU
1058 
1060 #define AOM_CTRL_AV1E_SET_TIMING_INFO_TYPE
1061 
1063 #define AOM_CTRL_AV1E_SET_ENABLE_DF
1064 
1066 #define AOM_CTRL_AV1E_SET_ENABLE_ORDER_HINT
1067 
1069 #define AOM_CTRL_AV1E_SET_ENABLE_JNT_COMP
1070 
1072 #define AOM_CTRL_AV1E_SET_ENABLE_REF_FRAME_MVS
1073 
1075 #define AOM_CTRL_AV1E_SET_ALLOW_REF_FRAME_MVS
1076 
1078 #define AOM_CTRL_AV1E_SET_ENABLE_WARPED_MOTION
1079 
1081 #define AOM_CTRL_AV1E_SET_ALLOW_WARPED_MOTION
1082 
1084 #define AOM_CTRL_AV1E_SET_ENABLE_SUPERRES
1085 
1087 #define AOM_CTRL_AV1E_SET_FRAME_PARALLEL_DECODING
1088 
1090 #define AOM_CTRL_AV1E_SET_ERROR_RESILIENT_MODE
1091 
1093 #define AOM_CTRL_AV1E_SET_S_FRAME_MODE
1094 
1095 AOM_CTRL_USE_TYPE(AV1E_SET_AQ_MODE, unsigned int)
1096 #define AOM_CTRL_AV1E_SET_AQ_MODE
1097 
1099 #define AOM_CTRL_AV1E_SET_DELTAQ_MODE
1100 
1102 #define AOM_CTRL_AV1E_SET_FRAME_PERIODIC_BOOST
1103 
1105 #define AOM_CTRL_AV1E_SET_NOISE_SENSITIVITY
1106 
1107 AOM_CTRL_USE_TYPE(AV1E_SET_TUNE_CONTENT, int) /* aom_tune_content */
1108 #define AOM_CTRL_AV1E_SET_TUNE_CONTENT
1109 
1111 #define AOM_CTRL_AV1E_SET_COLOR_PRIMARIES
1112 
1114 #define AOM_CTRL_AV1E_SET_TRANSFER_CHARACTERISTICS
1115 
1117 #define AOM_CTRL_AV1E_SET_MATRIX_COEFFICIENTS
1118 
1120 #define AOM_CTRL_AV1E_SET_CHROMA_SAMPLE_POSITION
1121 
1123 #define AOM_CTRL_AV1E_SET_MIN_GF_INTERVAL
1124 
1126 #define AOM_CTRL_AV1E_SET_MAX_GF_INTERVAL
1127 
1129 #define AOM_CTRL_AV1E_GET_ACTIVEMAP
1130 
1132 #define AOM_CTRL_AV1E_SET_COLOR_RANGE
1133 
1138 #define AOM_CTRL_AV1E_SET_RENDER_SIZE
1140 
1142 #define AOM_CTRL_AV1E_SET_SUPERBLOCK_SIZE
1143 
1145 #define AOM_CTRL_AV1E_SET_TARGET_LEVEL
1146 
1148 #define AOM_CTRL_AV1E_GET_LEVEL
1149 
1151 #define AOM_CTRL_AV1E_SET_ANS_WINDOW_SIZE_LOG2
1152 
1154 #define AOM_CTRL_AV1E_SET_SINGLE_TILE_DECODING
1155 
1157 #define AOM_CTRL_AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST
1158 
1160 #define AOM_CTRL_AV1E_SET_FILM_GRAIN_TEST_VECTOR
1161 
1163 #define AOM_CTRL_AV1E_SET_FILM_GRAIN_TABLE
1164 
1166 #define AOM_CTRL_AV1E_SET_CDF_UPDATE_MODE
1167 
1170 #ifdef __cplusplus
1171 } // extern "C"
1172 #endif
1173 
1174 #endif // AOM_AOMCX_H_
Codec control function to set Max data rate for Intra frames.
Definition: aomcx.h:244
Codec control function to set an MTU size for a tile group.
Definition: aomcx.h:686
Codec control function to encode with CDEF.
Definition: aomcx.h:549
Codec control function to set dependent_horz_tiles.
Definition: aomcx.h:698
unsigned char * active_map
specify an on (1) or off (0) each 16x16 region within a frame
Definition: aomcx.h:905
Codec control function to turn on / off frame order hint for a few tools:
Definition: aomcx.h:730
Describes the encoder algorithm interface to applications.
Codec control function to set noise sensitivity.
Definition: aomcx.h:388
Codec control function to encode with quantisation matrices.
Definition: aomcx.h:584
Codec control function to signal picture timing info in the bitstream.
Definition: aomcx.h:845
aom_scaling_mode_1d
aom 1-D scaling mode
Definition: aomcx.h:863
Codec control function to set chroma 4:2:0 sample position info.
Definition: aomcx.h:481
Codec control function to encode without trellis quantization.
Definition: aomcx.h:570
Codec control function to set the max no of frames to create arf.
Definition: aomcx.h:215
Codec control function to set constrained quality level.
Definition: aomcx.h:231
struct aom_roi_map aom_roi_map_t
aom region of interest map
Provides controls common to both the AOM encoder and decoder.
Codec control function to set encoder scaling mode.
Definition: aomcx.h:168
Codec control function to turn on / off warped motion usage at sequence level.
Definition: aomcx.h:765
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:598
Codec control function to enable frame parallel decoding feature.
Definition: aomcx.h:338
enum aom_scaling_mode_1d AOM_SCALING_MODE
aom 1-D scaling mode
Codec control function to turn on / off dual filter enabling/disabling.
Definition: aomcx.h:718
Codec control function to set transfer function info.
Definition: aomcx.h:472
struct aom_scaling_mode aom_scaling_mode_t
aom image scaling mode
Codec control function to set color range bit.
Definition: aomcx.h:504
Codec control function to add film grain parameters (one of several preset types) info in the bitstre...
Definition: aomcx.h:852
Codec control function to set max data rate for Inter frames.
Definition: aomcx.h:261
Codec control function to set number of tile columns.
Definition: aomcx.h:308
Codec control function to encode with dist_8x8.
Definition: aomcx.h:665
const struct aom_codec_iface aom_codec_iface_t
Codec interface structure.
Definition: aom_codec.h:181
Codec control function to set sharpness.
Definition: aomcx.h:194
Codec control function to set minimum interval between GF/ARF frames.
Definition: aomcx.h:487
unsigned int cols
Definition: aomcx.h:907
Codec control function to set loop_filter_across_tiles_v_enabled and loop_filter_across_tiles_h_enabl...
Definition: aomcx.h:795
Speed features for codec development.
Definition: aomcx.h:186
unsigned int cols
Definition: aomcx.h:890
#define AOM_CTRL_USE_TYPE(id, typ)
aom_codec_control type definition macro
Definition: aom_codec.h:438
Codec control function to enable error_resilient_mode.
Definition: aomcx.h:348
Codec control function to encode with Loop Restoration Filter.
Definition: aomcx.h:559
Codec control function to set visual tuning.
Definition: aomcx.h:223
Codec control function to set the path to the film grain parameters.
Definition: aomcx.h:856
Codec control function to set the number of symbols in an ANS data window.
Definition: aomcx.h:710
Codec control function to set minimum interval between GF/ARF frames.
Definition: aomcx.h:493
Codec control function to set number of spatial layers.
Definition: aomcx.h:248
Codec control function to turn on / off joint compound mode at sequence level.
Definition: aomcx.h:739
int delta_lf[8]
Definition: aomcx.h:892
aom active region map
Definition: aomcx.h:903
Codec control function to turn on / off ref frame mvs (mfmv) usage at sequence level.
Definition: aomcx.h:748
Codec control function to set encoder spatial layer id.
Definition: aomcx.h:172
Codec control function to get last quantizer chosen by the encoder.
Definition: aomcx.h:211
Codec control function to get an Active map back from the encoder.
Definition: aomcx.h:497
Codec control function to set lossless encoding mode.
Definition: aomcx.h:287
Codec control function to set intended rendering image size.
Definition: aomcx.h:510
Codec control function to enable s_frame_mode.
Definition: aomcx.h:358
Codec control function to pass an ROI map to encoder.
Definition: aomcx.h:160
AOM_SCALING_MODE v_scaling_mode
Definition: aomcx.h:917
Codec control function to set encoder internal speed settings.
Definition: aomcx.h:182
Codec control function to set loop_filter_across_tiles_enabled.
Definition: aomcx.h:810
Codec control function to set the delta q mode.
Definition: aomcx.h:822
Codec control function to enable the extreme motion vector unit test in AV1. Please note that this is...
Definition: aomcx.h:839
unsigned int static_threshold[8]
Definition: aomcx.h:894
Codec control function to pass an Active map to encoder.
Definition: aomcx.h:164
aom_tune_content
Definition: aomcx.h:921
Codec control function to set the filter strength for the arf.
Definition: aomcx.h:219
unsigned char * roi_map
Definition: aomcx.h:888
aome_enc_control_id
AVx encoder control functions.
Definition: aomcx.h:153
Codec control function to enable automatic set and use alf frames.
Definition: aomcx.h:190
#define AOM_MAX_SEGMENTS
Max number of segments.
Definition: aomcx.h:877
aom region of interest map
Definition: aomcx.h:886
unsigned int rows
Definition: aomcx.h:906
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:650
Codec control function to set number of tile rows.
Definition: aomcx.h:326
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:637
aom image scaling mode
Definition: aomcx.h:915
struct aom_active_map aom_active_map_t
aom active region map
Codec control function to turn on / off warped motion usage at frame level.
Definition: aomcx.h:774
Codec control function to set content type.
Definition: aomcx.h:395
Codec control function to set the max quant matrix flatness.
Definition: aomcx.h:611
int delta_q[8]
Definition: aomcx.h:891
Codec control function to set color space info.
Definition: aomcx.h:424
Codec control function to set adaptive quantization mode.
Definition: aomcx.h:369
Codec control function to get bitstream level.
Definition: aomcx.h:521
AOM_SCALING_MODE h_scaling_mode
Definition: aomcx.h:916
aom_timing_info_type_t
Definition: aomcx.h:928
Boost percentage for Golden Frame in CBR mode.
Definition: aomcx.h:274
Codec control function to set target level.
Definition: aomcx.h:517
Codec control function to set CDF update mode.
Definition: aomcx.h:402
unsigned int rows
Definition: aomcx.h:889
Codec control function to set transfer function info.
Definition: aomcx.h:450
Codec control function to set the single tile decoding mode to 0 or 1.
Definition: aomcx.h:832
Codec control function to turn on / off frame superresolution.
Definition: aomcx.h:781
Codec control function to set temporal mv prediction enabling/disabling at frame level.
Definition: aomcx.h:757
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:624
Codec control function to set the threshold for MBs treated static.
Definition: aomcx.h:198
aom_tune_metric
Model tuning parameters.
Definition: aomcx.h:939
Codec control function to set intended superblock size.
Definition: aomcx.h:530
Codec control function to enable/disable periodic Q boost.
Definition: aomcx.h:382
Codec control function to get last quantizer chosen by the encoder.
Definition: aomcx.h:204
Codec control function to set a maximum number of tile groups.
Definition: aomcx.h:674
Codec control function to enable automatic set and use bwd-pred frames.
Definition: aomcx.h:536
Codec control function to set which reference frame encoder can use.
Definition: aomcx.h:156