blob: 57901452a9d890b15d7de4887e88f13d6487f243 [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)
Yunqing Wang9a50fec2017-11-02 17:02:00 -070051/*!\brief Don't reference the last2 frame
52 *
53 * When this flag is set, the encoder will not use the last2 frame as a
54 * predictor. When not set, the encoder will choose whether to use the
55 * last2 frame or not automatically.
56 */
57#define AOM_EFLAG_NO_REF_LAST2 (1 << 17)
58/*!\brief Don't reference the last3 frame
59 *
60 * When this flag is set, the encoder will not use the last3 frame as a
61 * predictor. When not set, the encoder will choose whether to use the
62 * last3 frame or not automatically.
63 */
64#define AOM_EFLAG_NO_REF_LAST3 (1 << 18)
John Koleszar0ea50ce2010-05-18 11:58:33 -040065/*!\brief Don't reference the golden frame
66 *
67 * When this flag is set, the encoder will not use the golden frame as a
68 * predictor. When not set, the encoder will choose whether to use the
69 * golden frame or not automatically.
70 */
Yunqing Wang9a50fec2017-11-02 17:02:00 -070071#define AOM_EFLAG_NO_REF_GF (1 << 19)
John Koleszar0ea50ce2010-05-18 11:58:33 -040072
73/*!\brief Don't reference the alternate reference frame
74 *
75 * When this flag is set, the encoder will not use the alt ref frame as a
76 * predictor. When not set, the encoder will choose whether to use the
77 * alt ref frame or not automatically.
78 */
Yunqing Wang9a50fec2017-11-02 17:02:00 -070079#define AOM_EFLAG_NO_REF_ARF (1 << 20)
80/*!\brief Don't reference the bwd reference frame
81 *
82 * When this flag is set, the encoder will not use the bwd ref frame as a
83 * predictor. When not set, the encoder will choose whether to use the
84 * bwd ref frame or not automatically.
85 */
86#define AOM_EFLAG_NO_REF_BWD (1 << 21)
87/*!\brief Don't reference the alt2 reference frame
88 *
89 * When this flag is set, the encoder will not use the alt2 ref frame as a
90 * predictor. When not set, the encoder will choose whether to use the
91 * alt2 ref frame or not automatically.
92 */
93#define AOM_EFLAG_NO_REF_ARF2 (1 << 22)
John Koleszar0ea50ce2010-05-18 11:58:33 -040094
95/*!\brief Don't update the last frame
96 *
97 * When this flag is set, the encoder will not update the last frame with
98 * the contents of the current frame.
99 */
Yunqing Wang9a50fec2017-11-02 17:02:00 -0700100#define AOM_EFLAG_NO_UPD_LAST (1 << 23)
John Koleszar0ea50ce2010-05-18 11:58:33 -0400101
102/*!\brief Don't update the golden frame
103 *
104 * When this flag is set, the encoder will not update the golden frame with
105 * the contents of the current frame.
106 */
Yunqing Wang9a50fec2017-11-02 17:02:00 -0700107#define AOM_EFLAG_NO_UPD_GF (1 << 24)
John Koleszar0ea50ce2010-05-18 11:58:33 -0400108
109/*!\brief Don't update the alternate reference frame
110 *
111 * When this flag is set, the encoder will not update the alt ref frame with
112 * the contents of the current frame.
113 */
Yunqing Wang9a50fec2017-11-02 17:02:00 -0700114#define AOM_EFLAG_NO_UPD_ARF (1 << 25)
John Koleszar0ea50ce2010-05-18 11:58:33 -0400115/*!\brief Disable entropy update
116 *
117 * When this flag is set, the encoder will not update its internal entropy
118 * model based on the entropy of this frame.
119 */
Yunqing Wang9a50fec2017-11-02 17:02:00 -0700120#define AOM_EFLAG_NO_UPD_ENTROPY (1 << 26)
John Koleszar0ea50ce2010-05-18 11:58:33 -0400121
Yaowu Xuf883b422016-08-30 14:01:10 -0700122/*!\brief AVx encoder control functions
John Koleszar0ea50ce2010-05-18 11:58:33 -0400123 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700124 * This set of macros define the control functions available for AVx
James Zern8e17e822011-02-24 14:12:57 -0800125 * encoder interface.
126 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700127 * \sa #aom_codec_control
John Koleszar0ea50ce2010-05-18 11:58:33 -0400128 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700129enum aome_enc_control_id {
Yunqing Wangbdcc1402016-03-25 09:05:25 -0700130 /*!\brief Codec control function to set which reference frame encoder can use.
Yunqing Wangbdcc1402016-03-25 09:05:25 -0700131 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700132 AOME_USE_REFERENCE = 7,
Yunqing Wangbdcc1402016-03-25 09:05:25 -0700133
Yaowu Xu268f1062015-03-13 09:42:57 -0700134 /*!\brief Codec control function to pass an ROI map to encoder.
Yaowu Xu268f1062015-03-13 09:42:57 -0700135 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700136 AOME_SET_ROI_MAP = 8,
Yaowu Xu268f1062015-03-13 09:42:57 -0700137
138 /*!\brief Codec control function to pass an Active map to encoder.
Yaowu Xu268f1062015-03-13 09:42:57 -0700139 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700140 AOME_SET_ACTIVEMAP,
Yaowu Xu268f1062015-03-13 09:42:57 -0700141
142 /*!\brief Codec control function to set encoder scaling mode.
Yaowu Xu268f1062015-03-13 09:42:57 -0700143 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700144 AOME_SET_SCALEMODE = 11,
Yaowu Xu268f1062015-03-13 09:42:57 -0700145
146 /*!\brief Codec control function to set encoder internal speed settings.
John Koleszarc6b90392012-07-13 15:21:29 -0700147 *
148 * Changes in this value influences, among others, the encoder's selection
149 * of motion estimation methods. Values greater than 0 will increase encoder
150 * speed at the expense of quality.
John Koleszarc6b90392012-07-13 15:21:29 -0700151 *
Alex Converse561d0af2017-03-23 12:58:04 -0700152 * \note Valid range: 0..8
John Koleszarc6b90392012-07-13 15:21:29 -0700153 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700154 AOME_SET_CPUUSED = 13,
Yaowu Xu268f1062015-03-13 09:42:57 -0700155
Jingning Hanb49c6ae2017-11-27 18:14:05 -0800156 /*!\brief Speed features for codec development
157 */
158 AOME_SET_DEVSF,
159
Yaowu Xu268f1062015-03-13 09:42:57 -0700160 /*!\brief Codec control function to enable automatic set and use alf frames.
Yaowu Xu268f1062015-03-13 09:42:57 -0700161 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700162 AOME_SET_ENABLEAUTOALTREF,
Yaowu Xu268f1062015-03-13 09:42:57 -0700163
Yaowu Xu268f1062015-03-13 09:42:57 -0700164 /*!\brief Codec control function to set sharpness.
Yaowu Xu268f1062015-03-13 09:42:57 -0700165 */
Alex Converse0f4bcda2016-12-12 15:43:35 -0800166 AOME_SET_SHARPNESS = AOME_SET_ENABLEAUTOALTREF + 2,
Yaowu Xu268f1062015-03-13 09:42:57 -0700167
168 /*!\brief Codec control function to set the threshold for MBs treated static.
Yaowu Xu268f1062015-03-13 09:42:57 -0700169 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700170 AOME_SET_STATIC_THRESHOLD,
Yaowu Xu268f1062015-03-13 09:42:57 -0700171
Yaowu Xu268f1062015-03-13 09:42:57 -0700172 /*!\brief Codec control function to get last quantizer chosen by the encoder.
173 *
174 * Return value uses internal quantizer scale defined by the codec.
Yaowu Xu268f1062015-03-13 09:42:57 -0700175 */
Alex Converse0f4bcda2016-12-12 15:43:35 -0800176 AOME_GET_LAST_QUANTIZER = AOME_SET_STATIC_THRESHOLD + 2,
Yaowu Xu268f1062015-03-13 09:42:57 -0700177
178 /*!\brief Codec control function to get last quantizer chosen by the encoder.
179 *
180 * Return value uses the 0..63 scale as used by the rc_*_quantizer config
181 * parameters.
Yaowu Xu268f1062015-03-13 09:42:57 -0700182 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700183 AOME_GET_LAST_QUANTIZER_64,
Yaowu Xu268f1062015-03-13 09:42:57 -0700184
185 /*!\brief Codec control function to set the max no of frames to create arf.
Yaowu Xu268f1062015-03-13 09:42:57 -0700186 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700187 AOME_SET_ARNR_MAXFRAMES,
Yaowu Xu268f1062015-03-13 09:42:57 -0700188
189 /*!\brief Codec control function to set the filter strength for the arf.
Yaowu Xu268f1062015-03-13 09:42:57 -0700190 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700191 AOME_SET_ARNR_STRENGTH,
Yaowu Xu268f1062015-03-13 09:42:57 -0700192
Yaowu Xu268f1062015-03-13 09:42:57 -0700193 /*!\brief Codec control function to set visual tuning.
Yaowu Xu268f1062015-03-13 09:42:57 -0700194 */
Alex Conversefab62242016-12-13 10:09:15 -0800195 AOME_SET_TUNING = AOME_SET_ARNR_STRENGTH + 2,
Yaowu Xu268f1062015-03-13 09:42:57 -0700196
197 /*!\brief Codec control function to set constrained quality level.
John Koleszarc6b90392012-07-13 15:21:29 -0700198 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700199 * \attention For this value to be used aom_codec_enc_cfg_t::g_usage must be
200 * set to #AOM_CQ.
John Koleszarc6b90392012-07-13 15:21:29 -0700201 * \note Valid range: 0..63
202 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700203 AOME_SET_CQ_LEVEL,
John Koleszar1654ae92011-07-28 09:17:32 -0400204
Yaowu Xu268f1062015-03-13 09:42:57 -0700205 /*!\brief Codec control function to set Max data rate for Intra frames.
John Koleszarc6b90392012-07-13 15:21:29 -0700206 *
207 * This value controls additional clamping on the maximum size of a
208 * keyframe. It is expressed as a percentage of the average
209 * per-frame bitrate, with the special (and default) value 0 meaning
210 * unlimited, or no additional clamping beyond the codec's built-in
211 * algorithm.
212 *
213 * For example, to allocate no more than 4.5 frames worth of bitrate
214 * to a keyframe, set this to 450.
John Koleszarc6b90392012-07-13 15:21:29 -0700215 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700216 AOME_SET_MAX_INTRA_BITRATE_PCT,
John Koleszar83b1d902012-11-05 12:37:14 -0800217
Yaowu Xu268f1062015-03-13 09:42:57 -0700218 /*!\brief Codec control function to set max data rate for Inter frames.
Yaowu Xu636099f2014-10-24 09:31:16 -0700219 *
220 * This value controls additional clamping on the maximum size of an
221 * inter frame. It is expressed as a percentage of the average
222 * per-frame bitrate, with the special (and default) value 0 meaning
223 * unlimited, or no additional clamping beyond the codec's built-in
224 * algorithm.
225 *
226 * For example, to allow no more than 4.5 frames worth of bitrate
227 * to an inter frame, set this to 450.
Yaowu Xu636099f2014-10-24 09:31:16 -0700228 */
Alex Converse0f4bcda2016-12-12 15:43:35 -0800229 AV1E_SET_MAX_INTER_BITRATE_PCT = AOME_SET_MAX_INTRA_BITRATE_PCT + 2,
Yaowu Xu636099f2014-10-24 09:31:16 -0700230
Yaowu Xu268f1062015-03-13 09:42:57 -0700231 /*!\brief Boost percentage for Golden Frame in CBR mode.
Yaowu Xu03a60b72014-10-27 13:13:14 -0700232 *
233 * This value controls the amount of boost given to Golden Frame in
234 * CBR mode. It is expressed as a percentage of the average
235 * per-frame bitrate, with the special (and default) value 0 meaning
236 * the feature is off, i.e., no golden frame boost in CBR mode and
237 * average bitrate target is used.
238 *
239 * For example, to allow 100% more bits, i.e, 2X, in a golden frame
240 * than average frame, set this to 100.
Yaowu Xu03a60b72014-10-27 13:13:14 -0700241 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700242 AV1E_SET_GF_CBR_BOOST_PCT,
John Koleszar83b1d902012-11-05 12:37:14 -0800243
Yaowu Xu268f1062015-03-13 09:42:57 -0700244 /*!\brief Codec control function to set lossless encoding mode.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800245 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700246 * AV1 can operate in lossless encoding mode, in which the bitstream
Yaowu Xu87c436f2015-01-13 12:39:42 -0800247 * produced will be able to decode and reconstruct a perfect copy of
248 * input source. This control function provides a mean to switch encoder
249 * into lossless coding mode(1) or normal coding mode(0) that may be lossy.
250 * 0 = lossy coding mode
251 * 1 = lossless coding mode
252 *
253 * By default, encoder operates in normal coding mode (maybe lossy).
254 */
Alex Converse0f4bcda2016-12-12 15:43:35 -0800255 AV1E_SET_LOSSLESS = AV1E_SET_GF_CBR_BOOST_PCT + 2,
Thomas Daviesaf6df172016-11-09 14:04:18 +0000256
Yaowu Xu268f1062015-03-13 09:42:57 -0700257 /*!\brief Codec control function to set number of tile columns.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800258 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700259 * In encoding and decoding, AV1 allows an input image frame be partitioned
Yaowu Xu87c436f2015-01-13 12:39:42 -0800260 * into separated vertical tile columns, which can be encoded or decoded
261 * independently. This enables easy implementation of parallel encoding and
262 * decoding. This control requests the encoder to use column tiles in
263 * encoding an input frame, with number of tile columns (in Log2 unit) as
264 * the parameter:
265 * 0 = 1 tile column
266 * 1 = 2 tile columns
267 * 2 = 4 tile columns
268 * .....
269 * n = 2**n tile columns
270 * The requested tile columns will be capped by encoder based on image size
271 * limitation (The minimum width of a tile column is 256 pixel, the maximum
272 * is 4096).
273 *
274 * By default, the value is 0, i.e. one single column tile for entire image.
275 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700276 AV1E_SET_TILE_COLUMNS,
Yaowu Xu87c436f2015-01-13 12:39:42 -0800277
Yaowu Xu268f1062015-03-13 09:42:57 -0700278 /*!\brief Codec control function to set number of tile rows.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800279 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700280 * In encoding and decoding, AV1 allows an input image frame be partitioned
Yaowu Xu87c436f2015-01-13 12:39:42 -0800281 * into separated horizontal tile rows. Tile rows are encoded or decoded
282 * sequentially. Even though encoding/decoding of later tile rows depends on
283 * earlier ones, this allows the encoder to output data packets for tile rows
284 * prior to completely processing all tile rows in a frame, thereby reducing
285 * the latency in processing between input and output. The parameter
286 * for this control describes the number of tile rows, which has a valid
287 * range [0, 2]:
288 * 0 = 1 tile row
289 * 1 = 2 tile rows
290 * 2 = 4 tile rows
291 *
292 * By default, the value is 0, i.e. one single row tile for entire image.
293 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700294 AV1E_SET_TILE_ROWS,
Ryan Lei7386eda2016-12-08 21:08:31 -0800295
Yaowu Xu268f1062015-03-13 09:42:57 -0700296 /*!\brief Codec control function to enable frame parallel decoding feature.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800297 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700298 * AV1 has a bitstream feature to reduce decoding dependency between frames
Yaowu Xu87c436f2015-01-13 12:39:42 -0800299 * by turning off backward update of probability context used in encoding
300 * and decoding. This allows staged parallel processing of more than one
301 * video frames in the decoder. This control function provides a mean to
302 * turn this feature on or off for bitstreams produced by encoder.
303 *
304 * By default, this feature is off.
305 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700306 AV1E_SET_FRAME_PARALLEL_DECODING,
Yaowu Xu87c436f2015-01-13 12:39:42 -0800307
Yaowu Xu268f1062015-03-13 09:42:57 -0700308 /*!\brief Codec control function to set adaptive quantization mode.
Yaowu Xu87c436f2015-01-13 12:39:42 -0800309 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700310 * AV1 has a segment based feature that allows encoder to adaptively change
Yaowu Xu87c436f2015-01-13 12:39:42 -0800311 * quantization parameter for each segment within a frame to improve the
312 * subjective quality. This control makes encoder operate in one of the
313 * several AQ_modes supported.
314 *
315 * By default, encoder operates with AQ_Mode 0(adaptive quantization off).
316 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700317 AV1E_SET_AQ_MODE,
Yaowu Xu4ab39e12015-01-14 09:07:02 -0800318
Yaowu Xu268f1062015-03-13 09:42:57 -0700319 /*!\brief Codec control function to enable/disable periodic Q boost.
Yaowu Xu4ab39e12015-01-14 09:07:02 -0800320 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700321 * One AV1 encoder speed feature is to enable quality boost by lowering
Yaowu Xu4ab39e12015-01-14 09:07:02 -0800322 * frame level Q periodically. This control function provides a mean to
323 * turn on/off this feature.
324 * 0 = off
325 * 1 = on
326 *
327 * By default, the encoder is allowed to use this feature for appropriate
328 * encoding modes.
329 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700330 AV1E_SET_FRAME_PERIODIC_BOOST,
Yaowu Xu4ab39e12015-01-14 09:07:02 -0800331
Yaowu Xu268f1062015-03-13 09:42:57 -0700332 /*!\brief Codec control function to set noise sensitivity.
JackyChenbb1a2362014-09-12 11:48:44 -0700333 *
Yaowu Xu268f1062015-03-13 09:42:57 -0700334 * 0: off, 1: On(YOnly)
JackyChenbb1a2362014-09-12 11:48:44 -0700335 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700336 AV1E_SET_NOISE_SENSITIVITY,
Ivan Maltz01b35c32013-09-05 08:55:47 -0700337
Yaowu Xu268f1062015-03-13 09:42:57 -0700338 /*!\brief Codec control function to set content type.
Yaowu Xudc08b202015-01-14 11:17:09 -0800339 * \note Valid parameter range:
Yaowu Xuf883b422016-08-30 14:01:10 -0700340 * AOM_CONTENT_DEFAULT = Regular video content (Default)
341 * AOM_CONTENT_SCREEN = Screen capture content
Yaowu Xudc08b202015-01-14 11:17:09 -0800342 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700343 AV1E_SET_TUNE_CONTENT,
Yaowu Xu193ca4b2015-01-14 11:48:29 -0800344
Andrey Norkin9e694632017-12-21 18:50:57 -0800345 /*!\brief Codec control function to set color space info.
346 * \note Valid ranges: 0..23, default is "Unspecified".
347 * 0 = For future use
348 * 1 = BT.709
349 * 2 = Unspecified
350 * 3 = For future use
351 * 4 = BT.470 System M (historical)
352 * 5 = BT.470 System B, G (historical)
353 * 6 = BT.601
354 * 7 = SMPTE 240
355 * 8 = Generic film (color filters using illuminant C)
356 * 9 = BT.2020, BT.2100
357 * 10 = SMPTE 428 (CIE 1921 XYZ)
358 * 11 = SMPTE RP 431-2
359 * 12 = SMPTE EG 432-1
360 * 13 = For future use (values 13 - 21)
361 * 22 = EBU Tech. 3213-E
362 * 23 = For future use
Edward Hervey24e47832018-01-11 12:17:12 +0100363 *
364 * Experiment: CICP
Andrey Norkin9e694632017-12-21 18:50:57 -0800365 */
366 AV1E_SET_COLOR_PRIMARIES,
367
368 /*!\brief Codec control function to set transfer function info.
369 * \note Valid ranges: 0..19, default is "Unspecified".
370 * 0 = For future use
371 * 1 = BT.709
372 * 2 = Unspecified
373 * 3 = For future use
374 * 4 = BT.470 System M (historical)
375 * 5 = BT.470 System B, G (historical)
376 * 6 = BT.601
377 * 7 = SMPTE 240 M
378 * 8 = Linear
379 * 9 = Logarithmic (100 : 1 range)
380 * 10 = Logarithmic (100 * Sqrt(10) : 1 range)
381 * 11 = IEC 61966-2-4
382 * 12 = BT.1361
383 * 13 = sRGB or sYCC
384 * 14 = BT.2020 10-bit systems
385 * 15 = BT.2020 12-bit systems
386 * 16 = SMPTE ST 2084, ITU BT.2100 PQ
387 * 17 = SMPTE ST 428
388 * 18 = BT.2100 HLG, ARIB STD-B67
389 * 19 = For future use
Edward Hervey24e47832018-01-11 12:17:12 +0100390 *
391 * Experiment: CICP
Andrey Norkin9e694632017-12-21 18:50:57 -0800392 */
393 AV1E_SET_TRANSFER_CHARACTERISTICS,
394
395 /*!\brief Codec control function to set transfer function info.
396 * \note Valid ranges: 0..15, default is "Unspecified".
397 * 0 = Identity matrix
398 * 1 = BT.709
399 * 2 = Unspecified
400 * 3 = For future use
401 * 4 = US FCC 73.628
402 * 5 = BT.470 System B, G (historical)
403 * 6 = BT.601
404 * 7 = SMPTE 240 M
405 * 8 = YCgCo
406 * 9 = BT.2020 non-constant luminance, BT.2100 YCbCr
407 * 10 = BT.2020 constant luminance
408 * 11 = SMPTE ST 2085 YDzDx
409 * 12 = Chromaticity-derived non-constant luminance
410 * 13 = Chromaticity-derived constant luminance
411 * 14 = BT.2100 ICtCp
412 * 15 = For future use
Edward Hervey24e47832018-01-11 12:17:12 +0100413 *
414 * Experiment: CICP
Andrey Norkin9e694632017-12-21 18:50:57 -0800415 */
416 AV1E_SET_MATRIX_COEFFICIENTS,
Edward Hervey24e47832018-01-11 12:17:12 +0100417
Yaowu Xu268f1062015-03-13 09:42:57 -0700418 /*!\brief Codec control function to set color space info.
anorkin76fb1262017-03-22 15:12:12 -0700419 * \note Valid ranges: 0..9, default is "UNKNOWN".
Yaowu Xue94b4152015-01-13 10:07:20 -0800420 * 0 = UNKNOWN,
421 * 1 = BT_601
422 * 2 = BT_709
423 * 3 = SMPTE_170
424 * 4 = SMPTE_240
anorkin76fb1262017-03-22 15:12:12 -0700425 * 5 = BT_2020_NCL
426 * 6 = BT_2020_CL
Yaowu Xue94b4152015-01-13 10:07:20 -0800427 * 7 = SRGB
anorkin76fb1262017-03-22 15:12:12 -0700428 * 8 = ICtCp
429 * 9 = RESERVED
Yaowu Xue94b4152015-01-13 10:07:20 -0800430 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700431 AV1E_SET_COLOR_SPACE,
Alex Converse4dcb8392015-03-20 14:55:43 -0700432
anorkin76fb1262017-03-22 15:12:12 -0700433 /*!\brief Codec control function to set transfer function info.
434 * \note Valid ranges: 0..4, default is "UNKNOWN".
435 * 0 = UNKNOWN,
436 * 1 = BT_709
437 * 2 = PQ
438 * 3 = HLG
439 * 4 = RESERVED
440 */
441 AV1E_SET_TRANSFER_FUNCTION,
442
443 /*!\brief Codec control function to set chroma 4:2:0 sample position info.
444 * \note Valid ranges: 0..3, default is "UNKNOWN".
445 * 0 = UNKNOWN,
446 * 1 = VERTICAL
447 * 2 = COLOCATED
448 * 3 = RESERVED
449 */
450 AV1E_SET_CHROMA_SAMPLE_POSITION,
anorkin76fb1262017-03-22 15:12:12 -0700451
Debargha Mukherjee98526432015-04-01 16:39:06 -0700452 /*!\brief Codec control function to set minimum interval between GF/ARF frames
453 *
454 * By default the value is set as 4.
Debargha Mukherjee98526432015-04-01 16:39:06 -0700455 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700456 AV1E_SET_MIN_GF_INTERVAL,
Debargha Mukherjee98526432015-04-01 16:39:06 -0700457
458 /*!\brief Codec control function to set minimum interval between GF/ARF frames
459 *
460 * By default the value is set as 16.
Debargha Mukherjee98526432015-04-01 16:39:06 -0700461 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700462 AV1E_SET_MAX_GF_INTERVAL,
Debargha Mukherjee98526432015-04-01 16:39:06 -0700463
Alex Converse4dcb8392015-03-20 14:55:43 -0700464 /*!\brief Codec control function to get an Active map back from the encoder.
Alex Converse4dcb8392015-03-20 14:55:43 -0700465 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700466 AV1E_GET_ACTIVEMAP,
Ronald S. Bultjeeeb5ef02015-09-15 21:56:51 -0400467
468 /*!\brief Codec control function to set color range bit.
469 * \note Valid ranges: 0..1, default is 0
470 * 0 = Limited range (16..235 or HBD equivalent)
471 * 1 = Full range (0..255 or HBD equivalent)
Ronald S. Bultjeeeb5ef02015-09-15 21:56:51 -0400472 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700473 AV1E_SET_COLOR_RANGE,
Yaowu Xu7c514e22015-09-28 15:55:46 -0700474
Yaowu Xu7c514e22015-09-28 15:55:46 -0700475 /*!\brief Codec control function to set intended rendering image size.
476 *
477 * By default, this is identical to the image size in pixels.
Yaowu Xu7c514e22015-09-28 15:55:46 -0700478 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700479 AV1E_SET_RENDER_SIZE,
Geza Lore454989f2016-03-24 13:56:05 +0000480
hui sube3f0692016-05-05 15:37:37 -0700481 /*!\brief Codec control function to set target level.
482 *
483 * 255: off (default); 0: only keep level stats; 10: target for level 1.0;
484 * 11: target for level 1.1; ... 62: target for level 6.2
hui sube3f0692016-05-05 15:37:37 -0700485 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700486 AV1E_SET_TARGET_LEVEL,
hui su72d48902016-05-05 12:04:42 -0700487
488 /*!\brief Codec control function to get bitstream level.
hui su72d48902016-05-05 12:04:42 -0700489 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700490 AV1E_GET_LEVEL,
Yaowu Xu6fe07a22016-07-14 10:57:35 -0700491
Geza Lore454989f2016-03-24 13:56:05 +0000492 /*!\brief Codec control function to set intended superblock size.
493 *
494 * By default, the superblock size is determined separately for each
495 * frame by the encoder.
Alex Converse85370ae2016-12-13 11:18:28 -0800496 *
497 * Experiment: EXT_PARTITION
Geza Lore454989f2016-03-24 13:56:05 +0000498 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700499 AV1E_SET_SUPERBLOCK_SIZE,
Alex Converse85370ae2016-12-13 11:18:28 -0800500
501 /*!\brief Codec control function to enable automatic set and use
502 * bwd-pred frames.
503 *
Alex Converse85370ae2016-12-13 11:18:28 -0800504 */
505 AOME_SET_ENABLEAUTOBWDREF,
506
Steinar Midtskogene44c6222017-11-09 13:22:09 +0100507 /*!\brief Codec control function to encode with CDEF.
508 *
509 * CDEF is the constrained directional enhancement filter which is an
510 * in-loop filter aiming to remove coding artifacts
511 * 0 = do not apply CDEF
512 * 1 = apply CDEF
513 *
514 * By default, the encoder applies CDEF.
515 *
516 * Experiment: AOM_CDEF
517 */
518 AV1E_SET_ENABLE_CDEF,
519
Alex Converse85370ae2016-12-13 11:18:28 -0800520 /*!\brief Codec control function to encode with quantisation matrices.
521 *
522 * AOM can operate with default quantisation matrices dependent on
523 * quantisation level and block type.
524 * 0 = do not use quantisation matrices
525 * 1 = use quantisation matrices
526 *
527 * By default, the encoder operates without quantisation matrices.
528 *
529 * Experiment: AOM_QM
530 */
531 AV1E_SET_ENABLE_QM,
532
533 /*!\brief Codec control function to set the min quant matrix flatness.
534 *
535 * AOM can operate with different ranges of quantisation matrices.
536 * As quantisation levels increase, the matrices get flatter. This
537 * control sets the minimum level of flatness from which the matrices
538 * are determined.
539 *
540 * By default, the encoder sets this minimum at half the available
541 * range.
542 *
543 * Experiment: AOM_QM
544 */
545 AV1E_SET_QM_MIN,
546
547 /*!\brief Codec control function to set the max quant matrix flatness.
548 *
549 * AOM can operate with different ranges of quantisation matrices.
550 * As quantisation levels increase, the matrices get flatter. This
551 * control sets the maximum level of flatness possible.
552 *
553 * By default, the encoder sets this maximum at the top of the
554 * available range.
555 *
556 * Experiment: AOM_QM
557 */
558 AV1E_SET_QM_MAX,
559
Yushin Chod808bfc2017-08-10 15:54:36 -0700560 /*!\brief Codec control function to encode with dist_8x8.
561 *
562 * The dist_8x8 is enabled automatically for model tuning parameters that
563 * require measuring distortion at the 8x8 level. This control also allows
564 * measuring distortion at the 8x8 level for other tuning options
565 * (e.g., PSNR), for testing purposes.
566 * 0 = do not use dist_8x8
567 * 1 = use dist_8x8
568 *
569 * By default, the encoder does not use dist_8x8
570 *
571 * Experiment: DIST_8X8
572 */
573 AV1E_SET_ENABLE_DIST_8X8,
574
Alex Converse85370ae2016-12-13 11:18:28 -0800575 /*!\brief Codec control function to set a maximum number of tile groups.
576 *
577 * This will set the maximum number of tile groups. This will be
578 * overridden if an MTU size is set. The default value is 1.
579 *
580 * Experiment: TILE_GROUPS
581 */
582 AV1E_SET_NUM_TG,
583
584 /*!\brief Codec control function to set an MTU size for a tile group.
585 *
586 * This will set the maximum number of bytes in a tile group. This can be
587 * exceeded only if a single tile is larger than this amount.
588 *
589 * By default, the value is 0, in which case a fixed number of tile groups
590 * is used.
591 *
592 * Experiment: TILE_GROUPS
593 */
594 AV1E_SET_MTU,
Alex Converseeb780e72016-12-13 12:46:41 -0800595
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800596 /*!\brief Codec control function to set dependent_horz_tiles.
Andrey Norkin9e694632017-12-21 18:50:57 -0800597 *
598 * In encoding and decoding, AV1 allows enabling dependent horizontal tile
599 * The parameter for this control describes the value of this flag,
600 * which has a valid range [0, 1]:
601 * 0 = disable dependent horizontal tile
602 * 1 = enable dependent horizontal tile,
603 *
604 * By default, the value is 0, i.e. disable dependent horizontal tile.
605 */
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800606 AV1E_SET_TILE_DEPENDENT_ROWS,
607
Alex Converseeb780e72016-12-13 12:46:41 -0800608 /*!\brief Codec control function to set the number of symbols in an ANS data
609 * window.
610 *
611 * The number of ANS symbols (both boolean and non-booleans alphabets) in an
612 * ANS data window is set to 1 << value.
613 *
614 * \note Valid range: [8, 23]
615 *
616 * Experiment: ANS
617 */
618 AV1E_SET_ANS_WINDOW_SIZE_LOG2,
Alex Converse00b7e272017-03-22 18:14:08 -0700619
620 /*!\brief Codec control function to set temporal mv prediction
Andrey Norkin9e694632017-12-21 18:50:57 -0800621 * enabling/disabling.
622 *
623 * This will enable or disable temporal mv predicton. The default value is 0.
624 *
625 * Experiment: TEMPMV_SIGNALING
626 */
Alex Converse00b7e272017-03-22 18:14:08 -0700627 AV1E_SET_DISABLE_TEMPMV,
628
Lei7bb501d2017-12-13 15:10:34 -0800629 /*!\brief Codec control function to set loop_filter_across_tiles_v_enabled
630 * and loop_filter_across_tiles_h_enabled.
631 * In encoding and decoding, AV1 allows disabling loop filter across tile
632 * boundary The parameter for this control describes the value of this flag,
633 * which has a valid range [0, 1]:
634 * 0 = disable loop filter across tile boundary
635 * 1 = enable loop filter across tile boundary
636 *
637 * By default, the value is 1, i.e. enable loop filter across tile boundary.
638 *
639 * Experiment: LOOPFILTERING_ACROSS_TILES_EXT
640 */
641 AV1E_SET_TILE_LOOPFILTER_V,
642 AV1E_SET_TILE_LOOPFILTER_H,
643
Alex Converse00b7e272017-03-22 18:14:08 -0700644 /*!\brief Codec control function to set loop_filter_across_tiles_enabled.
645 *
646 * In encoding and decoding, AV1 allows disabling loop filter across tile
647 * boundary The parameter for this control describes the value of this flag,
648 * which has a valid range [0, 1]:
649 * 0 = disable loop filter across tile boundary
650 * 1 = enable loop filter across tile boundary
651 *
652 * By default, the value is 1, i.e. enable loop filter across tile boundary.
653 *
654 * Experiment: LOOPFILTERING_ACROSS_TILES
655 */
656 AV1E_SET_TILE_LOOPFILTER,
Yunqing Wangd8cd55f2017-02-27 12:16:00 -0800657
Fangwen Fu6160df22017-04-24 09:45:51 -0700658 /*!\brief Codec control function to set the delta q mode
Andrey Norkin9e694632017-12-21 18:50:57 -0800659 *
660 * AV1 has a segment based feature that allows encoder to adaptively change
661 * quantization parameter for each segment within a frame to improve the
662 * subjective quality. the delta q mode is added on top of segment based
663 * feature, and allows control per 64x64 q and lf delta.This control makes
664 * encoder operate in one of the several DELTA_Q_modes supported.
665 *
666 * By default, encoder operates with DELTAQ_Mode 0(deltaq signaling off).
667 */
Fangwen Fu6160df22017-04-24 09:45:51 -0700668 AV1E_SET_DELTAQ_MODE,
669
Yunqing Wangeeb08a92017-07-07 21:25:18 -0700670 /*!\brief Codec control function to set the single tile decoding mode to 0 or
671 * 1.
Yunqing Wangd8cd55f2017-02-27 12:16:00 -0800672 *
Yunqing Wangeeb08a92017-07-07 21:25:18 -0700673 * 0 means that the single tile decoding is off, and 1 means that the single
674 * tile decoding is on.
Yunqing Wangd8cd55f2017-02-27 12:16:00 -0800675 *
676 * Experiment: EXT_TILE
677 */
Yunqing Wangeeb08a92017-07-07 21:25:18 -0700678 AV1E_SET_SINGLE_TILE_DECODING,
Yunqing Wangff4fa062017-04-21 10:56:08 -0700679
680 /*!\brief Codec control function to enable the extreme motion vector unit test
681 * in AV1. Please note that this is only used in motion vector unit test.
682 *
683 * 0 : off, 1 : MAX_EXTREME_MV, 2 : MIN_EXTREME_MV
684 */
685 AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST,
John Koleszarb0da9b32010-12-17 09:43:39 -0500686};
John Koleszar0ea50ce2010-05-18 11:58:33 -0400687
Yaowu Xuf883b422016-08-30 14:01:10 -0700688/*!\brief aom 1-D scaling mode
John Koleszar0ea50ce2010-05-18 11:58:33 -0400689 *
Yaowu Xuf883b422016-08-30 14:01:10 -0700690 * This set of constants define 1-D aom scaling modes
John Koleszar0ea50ce2010-05-18 11:58:33 -0400691 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700692typedef enum aom_scaling_mode_1d {
693 AOME_NORMAL = 0,
694 AOME_FOURFIVE = 1,
695 AOME_THREEFIVE = 2,
696 AOME_ONETWO = 3
697} AOM_SCALING_MODE;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400698
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700699/*!\brief Max number of segments
700 *
701 * This is the limit of number of segments allowed within a frame.
702 *
703 * Currently same as "MAX_SEGMENTS" in AV1, the maximum that AV1 supports.
704 *
705 */
706#define AOM_MAX_SEGMENTS 8
707
Yaowu Xuf883b422016-08-30 14:01:10 -0700708/*!\brief aom region of interest map
John Koleszar0ea50ce2010-05-18 11:58:33 -0400709 *
710 * These defines the data structures for the region of interest map
711 *
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700712 * TODO(yaowu): create a unit test for ROI map related APIs
713 *
John Koleszar0ea50ce2010-05-18 11:58:33 -0400714 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700715typedef struct aom_roi_map {
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700716 /*! An id between 0 and 7 for each 8x8 region within a frame. */
Adrian Grangef58eca92013-10-24 15:11:36 -0700717 unsigned char *roi_map;
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700718 unsigned int rows; /**< Number of rows. */
719 unsigned int cols; /**< Number of columns. */
720 int delta_q[AOM_MAX_SEGMENTS]; /**< Quantizer deltas. */
721 int delta_lf[AOM_MAX_SEGMENTS]; /**< Loop filter deltas. */
Adrian Grangef58eca92013-10-24 15:11:36 -0700722 /*! Static breakout threshold for each segment. */
Yaowu Xuc5bf1e02017-09-26 13:51:29 -0700723 unsigned int static_threshold[AOM_MAX_SEGMENTS];
Yaowu Xuf883b422016-08-30 14:01:10 -0700724} aom_roi_map_t;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400725
Yaowu Xuf883b422016-08-30 14:01:10 -0700726/*!\brief aom active region map
John Koleszar0ea50ce2010-05-18 11:58:33 -0400727 *
728 * These defines the data structures for active region map
729 *
730 */
731
Yaowu Xuf883b422016-08-30 14:01:10 -0700732typedef struct aom_active_map {
clang-format83a52072016-08-08 20:22:13 -0700733 /*!\brief specify an on (1) or off (0) each 16x16 region within a frame */
734 unsigned char *active_map;
735 unsigned int rows; /**< number of rows */
736 unsigned int cols; /**< number of cols */
Yaowu Xuf883b422016-08-30 14:01:10 -0700737} aom_active_map_t;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400738
Yaowu Xuf883b422016-08-30 14:01:10 -0700739/*!\brief aom image scaling mode
John Koleszar0ea50ce2010-05-18 11:58:33 -0400740 *
741 * This defines the data structure for image scaling mode
742 *
743 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700744typedef struct aom_scaling_mode {
745 AOM_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */
746 AOM_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */
747} aom_scaling_mode_t;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400748
Yaowu Xuf883b422016-08-30 14:01:10 -0700749/*!brief AV1 encoder content type */
Alex Converse572de922014-07-31 08:27:32 -0700750typedef enum {
Yaowu Xuf883b422016-08-30 14:01:10 -0700751 AOM_CONTENT_DEFAULT,
752 AOM_CONTENT_SCREEN,
753 AOM_CONTENT_INVALID
754} aom_tune_content;
John Koleszar0ea50ce2010-05-18 11:58:33 -0400755
Alex Converse6e3c8052016-12-16 09:48:56 -0800756/*!\brief Model tuning parameters
John Koleszarb0da9b32010-12-17 09:43:39 -0500757 *
758 * Changes the encoder to tune for certain types of input material.
759 *
760 */
Yushin Chod808bfc2017-08-10 15:54:36 -0700761typedef enum {
762 AOM_TUNE_PSNR,
763 AOM_TUNE_SSIM,
Yushin Chod808bfc2017-08-10 15:54:36 -0700764 AOM_TUNE_CDEF_DIST,
765 AOM_TUNE_DAALA_DIST
Yushin Chod808bfc2017-08-10 15:54:36 -0700766} aom_tune_metric;
John Koleszarb0da9b32010-12-17 09:43:39 -0500767
James Zern7dd7a7d2015-10-09 16:31:17 -0700768/*!\cond */
Alex Converse6e3c8052016-12-16 09:48:56 -0800769/*!\brief Encoder control function parameter type
John Koleszar0ea50ce2010-05-18 11:58:33 -0400770 *
Alex Converse6e3c8052016-12-16 09:48:56 -0800771 * Defines the data types that AOME/AV1E control functions take. Note that
Yaowu Xuf883b422016-08-30 14:01:10 -0700772 * additional common controls are defined in aom.h
John Koleszar0ea50ce2010-05-18 11:58:33 -0400773 *
774 */
775
Ryan Overbecka5fefa72017-09-19 11:39:10 -0700776AOM_CTRL_USE_TYPE(AOME_USE_REFERENCE, int)
Yaowu Xuf883b422016-08-30 14:01:10 -0700777#define AOM_CTRL_AOME_USE_REFERENCE
Yaowu Xuf883b422016-08-30 14:01:10 -0700778AOM_CTRL_USE_TYPE(AOME_SET_ROI_MAP, aom_roi_map_t *)
779#define AOM_CTRL_AOME_SET_ROI_MAP
780AOM_CTRL_USE_TYPE(AOME_SET_ACTIVEMAP, aom_active_map_t *)
781#define AOM_CTRL_AOME_SET_ACTIVEMAP
782AOM_CTRL_USE_TYPE(AOME_SET_SCALEMODE, aom_scaling_mode_t *)
783#define AOM_CTRL_AOME_SET_SCALEMODE
John Koleszar0ea50ce2010-05-18 11:58:33 -0400784
Yaowu Xuf883b422016-08-30 14:01:10 -0700785AOM_CTRL_USE_TYPE(AOME_SET_CPUUSED, int)
786#define AOM_CTRL_AOME_SET_CPUUSED
Jingning Hanb49c6ae2017-11-27 18:14:05 -0800787AOM_CTRL_USE_TYPE(AOME_SET_DEVSF, int)
788#define AOM_CTRL_AOME_SET_DEVSF
Yaowu Xuf883b422016-08-30 14:01:10 -0700789AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOALTREF, unsigned int)
790#define AOM_CTRL_AOME_SET_ENABLEAUTOALTREF
Zoe Liucf5083d2016-02-04 09:47:46 -0800791
Yaowu Xuf883b422016-08-30 14:01:10 -0700792AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOBWDREF, unsigned int)
793#define AOM_CTRL_AOME_SET_ENABLEAUTOBWDREF
Zoe Liucf5083d2016-02-04 09:47:46 -0800794
Yaowu Xuf883b422016-08-30 14:01:10 -0700795AOM_CTRL_USE_TYPE(AOME_SET_SHARPNESS, unsigned int)
796#define AOM_CTRL_AOME_SET_SHARPNESS
797AOM_CTRL_USE_TYPE(AOME_SET_STATIC_THRESHOLD, unsigned int)
798#define AOM_CTRL_AOME_SET_STATIC_THRESHOLD
John Koleszar0ea50ce2010-05-18 11:58:33 -0400799
Yaowu Xuf883b422016-08-30 14:01:10 -0700800AOM_CTRL_USE_TYPE(AOME_SET_ARNR_MAXFRAMES, unsigned int)
801#define AOM_CTRL_AOME_SET_ARNR_MAXFRAMES
802AOM_CTRL_USE_TYPE(AOME_SET_ARNR_STRENGTH, unsigned int)
803#define AOM_CTRL_AOME_SET_ARNR_STRENGTH
Yaowu Xuf883b422016-08-30 14:01:10 -0700804AOM_CTRL_USE_TYPE(AOME_SET_TUNING, int) /* aom_tune_metric */
805#define AOM_CTRL_AOME_SET_TUNING
806AOM_CTRL_USE_TYPE(AOME_SET_CQ_LEVEL, unsigned int)
807#define AOM_CTRL_AOME_SET_CQ_LEVEL
John Koleszar0ea50ce2010-05-18 11:58:33 -0400808
Yaowu Xuf883b422016-08-30 14:01:10 -0700809AOM_CTRL_USE_TYPE(AV1E_SET_TILE_COLUMNS, int)
810#define AOM_CTRL_AV1E_SET_TILE_COLUMNS
811AOM_CTRL_USE_TYPE(AV1E_SET_TILE_ROWS, int)
812#define AOM_CTRL_AV1E_SET_TILE_ROWS
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800813
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800814AOM_CTRL_USE_TYPE(AV1E_SET_TILE_DEPENDENT_ROWS, int)
815#define AOM_CTRL_AV1E_SET_TILE_DEPENDENT_ROWS
Fangwen Fu7b9f2b32017-01-17 14:01:52 -0800816
Lei7bb501d2017-12-13 15:10:34 -0800817AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER_V, int)
818#define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER_V
819AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER_H, int)
820#define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER_H
Ryan Lei7386eda2016-12-08 21:08:31 -0800821AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER, int)
822#define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER
Ronald S. Bultje1407bdc2013-02-01 09:35:28 -0800823
Yaowu Xuf883b422016-08-30 14:01:10 -0700824AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER, int *)
825#define AOM_CTRL_AOME_GET_LAST_QUANTIZER
826AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER_64, int *)
827#define AOM_CTRL_AOME_GET_LAST_QUANTIZER_64
John Koleszar0ea50ce2010-05-18 11:58:33 -0400828
Yaowu Xuf883b422016-08-30 14:01:10 -0700829AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
830#define AOM_CTRL_AOME_SET_MAX_INTRA_BITRATE_PCT
831AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTER_BITRATE_PCT, unsigned int)
832#define AOM_CTRL_AOME_SET_MAX_INTER_BITRATE_PCT
John Koleszar1654ae92011-07-28 09:17:32 -0400833
Yaowu Xuf883b422016-08-30 14:01:10 -0700834AOM_CTRL_USE_TYPE(AV1E_SET_GF_CBR_BOOST_PCT, unsigned int)
835#define AOM_CTRL_AV1E_SET_GF_CBR_BOOST_PCT
Yaowu Xu41652902015-03-12 17:59:18 -0700836
Yaowu Xuf883b422016-08-30 14:01:10 -0700837AOM_CTRL_USE_TYPE(AV1E_SET_LOSSLESS, unsigned int)
838#define AOM_CTRL_AV1E_SET_LOSSLESS
John Koleszar1654ae92011-07-28 09:17:32 -0400839
Steinar Midtskogene44c6222017-11-09 13:22:09 +0100840AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_CDEF, unsigned int)
841#define AOM_CTRL_AV1E_SET_ENABLE_CDEF
842
Yaowu Xuf883b422016-08-30 14:01:10 -0700843AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_QM, unsigned int)
844#define AOM_CTRL_AV1E_SET_ENABLE_QM
Yaowu Xu0818a7c2016-08-11 09:39:47 -0700845
Yushin Chod808bfc2017-08-10 15:54:36 -0700846AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DIST_8X8, unsigned int)
847#define AOM_CTRL_AV1E_SET_ENABLE_DIST_8X8
848
Yaowu Xuf883b422016-08-30 14:01:10 -0700849AOM_CTRL_USE_TYPE(AV1E_SET_QM_MIN, unsigned int)
850#define AOM_CTRL_AV1E_SET_QM_MIN
Yaowu Xu0818a7c2016-08-11 09:39:47 -0700851
Yaowu Xuf883b422016-08-30 14:01:10 -0700852AOM_CTRL_USE_TYPE(AV1E_SET_QM_MAX, unsigned int)
853#define AOM_CTRL_AV1E_SET_QM_MAX
Yaowu Xu0818a7c2016-08-11 09:39:47 -0700854
Thomas Daviesaf6df172016-11-09 14:04:18 +0000855AOM_CTRL_USE_TYPE(AV1E_SET_NUM_TG, unsigned int)
856#define AOM_CTRL_AV1E_SET_NUM_TG
857AOM_CTRL_USE_TYPE(AV1E_SET_MTU, unsigned int)
858#define AOM_CTRL_AV1E_SET_MTU
Thomas Daviesaf6df172016-11-09 14:04:18 +0000859
Fangwen Fu8d164de2016-12-14 13:40:54 -0800860AOM_CTRL_USE_TYPE(AV1E_SET_DISABLE_TEMPMV, unsigned int)
861#define AOM_CTRL_AV1E_SET_DISABLE_TEMPMV
Fangwen Fu8d164de2016-12-14 13:40:54 -0800862
Yaowu Xuf883b422016-08-30 14:01:10 -0700863AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PARALLEL_DECODING, unsigned int)
864#define AOM_CTRL_AV1E_SET_FRAME_PARALLEL_DECODING
Ivan Maltz01b35c32013-09-05 08:55:47 -0700865
Yaowu Xuf883b422016-08-30 14:01:10 -0700866AOM_CTRL_USE_TYPE(AV1E_SET_AQ_MODE, unsigned int)
867#define AOM_CTRL_AV1E_SET_AQ_MODE
Guillaume Martres17084652013-11-14 19:23:57 +0100868
Fangwen Fu6160df22017-04-24 09:45:51 -0700869AOM_CTRL_USE_TYPE(AV1E_SET_DELTAQ_MODE, unsigned int)
870#define AOM_CTRL_AV1E_SET_DELTAQ_MODE
871
Yaowu Xuf883b422016-08-30 14:01:10 -0700872AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PERIODIC_BOOST, unsigned int)
873#define AOM_CTRL_AV1E_SET_FRAME_PERIODIC_BOOST
Marco Paniconi0eb88c92014-04-03 15:49:03 -0700874
Yaowu Xuf883b422016-08-30 14:01:10 -0700875AOM_CTRL_USE_TYPE(AV1E_SET_NOISE_SENSITIVITY, unsigned int)
876#define AOM_CTRL_AV1E_SET_NOISE_SENSITIVITY
JackyChenbb1a2362014-09-12 11:48:44 -0700877
Yaowu Xuf883b422016-08-30 14:01:10 -0700878AOM_CTRL_USE_TYPE(AV1E_SET_TUNE_CONTENT, int) /* aom_tune_content */
879#define AOM_CTRL_AV1E_SET_TUNE_CONTENT
Yaowu Xue94b4152015-01-13 10:07:20 -0800880
Andrey Norkin9e694632017-12-21 18:50:57 -0800881AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_PRIMARIES, int)
882#define AOM_CTRL_AV1E_SET_COLOR_PRIMARIES
883
884AOM_CTRL_USE_TYPE(AV1E_SET_TRANSFER_CHARACTERISTICS, int)
885#define AOM_CTRL_AV1E_SET_TRANSFER_CHARACTERISTICS
886
887AOM_CTRL_USE_TYPE(AV1E_SET_MATRIX_COEFFICIENTS, int)
888#define AOM_CTRL_AV1E_SET_MATRIX_COEFFICIENTS
889
Yaowu Xuf883b422016-08-30 14:01:10 -0700890AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_SPACE, int)
891#define AOM_CTRL_AV1E_SET_COLOR_SPACE
Alex Converse4dcb8392015-03-20 14:55:43 -0700892
anorkin76fb1262017-03-22 15:12:12 -0700893AOM_CTRL_USE_TYPE(AV1E_SET_TRANSFER_FUNCTION, int)
894#define AOM_CTRL_AV1E_SET_TRANSFER_FUNCTION
895
896AOM_CTRL_USE_TYPE(AV1E_SET_CHROMA_SAMPLE_POSITION, int)
897#define AOM_CTRL_AV1E_SET_CHROMA_SAMPLE_POSITION
anorkin76fb1262017-03-22 15:12:12 -0700898
Yaowu Xuf883b422016-08-30 14:01:10 -0700899AOM_CTRL_USE_TYPE(AV1E_SET_MIN_GF_INTERVAL, unsigned int)
900#define AOM_CTRL_AV1E_SET_MIN_GF_INTERVAL
Debargha Mukherjee98526432015-04-01 16:39:06 -0700901
Yaowu Xuf883b422016-08-30 14:01:10 -0700902AOM_CTRL_USE_TYPE(AV1E_SET_MAX_GF_INTERVAL, unsigned int)
903#define AOM_CTRL_AV1E_SET_MAX_GF_INTERVAL
Debargha Mukherjee98526432015-04-01 16:39:06 -0700904
Yaowu Xuf883b422016-08-30 14:01:10 -0700905AOM_CTRL_USE_TYPE(AV1E_GET_ACTIVEMAP, aom_active_map_t *)
906#define AOM_CTRL_AV1E_GET_ACTIVEMAP
Ronald S. Bultjeeeb5ef02015-09-15 21:56:51 -0400907
Yaowu Xuf883b422016-08-30 14:01:10 -0700908AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_RANGE, int)
909#define AOM_CTRL_AV1E_SET_COLOR_RANGE
Yaowu Xu7c514e22015-09-28 15:55:46 -0700910
Yaowu Xu7c514e22015-09-28 15:55:46 -0700911/*!\brief
912 *
913 * TODO(rbultje) : add support of the control in ffmpeg
914 */
Yaowu Xuf883b422016-08-30 14:01:10 -0700915#define AOM_CTRL_AV1E_SET_RENDER_SIZE
916AOM_CTRL_USE_TYPE(AV1E_SET_RENDER_SIZE, int *)
Geza Lore454989f2016-03-24 13:56:05 +0000917
Yaowu Xuf883b422016-08-30 14:01:10 -0700918AOM_CTRL_USE_TYPE(AV1E_SET_SUPERBLOCK_SIZE, unsigned int)
919#define AOM_CTRL_AV1E_SET_SUPERBLOCK_SIZE
James Zern7dd7a7d2015-10-09 16:31:17 -0700920
Yaowu Xuf883b422016-08-30 14:01:10 -0700921AOM_CTRL_USE_TYPE(AV1E_SET_TARGET_LEVEL, unsigned int)
922#define AOM_CTRL_AV1E_SET_TARGET_LEVEL
hui sube3f0692016-05-05 15:37:37 -0700923
Yaowu Xuf883b422016-08-30 14:01:10 -0700924AOM_CTRL_USE_TYPE(AV1E_GET_LEVEL, int *)
925#define AOM_CTRL_AV1E_GET_LEVEL
Alex Converseeb780e72016-12-13 12:46:41 -0800926
927AOM_CTRL_USE_TYPE(AV1E_SET_ANS_WINDOW_SIZE_LOG2, unsigned int)
928#define AOM_CTRL_AV1E_SET_ANS_WINDOW_SIZE_LOG2
Yunqing Wangd8cd55f2017-02-27 12:16:00 -0800929
Yunqing Wangeeb08a92017-07-07 21:25:18 -0700930AOM_CTRL_USE_TYPE(AV1E_SET_SINGLE_TILE_DECODING, unsigned int)
931#define AOM_CTRL_AV1E_SET_SINGLE_TILE_DECODING
Yunqing Wangff4fa062017-04-21 10:56:08 -0700932
933AOM_CTRL_USE_TYPE(AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST, unsigned int)
934#define AOM_CTRL_AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST
935
James Zern7dd7a7d2015-10-09 16:31:17 -0700936/*!\endcond */
Alex Conversec77b2ff2016-12-12 17:29:32 -0800937/*! @} - end defgroup aom_encoder */
Dmitry Kovaleve288c602013-09-29 18:00:15 -0700938#ifdef __cplusplus
939} // extern "C"
940#endif
941
Yaowu Xuf883b422016-08-30 14:01:10 -0700942#endif // AOM_AOMCX_H_