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_AOM_AOMCX_H_
12 #define AOM_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 
201 
208 
212 
216 
220 
228 
241 
245 
258 
271 
284 
290 
310 
326 
338 
348 
358 
369 
382 
388 
395 
402 
424 
450 
472 
481 
487 
493 
497 
504 
510 
517 
521 
530 
536 
549 
559 
570 
584 
598 
611 
624 
637 
650 
665 
674 
686 
698 
710 
718 
730 
739 
748 
757 
765 
774 
781 
795  AV1E_SET_TILE_LOOPFILTER_H,
796 
810 
822 
832 
839 
845 
852 
856 
859 
862 
865 
868 };
869 
874 typedef enum aom_scaling_mode_1d {
875  AOME_NORMAL = 0,
876  AOME_FOURFIVE = 1,
877  AOME_THREEFIVE = 2,
878  AOME_ONETWO = 3
880 
888 #define AOM_MAX_SEGMENTS 8
889 
897 typedef struct aom_roi_map {
899  unsigned char *roi_map;
900  unsigned int rows;
901  unsigned int cols;
906 } aom_roi_map_t;
907 
914 typedef struct aom_active_map {
916  unsigned char *active_map;
917  unsigned int rows;
918  unsigned int cols;
920 
926 typedef struct aom_scaling_mode {
930 
932 typedef enum {
933  AOM_CONTENT_DEFAULT,
934  AOM_CONTENT_SCREEN,
935  AOM_CONTENT_INVALID
937 
939 typedef enum {
940  AOM_TIMING_UNSPECIFIED,
941  AOM_TIMING_EQUAL,
942  AOM_TIMING_DEC_MODEL
944 
950 typedef enum {
951  AOM_TUNE_PSNR,
952  AOM_TUNE_SSIM,
953  AOM_TUNE_CDEF_DIST,
954  AOM_TUNE_DAALA_DIST
956 
966 #define AOM_CTRL_AOME_USE_REFERENCE
968 #define AOM_CTRL_AOME_SET_ROI_MAP
970 #define AOM_CTRL_AOME_SET_ACTIVEMAP
972 #define AOM_CTRL_AOME_SET_SCALEMODE
973 
975 #define AOM_CTRL_AOME_SET_SPATIAL_LAYER_ID
976 
978 #define AOM_CTRL_AOME_SET_CPUUSED
979 AOM_CTRL_USE_TYPE(AOME_SET_DEVSF, int)
980 #define AOM_CTRL_AOME_SET_DEVSF
982 #define AOM_CTRL_AOME_SET_ENABLEAUTOALTREF
983 
985 #define AOM_CTRL_AOME_SET_ENABLEAUTOBWDREF
986 
988 #define AOM_CTRL_AOME_SET_SHARPNESS
990 #define AOM_CTRL_AOME_SET_STATIC_THRESHOLD
991 
993 #define AOM_CTRL_AOME_SET_ARNR_MAXFRAMES
995 #define AOM_CTRL_AOME_SET_ARNR_STRENGTH
996 AOM_CTRL_USE_TYPE(AOME_SET_TUNING, int) /* aom_tune_metric */
997 #define AOM_CTRL_AOME_SET_TUNING
999 #define AOM_CTRL_AOME_SET_CQ_LEVEL
1000 
1002 #define AOM_CTRL_AV1E_SET_ROW_MT
1003 
1005 #define AOM_CTRL_AV1E_SET_TILE_COLUMNS
1007 #define AOM_CTRL_AV1E_SET_TILE_ROWS
1008 
1010 #define AOM_CTRL_AV1E_SET_TILE_DEPENDENT_ROWS
1011 
1013 #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER_V
1014 AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER_H, int)
1015 #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER_H
1017 #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER
1018 
1020 #define AOM_CTRL_AOME_GET_LAST_QUANTIZER
1022 #define AOM_CTRL_AOME_GET_LAST_QUANTIZER_64
1023 
1025 #define AOM_CTRL_AOME_SET_MAX_INTRA_BITRATE_PCT
1026 AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTER_BITRATE_PCT, unsigned int)
1027 #define AOM_CTRL_AOME_SET_MAX_INTER_BITRATE_PCT
1028 
1030 #define AOME_CTRL_AOME_SET_NUMBER_SPATIAL_LAYERS
1031 
1033 #define AOM_CTRL_AV1E_SET_GF_CBR_BOOST_PCT
1034 
1035 AOM_CTRL_USE_TYPE(AV1E_SET_LOSSLESS, unsigned int)
1036 #define AOM_CTRL_AV1E_SET_LOSSLESS
1037 
1039 #define AOM_CTRL_AV1E_SET_ENABLE_CDEF
1040 
1042 #define AOM_CTRL_AV1E_SET_ENABLE_RESTORATION
1043 
1045 #define AOM_CTRL_AV1E_SET_DISABLE_TRELLIS_QUANT
1046 
1048 #define AOM_CTRL_AV1E_SET_ENABLE_QM
1049 
1051 #define AOM_CTRL_AV1E_SET_ENABLE_DIST_8X8
1052 
1053 AOM_CTRL_USE_TYPE(AV1E_SET_QM_MIN, unsigned int)
1054 #define AOM_CTRL_AV1E_SET_QM_MIN
1055 
1056 AOM_CTRL_USE_TYPE(AV1E_SET_QM_MAX, unsigned int)
1057 #define AOM_CTRL_AV1E_SET_QM_MAX
1058 
1059 AOM_CTRL_USE_TYPE(AV1E_SET_QM_Y, unsigned int)
1060 #define AOM_CTRL_AV1E_SET_QM_Y
1061 
1062 AOM_CTRL_USE_TYPE(AV1E_SET_QM_U, unsigned int)
1063 #define AOM_CTRL_AV1E_SET_QM_U
1064 
1065 AOM_CTRL_USE_TYPE(AV1E_SET_QM_V, unsigned int)
1066 #define AOM_CTRL_AV1E_SET_QM_V
1067 
1068 AOM_CTRL_USE_TYPE(AV1E_SET_NUM_TG, unsigned int)
1069 #define AOM_CTRL_AV1E_SET_NUM_TG
1070 AOM_CTRL_USE_TYPE(AV1E_SET_MTU, unsigned int)
1071 #define AOM_CTRL_AV1E_SET_MTU
1072 
1073 AOM_CTRL_USE_TYPE(AV1E_SET_TIMING_INFO_TYPE, aom_timing_info_type_t)
1074 #define AOM_CTRL_AV1E_SET_TIMING_INFO_TYPE
1075 
1077 #define AOM_CTRL_AV1E_SET_ENABLE_DF
1078 
1080 #define AOM_CTRL_AV1E_SET_ENABLE_ORDER_HINT
1081 
1083 #define AOM_CTRL_AV1E_SET_ENABLE_JNT_COMP
1084 
1086 #define AOM_CTRL_AV1E_SET_ENABLE_REF_FRAME_MVS
1087 
1089 #define AOM_CTRL_AV1E_SET_ALLOW_REF_FRAME_MVS
1090 
1092 #define AOM_CTRL_AV1E_SET_ENABLE_WARPED_MOTION
1093 
1095 #define AOM_CTRL_AV1E_SET_ALLOW_WARPED_MOTION
1096 
1098 #define AOM_CTRL_AV1E_SET_ENABLE_SUPERRES
1099 
1101 #define AOM_CTRL_AV1E_SET_FRAME_PARALLEL_DECODING
1102 
1104 #define AOM_CTRL_AV1E_SET_ERROR_RESILIENT_MODE
1105 
1107 #define AOM_CTRL_AV1E_SET_S_FRAME_MODE
1108 
1109 AOM_CTRL_USE_TYPE(AV1E_SET_AQ_MODE, unsigned int)
1110 #define AOM_CTRL_AV1E_SET_AQ_MODE
1111 
1113 #define AOM_CTRL_AV1E_SET_DELTAQ_MODE
1114 
1116 #define AOM_CTRL_AV1E_SET_FRAME_PERIODIC_BOOST
1117 
1119 #define AOM_CTRL_AV1E_SET_NOISE_SENSITIVITY
1120 
1121 AOM_CTRL_USE_TYPE(AV1E_SET_TUNE_CONTENT, int) /* aom_tune_content */
1122 #define AOM_CTRL_AV1E_SET_TUNE_CONTENT
1123 
1125 #define AOM_CTRL_AV1E_SET_COLOR_PRIMARIES
1126 
1128 #define AOM_CTRL_AV1E_SET_TRANSFER_CHARACTERISTICS
1129 
1131 #define AOM_CTRL_AV1E_SET_MATRIX_COEFFICIENTS
1132 
1134 #define AOM_CTRL_AV1E_SET_CHROMA_SAMPLE_POSITION
1135 
1137 #define AOM_CTRL_AV1E_SET_MIN_GF_INTERVAL
1138 
1140 #define AOM_CTRL_AV1E_SET_MAX_GF_INTERVAL
1141 
1143 #define AOM_CTRL_AV1E_GET_ACTIVEMAP
1144 
1146 #define AOM_CTRL_AV1E_SET_COLOR_RANGE
1147 
1148 #define AOM_CTRL_AV1E_SET_RENDER_SIZE
1150 
1152 #define AOM_CTRL_AV1E_SET_SUPERBLOCK_SIZE
1153 
1155 #define AOM_CTRL_AV1E_SET_TARGET_LEVEL
1156 
1158 #define AOM_CTRL_AV1E_GET_LEVEL
1159 
1161 #define AOM_CTRL_AV1E_SET_ANS_WINDOW_SIZE_LOG2
1162 
1164 #define AOM_CTRL_AV1E_SET_SINGLE_TILE_DECODING
1165 
1167 #define AOM_CTRL_AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST
1168 
1170 #define AOM_CTRL_AV1E_SET_FILM_GRAIN_TEST_VECTOR
1171 
1173 #define AOM_CTRL_AV1E_SET_FILM_GRAIN_TABLE
1174 
1176 #define AOM_CTRL_AV1E_SET_CDF_UPDATE_MODE
1177 
1178 #ifdef CONFIG_DENOISE
1180 #define AOM_CTRL_AV1E_SET_DENOISE_NOISE_LEVEL
1181 
1183 #define AOM_CTRL_AV1E_SET_DENOISE_BLOCK_SIZE
1184 #endif
1185 
1187 #define AOM_CTRL_AV1E_SET_CHROMA_SUBSAMPLING_X
1188 
1190 #define AOM_CTRL_AV1E_SET_CHROMA_SUBSAMPLING_Y
1191 
1194 #ifdef __cplusplus
1195 } // extern "C"
1196 #endif
1197 
1198 #endif // AOM_AOM_AOMCX_H_
Codec control function to set Max data rate for Intra frames.
Definition: aomcx.h:240
Codec control function to set an MTU size for a tile group.
Definition: aomcx.h:685
Codec control function to encode with CDEF.
Definition: aomcx.h:548
Codec control function to set dependent_horz_tiles.
Definition: aomcx.h:697
unsigned char * active_map
specify an on (1) or off (0) each 16x16 region within a frame
Definition: aomcx.h:916
Codec control function to turn on / off frame order hint for a few tools:
Definition: aomcx.h:729
Describes the encoder algorithm interface to applications.
Codec control function to set noise sensitivity.
Definition: aomcx.h:387
Codec control function to encode with quantisation matrices.
Definition: aomcx.h:583
Codec control function to signal picture timing info in the bitstream.
Definition: aomcx.h:844
aom_scaling_mode_1d
aom 1-D scaling mode
Definition: aomcx.h:874
Codec control function to set chroma 4:2:0 sample position info.
Definition: aomcx.h:480
Codec control function to encode without trellis quantization.
Definition: aomcx.h:569
Codec control function to set the max no of frames to create arf.
Definition: aomcx.h:211
Codec control function to set constrained quality level.
Definition: aomcx.h:227
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:764
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:597
Codec control function to enable frame parallel decoding feature.
Definition: aomcx.h:337
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:717
Codec control function to set transfer function info.
Definition: aomcx.h:471
struct aom_scaling_mode aom_scaling_mode_t
aom image scaling mode
Codec control function to set color range bit.
Definition: aomcx.h:503
Codec control function to add film grain parameters (one of several preset types) info in the bitstre...
Definition: aomcx.h:851
Codec control function to set max data rate for Inter frames.
Definition: aomcx.h:257
Codec control function to set number of tile columns.
Definition: aomcx.h:309
Codec control function to encode with dist_8x8.
Definition: aomcx.h:664
Sets the denoisers block size.
Definition: aomcx.h:861
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:190
Sets the noise level.
Definition: aomcx.h:858
Codec control function to set minimum interval between GF/ARF frames.
Definition: aomcx.h:486
unsigned int cols
Definition: aomcx.h:918
Codec control function to set loop_filter_across_tiles_v_enabled and loop_filter_across_tiles_h_enabl...
Definition: aomcx.h:794
unsigned int cols
Definition: aomcx.h:901
#define AOM_CTRL_USE_TYPE(id, typ)
aom_codec_control type definition macro
Definition: aom_codec.h:429
Codec control function to enable error_resilient_mode.
Definition: aomcx.h:347
Codec control function to encode with Loop Restoration Filter.
Definition: aomcx.h:558
Codec control function to set visual tuning.
Definition: aomcx.h:219
Codec control function to set the path to the film grain parameters.
Definition: aomcx.h:855
Codec control function to set the number of symbols in an ANS data window.
Definition: aomcx.h:709
Codec control function to set minimum interval between GF/ARF frames.
Definition: aomcx.h:492
Codec control function to set number of spatial layers.
Definition: aomcx.h:244
Codec control function to turn on / off joint compound mode at sequence level.
Definition: aomcx.h:738
Sets the chroma subsampling y value.
Definition: aomcx.h:867
int delta_lf[8]
Definition: aomcx.h:903
aom active region map
Definition: aomcx.h:914
Sets the chroma subsampling x value.
Definition: aomcx.h:864
Codec control function to turn on / off ref frame mvs (mfmv) usage at sequence level.
Definition: aomcx.h:747
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:207
Codec control function to get an Active map back from the encoder.
Definition: aomcx.h:496
Codec control function to set lossless encoding mode.
Definition: aomcx.h:283
Codec control function to set intended rendering image size.
Definition: aomcx.h:509
Codec control function to enable s_frame_mode.
Definition: aomcx.h:357
Codec control function to pass an ROI map to encoder.
Definition: aomcx.h:160
AOM_SCALING_MODE v_scaling_mode
Definition: aomcx.h:928
Codec control function to set encoder internal speed settings.
Definition: aomcx.h:182
Definition: aomcx.h:289
Codec control function to set loop_filter_across_tiles_enabled.
Definition: aomcx.h:809
Codec control function to set the delta q mode.
Definition: aomcx.h:821
Codec control function to enable the extreme motion vector unit test in AV1. Please note that this is...
Definition: aomcx.h:838
unsigned int static_threshold[8]
Definition: aomcx.h:905
Codec control function to pass an Active map to encoder.
Definition: aomcx.h:164
aom_tune_content
Definition: aomcx.h:932
Codec control function to set the filter strength for the arf.
Definition: aomcx.h:215
unsigned char * roi_map
Definition: aomcx.h:899
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:186
#define AOM_MAX_SEGMENTS
Max number of segments.
Definition: aomcx.h:888
aom region of interest map
Definition: aomcx.h:897
unsigned int rows
Definition: aomcx.h:917
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:649
Codec control function to set number of tile rows.
Definition: aomcx.h:325
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:636
aom image scaling mode
Definition: aomcx.h:926
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:773
Codec control function to set content type.
Definition: aomcx.h:394
Codec control function to set the max quant matrix flatness.
Definition: aomcx.h:610
int delta_q[8]
Definition: aomcx.h:902
Codec control function to set color space info.
Definition: aomcx.h:423
Codec control function to set adaptive quantization mode.
Definition: aomcx.h:368
Codec control function to get bitstream level.
Definition: aomcx.h:520
AOM_SCALING_MODE h_scaling_mode
Definition: aomcx.h:927
aom_timing_info_type_t
Definition: aomcx.h:939
Boost percentage for Golden Frame in CBR mode.
Definition: aomcx.h:270
Codec control function to set target level.
Definition: aomcx.h:516
Codec control function to set CDF update mode.
Definition: aomcx.h:401
unsigned int rows
Definition: aomcx.h:900
Codec control function to set transfer function info.
Definition: aomcx.h:449
Codec control function to set the single tile decoding mode to 0 or 1.
Definition: aomcx.h:831
Codec control function to turn on / off frame superresolution.
Definition: aomcx.h:780
Codec control function to set temporal mv prediction enabling/disabling at frame level.
Definition: aomcx.h:756
Codec control function to set the min quant matrix flatness.
Definition: aomcx.h:623
Codec control function to set the threshold for MBs treated static.
Definition: aomcx.h:194
aom_tune_metric
Model tuning parameters.
Definition: aomcx.h:950
Codec control function to set intended superblock size.
Definition: aomcx.h:529
Codec control function to enable/disable periodic Q boost.
Definition: aomcx.h:381
Codec control function to get last quantizer chosen by the encoder.
Definition: aomcx.h:200
Codec control function to set a maximum number of tile groups.
Definition: aomcx.h:673
Codec control function to enable automatic set and use bwd-pred frames.
Definition: aomcx.h:535
Codec control function to set which reference frame encoder can use.
Definition: aomcx.h:156