blob: 9b45bd92c5a035308778a688da161317009845fe [file] [log] [blame]
John Koleszar0ea50ce2010-05-18 11:58:33 -04001/*
Yaowu Xu9c01aa12016-09-01 14:32:49 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
John Koleszar0ea50ce2010-05-18 11:58:33 -04003 *
Yaowu Xu9c01aa12016-09-01 14:32:49 -07004 * 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.
John Koleszar0ea50ce2010-05-18 11:58:33 -040010 */
Yaowu Xuf883b422016-08-30 14:01:10 -070011#ifndef AOM_AOMCX_H_
12#define AOM_AOMCX_H_
John Koleszar0ea50ce2010-05-18 11:58:33 -040013
Yaowu Xu9c01aa12016-09-01 14:32:49 -070014/*!\defgroup aom_encoder AOMedia AOM/AV1 Encoder
15 * \ingroup aom
John Koleszar0ea50ce2010-05-18 11:58:33 -040016 *
17 * @{
18 */
Yaowu Xuf883b422016-08-30 14:01:10 -070019#include "./aom.h"
20#include "./aom_encoder.h"
John Koleszar0ea50ce2010-05-18 11:58:33 -040021
James Zernf42d52e2011-02-16 17:54:49 -080022/*!\file
Yaowu Xu9c01aa12016-09-01 14:32:49 -070023 * \brief Provides definitions for using AOM or AV1 encoder algorithm within the
Yaowu Xuf883b422016-08-30 14:01:10 -070024 * aom Codec Interface.
John Koleszar0ea50ce2010-05-18 11:58:33 -040025 */
Dmitry Kovaleve288c602013-09-29 18:00:15 -070026
27#ifdef __cplusplus
28extern "C" {
29#endif
John Koleszar0ea50ce2010-05-18 11:58:33 -040030
Yaowu Xuf883b422016-08-30 14:01:10 -070031/*!\name Algorithm interface for AV1
Jingning Han3ee6db62015-08-05 19:00:31 -070032 *
Yaowu Xuf883b422016-08-30 14:01:10 -070033 * This interface provides the capability to encode raw AV1 streams.
Jingning Han3ee6db62015-08-05 19:00:31 -070034 * @{
35 */
Yaowu Xuf883b422016-08-30 14:01:10 -070036extern aom_codec_iface_t aom_codec_av1_cx_algo;
37extern aom_codec_iface_t *aom_codec_av1_cx(void);
Jingning Han3ee6db62015-08-05 19:00:31 -070038/*!@} - end algorithm interface member group*/
John Koleszar0952acb2010-06-01 11:14:25 -040039
John Koleszar0ea50ce2010-05-18 11:58:33 -040040/*
41 * Algorithm Flags
42 */
43
44/*!\brief Don't reference the last frame
45 *
46 * When this flag is set, the encoder will not use the last frame as a
47 * predictor. When not set, the encoder will choose whether to use the
48 * last frame or not automatically.
49 */
Yaowu Xuf883b422016-08-30 14:01:10 -070050#define AOM_EFLAG_NO_REF_LAST (1 << 16)
John Koleszar0ea50ce2010-05-18 11:58:33 -040051
52/*!\brief Don't reference the golden frame
53 *
54 * When this flag is set, the encoder will not use the golden frame as a
55 * predictor. When not set, the encoder will choose whether to use the
56 * golden frame or not automatically.
57 */
Yaowu Xuf883b422016-08-30 14:01:10 -070058#define AOM_EFLAG_NO_REF_GF (1 << 17)
John Koleszar0ea50ce2010-05-18 11:58:33 -040059
60/*!\brief Don't reference the alternate reference frame
61 *
62 * When this flag is set, the encoder will not use the alt ref frame as a
63 * predictor. When not set, the encoder will choose whether to use the
64 * alt ref frame or not automatically.
65 */
Yaowu Xuf883b422016-08-30 14:01:10 -070066#define AOM_EFLAG_NO_REF_ARF (1 << 21)
John Koleszar0ea50ce2010-05-18 11:58:33 -040067
68/*!\brief Don't update the last frame
69 *
70 * When this flag is set, the encoder will not update the last frame with
71 * the contents of the current frame.
72 */
Yaowu Xuf883b422016-08-30 14:01:10 -070073#define AOM_EFLAG_NO_UPD_LAST (1 << 18)
John Koleszar0ea50ce2010-05-18 11:58:33 -040074
75/*!\brief Don't update the golden frame
76 *
77 * When this flag is set, the encoder will not update the golden frame with
78 * the contents of the current frame.
79 */
Yaowu Xuf883b422016-08-30 14:01:10 -070080#define AOM_EFLAG_NO_UPD_GF (1 << 22)
John Koleszar0ea50ce2010-05-18 11:58:33 -040081
82/*!\brief Don't update the alternate reference frame
83 *
84 * When this flag is set, the encoder will not update the alt ref frame with
85 * the contents of the current frame.
86 */
Yaowu Xuf883b422016-08-30 14:01:10 -070087#define AOM_EFLAG_NO_UPD_ARF (1 << 23)
John Koleszar0ea50ce2010-05-18 11:58:33 -040088
89/*!\brief Force golden frame update
90 *
91 * When this flag is set, the encoder copy the contents of the current frame
92 * to the golden frame buffer.
93 */
Yaowu Xuf883b422016-08-30 14:01:10 -070094#define AOM_EFLAG_FORCE_GF (1 << 19)
John Koleszar0ea50ce2010-05-18 11:58:33 -040095
96/*!\brief Force alternate reference frame update
97 *
98 * When this flag is set, the encoder copy the contents of the current frame
99 * to the alternate reference frame buffer.
100 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700101#define AOM_EFLAG_FORCE_ARF (1 << 24)
John Koleszar0ea50ce2010-05-18 11:58:33 -0400102
103/*!\brief Disable entropy update
104 *
105 * When this flag is set, the encoder will not update its internal entropy
106 * model based on the entropy of this frame.
107 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700108#define AOM_EFLAG_NO_UPD_ENTROPY (1 << 20)
John Koleszar0ea50ce2010-05-18 11:58:33 -0400109
Yaowu Xuf883b422016-08-30 14:01:10 -0700110/*!\brief AVx encoder control functions
John Koleszar0ea50ce2010-05-18 11:58:33 -0400111 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700112 * This set of macros define the control functions available for AVx
James Zern8e17e822011-02-24 14:12:57 -0800113 * encoder interface.
114 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700115 * \sa #aom_codec_control
John Koleszar0ea50ce2010-05-18 11:58:33 -0400116 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700117enum aome_enc_control_id {
Yunqing Wangbdcc1402016-03-25 09:05:25 -0700118 /*!\brief Codec control function to set which reference frame encoder can use.
Yunqing Wangbdcc1402016-03-25 09:05:25 -0700119 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700120 AOME_USE_REFERENCE = 7,
Yunqing Wangbdcc1402016-03-25 09:05:25 -0700121
Yaowu Xu268f1062015-03-13 09:42:57 -0700122 /*!\brief Codec control function to pass an ROI map to encoder.
Yaowu Xu268f1062015-03-13 09:42:57 -0700123 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700124 AOME_SET_ROI_MAP = 8,
Yaowu Xu268f1062015-03-13 09:42:57 -0700125
126 /*!\brief Codec control function to pass an Active map to encoder.
Yaowu Xu268f1062015-03-13 09:42:57 -0700127 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700128 AOME_SET_ACTIVEMAP,
Yaowu Xu268f1062015-03-13 09:42:57 -0700129
130 /*!\brief Codec control function to set encoder scaling mode.
Yaowu Xu268f1062015-03-13 09:42:57 -0700131 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700132 AOME_SET_SCALEMODE = 11,
Yaowu Xu268f1062015-03-13 09:42:57 -0700133
134 /*!\brief Codec control function to set encoder internal speed settings.
John Koleszarc6b90392012-07-13 15:21:29 -0700135 *
136 * Changes in this value influences, among others, the encoder's selection
137 * of motion estimation methods. Values greater than 0 will increase encoder
138 * speed at the expense of quality.
John Koleszarc6b90392012-07-13 15:21:29 -0700139 *
Alex Converse561d0af2017-03-23 12:58:04 -0700140 * \note Valid range: 0..8
John Koleszarc6b90392012-07-13 15:21:29 -0700141 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700142 AOME_SET_CPUUSED = 13,
Yaowu Xu268f1062015-03-13 09:42:57 -0700143
144 /*!\brief Codec control function to enable automatic set and use alf frames.
Yaowu Xu268f1062015-03-13 09:42:57 -0700145 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700146 AOME_SET_ENABLEAUTOALTREF,
Yaowu Xu268f1062015-03-13 09:42:57 -0700147
Yaowu Xu268f1062015-03-13 09:42:57 -0700148 /*!\brief Codec control function to set sharpness.
Yaowu Xu268f1062015-03-13 09:42:57 -0700149 */
Alex Converse0f4bcda2016-12-12 15:43:35 -0800150 AOME_SET_SHARPNESS = AOME_SET_ENABLEAUTOALTREF + 2,
Yaowu Xu268f1062015-03-13 09:42:57 -0700151
152 /*!\brief Codec control function to set the threshold for MBs treated static.
Yaowu Xu268f1062015-03-13 09:42:57 -0700153 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700154 AOME_SET_STATIC_THRESHOLD,
Yaowu Xu268f1062015-03-13 09:42:57 -0700155
Yaowu Xu268f1062015-03-13 09:42:57 -0700156 /*!\brief Codec control function to get last quantizer chosen by the encoder.
157 *
158 * Return value uses internal quantizer scale defined by the codec.
Yaowu Xu268f1062015-03-13 09:42:57 -0700159 */
Alex Converse0f4bcda2016-12-12 15:43:35 -0800160 AOME_GET_LAST_QUANTIZER = AOME_SET_STATIC_THRESHOLD + 2,
Yaowu Xu268f1062015-03-13 09:42:57 -0700161
162 /*!\brief Codec control function to get last quantizer chosen by the encoder.
163 *
164 * Return value uses the 0..63 scale as used by the rc_*_quantizer config
165 * parameters.
Yaowu Xu268f1062015-03-13 09:42:57 -0700166 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700167 AOME_GET_LAST_QUANTIZER_64,
Yaowu Xu268f1062015-03-13 09:42:57 -0700168
169 /*!\brief Codec control function to set the max no of frames to create arf.
Yaowu Xu268f1062015-03-13 09:42:57 -0700170 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700171 AOME_SET_ARNR_MAXFRAMES,
Yaowu Xu268f1062015-03-13 09:42:57 -0700172
173 /*!\brief Codec control function to set the filter strength for the arf.
Yaowu Xu268f1062015-03-13 09:42:57 -0700174 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700175 AOME_SET_ARNR_STRENGTH,
Yaowu Xu268f1062015-03-13 09:42:57 -0700176
Yaowu Xu268f1062015-03-13 09:42:57 -0700177 /*!\brief Codec control function to set visual tuning.
Yaowu Xu268f1062015-03-13 09:42:57 -0700178 */
Alex Conversefab62242016-12-13 10:09:15 -0800179 AOME_SET_TUNING = AOME_SET_ARNR_STRENGTH + 2,
Yaowu Xu268f1062015-03-13 09:42:57 -0700180
181 /*!\brief Codec control function to set constrained quality level.
John Koleszarc6b90392012-07-13 15:21:29 -0700182 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700183 * \attention For this value to be used aom_codec_enc_cfg_t::g_usage must be
184 * set to #AOM_CQ.
John Koleszarc6b90392012-07-13 15:21:29 -0700185 * \note Valid range: 0..63
186 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700187 AOME_SET_CQ_LEVEL,
John Koleszar1654ae92011-07-28 09:17:32 -0400188
Yaowu Xu268f1062015-03-13 09:42:57 -0700189 /*!\brief Codec control function to set Max data rate for Intra frames.
John Koleszarc6b90392012-07-13 15:21:29 -0700190 *
191 * This value controls additional clamping on the maximum size of a
192 * keyframe. It is expressed as a percentage of the average
193 * per-frame bitrate, with the special (and default) value 0 meaning
194 * unlimited, or no additional clamping beyond the codec's built-in
195 * algorithm.
196 *
197 * For example, to allocate no more than 4.5 frames worth of bitrate
198 * to a keyframe, set this to 450.
John Koleszarc6b90392012-07-13 15:21:29 -0700199 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700200 AOME_SET_MAX_INTRA_BITRATE_PCT,
John Koleszar83b1d902012-11-05 12:37:14 -0800201
Yaowu Xu268f1062015-03-13 09:42:57 -0700202 /*!\brief Codec control function to set max data rate for Inter frames.
Yaowu Xu636099f2014-10-24 09:31:16 -0700203 *
204 * This value controls additional clamping on the maximum size of an
205 * inter frame. It is expressed as a percentage of the average
206 * per-frame bitrate, with the special (and default) value 0 meaning
207 * unlimited, or no additional clamping beyond the codec's built-in
208 * algorithm.
209 *
210 * For example, to allow no more than 4.5 frames worth of bitrate
211 * to an inter frame, set this to 450.
Yaowu Xu636099f2014-10-24 09:31:16 -0700212 */
Alex Converse0f4bcda2016-12-12 15:43:35 -0800213 AV1E_SET_MAX_INTER_BITRATE_PCT = AOME_SET_MAX_INTRA_BITRATE_PCT + 2,
Yaowu Xu636099f2014-10-24 09:31:16 -0700214
Yaowu Xu268f1062015-03-13 09:42:57 -0700215 /*!\brief Boost percentage for Golden Frame in CBR mode.
Yaowu Xu03a60b72014-10-27 13:13:14 -0700216 *
217 * This value controls the amount of boost given to Golden Frame in
218 * CBR mode. It is expressed as a percentage of the average
219 * per-frame bitrate, with the special (and default) value 0 meaning
220 * the feature is off, i.e., no golden frame boost in CBR mode and
221 * average bitrate target is used.
222 *
223 * For example, to allow 100% more bits, i.e, 2X, in a golden frame
224 * than average frame, set this to 100.
Yaowu Xu03a60b72014-10-27 13:13:14 -0700225 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700226 AV1E_SET_GF_CBR_BOOST_PCT,
John Koleszar83b1d902012-11-05 12:37:14 -0800227
Yaowu Xu268f1062015-03-13 09:42:57 -0700228 /*!\brief Codec control function to set lossless encoding mode.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800229 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700230 * AV1 can operate in lossless encoding mode, in which the bitstream
Yaowu Xu87c436f2015-01-13 12:39:42 -0800231 * produced will be able to decode and reconstruct a perfect copy of
232 * input source. This control function provides a mean to switch encoder
233 * into lossless coding mode(1) or normal coding mode(0) that may be lossy.
234 * 0 = lossy coding mode
235 * 1 = lossless coding mode
236 *
237 * By default, encoder operates in normal coding mode (maybe lossy).
238 */
Alex Converse0f4bcda2016-12-12 15:43:35 -0800239 AV1E_SET_LOSSLESS = AV1E_SET_GF_CBR_BOOST_PCT + 2,
Thomas Daviesaf6df172016-11-09 14:04:18 +0000240
Yaowu Xu268f1062015-03-13 09:42:57 -0700241 /*!\brief Codec control function to set number of tile columns.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800242 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700243 * In encoding and decoding, AV1 allows an input image frame be partitioned
Yaowu Xu87c436f2015-01-13 12:39:42 -0800244 * into separated vertical tile columns, which can be encoded or decoded
245 * independently. This enables easy implementation of parallel encoding and
246 * decoding. This control requests the encoder to use column tiles in
247 * encoding an input frame, with number of tile columns (in Log2 unit) as
248 * the parameter:
249 * 0 = 1 tile column
250 * 1 = 2 tile columns
251 * 2 = 4 tile columns
252 * .....
253 * n = 2**n tile columns
254 * The requested tile columns will be capped by encoder based on image size
255 * limitation (The minimum width of a tile column is 256 pixel, the maximum
256 * is 4096).
257 *
258 * By default, the value is 0, i.e. one single column tile for entire image.
259 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700260 AV1E_SET_TILE_COLUMNS,
Yaowu Xu87c436f2015-01-13 12:39:42 -0800261
Yaowu Xu268f1062015-03-13 09:42:57 -0700262 /*!\brief Codec control function to set number of tile rows.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800263 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700264 * In encoding and decoding, AV1 allows an input image frame be partitioned
Yaowu Xu87c436f2015-01-13 12:39:42 -0800265 * into separated horizontal tile rows. Tile rows are encoded or decoded
266 * sequentially. Even though encoding/decoding of later tile rows depends on
267 * earlier ones, this allows the encoder to output data packets for tile rows
268 * prior to completely processing all tile rows in a frame, thereby reducing
269 * the latency in processing between input and output. The parameter
270 * for this control describes the number of tile rows, which has a valid
271 * range [0, 2]:
272 * 0 = 1 tile row
273 * 1 = 2 tile rows
274 * 2 = 4 tile rows
275 *
276 * By default, the value is 0, i.e. one single row tile for entire image.
277 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700278 AV1E_SET_TILE_ROWS,
Ryan Lei7386eda2016-12-08 21:08:31 -0800279
Yaowu Xu268f1062015-03-13 09:42:57 -0700280 /*!\brief Codec control function to enable frame parallel decoding feature.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800281 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700282 * AV1 has a bitstream feature to reduce decoding dependency between frames
Yaowu Xu87c436f2015-01-13 12:39:42 -0800283 * by turning off backward update of probability context used in encoding
284 * and decoding. This allows staged parallel processing of more than one
285 * video frames in the decoder. This control function provides a mean to
286 * turn this feature on or off for bitstreams produced by encoder.
287 *
288 * By default, this feature is off.
289 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700290 AV1E_SET_FRAME_PARALLEL_DECODING,
Yaowu Xu87c436f2015-01-13 12:39:42 -0800291
Yaowu Xu268f1062015-03-13 09:42:57 -0700292 /*!\brief Codec control function to set adaptive quantization mode.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800293 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700294 * AV1 has a segment based feature that allows encoder to adaptively change
Yaowu Xu87c436f2015-01-13 12:39:42 -0800295 * quantization parameter for each segment within a frame to improve the
296 * subjective quality. This control makes encoder operate in one of the
297 * several AQ_modes supported.
298 *
299 * By default, encoder operates with AQ_Mode 0(adaptive quantization off).
300 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700301 AV1E_SET_AQ_MODE,
Yaowu Xu4ab39e12015-01-14 09:07:02 -0800302
Yaowu Xu268f1062015-03-13 09:42:57 -0700303 /*!\brief Codec control function to enable/disable periodic Q boost.
Yaowu Xu4ab39e12015-01-14 09:07:02 -0800304 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700305 * One AV1 encoder speed feature is to enable quality boost by lowering
Yaowu Xu4ab39e12015-01-14 09:07:02 -0800306 * frame level Q periodically. This control function provides a mean to
307 * turn on/off this feature.
308 * 0 = off
309 * 1 = on
310 *
311 * By default, the encoder is allowed to use this feature for appropriate
312 * encoding modes.
313 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700314 AV1E_SET_FRAME_PERIODIC_BOOST,
Yaowu Xu4ab39e12015-01-14 09:07:02 -0800315
Yaowu Xu268f1062015-03-13 09:42:57 -0700316 /*!\brief Codec control function to set noise sensitivity.
JackyChenbb1a2362014-09-12 11:48:44 -0700317 *
Yaowu Xu268f1062015-03-13 09:42:57 -0700318 * 0: off, 1: On(YOnly)
JackyChenbb1a2362014-09-12 11:48:44 -0700319 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700320 AV1E_SET_NOISE_SENSITIVITY,
Ivan Maltz01b35c32013-09-05 08:55:47 -0700321
Yaowu Xu268f1062015-03-13 09:42:57 -0700322 /*!\brief Codec control function to set content type.
Yaowu Xudc08b202015-01-14 11:17:09 -0800323 * \note Valid parameter range:
Yaowu Xuf883b422016-08-30 14:01:10 -0700324 * AOM_CONTENT_DEFAULT = Regular video content (Default)
325 * AOM_CONTENT_SCREEN = Screen capture content
Yaowu Xudc08b202015-01-14 11:17:09 -0800326 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700327 AV1E_SET_TUNE_CONTENT,
Yaowu Xu193ca4b2015-01-14 11:48:29 -0800328
Yaowu Xu268f1062015-03-13 09:42:57 -0700329 /*!\brief Codec control function to set color space info.
anorkin76fb1262017-03-22 15:12:12 -0700330 * \note Valid ranges: 0..9, default is "UNKNOWN".
Yaowu Xue94b4152015-01-13 10:07:20 -0800331 * 0 = UNKNOWN,
332 * 1 = BT_601
333 * 2 = BT_709
334 * 3 = SMPTE_170
335 * 4 = SMPTE_240
anorkin76fb1262017-03-22 15:12:12 -0700336 * 5 = BT_2020_NCL
337 * 6 = BT_2020_CL
Yaowu Xue94b4152015-01-13 10:07:20 -0800338 * 7 = SRGB
anorkin76fb1262017-03-22 15:12:12 -0700339 * 8 = ICtCp
340 * 9 = RESERVED
Yaowu Xue94b4152015-01-13 10:07:20 -0800341 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700342 AV1E_SET_COLOR_SPACE,
Alex Converse4dcb8392015-03-20 14:55:43 -0700343
anorkin76fb1262017-03-22 15:12:12 -0700344 /*!\brief Codec control function to set transfer function info.
345 * \note Valid ranges: 0..4, default is "UNKNOWN".
346 * 0 = UNKNOWN,
347 * 1 = BT_709
348 * 2 = PQ
349 * 3 = HLG
350 * 4 = RESERVED
351 */
352 AV1E_SET_TRANSFER_FUNCTION,
353
354 /*!\brief Codec control function to set chroma 4:2:0 sample position info.
355 * \note Valid ranges: 0..3, default is "UNKNOWN".
356 * 0 = UNKNOWN,
357 * 1 = VERTICAL
358 * 2 = COLOCATED
359 * 3 = RESERVED
360 */
361 AV1E_SET_CHROMA_SAMPLE_POSITION,
anorkin76fb1262017-03-22 15:12:12 -0700362
Debargha Mukherjee98526432015-04-01 16:39:06 -0700363 /*!\brief Codec control function to set minimum interval between GF/ARF frames
364 *
365 * By default the value is set as 4.
Debargha Mukherjee98526432015-04-01 16:39:06 -0700366 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700367 AV1E_SET_MIN_GF_INTERVAL,
Debargha Mukherjee98526432015-04-01 16:39:06 -0700368
369 /*!\brief Codec control function to set minimum interval between GF/ARF frames
370 *
371 * By default the value is set as 16.
Debargha Mukherjee98526432015-04-01 16:39:06 -0700372 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700373 AV1E_SET_MAX_GF_INTERVAL,
Debargha Mukherjee98526432015-04-01 16:39:06 -0700374
Alex Converse4dcb8392015-03-20 14:55:43 -0700375 /*!\brief Codec control function to get an Active map back from the encoder.
Alex Converse4dcb8392015-03-20 14:55:43 -0700376 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700377 AV1E_GET_ACTIVEMAP,
Ronald S. Bultjeeeb5ef02015-09-15 21:56:51 -0400378
379 /*!\brief Codec control function to set color range bit.
380 * \note Valid ranges: 0..1, default is 0
381 * 0 = Limited range (16..235 or HBD equivalent)
382 * 1 = Full range (0..255 or HBD equivalent)
Ronald S. Bultjeeeb5ef02015-09-15 21:56:51 -0400383 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700384 AV1E_SET_COLOR_RANGE,
Yaowu Xu7c514e22015-09-28 15:55:46 -0700385
Yaowu Xu7c514e22015-09-28 15:55:46 -0700386 /*!\brief Codec control function to set intended rendering image size.
387 *
388 * By default, this is identical to the image size in pixels.
Yaowu Xu7c514e22015-09-28 15:55:46 -0700389 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700390 AV1E_SET_RENDER_SIZE,
Geza Lore454989f2016-03-24 13:56:05 +0000391
hui sube3f0692016-05-05 15:37:37 -0700392 /*!\brief Codec control function to set target level.
393 *
394 * 255: off (default); 0: only keep level stats; 10: target for level 1.0;
395 * 11: target for level 1.1; ... 62: target for level 6.2
hui sube3f0692016-05-05 15:37:37 -0700396 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700397 AV1E_SET_TARGET_LEVEL,
hui su72d48902016-05-05 12:04:42 -0700398
399 /*!\brief Codec control function to get bitstream level.
hui su72d48902016-05-05 12:04:42 -0700400 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700401 AV1E_GET_LEVEL,
Yaowu Xu6fe07a22016-07-14 10:57:35 -0700402
Geza Lore454989f2016-03-24 13:56:05 +0000403 /*!\brief Codec control function to set intended superblock size.
404 *
405 * By default, the superblock size is determined separately for each
406 * frame by the encoder.
Alex Converse85370ae2016-12-13 11:18:28 -0800407 *
408 * Experiment: EXT_PARTITION
Geza Lore454989f2016-03-24 13:56:05 +0000409 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700410 AV1E_SET_SUPERBLOCK_SIZE,
Alex Converse85370ae2016-12-13 11:18:28 -0800411
412 /*!\brief Codec control function to enable automatic set and use
413 * bwd-pred frames.
414 *
Alex Converse85370ae2016-12-13 11:18:28 -0800415 */
416 AOME_SET_ENABLEAUTOBWDREF,
417
418 /*!\brief Codec control function to encode with quantisation matrices.
419 *
420 * AOM can operate with default quantisation matrices dependent on
421 * quantisation level and block type.
422 * 0 = do not use quantisation matrices
423 * 1 = use quantisation matrices
424 *
425 * By default, the encoder operates without quantisation matrices.
426 *
427 * Experiment: AOM_QM
428 */
429 AV1E_SET_ENABLE_QM,
430
431 /*!\brief Codec control function to set the min quant matrix flatness.
432 *
433 * AOM can operate with different ranges of quantisation matrices.
434 * As quantisation levels increase, the matrices get flatter. This
435 * control sets the minimum level of flatness from which the matrices
436 * are determined.
437 *
438 * By default, the encoder sets this minimum at half the available
439 * range.
440 *
441 * Experiment: AOM_QM
442 */
443 AV1E_SET_QM_MIN,
444
445 /*!\brief Codec control function to set the max quant matrix flatness.
446 *
447 * AOM can operate with different ranges of quantisation matrices.
448 * As quantisation levels increase, the matrices get flatter. This
449 * control sets the maximum level of flatness possible.
450 *
451 * By default, the encoder sets this maximum at the top of the
452 * available range.
453 *
454 * Experiment: AOM_QM
455 */
456 AV1E_SET_QM_MAX,
457
Yushin Chod808bfc2017-08-10 15:54:36 -0700458 /*!\brief Codec control function to encode with dist_8x8.
459 *
460 * The dist_8x8 is enabled automatically for model tuning parameters that
461 * require measuring distortion at the 8x8 level. This control also allows
462 * measuring distortion at the 8x8 level for other tuning options
463 * (e.g., PSNR), for testing purposes.
464 * 0 = do not use dist_8x8
465 * 1 = use dist_8x8
466 *
467 * By default, the encoder does not use dist_8x8
468 *
469 * Experiment: DIST_8X8
470 */
471 AV1E_SET_ENABLE_DIST_8X8,
472
Alex Converse85370ae2016-12-13 11:18:28 -0800473 /*!\brief Codec control function to set a maximum number of tile groups.
474 *
475 * This will set the maximum number of tile groups. This will be
476 * overridden if an MTU size is set. The default value is 1.
477 *
478 * Experiment: TILE_GROUPS
479 */
480 AV1E_SET_NUM_TG,
481
482 /*!\brief Codec control function to set an MTU size for a tile group.
483 *
484 * This will set the maximum number of bytes in a tile group. This can be
485 * exceeded only if a single tile is larger than this amount.
486 *
487 * By default, the value is 0, in which case a fixed number of tile groups
488 * is used.
489 *
490 * Experiment: TILE_GROUPS
491 */
492 AV1E_SET_MTU,
Alex Converseeb780e72016-12-13 12:46:41 -0800493
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800494 /*!\brief Codec control function to set dependent_horz_tiles.
495 *
496 * In encoding and decoding, AV1 allows enabling dependent horizontal tile
497 * The parameter for this control describes the value of this flag,
498 * which has a valid range [0, 1]:
499 * 0 = disable dependent horizontal tile
500 * 1 = enable dependent horizontal tile,
501 *
502 * By default, the value is 0, i.e. disable dependent horizontal tile.
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800503 */
504 AV1E_SET_TILE_DEPENDENT_ROWS,
505
Alex Converseeb780e72016-12-13 12:46:41 -0800506 /*!\brief Codec control function to set the number of symbols in an ANS data
507 * window.
508 *
509 * The number of ANS symbols (both boolean and non-booleans alphabets) in an
510 * ANS data window is set to 1 << value.
511 *
512 * \note Valid range: [8, 23]
513 *
514 * Experiment: ANS
515 */
516 AV1E_SET_ANS_WINDOW_SIZE_LOG2,
Alex Converse00b7e272017-03-22 18:14:08 -0700517
518 /*!\brief Codec control function to set temporal mv prediction
519 * enabling/disabling.
520 *
521 * This will enable or disable temporal mv predicton. The default value is 0.
522 *
523 * Experiment: TEMPMV_SIGNALING
524 */
525 AV1E_SET_DISABLE_TEMPMV,
526
527 /*!\brief Codec control function to set loop_filter_across_tiles_enabled.
528 *
529 * In encoding and decoding, AV1 allows disabling loop filter across tile
530 * boundary The parameter for this control describes the value of this flag,
531 * which has a valid range [0, 1]:
532 * 0 = disable loop filter across tile boundary
533 * 1 = enable loop filter across tile boundary
534 *
535 * By default, the value is 1, i.e. enable loop filter across tile boundary.
536 *
537 * Experiment: LOOPFILTERING_ACROSS_TILES
538 */
539 AV1E_SET_TILE_LOOPFILTER,
Yunqing Wangd8cd55f2017-02-27 12:16:00 -0800540
Fangwen Fu6160df22017-04-24 09:45:51 -0700541 /*!\brief Codec control function to set the delta q mode
542 *
543 * AV1 has a segment based feature that allows encoder to adaptively change
544 * quantization parameter for each segment within a frame to improve the
545 * subjective quality. the delta q mode is added on top of segment based
546 * feature, and allows control per 64x64 q and lf delta.This control makes
547 * encoder operate in one of the several DELTA_Q_modes supported.
548 *
549 * By default, encoder operates with DELTAQ_Mode 0(deltaq signaling off).
550 */
551 AV1E_SET_DELTAQ_MODE,
552
Yunqing Wangeeb08a92017-07-07 21:25:18 -0700553 /*!\brief Codec control function to set the single tile decoding mode to 0 or
554 * 1.
Yunqing Wangd8cd55f2017-02-27 12:16:00 -0800555 *
Yunqing Wangeeb08a92017-07-07 21:25:18 -0700556 * 0 means that the single tile decoding is off, and 1 means that the single
557 * tile decoding is on.
Yunqing Wangd8cd55f2017-02-27 12:16:00 -0800558 *
559 * Experiment: EXT_TILE
560 */
Yunqing Wangeeb08a92017-07-07 21:25:18 -0700561 AV1E_SET_SINGLE_TILE_DECODING,
Yunqing Wangff4fa062017-04-21 10:56:08 -0700562
563 /*!\brief Codec control function to enable the extreme motion vector unit test
564 * in AV1. Please note that this is only used in motion vector unit test.
565 *
566 * 0 : off, 1 : MAX_EXTREME_MV, 2 : MIN_EXTREME_MV
567 */
568 AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST,
John Koleszarb0da9b32010-12-17 09:43:39 -0500569};
John Koleszar0ea50ce2010-05-18 11:58:33 -0400570
Yaowu Xuf883b422016-08-30 14:01:10 -0700571/*!\brief aom 1-D scaling mode
John Koleszar0ea50ce2010-05-18 11:58:33 -0400572 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700573 * This set of constants define 1-D aom scaling modes
John Koleszar0ea50ce2010-05-18 11:58:33 -0400574 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700575typedef enum aom_scaling_mode_1d {
576 AOME_NORMAL = 0,
577 AOME_FOURFIVE = 1,
578 AOME_THREEFIVE = 2,
579 AOME_ONETWO = 3
580} AOM_SCALING_MODE;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400581
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700582/*!\brief Max number of segments
583 *
584 * This is the limit of number of segments allowed within a frame.
585 *
586 * Currently same as "MAX_SEGMENTS" in AV1, the maximum that AV1 supports.
587 *
588 */
589#define AOM_MAX_SEGMENTS 8
590
Yaowu Xuf883b422016-08-30 14:01:10 -0700591/*!\brief aom region of interest map
John Koleszar0ea50ce2010-05-18 11:58:33 -0400592 *
593 * These defines the data structures for the region of interest map
594 *
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700595 * TODO(yaowu): create a unit test for ROI map related APIs
596 *
John Koleszar0ea50ce2010-05-18 11:58:33 -0400597 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700598typedef struct aom_roi_map {
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700599 /*! An id between 0 and 7 for each 8x8 region within a frame. */
Adrian Grangef58eca92013-10-24 15:11:36 -0700600 unsigned char *roi_map;
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700601 unsigned int rows; /**< Number of rows. */
602 unsigned int cols; /**< Number of columns. */
603 int delta_q[AOM_MAX_SEGMENTS]; /**< Quantizer deltas. */
604 int delta_lf[AOM_MAX_SEGMENTS]; /**< Loop filter deltas. */
Adrian Grangef58eca92013-10-24 15:11:36 -0700605 /*! Static breakout threshold for each segment. */
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700606 unsigned int static_threshold[AOM_MAX_SEGMENTS];
Yaowu Xuf883b422016-08-30 14:01:10 -0700607} aom_roi_map_t;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400608
Yaowu Xuf883b422016-08-30 14:01:10 -0700609/*!\brief aom active region map
John Koleszar0ea50ce2010-05-18 11:58:33 -0400610 *
611 * These defines the data structures for active region map
612 *
613 */
614
Yaowu Xuf883b422016-08-30 14:01:10 -0700615typedef struct aom_active_map {
clang-format83a52072016-08-08 20:22:13 -0700616 /*!\brief specify an on (1) or off (0) each 16x16 region within a frame */
617 unsigned char *active_map;
618 unsigned int rows; /**< number of rows */
619 unsigned int cols; /**< number of cols */
Yaowu Xuf883b422016-08-30 14:01:10 -0700620} aom_active_map_t;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400621
Yaowu Xuf883b422016-08-30 14:01:10 -0700622/*!\brief aom image scaling mode
John Koleszar0ea50ce2010-05-18 11:58:33 -0400623 *
624 * This defines the data structure for image scaling mode
625 *
626 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700627typedef struct aom_scaling_mode {
628 AOM_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */
629 AOM_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */
630} aom_scaling_mode_t;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400631
Yaowu Xuf883b422016-08-30 14:01:10 -0700632/*!brief AV1 encoder content type */
Alex Converse572de922014-07-31 08:27:32 -0700633typedef enum {
Yaowu Xuf883b422016-08-30 14:01:10 -0700634 AOM_CONTENT_DEFAULT,
635 AOM_CONTENT_SCREEN,
636 AOM_CONTENT_INVALID
637} aom_tune_content;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400638
Alex Converse6e3c8052016-12-16 09:48:56 -0800639/*!\brief Model tuning parameters
John Koleszarb0da9b32010-12-17 09:43:39 -0500640 *
641 * Changes the encoder to tune for certain types of input material.
642 *
643 */
Yushin Chod808bfc2017-08-10 15:54:36 -0700644typedef enum {
645 AOM_TUNE_PSNR,
646 AOM_TUNE_SSIM,
647#ifdef CONFIG_DIST_8X8
648 AOM_TUNE_CDEF_DIST,
649 AOM_TUNE_DAALA_DIST
650#endif
651} aom_tune_metric;
John Koleszarb0da9b32010-12-17 09:43:39 -0500652
James Zern7dd7a7d2015-10-09 16:31:17 -0700653/*!\cond */
Alex Converse6e3c8052016-12-16 09:48:56 -0800654/*!\brief Encoder control function parameter type
John Koleszar0ea50ce2010-05-18 11:58:33 -0400655 *
Alex Converse6e3c8052016-12-16 09:48:56 -0800656 * Defines the data types that AOME/AV1E control functions take. Note that
Yaowu Xuf883b422016-08-30 14:01:10 -0700657 * additional common controls are defined in aom.h
John Koleszar0ea50ce2010-05-18 11:58:33 -0400658 *
659 */
660
Ryan Overbecka5fefa72017-09-19 11:39:10 -0700661AOM_CTRL_USE_TYPE(AOME_USE_REFERENCE, int)
Yaowu Xuf883b422016-08-30 14:01:10 -0700662#define AOM_CTRL_AOME_USE_REFERENCE
Yaowu Xuf883b422016-08-30 14:01:10 -0700663AOM_CTRL_USE_TYPE(AOME_SET_ROI_MAP, aom_roi_map_t *)
664#define AOM_CTRL_AOME_SET_ROI_MAP
665AOM_CTRL_USE_TYPE(AOME_SET_ACTIVEMAP, aom_active_map_t *)
666#define AOM_CTRL_AOME_SET_ACTIVEMAP
667AOM_CTRL_USE_TYPE(AOME_SET_SCALEMODE, aom_scaling_mode_t *)
668#define AOM_CTRL_AOME_SET_SCALEMODE
John Koleszar0ea50ce2010-05-18 11:58:33 -0400669
Yaowu Xuf883b422016-08-30 14:01:10 -0700670AOM_CTRL_USE_TYPE(AOME_SET_CPUUSED, int)
671#define AOM_CTRL_AOME_SET_CPUUSED
672AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOALTREF, unsigned int)
673#define AOM_CTRL_AOME_SET_ENABLEAUTOALTREF
Zoe Liucf5083d2016-02-04 09:47:46 -0800674
Yaowu Xuf883b422016-08-30 14:01:10 -0700675AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOBWDREF, unsigned int)
676#define AOM_CTRL_AOME_SET_ENABLEAUTOBWDREF
Zoe Liucf5083d2016-02-04 09:47:46 -0800677
Yaowu Xuf883b422016-08-30 14:01:10 -0700678AOM_CTRL_USE_TYPE(AOME_SET_SHARPNESS, unsigned int)
679#define AOM_CTRL_AOME_SET_SHARPNESS
680AOM_CTRL_USE_TYPE(AOME_SET_STATIC_THRESHOLD, unsigned int)
681#define AOM_CTRL_AOME_SET_STATIC_THRESHOLD
John Koleszar0ea50ce2010-05-18 11:58:33 -0400682
Yaowu Xuf883b422016-08-30 14:01:10 -0700683AOM_CTRL_USE_TYPE(AOME_SET_ARNR_MAXFRAMES, unsigned int)
684#define AOM_CTRL_AOME_SET_ARNR_MAXFRAMES
685AOM_CTRL_USE_TYPE(AOME_SET_ARNR_STRENGTH, unsigned int)
686#define AOM_CTRL_AOME_SET_ARNR_STRENGTH
Yaowu Xuf883b422016-08-30 14:01:10 -0700687AOM_CTRL_USE_TYPE(AOME_SET_TUNING, int) /* aom_tune_metric */
688#define AOM_CTRL_AOME_SET_TUNING
689AOM_CTRL_USE_TYPE(AOME_SET_CQ_LEVEL, unsigned int)
690#define AOM_CTRL_AOME_SET_CQ_LEVEL
John Koleszar0ea50ce2010-05-18 11:58:33 -0400691
Yaowu Xuf883b422016-08-30 14:01:10 -0700692AOM_CTRL_USE_TYPE(AV1E_SET_TILE_COLUMNS, int)
693#define AOM_CTRL_AV1E_SET_TILE_COLUMNS
694AOM_CTRL_USE_TYPE(AV1E_SET_TILE_ROWS, int)
695#define AOM_CTRL_AV1E_SET_TILE_ROWS
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800696
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800697AOM_CTRL_USE_TYPE(AV1E_SET_TILE_DEPENDENT_ROWS, int)
698#define AOM_CTRL_AV1E_SET_TILE_DEPENDENT_ROWS
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800699
Ryan Lei7386eda2016-12-08 21:08:31 -0800700AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER, int)
701#define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER
Ronald S. Bultje1407bdc2013-02-01 09:35:28 -0800702
Yaowu Xuf883b422016-08-30 14:01:10 -0700703AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER, int *)
704#define AOM_CTRL_AOME_GET_LAST_QUANTIZER
705AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER_64, int *)
706#define AOM_CTRL_AOME_GET_LAST_QUANTIZER_64
John Koleszar0ea50ce2010-05-18 11:58:33 -0400707
Yaowu Xuf883b422016-08-30 14:01:10 -0700708AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
709#define AOM_CTRL_AOME_SET_MAX_INTRA_BITRATE_PCT
710AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTER_BITRATE_PCT, unsigned int)
711#define AOM_CTRL_AOME_SET_MAX_INTER_BITRATE_PCT
John Koleszar1654ae92011-07-28 09:17:32 -0400712
Yaowu Xuf883b422016-08-30 14:01:10 -0700713AOM_CTRL_USE_TYPE(AV1E_SET_GF_CBR_BOOST_PCT, unsigned int)
714#define AOM_CTRL_AV1E_SET_GF_CBR_BOOST_PCT
Yaowu Xu41652902015-03-12 17:59:18 -0700715
Yaowu Xuf883b422016-08-30 14:01:10 -0700716AOM_CTRL_USE_TYPE(AV1E_SET_LOSSLESS, unsigned int)
717#define AOM_CTRL_AV1E_SET_LOSSLESS
John Koleszar1654ae92011-07-28 09:17:32 -0400718
Yaowu Xuf883b422016-08-30 14:01:10 -0700719AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_QM, unsigned int)
720#define AOM_CTRL_AV1E_SET_ENABLE_QM
Yaowu Xu0818a7c2016-08-11 09:39:47 -0700721
Yushin Chod808bfc2017-08-10 15:54:36 -0700722AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DIST_8X8, unsigned int)
723#define AOM_CTRL_AV1E_SET_ENABLE_DIST_8X8
724
Yaowu Xuf883b422016-08-30 14:01:10 -0700725AOM_CTRL_USE_TYPE(AV1E_SET_QM_MIN, unsigned int)
726#define AOM_CTRL_AV1E_SET_QM_MIN
Yaowu Xu0818a7c2016-08-11 09:39:47 -0700727
Yaowu Xuf883b422016-08-30 14:01:10 -0700728AOM_CTRL_USE_TYPE(AV1E_SET_QM_MAX, unsigned int)
729#define AOM_CTRL_AV1E_SET_QM_MAX
Yaowu Xu0818a7c2016-08-11 09:39:47 -0700730
Thomas Daviesaf6df172016-11-09 14:04:18 +0000731AOM_CTRL_USE_TYPE(AV1E_SET_NUM_TG, unsigned int)
732#define AOM_CTRL_AV1E_SET_NUM_TG
733AOM_CTRL_USE_TYPE(AV1E_SET_MTU, unsigned int)
734#define AOM_CTRL_AV1E_SET_MTU
Thomas Daviesaf6df172016-11-09 14:04:18 +0000735
Fangwen Fu8d164de2016-12-14 13:40:54 -0800736AOM_CTRL_USE_TYPE(AV1E_SET_DISABLE_TEMPMV, unsigned int)
737#define AOM_CTRL_AV1E_SET_DISABLE_TEMPMV
Fangwen Fu8d164de2016-12-14 13:40:54 -0800738
Yaowu Xuf883b422016-08-30 14:01:10 -0700739AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PARALLEL_DECODING, unsigned int)
740#define AOM_CTRL_AV1E_SET_FRAME_PARALLEL_DECODING
Ivan Maltz01b35c32013-09-05 08:55:47 -0700741
Yaowu Xuf883b422016-08-30 14:01:10 -0700742AOM_CTRL_USE_TYPE(AV1E_SET_AQ_MODE, unsigned int)
743#define AOM_CTRL_AV1E_SET_AQ_MODE
Guillaume Martres17084652013-11-14 19:23:57 +0100744
Fangwen Fu6160df22017-04-24 09:45:51 -0700745AOM_CTRL_USE_TYPE(AV1E_SET_DELTAQ_MODE, unsigned int)
746#define AOM_CTRL_AV1E_SET_DELTAQ_MODE
747
Yaowu Xuf883b422016-08-30 14:01:10 -0700748AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PERIODIC_BOOST, unsigned int)
749#define AOM_CTRL_AV1E_SET_FRAME_PERIODIC_BOOST
Marco Paniconi0eb88c92014-04-03 15:49:03 -0700750
Yaowu Xuf883b422016-08-30 14:01:10 -0700751AOM_CTRL_USE_TYPE(AV1E_SET_NOISE_SENSITIVITY, unsigned int)
752#define AOM_CTRL_AV1E_SET_NOISE_SENSITIVITY
JackyChenbb1a2362014-09-12 11:48:44 -0700753
Yaowu Xuf883b422016-08-30 14:01:10 -0700754AOM_CTRL_USE_TYPE(AV1E_SET_TUNE_CONTENT, int) /* aom_tune_content */
755#define AOM_CTRL_AV1E_SET_TUNE_CONTENT
Yaowu Xue94b4152015-01-13 10:07:20 -0800756
Yaowu Xuf883b422016-08-30 14:01:10 -0700757AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_SPACE, int)
758#define AOM_CTRL_AV1E_SET_COLOR_SPACE
Alex Converse4dcb8392015-03-20 14:55:43 -0700759
anorkin76fb1262017-03-22 15:12:12 -0700760AOM_CTRL_USE_TYPE(AV1E_SET_TRANSFER_FUNCTION, int)
761#define AOM_CTRL_AV1E_SET_TRANSFER_FUNCTION
762
763AOM_CTRL_USE_TYPE(AV1E_SET_CHROMA_SAMPLE_POSITION, int)
764#define AOM_CTRL_AV1E_SET_CHROMA_SAMPLE_POSITION
anorkin76fb1262017-03-22 15:12:12 -0700765
Yaowu Xuf883b422016-08-30 14:01:10 -0700766AOM_CTRL_USE_TYPE(AV1E_SET_MIN_GF_INTERVAL, unsigned int)
767#define AOM_CTRL_AV1E_SET_MIN_GF_INTERVAL
Debargha Mukherjee98526432015-04-01 16:39:06 -0700768
Yaowu Xuf883b422016-08-30 14:01:10 -0700769AOM_CTRL_USE_TYPE(AV1E_SET_MAX_GF_INTERVAL, unsigned int)
770#define AOM_CTRL_AV1E_SET_MAX_GF_INTERVAL
Debargha Mukherjee98526432015-04-01 16:39:06 -0700771
Yaowu Xuf883b422016-08-30 14:01:10 -0700772AOM_CTRL_USE_TYPE(AV1E_GET_ACTIVEMAP, aom_active_map_t *)
773#define AOM_CTRL_AV1E_GET_ACTIVEMAP
Ronald S. Bultjeeeb5ef02015-09-15 21:56:51 -0400774
Yaowu Xuf883b422016-08-30 14:01:10 -0700775AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_RANGE, int)
776#define AOM_CTRL_AV1E_SET_COLOR_RANGE
Yaowu Xu7c514e22015-09-28 15:55:46 -0700777
Yaowu Xu7c514e22015-09-28 15:55:46 -0700778/*!\brief
779 *
780 * TODO(rbultje) : add support of the control in ffmpeg
781 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700782#define AOM_CTRL_AV1E_SET_RENDER_SIZE
783AOM_CTRL_USE_TYPE(AV1E_SET_RENDER_SIZE, int *)
Geza Lore454989f2016-03-24 13:56:05 +0000784
Yaowu Xuf883b422016-08-30 14:01:10 -0700785AOM_CTRL_USE_TYPE(AV1E_SET_SUPERBLOCK_SIZE, unsigned int)
786#define AOM_CTRL_AV1E_SET_SUPERBLOCK_SIZE
James Zern7dd7a7d2015-10-09 16:31:17 -0700787
Yaowu Xuf883b422016-08-30 14:01:10 -0700788AOM_CTRL_USE_TYPE(AV1E_SET_TARGET_LEVEL, unsigned int)
789#define AOM_CTRL_AV1E_SET_TARGET_LEVEL
hui sube3f0692016-05-05 15:37:37 -0700790
Yaowu Xuf883b422016-08-30 14:01:10 -0700791AOM_CTRL_USE_TYPE(AV1E_GET_LEVEL, int *)
792#define AOM_CTRL_AV1E_GET_LEVEL
Alex Converseeb780e72016-12-13 12:46:41 -0800793
794AOM_CTRL_USE_TYPE(AV1E_SET_ANS_WINDOW_SIZE_LOG2, unsigned int)
795#define AOM_CTRL_AV1E_SET_ANS_WINDOW_SIZE_LOG2
Yunqing Wangd8cd55f2017-02-27 12:16:00 -0800796
Yunqing Wangeeb08a92017-07-07 21:25:18 -0700797AOM_CTRL_USE_TYPE(AV1E_SET_SINGLE_TILE_DECODING, unsigned int)
798#define AOM_CTRL_AV1E_SET_SINGLE_TILE_DECODING
Yunqing Wangff4fa062017-04-21 10:56:08 -0700799
800AOM_CTRL_USE_TYPE(AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST, unsigned int)
801#define AOM_CTRL_AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST
802
James Zern7dd7a7d2015-10-09 16:31:17 -0700803/*!\endcond */
Alex Conversec77b2ff2016-12-12 17:29:32 -0800804/*! @} - end defgroup aom_encoder */
Dmitry Kovaleve288c602013-09-29 18:00:15 -0700805#ifdef __cplusplus
806} // extern "C"
807#endif
808
Yaowu Xuf883b422016-08-30 14:01:10 -0700809#endif // AOM_AOMCX_H_