John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 1 | /* |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 3 | * |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 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. |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 10 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 11 | #ifndef AOM_AOMCX_H_ |
| 12 | #define AOM_AOMCX_H_ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 13 | |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 14 | /*!\defgroup aom_encoder AOMedia AOM/AV1 Encoder |
| 15 | * \ingroup aom |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 16 | * |
| 17 | * @{ |
| 18 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 19 | #include "./aom.h" |
| 20 | #include "./aom_encoder.h" |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 21 | |
James Zern | f42d52e | 2011-02-16 17:54:49 -0800 | [diff] [blame] | 22 | /*!\file |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 23 | * \brief Provides definitions for using AOM or AV1 encoder algorithm within the |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 24 | * aom Codec Interface. |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 25 | */ |
Dmitry Kovalev | e288c60 | 2013-09-29 18:00:15 -0700 | [diff] [blame] | 26 | |
| 27 | #ifdef __cplusplus |
| 28 | extern "C" { |
| 29 | #endif |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 30 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 31 | /*!\name Algorithm interface for AV1 |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 32 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 33 | * This interface provides the capability to encode raw AV1 streams. |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 34 | * @{ |
| 35 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 36 | extern aom_codec_iface_t aom_codec_av1_cx_algo; |
| 37 | extern aom_codec_iface_t *aom_codec_av1_cx(void); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 38 | /*!@} - end algorithm interface member group*/ |
John Koleszar | 0952acb | 2010-06-01 11:14:25 -0400 | [diff] [blame] | 39 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 40 | /* |
| 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 Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 50 | #define AOM_EFLAG_NO_REF_LAST (1 << 16) |
Yunqing Wang | 9a50fec | 2017-11-02 17:02:00 -0700 | [diff] [blame] | 51 | /*!\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 Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 65 | /*!\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 Wang | 9a50fec | 2017-11-02 17:02:00 -0700 | [diff] [blame] | 71 | #define AOM_EFLAG_NO_REF_GF (1 << 19) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 72 | |
| 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 Wang | 9a50fec | 2017-11-02 17:02:00 -0700 | [diff] [blame] | 79 | #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 Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 94 | |
| 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 Wang | 9a50fec | 2017-11-02 17:02:00 -0700 | [diff] [blame] | 100 | #define AOM_EFLAG_NO_UPD_LAST (1 << 23) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 101 | |
| 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 Wang | 9a50fec | 2017-11-02 17:02:00 -0700 | [diff] [blame] | 107 | #define AOM_EFLAG_NO_UPD_GF (1 << 24) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 108 | |
| 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 Wang | 9a50fec | 2017-11-02 17:02:00 -0700 | [diff] [blame] | 114 | #define AOM_EFLAG_NO_UPD_ARF (1 << 25) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 115 | /*!\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 Wang | 9a50fec | 2017-11-02 17:02:00 -0700 | [diff] [blame] | 120 | #define AOM_EFLAG_NO_UPD_ENTROPY (1 << 26) |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 121 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 122 | /*!\brief AVx encoder control functions |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 123 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 124 | * This set of macros define the control functions available for AVx |
James Zern | 8e17e82 | 2011-02-24 14:12:57 -0800 | [diff] [blame] | 125 | * encoder interface. |
| 126 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 127 | * \sa #aom_codec_control |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 128 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 129 | enum aome_enc_control_id { |
Yunqing Wang | bdcc140 | 2016-03-25 09:05:25 -0700 | [diff] [blame] | 130 | /*!\brief Codec control function to set which reference frame encoder can use. |
Yunqing Wang | bdcc140 | 2016-03-25 09:05:25 -0700 | [diff] [blame] | 131 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 132 | AOME_USE_REFERENCE = 7, |
Yunqing Wang | bdcc140 | 2016-03-25 09:05:25 -0700 | [diff] [blame] | 133 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 134 | /*!\brief Codec control function to pass an ROI map to encoder. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 135 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 136 | AOME_SET_ROI_MAP = 8, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 137 | |
| 138 | /*!\brief Codec control function to pass an Active map to encoder. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 139 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 140 | AOME_SET_ACTIVEMAP, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 141 | |
| 142 | /*!\brief Codec control function to set encoder scaling mode. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 143 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 144 | AOME_SET_SCALEMODE = 11, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 145 | |
Soo-Chul Han | f858986 | 2018-01-24 03:13:14 +0000 | [diff] [blame] | 146 | /*!\brief Codec control function to set encoder enhancement layer id. |
Johann | 3c30fb4 | 2018-02-08 14:33:20 -0800 | [diff] [blame] | 147 | */ |
Soo-Chul Han | f858986 | 2018-01-24 03:13:14 +0000 | [diff] [blame] | 148 | AOME_SET_ENHANCEMENT_LAYER_ID = 12, |
| 149 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 150 | /*!\brief Codec control function to set encoder internal speed settings. |
John Koleszar | c6b9039 | 2012-07-13 15:21:29 -0700 | [diff] [blame] | 151 | * |
| 152 | * Changes in this value influences, among others, the encoder's selection |
| 153 | * of motion estimation methods. Values greater than 0 will increase encoder |
| 154 | * speed at the expense of quality. |
John Koleszar | c6b9039 | 2012-07-13 15:21:29 -0700 | [diff] [blame] | 155 | * |
Alex Converse | 561d0af | 2017-03-23 12:58:04 -0700 | [diff] [blame] | 156 | * \note Valid range: 0..8 |
John Koleszar | c6b9039 | 2012-07-13 15:21:29 -0700 | [diff] [blame] | 157 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 158 | AOME_SET_CPUUSED = 13, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 159 | |
Jingning Han | b49c6ae | 2017-11-27 18:14:05 -0800 | [diff] [blame] | 160 | /*!\brief Speed features for codec development |
| 161 | */ |
| 162 | AOME_SET_DEVSF, |
| 163 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 164 | /*!\brief Codec control function to enable automatic set and use alf frames. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 165 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 166 | AOME_SET_ENABLEAUTOALTREF, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 167 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 168 | /*!\brief Codec control function to set sharpness. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 169 | */ |
Alex Converse | 0f4bcda | 2016-12-12 15:43:35 -0800 | [diff] [blame] | 170 | AOME_SET_SHARPNESS = AOME_SET_ENABLEAUTOALTREF + 2, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 171 | |
| 172 | /*!\brief Codec control function to set the threshold for MBs treated static. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 173 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 174 | AOME_SET_STATIC_THRESHOLD, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 175 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 176 | /*!\brief Codec control function to get last quantizer chosen by the encoder. |
| 177 | * |
| 178 | * Return value uses internal quantizer scale defined by the codec. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 179 | */ |
Alex Converse | 0f4bcda | 2016-12-12 15:43:35 -0800 | [diff] [blame] | 180 | AOME_GET_LAST_QUANTIZER = AOME_SET_STATIC_THRESHOLD + 2, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 181 | |
| 182 | /*!\brief Codec control function to get last quantizer chosen by the encoder. |
| 183 | * |
| 184 | * Return value uses the 0..63 scale as used by the rc_*_quantizer config |
| 185 | * parameters. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 186 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 187 | AOME_GET_LAST_QUANTIZER_64, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 188 | |
| 189 | /*!\brief Codec control function to set the max no of frames to create arf. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 190 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 191 | AOME_SET_ARNR_MAXFRAMES, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 192 | |
| 193 | /*!\brief Codec control function to set the filter strength for the arf. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 194 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 195 | AOME_SET_ARNR_STRENGTH, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 196 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 197 | /*!\brief Codec control function to set visual tuning. |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 198 | */ |
Alex Converse | fab6224 | 2016-12-13 10:09:15 -0800 | [diff] [blame] | 199 | AOME_SET_TUNING = AOME_SET_ARNR_STRENGTH + 2, |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 200 | |
| 201 | /*!\brief Codec control function to set constrained quality level. |
John Koleszar | c6b9039 | 2012-07-13 15:21:29 -0700 | [diff] [blame] | 202 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 203 | * \attention For this value to be used aom_codec_enc_cfg_t::g_usage must be |
| 204 | * set to #AOM_CQ. |
John Koleszar | c6b9039 | 2012-07-13 15:21:29 -0700 | [diff] [blame] | 205 | * \note Valid range: 0..63 |
| 206 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 207 | AOME_SET_CQ_LEVEL, |
John Koleszar | 1654ae9 | 2011-07-28 09:17:32 -0400 | [diff] [blame] | 208 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 209 | /*!\brief Codec control function to set Max data rate for Intra frames. |
John Koleszar | c6b9039 | 2012-07-13 15:21:29 -0700 | [diff] [blame] | 210 | * |
| 211 | * This value controls additional clamping on the maximum size of a |
| 212 | * keyframe. It is expressed as a percentage of the average |
| 213 | * per-frame bitrate, with the special (and default) value 0 meaning |
| 214 | * unlimited, or no additional clamping beyond the codec's built-in |
| 215 | * algorithm. |
| 216 | * |
| 217 | * For example, to allocate no more than 4.5 frames worth of bitrate |
| 218 | * to a keyframe, set this to 450. |
John Koleszar | c6b9039 | 2012-07-13 15:21:29 -0700 | [diff] [blame] | 219 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 220 | AOME_SET_MAX_INTRA_BITRATE_PCT, |
John Koleszar | 83b1d90 | 2012-11-05 12:37:14 -0800 | [diff] [blame] | 221 | |
Soo-Chul Han | f858986 | 2018-01-24 03:13:14 +0000 | [diff] [blame] | 222 | /*!\brief Codec control function to set number of spatial layers. |
Johann | 3c30fb4 | 2018-02-08 14:33:20 -0800 | [diff] [blame] | 223 | */ |
Soo-Chul Han | f858986 | 2018-01-24 03:13:14 +0000 | [diff] [blame] | 224 | AOME_SET_NUMBER_SPATIAL_LAYERS, |
| 225 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 226 | /*!\brief Codec control function to set max data rate for Inter frames. |
Yaowu Xu | 636099f | 2014-10-24 09:31:16 -0700 | [diff] [blame] | 227 | * |
| 228 | * This value controls additional clamping on the maximum size of an |
| 229 | * inter frame. It is expressed as a percentage of the average |
| 230 | * per-frame bitrate, with the special (and default) value 0 meaning |
| 231 | * unlimited, or no additional clamping beyond the codec's built-in |
| 232 | * algorithm. |
| 233 | * |
| 234 | * For example, to allow no more than 4.5 frames worth of bitrate |
| 235 | * to an inter frame, set this to 450. |
Yaowu Xu | 636099f | 2014-10-24 09:31:16 -0700 | [diff] [blame] | 236 | */ |
Alex Converse | 0f4bcda | 2016-12-12 15:43:35 -0800 | [diff] [blame] | 237 | AV1E_SET_MAX_INTER_BITRATE_PCT = AOME_SET_MAX_INTRA_BITRATE_PCT + 2, |
Yaowu Xu | 636099f | 2014-10-24 09:31:16 -0700 | [diff] [blame] | 238 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 239 | /*!\brief Boost percentage for Golden Frame in CBR mode. |
Yaowu Xu | 03a60b7 | 2014-10-27 13:13:14 -0700 | [diff] [blame] | 240 | * |
| 241 | * This value controls the amount of boost given to Golden Frame in |
| 242 | * CBR mode. It is expressed as a percentage of the average |
| 243 | * per-frame bitrate, with the special (and default) value 0 meaning |
| 244 | * the feature is off, i.e., no golden frame boost in CBR mode and |
| 245 | * average bitrate target is used. |
| 246 | * |
| 247 | * For example, to allow 100% more bits, i.e, 2X, in a golden frame |
| 248 | * than average frame, set this to 100. |
Yaowu Xu | 03a60b7 | 2014-10-27 13:13:14 -0700 | [diff] [blame] | 249 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 250 | AV1E_SET_GF_CBR_BOOST_PCT, |
John Koleszar | 83b1d90 | 2012-11-05 12:37:14 -0800 | [diff] [blame] | 251 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 252 | /*!\brief Codec control function to set lossless encoding mode. |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 253 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 254 | * AV1 can operate in lossless encoding mode, in which the bitstream |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 255 | * produced will be able to decode and reconstruct a perfect copy of |
| 256 | * input source. This control function provides a mean to switch encoder |
| 257 | * into lossless coding mode(1) or normal coding mode(0) that may be lossy. |
| 258 | * 0 = lossy coding mode |
| 259 | * 1 = lossless coding mode |
| 260 | * |
| 261 | * By default, encoder operates in normal coding mode (maybe lossy). |
| 262 | */ |
Alex Converse | 0f4bcda | 2016-12-12 15:43:35 -0800 | [diff] [blame] | 263 | AV1E_SET_LOSSLESS = AV1E_SET_GF_CBR_BOOST_PCT + 2, |
Thomas Davies | af6df17 | 2016-11-09 14:04:18 +0000 | [diff] [blame] | 264 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 265 | /*!\brief Codec control function to set number of tile columns. |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 266 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 267 | * In encoding and decoding, AV1 allows an input image frame be partitioned |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 268 | * into separated vertical tile columns, which can be encoded or decoded |
| 269 | * independently. This enables easy implementation of parallel encoding and |
| 270 | * decoding. This control requests the encoder to use column tiles in |
| 271 | * encoding an input frame, with number of tile columns (in Log2 unit) as |
| 272 | * the parameter: |
| 273 | * 0 = 1 tile column |
| 274 | * 1 = 2 tile columns |
| 275 | * 2 = 4 tile columns |
| 276 | * ..... |
| 277 | * n = 2**n tile columns |
| 278 | * The requested tile columns will be capped by encoder based on image size |
| 279 | * limitation (The minimum width of a tile column is 256 pixel, the maximum |
| 280 | * is 4096). |
| 281 | * |
| 282 | * By default, the value is 0, i.e. one single column tile for entire image. |
| 283 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 284 | AV1E_SET_TILE_COLUMNS, |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 285 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 286 | /*!\brief Codec control function to set number of tile rows. |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 287 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 288 | * In encoding and decoding, AV1 allows an input image frame be partitioned |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 289 | * into separated horizontal tile rows. Tile rows are encoded or decoded |
| 290 | * sequentially. Even though encoding/decoding of later tile rows depends on |
| 291 | * earlier ones, this allows the encoder to output data packets for tile rows |
| 292 | * prior to completely processing all tile rows in a frame, thereby reducing |
| 293 | * the latency in processing between input and output. The parameter |
| 294 | * for this control describes the number of tile rows, which has a valid |
| 295 | * range [0, 2]: |
| 296 | * 0 = 1 tile row |
| 297 | * 1 = 2 tile rows |
| 298 | * 2 = 4 tile rows |
| 299 | * |
| 300 | * By default, the value is 0, i.e. one single row tile for entire image. |
| 301 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 302 | AV1E_SET_TILE_ROWS, |
Ryan Lei | 7386eda | 2016-12-08 21:08:31 -0800 | [diff] [blame] | 303 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 304 | /*!\brief Codec control function to enable frame parallel decoding feature. |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 305 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 306 | * AV1 has a bitstream feature to reduce decoding dependency between frames |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 307 | * by turning off backward update of probability context used in encoding |
| 308 | * and decoding. This allows staged parallel processing of more than one |
| 309 | * video frames in the decoder. This control function provides a mean to |
| 310 | * turn this feature on or off for bitstreams produced by encoder. |
| 311 | * |
| 312 | * By default, this feature is off. |
| 313 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 314 | AV1E_SET_FRAME_PARALLEL_DECODING, |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 315 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 316 | /*!\brief Codec control function to set adaptive quantization mode. |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 317 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 318 | * AV1 has a segment based feature that allows encoder to adaptively change |
Yaowu Xu | 87c436f | 2015-01-13 12:39:42 -0800 | [diff] [blame] | 319 | * quantization parameter for each segment within a frame to improve the |
| 320 | * subjective quality. This control makes encoder operate in one of the |
| 321 | * several AQ_modes supported. |
| 322 | * |
| 323 | * By default, encoder operates with AQ_Mode 0(adaptive quantization off). |
| 324 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 325 | AV1E_SET_AQ_MODE, |
Yaowu Xu | 4ab39e1 | 2015-01-14 09:07:02 -0800 | [diff] [blame] | 326 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 327 | /*!\brief Codec control function to enable/disable periodic Q boost. |
Yaowu Xu | 4ab39e1 | 2015-01-14 09:07:02 -0800 | [diff] [blame] | 328 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 329 | * One AV1 encoder speed feature is to enable quality boost by lowering |
Yaowu Xu | 4ab39e1 | 2015-01-14 09:07:02 -0800 | [diff] [blame] | 330 | * frame level Q periodically. This control function provides a mean to |
| 331 | * turn on/off this feature. |
| 332 | * 0 = off |
| 333 | * 1 = on |
| 334 | * |
| 335 | * By default, the encoder is allowed to use this feature for appropriate |
| 336 | * encoding modes. |
| 337 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 338 | AV1E_SET_FRAME_PERIODIC_BOOST, |
Yaowu Xu | 4ab39e1 | 2015-01-14 09:07:02 -0800 | [diff] [blame] | 339 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 340 | /*!\brief Codec control function to set noise sensitivity. |
JackyChen | bb1a236 | 2014-09-12 11:48:44 -0700 | [diff] [blame] | 341 | * |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 342 | * 0: off, 1: On(YOnly) |
JackyChen | bb1a236 | 2014-09-12 11:48:44 -0700 | [diff] [blame] | 343 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 344 | AV1E_SET_NOISE_SENSITIVITY, |
Ivan Maltz | 01b35c3 | 2013-09-05 08:55:47 -0700 | [diff] [blame] | 345 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 346 | /*!\brief Codec control function to set content type. |
Yaowu Xu | dc08b20 | 2015-01-14 11:17:09 -0800 | [diff] [blame] | 347 | * \note Valid parameter range: |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 348 | * AOM_CONTENT_DEFAULT = Regular video content (Default) |
| 349 | * AOM_CONTENT_SCREEN = Screen capture content |
Yaowu Xu | dc08b20 | 2015-01-14 11:17:09 -0800 | [diff] [blame] | 350 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 351 | AV1E_SET_TUNE_CONTENT, |
Yaowu Xu | 193ca4b | 2015-01-14 11:48:29 -0800 | [diff] [blame] | 352 | |
Hui Su | 1cb1c00 | 2018-02-05 18:21:20 -0800 | [diff] [blame] | 353 | /*!\brief Codec control function to set CDF update mode. |
| 354 | * |
| 355 | * 0: no update 1: update all the time |
| 356 | * 2: update half of the time 3: update quarter of the time |
| 357 | */ |
| 358 | AV1E_SET_CDF_UPDATE_MODE, |
| 359 | |
Andrey Norkin | 9e69463 | 2017-12-21 18:50:57 -0800 | [diff] [blame] | 360 | /*!\brief Codec control function to set color space info. |
| 361 | * \note Valid ranges: 0..23, default is "Unspecified". |
| 362 | * 0 = For future use |
| 363 | * 1 = BT.709 |
| 364 | * 2 = Unspecified |
| 365 | * 3 = For future use |
| 366 | * 4 = BT.470 System M (historical) |
| 367 | * 5 = BT.470 System B, G (historical) |
| 368 | * 6 = BT.601 |
| 369 | * 7 = SMPTE 240 |
| 370 | * 8 = Generic film (color filters using illuminant C) |
| 371 | * 9 = BT.2020, BT.2100 |
| 372 | * 10 = SMPTE 428 (CIE 1921 XYZ) |
| 373 | * 11 = SMPTE RP 431-2 |
| 374 | * 12 = SMPTE EG 432-1 |
| 375 | * 13 = For future use (values 13 - 21) |
| 376 | * 22 = EBU Tech. 3213-E |
| 377 | * 23 = For future use |
Edward Hervey | 24e4783 | 2018-01-11 12:17:12 +0100 | [diff] [blame] | 378 | * |
| 379 | * Experiment: CICP |
Andrey Norkin | 9e69463 | 2017-12-21 18:50:57 -0800 | [diff] [blame] | 380 | */ |
| 381 | AV1E_SET_COLOR_PRIMARIES, |
| 382 | |
| 383 | /*!\brief Codec control function to set transfer function info. |
| 384 | * \note Valid ranges: 0..19, default is "Unspecified". |
| 385 | * 0 = For future use |
| 386 | * 1 = BT.709 |
| 387 | * 2 = Unspecified |
| 388 | * 3 = For future use |
| 389 | * 4 = BT.470 System M (historical) |
| 390 | * 5 = BT.470 System B, G (historical) |
| 391 | * 6 = BT.601 |
| 392 | * 7 = SMPTE 240 M |
| 393 | * 8 = Linear |
| 394 | * 9 = Logarithmic (100 : 1 range) |
| 395 | * 10 = Logarithmic (100 * Sqrt(10) : 1 range) |
| 396 | * 11 = IEC 61966-2-4 |
| 397 | * 12 = BT.1361 |
| 398 | * 13 = sRGB or sYCC |
| 399 | * 14 = BT.2020 10-bit systems |
| 400 | * 15 = BT.2020 12-bit systems |
| 401 | * 16 = SMPTE ST 2084, ITU BT.2100 PQ |
| 402 | * 17 = SMPTE ST 428 |
| 403 | * 18 = BT.2100 HLG, ARIB STD-B67 |
| 404 | * 19 = For future use |
Edward Hervey | 24e4783 | 2018-01-11 12:17:12 +0100 | [diff] [blame] | 405 | * |
| 406 | * Experiment: CICP |
Andrey Norkin | 9e69463 | 2017-12-21 18:50:57 -0800 | [diff] [blame] | 407 | */ |
| 408 | AV1E_SET_TRANSFER_CHARACTERISTICS, |
| 409 | |
| 410 | /*!\brief Codec control function to set transfer function info. |
| 411 | * \note Valid ranges: 0..15, default is "Unspecified". |
| 412 | * 0 = Identity matrix |
| 413 | * 1 = BT.709 |
| 414 | * 2 = Unspecified |
| 415 | * 3 = For future use |
| 416 | * 4 = US FCC 73.628 |
| 417 | * 5 = BT.470 System B, G (historical) |
| 418 | * 6 = BT.601 |
| 419 | * 7 = SMPTE 240 M |
| 420 | * 8 = YCgCo |
| 421 | * 9 = BT.2020 non-constant luminance, BT.2100 YCbCr |
| 422 | * 10 = BT.2020 constant luminance |
| 423 | * 11 = SMPTE ST 2085 YDzDx |
| 424 | * 12 = Chromaticity-derived non-constant luminance |
| 425 | * 13 = Chromaticity-derived constant luminance |
| 426 | * 14 = BT.2100 ICtCp |
| 427 | * 15 = For future use |
Edward Hervey | 24e4783 | 2018-01-11 12:17:12 +0100 | [diff] [blame] | 428 | * |
| 429 | * Experiment: CICP |
Andrey Norkin | 9e69463 | 2017-12-21 18:50:57 -0800 | [diff] [blame] | 430 | */ |
| 431 | AV1E_SET_MATRIX_COEFFICIENTS, |
Edward Hervey | 24e4783 | 2018-01-11 12:17:12 +0100 | [diff] [blame] | 432 | |
Yaowu Xu | 268f106 | 2015-03-13 09:42:57 -0700 | [diff] [blame] | 433 | /*!\brief Codec control function to set color space info. |
anorkin | 76fb126 | 2017-03-22 15:12:12 -0700 | [diff] [blame] | 434 | * \note Valid ranges: 0..9, default is "UNKNOWN". |
Yaowu Xu | e94b415 | 2015-01-13 10:07:20 -0800 | [diff] [blame] | 435 | * 0 = UNKNOWN, |
| 436 | * 1 = BT_601 |
| 437 | * 2 = BT_709 |
| 438 | * 3 = SMPTE_170 |
| 439 | * 4 = SMPTE_240 |
anorkin | 76fb126 | 2017-03-22 15:12:12 -0700 | [diff] [blame] | 440 | * 5 = BT_2020_NCL |
| 441 | * 6 = BT_2020_CL |
Yaowu Xu | e94b415 | 2015-01-13 10:07:20 -0800 | [diff] [blame] | 442 | * 7 = SRGB |
anorkin | 76fb126 | 2017-03-22 15:12:12 -0700 | [diff] [blame] | 443 | * 8 = ICtCp |
| 444 | * 9 = RESERVED |
Yaowu Xu | e94b415 | 2015-01-13 10:07:20 -0800 | [diff] [blame] | 445 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 446 | AV1E_SET_COLOR_SPACE, |
Alex Converse | 4dcb839 | 2015-03-20 14:55:43 -0700 | [diff] [blame] | 447 | |
anorkin | 76fb126 | 2017-03-22 15:12:12 -0700 | [diff] [blame] | 448 | /*!\brief Codec control function to set transfer function info. |
| 449 | * \note Valid ranges: 0..4, default is "UNKNOWN". |
| 450 | * 0 = UNKNOWN, |
| 451 | * 1 = BT_709 |
| 452 | * 2 = PQ |
| 453 | * 3 = HLG |
| 454 | * 4 = RESERVED |
| 455 | */ |
| 456 | AV1E_SET_TRANSFER_FUNCTION, |
| 457 | |
| 458 | /*!\brief Codec control function to set chroma 4:2:0 sample position info. |
| 459 | * \note Valid ranges: 0..3, default is "UNKNOWN". |
| 460 | * 0 = UNKNOWN, |
| 461 | * 1 = VERTICAL |
| 462 | * 2 = COLOCATED |
| 463 | * 3 = RESERVED |
| 464 | */ |
| 465 | AV1E_SET_CHROMA_SAMPLE_POSITION, |
anorkin | 76fb126 | 2017-03-22 15:12:12 -0700 | [diff] [blame] | 466 | |
Debargha Mukherjee | 9852643 | 2015-04-01 16:39:06 -0700 | [diff] [blame] | 467 | /*!\brief Codec control function to set minimum interval between GF/ARF frames |
| 468 | * |
| 469 | * By default the value is set as 4. |
Debargha Mukherjee | 9852643 | 2015-04-01 16:39:06 -0700 | [diff] [blame] | 470 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 471 | AV1E_SET_MIN_GF_INTERVAL, |
Debargha Mukherjee | 9852643 | 2015-04-01 16:39:06 -0700 | [diff] [blame] | 472 | |
| 473 | /*!\brief Codec control function to set minimum interval between GF/ARF frames |
| 474 | * |
| 475 | * By default the value is set as 16. |
Debargha Mukherjee | 9852643 | 2015-04-01 16:39:06 -0700 | [diff] [blame] | 476 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 477 | AV1E_SET_MAX_GF_INTERVAL, |
Debargha Mukherjee | 9852643 | 2015-04-01 16:39:06 -0700 | [diff] [blame] | 478 | |
Alex Converse | 4dcb839 | 2015-03-20 14:55:43 -0700 | [diff] [blame] | 479 | /*!\brief Codec control function to get an Active map back from the encoder. |
Alex Converse | 4dcb839 | 2015-03-20 14:55:43 -0700 | [diff] [blame] | 480 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 481 | AV1E_GET_ACTIVEMAP, |
Ronald S. Bultje | eeb5ef0 | 2015-09-15 21:56:51 -0400 | [diff] [blame] | 482 | |
| 483 | /*!\brief Codec control function to set color range bit. |
| 484 | * \note Valid ranges: 0..1, default is 0 |
| 485 | * 0 = Limited range (16..235 or HBD equivalent) |
| 486 | * 1 = Full range (0..255 or HBD equivalent) |
Ronald S. Bultje | eeb5ef0 | 2015-09-15 21:56:51 -0400 | [diff] [blame] | 487 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 488 | AV1E_SET_COLOR_RANGE, |
Yaowu Xu | 7c514e2 | 2015-09-28 15:55:46 -0700 | [diff] [blame] | 489 | |
Yaowu Xu | 7c514e2 | 2015-09-28 15:55:46 -0700 | [diff] [blame] | 490 | /*!\brief Codec control function to set intended rendering image size. |
| 491 | * |
| 492 | * By default, this is identical to the image size in pixels. |
Yaowu Xu | 7c514e2 | 2015-09-28 15:55:46 -0700 | [diff] [blame] | 493 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 494 | AV1E_SET_RENDER_SIZE, |
Geza Lore | 454989f | 2016-03-24 13:56:05 +0000 | [diff] [blame] | 495 | |
hui su | be3f069 | 2016-05-05 15:37:37 -0700 | [diff] [blame] | 496 | /*!\brief Codec control function to set target level. |
| 497 | * |
| 498 | * 255: off (default); 0: only keep level stats; 10: target for level 1.0; |
| 499 | * 11: target for level 1.1; ... 62: target for level 6.2 |
hui su | be3f069 | 2016-05-05 15:37:37 -0700 | [diff] [blame] | 500 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 501 | AV1E_SET_TARGET_LEVEL, |
hui su | 72d4890 | 2016-05-05 12:04:42 -0700 | [diff] [blame] | 502 | |
| 503 | /*!\brief Codec control function to get bitstream level. |
hui su | 72d4890 | 2016-05-05 12:04:42 -0700 | [diff] [blame] | 504 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 505 | AV1E_GET_LEVEL, |
Yaowu Xu | 6fe07a2 | 2016-07-14 10:57:35 -0700 | [diff] [blame] | 506 | |
Geza Lore | 454989f | 2016-03-24 13:56:05 +0000 | [diff] [blame] | 507 | /*!\brief Codec control function to set intended superblock size. |
| 508 | * |
| 509 | * By default, the superblock size is determined separately for each |
| 510 | * frame by the encoder. |
Alex Converse | 85370ae | 2016-12-13 11:18:28 -0800 | [diff] [blame] | 511 | * |
| 512 | * Experiment: EXT_PARTITION |
Geza Lore | 454989f | 2016-03-24 13:56:05 +0000 | [diff] [blame] | 513 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 514 | AV1E_SET_SUPERBLOCK_SIZE, |
Alex Converse | 85370ae | 2016-12-13 11:18:28 -0800 | [diff] [blame] | 515 | |
| 516 | /*!\brief Codec control function to enable automatic set and use |
| 517 | * bwd-pred frames. |
| 518 | * |
Alex Converse | 85370ae | 2016-12-13 11:18:28 -0800 | [diff] [blame] | 519 | */ |
| 520 | AOME_SET_ENABLEAUTOBWDREF, |
| 521 | |
Steinar Midtskogen | e44c622 | 2017-11-09 13:22:09 +0100 | [diff] [blame] | 522 | /*!\brief Codec control function to encode with CDEF. |
| 523 | * |
| 524 | * CDEF is the constrained directional enhancement filter which is an |
| 525 | * in-loop filter aiming to remove coding artifacts |
| 526 | * 0 = do not apply CDEF |
| 527 | * 1 = apply CDEF |
| 528 | * |
| 529 | * By default, the encoder applies CDEF. |
| 530 | * |
| 531 | * Experiment: AOM_CDEF |
| 532 | */ |
| 533 | AV1E_SET_ENABLE_CDEF, |
| 534 | |
Sebastien Alaiwan | 1ed2024 | 2018-02-20 14:47:18 +0100 | [diff] [blame] | 535 | /*!\brief Codec control function to encode with Loop Restoration Filter. |
| 536 | * |
| 537 | * 0 = do not apply Restoration Filter |
| 538 | * 1 = apply Restoration Filter |
| 539 | * |
| 540 | * By default, the encoder applies Restoration Filter. |
| 541 | * |
| 542 | */ |
| 543 | AV1E_SET_ENABLE_RESTORATION, |
| 544 | |
Alex Converse | 85370ae | 2016-12-13 11:18:28 -0800 | [diff] [blame] | 545 | /*!\brief Codec control function to encode with quantisation matrices. |
| 546 | * |
| 547 | * AOM can operate with default quantisation matrices dependent on |
| 548 | * quantisation level and block type. |
| 549 | * 0 = do not use quantisation matrices |
| 550 | * 1 = use quantisation matrices |
| 551 | * |
| 552 | * By default, the encoder operates without quantisation matrices. |
| 553 | * |
| 554 | * Experiment: AOM_QM |
| 555 | */ |
| 556 | AV1E_SET_ENABLE_QM, |
| 557 | |
| 558 | /*!\brief Codec control function to set the min quant matrix flatness. |
| 559 | * |
| 560 | * AOM can operate with different ranges of quantisation matrices. |
| 561 | * As quantisation levels increase, the matrices get flatter. This |
| 562 | * control sets the minimum level of flatness from which the matrices |
| 563 | * are determined. |
| 564 | * |
| 565 | * By default, the encoder sets this minimum at half the available |
| 566 | * range. |
| 567 | * |
| 568 | * Experiment: AOM_QM |
| 569 | */ |
| 570 | AV1E_SET_QM_MIN, |
| 571 | |
| 572 | /*!\brief Codec control function to set the max quant matrix flatness. |
| 573 | * |
| 574 | * AOM can operate with different ranges of quantisation matrices. |
| 575 | * As quantisation levels increase, the matrices get flatter. This |
| 576 | * control sets the maximum level of flatness possible. |
| 577 | * |
| 578 | * By default, the encoder sets this maximum at the top of the |
| 579 | * available range. |
| 580 | * |
| 581 | * Experiment: AOM_QM |
| 582 | */ |
| 583 | AV1E_SET_QM_MAX, |
| 584 | |
Yaowu Xu | f7a1242 | 2018-01-31 15:29:20 -0800 | [diff] [blame] | 585 | /*!\brief Codec control function to set the min quant matrix flatness. |
| 586 | * |
| 587 | * AOM can operate with different ranges of quantisation matrices. |
| 588 | * As quantisation levels increase, the matrices get flatter. This |
| 589 | * control sets the flatness for luma (Y). |
| 590 | * |
| 591 | * By default, the encoder sets this minimum at half the available |
| 592 | * range. |
| 593 | * |
| 594 | * Experiment: AOM_QM |
| 595 | */ |
| 596 | AV1E_SET_QM_Y, |
| 597 | |
| 598 | /*!\brief Codec control function to set the min quant matrix flatness. |
| 599 | * |
| 600 | * AOM can operate with different ranges of quantisation matrices. |
| 601 | * As quantisation levels increase, the matrices get flatter. This |
| 602 | * control sets the flatness for chroma (U). |
| 603 | * |
| 604 | * By default, the encoder sets this minimum at half the available |
| 605 | * range. |
| 606 | * |
| 607 | * Experiment: AOM_QM |
| 608 | */ |
| 609 | AV1E_SET_QM_U, |
| 610 | |
| 611 | /*!\brief Codec control function to set the min quant matrix flatness. |
| 612 | * |
| 613 | * AOM can operate with different ranges of quantisation matrices. |
| 614 | * As quantisation levels increase, the matrices get flatter. This |
| 615 | * control sets the flatness for chrome (V). |
| 616 | * |
| 617 | * By default, the encoder sets this minimum at half the available |
| 618 | * range. |
| 619 | * |
| 620 | * Experiment: AOM_QM |
| 621 | */ |
| 622 | AV1E_SET_QM_V, |
| 623 | |
Yushin Cho | d808bfc | 2017-08-10 15:54:36 -0700 | [diff] [blame] | 624 | /*!\brief Codec control function to encode with dist_8x8. |
| 625 | * |
| 626 | * The dist_8x8 is enabled automatically for model tuning parameters that |
| 627 | * require measuring distortion at the 8x8 level. This control also allows |
| 628 | * measuring distortion at the 8x8 level for other tuning options |
| 629 | * (e.g., PSNR), for testing purposes. |
| 630 | * 0 = do not use dist_8x8 |
| 631 | * 1 = use dist_8x8 |
| 632 | * |
| 633 | * By default, the encoder does not use dist_8x8 |
| 634 | * |
| 635 | * Experiment: DIST_8X8 |
| 636 | */ |
| 637 | AV1E_SET_ENABLE_DIST_8X8, |
| 638 | |
Alex Converse | 85370ae | 2016-12-13 11:18:28 -0800 | [diff] [blame] | 639 | /*!\brief Codec control function to set a maximum number of tile groups. |
| 640 | * |
| 641 | * This will set the maximum number of tile groups. This will be |
| 642 | * overridden if an MTU size is set. The default value is 1. |
| 643 | * |
| 644 | * Experiment: TILE_GROUPS |
| 645 | */ |
| 646 | AV1E_SET_NUM_TG, |
| 647 | |
| 648 | /*!\brief Codec control function to set an MTU size for a tile group. |
| 649 | * |
| 650 | * This will set the maximum number of bytes in a tile group. This can be |
| 651 | * exceeded only if a single tile is larger than this amount. |
| 652 | * |
| 653 | * By default, the value is 0, in which case a fixed number of tile groups |
| 654 | * is used. |
| 655 | * |
| 656 | * Experiment: TILE_GROUPS |
| 657 | */ |
| 658 | AV1E_SET_MTU, |
Alex Converse | eb780e7 | 2016-12-13 12:46:41 -0800 | [diff] [blame] | 659 | |
Fangwen Fu | 7b9f2b3 | 2017-01-17 14:01:52 -0800 | [diff] [blame] | 660 | /*!\brief Codec control function to set dependent_horz_tiles. |
Andrey Norkin | 9e69463 | 2017-12-21 18:50:57 -0800 | [diff] [blame] | 661 | * |
| 662 | * In encoding and decoding, AV1 allows enabling dependent horizontal tile |
| 663 | * The parameter for this control describes the value of this flag, |
| 664 | * which has a valid range [0, 1]: |
| 665 | * 0 = disable dependent horizontal tile |
| 666 | * 1 = enable dependent horizontal tile, |
| 667 | * |
| 668 | * By default, the value is 0, i.e. disable dependent horizontal tile. |
| 669 | */ |
Fangwen Fu | 7b9f2b3 | 2017-01-17 14:01:52 -0800 | [diff] [blame] | 670 | AV1E_SET_TILE_DEPENDENT_ROWS, |
| 671 | |
Alex Converse | eb780e7 | 2016-12-13 12:46:41 -0800 | [diff] [blame] | 672 | /*!\brief Codec control function to set the number of symbols in an ANS data |
| 673 | * window. |
| 674 | * |
| 675 | * The number of ANS symbols (both boolean and non-booleans alphabets) in an |
| 676 | * ANS data window is set to 1 << value. |
| 677 | * |
| 678 | * \note Valid range: [8, 23] |
| 679 | * |
| 680 | * Experiment: ANS |
| 681 | */ |
| 682 | AV1E_SET_ANS_WINDOW_SIZE_LOG2, |
Alex Converse | 00b7e27 | 2017-03-22 18:14:08 -0700 | [diff] [blame] | 683 | |
| 684 | /*!\brief Codec control function to set temporal mv prediction |
Andrey Norkin | 9e69463 | 2017-12-21 18:50:57 -0800 | [diff] [blame] | 685 | * enabling/disabling. |
| 686 | * |
| 687 | * This will enable or disable temporal mv predicton. The default value is 0. |
| 688 | * |
| 689 | * Experiment: TEMPMV_SIGNALING |
| 690 | */ |
Alex Converse | 00b7e27 | 2017-03-22 18:14:08 -0700 | [diff] [blame] | 691 | AV1E_SET_DISABLE_TEMPMV, |
| 692 | |
Jingning Han | a446f55 | 2018-02-22 15:42:12 -0800 | [diff] [blame] | 693 | /*!\brief Codec control function to turn on / off dual filter |
| 694 | * enabling/disabling. |
| 695 | * |
| 696 | * This will enable or disable dual filter. The default value is 1 |
| 697 | * |
| 698 | */ |
| 699 | AV1E_SET_ENABLE_DF, |
| 700 | |
Lei | 7bb501d | 2017-12-13 15:10:34 -0800 | [diff] [blame] | 701 | /*!\brief Codec control function to set loop_filter_across_tiles_v_enabled |
| 702 | * and loop_filter_across_tiles_h_enabled. |
| 703 | * In encoding and decoding, AV1 allows disabling loop filter across tile |
| 704 | * boundary The parameter for this control describes the value of this flag, |
| 705 | * which has a valid range [0, 1]: |
| 706 | * 0 = disable loop filter across tile boundary |
| 707 | * 1 = enable loop filter across tile boundary |
| 708 | * |
| 709 | * By default, the value is 1, i.e. enable loop filter across tile boundary. |
| 710 | * |
| 711 | * Experiment: LOOPFILTERING_ACROSS_TILES_EXT |
| 712 | */ |
| 713 | AV1E_SET_TILE_LOOPFILTER_V, |
| 714 | AV1E_SET_TILE_LOOPFILTER_H, |
| 715 | |
Alex Converse | 00b7e27 | 2017-03-22 18:14:08 -0700 | [diff] [blame] | 716 | /*!\brief Codec control function to set loop_filter_across_tiles_enabled. |
| 717 | * |
| 718 | * In encoding and decoding, AV1 allows disabling loop filter across tile |
| 719 | * boundary The parameter for this control describes the value of this flag, |
| 720 | * which has a valid range [0, 1]: |
| 721 | * 0 = disable loop filter across tile boundary |
| 722 | * 1 = enable loop filter across tile boundary |
| 723 | * |
| 724 | * By default, the value is 1, i.e. enable loop filter across tile boundary. |
| 725 | * |
| 726 | * Experiment: LOOPFILTERING_ACROSS_TILES |
| 727 | */ |
| 728 | AV1E_SET_TILE_LOOPFILTER, |
Yunqing Wang | d8cd55f | 2017-02-27 12:16:00 -0800 | [diff] [blame] | 729 | |
Fangwen Fu | 6160df2 | 2017-04-24 09:45:51 -0700 | [diff] [blame] | 730 | /*!\brief Codec control function to set the delta q mode |
Andrey Norkin | 9e69463 | 2017-12-21 18:50:57 -0800 | [diff] [blame] | 731 | * |
| 732 | * AV1 has a segment based feature that allows encoder to adaptively change |
| 733 | * quantization parameter for each segment within a frame to improve the |
| 734 | * subjective quality. the delta q mode is added on top of segment based |
| 735 | * feature, and allows control per 64x64 q and lf delta.This control makes |
| 736 | * encoder operate in one of the several DELTA_Q_modes supported. |
| 737 | * |
| 738 | * By default, encoder operates with DELTAQ_Mode 0(deltaq signaling off). |
| 739 | */ |
Fangwen Fu | 6160df2 | 2017-04-24 09:45:51 -0700 | [diff] [blame] | 740 | AV1E_SET_DELTAQ_MODE, |
| 741 | |
Yunqing Wang | eeb08a9 | 2017-07-07 21:25:18 -0700 | [diff] [blame] | 742 | /*!\brief Codec control function to set the single tile decoding mode to 0 or |
| 743 | * 1. |
Yunqing Wang | d8cd55f | 2017-02-27 12:16:00 -0800 | [diff] [blame] | 744 | * |
Yunqing Wang | eeb08a9 | 2017-07-07 21:25:18 -0700 | [diff] [blame] | 745 | * 0 means that the single tile decoding is off, and 1 means that the single |
| 746 | * tile decoding is on. |
Yunqing Wang | d8cd55f | 2017-02-27 12:16:00 -0800 | [diff] [blame] | 747 | * |
| 748 | * Experiment: EXT_TILE |
| 749 | */ |
Yunqing Wang | eeb08a9 | 2017-07-07 21:25:18 -0700 | [diff] [blame] | 750 | AV1E_SET_SINGLE_TILE_DECODING, |
Yunqing Wang | ff4fa06 | 2017-04-21 10:56:08 -0700 | [diff] [blame] | 751 | |
| 752 | /*!\brief Codec control function to enable the extreme motion vector unit test |
| 753 | * in AV1. Please note that this is only used in motion vector unit test. |
| 754 | * |
| 755 | * 0 : off, 1 : MAX_EXTREME_MV, 2 : MIN_EXTREME_MV |
| 756 | */ |
| 757 | AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST, |
Andrey Norkin | 28e9ce2 | 2018-01-08 10:11:21 -0800 | [diff] [blame] | 758 | |
| 759 | /*!\brief Codec control function to signal picture timing info in the |
| 760 | * bitstream. \note Valid ranges: 0..1, default is "UNKNOWN". 0 = UNKNOWN, 1 = |
| 761 | * EQUAL |
| 762 | */ |
| 763 | AV1E_SET_TIMING_INFO, |
Andrey Norkin | 6f1c2f7 | 2018-01-15 20:08:52 -0800 | [diff] [blame] | 764 | |
| 765 | /*!\brief Codec control function to add film grain parameters (one of several |
| 766 | * preset types) info in the bitstream. |
| 767 | * \note Valid ranges: 0..11, default is "0". 0 = UNKNOWN, |
| 768 | * 1..16 = different test vectors for grain |
| 769 | */ |
| 770 | AV1E_SET_FILM_GRAIN_TEST_VECTOR, |
John Koleszar | b0da9b3 | 2010-12-17 09:43:39 -0500 | [diff] [blame] | 771 | }; |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 772 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 773 | /*!\brief aom 1-D scaling mode |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 774 | * |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 775 | * This set of constants define 1-D aom scaling modes |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 776 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 777 | typedef enum aom_scaling_mode_1d { |
| 778 | AOME_NORMAL = 0, |
| 779 | AOME_FOURFIVE = 1, |
| 780 | AOME_THREEFIVE = 2, |
| 781 | AOME_ONETWO = 3 |
| 782 | } AOM_SCALING_MODE; |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 783 | |
Yaowu Xu | c5bf1e0 | 2017-09-26 13:51:29 -0700 | [diff] [blame] | 784 | /*!\brief Max number of segments |
| 785 | * |
| 786 | * This is the limit of number of segments allowed within a frame. |
| 787 | * |
| 788 | * Currently same as "MAX_SEGMENTS" in AV1, the maximum that AV1 supports. |
| 789 | * |
| 790 | */ |
| 791 | #define AOM_MAX_SEGMENTS 8 |
| 792 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 793 | /*!\brief aom region of interest map |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 794 | * |
| 795 | * These defines the data structures for the region of interest map |
| 796 | * |
Yaowu Xu | c5bf1e0 | 2017-09-26 13:51:29 -0700 | [diff] [blame] | 797 | * TODO(yaowu): create a unit test for ROI map related APIs |
| 798 | * |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 799 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 800 | typedef struct aom_roi_map { |
Yaowu Xu | c5bf1e0 | 2017-09-26 13:51:29 -0700 | [diff] [blame] | 801 | /*! An id between 0 and 7 for each 8x8 region within a frame. */ |
Adrian Grange | f58eca9 | 2013-10-24 15:11:36 -0700 | [diff] [blame] | 802 | unsigned char *roi_map; |
Yaowu Xu | c5bf1e0 | 2017-09-26 13:51:29 -0700 | [diff] [blame] | 803 | unsigned int rows; /**< Number of rows. */ |
| 804 | unsigned int cols; /**< Number of columns. */ |
| 805 | int delta_q[AOM_MAX_SEGMENTS]; /**< Quantizer deltas. */ |
| 806 | int delta_lf[AOM_MAX_SEGMENTS]; /**< Loop filter deltas. */ |
Adrian Grange | f58eca9 | 2013-10-24 15:11:36 -0700 | [diff] [blame] | 807 | /*! Static breakout threshold for each segment. */ |
Yaowu Xu | c5bf1e0 | 2017-09-26 13:51:29 -0700 | [diff] [blame] | 808 | unsigned int static_threshold[AOM_MAX_SEGMENTS]; |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 809 | } aom_roi_map_t; |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 810 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 811 | /*!\brief aom active region map |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 812 | * |
| 813 | * These defines the data structures for active region map |
| 814 | * |
| 815 | */ |
| 816 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 817 | typedef struct aom_active_map { |
clang-format | 83a5207 | 2016-08-08 20:22:13 -0700 | [diff] [blame] | 818 | /*!\brief specify an on (1) or off (0) each 16x16 region within a frame */ |
| 819 | unsigned char *active_map; |
| 820 | unsigned int rows; /**< number of rows */ |
| 821 | unsigned int cols; /**< number of cols */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 822 | } aom_active_map_t; |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 823 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 824 | /*!\brief aom image scaling mode |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 825 | * |
| 826 | * This defines the data structure for image scaling mode |
| 827 | * |
| 828 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 829 | typedef struct aom_scaling_mode { |
| 830 | AOM_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */ |
| 831 | AOM_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */ |
| 832 | } aom_scaling_mode_t; |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 833 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 834 | /*!brief AV1 encoder content type */ |
Alex Converse | 572de92 | 2014-07-31 08:27:32 -0700 | [diff] [blame] | 835 | typedef enum { |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 836 | AOM_CONTENT_DEFAULT, |
| 837 | AOM_CONTENT_SCREEN, |
| 838 | AOM_CONTENT_INVALID |
| 839 | } aom_tune_content; |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 840 | |
Andrey Norkin | 28e9ce2 | 2018-01-08 10:11:21 -0800 | [diff] [blame] | 841 | /*!brief AV1 encoder timing info signaling */ |
| 842 | typedef enum { AOM_TIMING_UNSPECIFIED, AOM_TIMING_EQUAL } aom_timing_info_t; |
| 843 | |
Alex Converse | 6e3c805 | 2016-12-16 09:48:56 -0800 | [diff] [blame] | 844 | /*!\brief Model tuning parameters |
John Koleszar | b0da9b3 | 2010-12-17 09:43:39 -0500 | [diff] [blame] | 845 | * |
| 846 | * Changes the encoder to tune for certain types of input material. |
| 847 | * |
| 848 | */ |
Yushin Cho | d808bfc | 2017-08-10 15:54:36 -0700 | [diff] [blame] | 849 | typedef enum { |
| 850 | AOM_TUNE_PSNR, |
| 851 | AOM_TUNE_SSIM, |
Yushin Cho | d808bfc | 2017-08-10 15:54:36 -0700 | [diff] [blame] | 852 | AOM_TUNE_CDEF_DIST, |
| 853 | AOM_TUNE_DAALA_DIST |
Yushin Cho | d808bfc | 2017-08-10 15:54:36 -0700 | [diff] [blame] | 854 | } aom_tune_metric; |
John Koleszar | b0da9b3 | 2010-12-17 09:43:39 -0500 | [diff] [blame] | 855 | |
James Zern | 7dd7a7d | 2015-10-09 16:31:17 -0700 | [diff] [blame] | 856 | /*!\cond */ |
Alex Converse | 6e3c805 | 2016-12-16 09:48:56 -0800 | [diff] [blame] | 857 | /*!\brief Encoder control function parameter type |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 858 | * |
Alex Converse | 6e3c805 | 2016-12-16 09:48:56 -0800 | [diff] [blame] | 859 | * Defines the data types that AOME/AV1E control functions take. Note that |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 860 | * additional common controls are defined in aom.h |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 861 | * |
| 862 | */ |
| 863 | |
Ryan Overbeck | a5fefa7 | 2017-09-19 11:39:10 -0700 | [diff] [blame] | 864 | AOM_CTRL_USE_TYPE(AOME_USE_REFERENCE, int) |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 865 | #define AOM_CTRL_AOME_USE_REFERENCE |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 866 | AOM_CTRL_USE_TYPE(AOME_SET_ROI_MAP, aom_roi_map_t *) |
| 867 | #define AOM_CTRL_AOME_SET_ROI_MAP |
| 868 | AOM_CTRL_USE_TYPE(AOME_SET_ACTIVEMAP, aom_active_map_t *) |
| 869 | #define AOM_CTRL_AOME_SET_ACTIVEMAP |
| 870 | AOM_CTRL_USE_TYPE(AOME_SET_SCALEMODE, aom_scaling_mode_t *) |
| 871 | #define AOM_CTRL_AOME_SET_SCALEMODE |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 872 | |
Soo-Chul Han | f858986 | 2018-01-24 03:13:14 +0000 | [diff] [blame] | 873 | AOM_CTRL_USE_TYPE(AOME_SET_ENHANCEMENT_LAYER_ID, int) |
| 874 | #define AOM_CTRL_AOME_SET_ENHANCEMENT_LAYER_ID |
| 875 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 876 | AOM_CTRL_USE_TYPE(AOME_SET_CPUUSED, int) |
| 877 | #define AOM_CTRL_AOME_SET_CPUUSED |
Jingning Han | b49c6ae | 2017-11-27 18:14:05 -0800 | [diff] [blame] | 878 | AOM_CTRL_USE_TYPE(AOME_SET_DEVSF, int) |
| 879 | #define AOM_CTRL_AOME_SET_DEVSF |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 880 | AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOALTREF, unsigned int) |
| 881 | #define AOM_CTRL_AOME_SET_ENABLEAUTOALTREF |
Zoe Liu | cf5083d | 2016-02-04 09:47:46 -0800 | [diff] [blame] | 882 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 883 | AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOBWDREF, unsigned int) |
| 884 | #define AOM_CTRL_AOME_SET_ENABLEAUTOBWDREF |
Zoe Liu | cf5083d | 2016-02-04 09:47:46 -0800 | [diff] [blame] | 885 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 886 | AOM_CTRL_USE_TYPE(AOME_SET_SHARPNESS, unsigned int) |
| 887 | #define AOM_CTRL_AOME_SET_SHARPNESS |
| 888 | AOM_CTRL_USE_TYPE(AOME_SET_STATIC_THRESHOLD, unsigned int) |
| 889 | #define AOM_CTRL_AOME_SET_STATIC_THRESHOLD |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 890 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 891 | AOM_CTRL_USE_TYPE(AOME_SET_ARNR_MAXFRAMES, unsigned int) |
| 892 | #define AOM_CTRL_AOME_SET_ARNR_MAXFRAMES |
| 893 | AOM_CTRL_USE_TYPE(AOME_SET_ARNR_STRENGTH, unsigned int) |
| 894 | #define AOM_CTRL_AOME_SET_ARNR_STRENGTH |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 895 | AOM_CTRL_USE_TYPE(AOME_SET_TUNING, int) /* aom_tune_metric */ |
| 896 | #define AOM_CTRL_AOME_SET_TUNING |
| 897 | AOM_CTRL_USE_TYPE(AOME_SET_CQ_LEVEL, unsigned int) |
| 898 | #define AOM_CTRL_AOME_SET_CQ_LEVEL |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 899 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 900 | AOM_CTRL_USE_TYPE(AV1E_SET_TILE_COLUMNS, int) |
| 901 | #define AOM_CTRL_AV1E_SET_TILE_COLUMNS |
| 902 | AOM_CTRL_USE_TYPE(AV1E_SET_TILE_ROWS, int) |
| 903 | #define AOM_CTRL_AV1E_SET_TILE_ROWS |
Fangwen Fu | 7b9f2b3 | 2017-01-17 14:01:52 -0800 | [diff] [blame] | 904 | |
Fangwen Fu | 7b9f2b3 | 2017-01-17 14:01:52 -0800 | [diff] [blame] | 905 | AOM_CTRL_USE_TYPE(AV1E_SET_TILE_DEPENDENT_ROWS, int) |
| 906 | #define AOM_CTRL_AV1E_SET_TILE_DEPENDENT_ROWS |
Fangwen Fu | 7b9f2b3 | 2017-01-17 14:01:52 -0800 | [diff] [blame] | 907 | |
Lei | 7bb501d | 2017-12-13 15:10:34 -0800 | [diff] [blame] | 908 | AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER_V, int) |
| 909 | #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER_V |
| 910 | AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER_H, int) |
| 911 | #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER_H |
Ryan Lei | 7386eda | 2016-12-08 21:08:31 -0800 | [diff] [blame] | 912 | AOM_CTRL_USE_TYPE(AV1E_SET_TILE_LOOPFILTER, int) |
| 913 | #define AOM_CTRL_AV1E_SET_TILE_LOOPFILTER |
Ronald S. Bultje | 1407bdc | 2013-02-01 09:35:28 -0800 | [diff] [blame] | 914 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 915 | AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER, int *) |
| 916 | #define AOM_CTRL_AOME_GET_LAST_QUANTIZER |
| 917 | AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER_64, int *) |
| 918 | #define AOM_CTRL_AOME_GET_LAST_QUANTIZER_64 |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 919 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 920 | AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTRA_BITRATE_PCT, unsigned int) |
| 921 | #define AOM_CTRL_AOME_SET_MAX_INTRA_BITRATE_PCT |
| 922 | AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTER_BITRATE_PCT, unsigned int) |
| 923 | #define AOM_CTRL_AOME_SET_MAX_INTER_BITRATE_PCT |
John Koleszar | 1654ae9 | 2011-07-28 09:17:32 -0400 | [diff] [blame] | 924 | |
Soo-Chul Han | f858986 | 2018-01-24 03:13:14 +0000 | [diff] [blame] | 925 | AOM_CTRL_USE_TYPE(AOME_SET_NUMBER_SPATIAL_LAYERS, int) |
| 926 | #define AOME_CTRL_AOME_SET_NUMBER_SPATIAL_LAYERS |
| 927 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 928 | AOM_CTRL_USE_TYPE(AV1E_SET_GF_CBR_BOOST_PCT, unsigned int) |
| 929 | #define AOM_CTRL_AV1E_SET_GF_CBR_BOOST_PCT |
Yaowu Xu | 4165290 | 2015-03-12 17:59:18 -0700 | [diff] [blame] | 930 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 931 | AOM_CTRL_USE_TYPE(AV1E_SET_LOSSLESS, unsigned int) |
| 932 | #define AOM_CTRL_AV1E_SET_LOSSLESS |
John Koleszar | 1654ae9 | 2011-07-28 09:17:32 -0400 | [diff] [blame] | 933 | |
Steinar Midtskogen | e44c622 | 2017-11-09 13:22:09 +0100 | [diff] [blame] | 934 | AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_CDEF, unsigned int) |
| 935 | #define AOM_CTRL_AV1E_SET_ENABLE_CDEF |
| 936 | |
Sebastien Alaiwan | 1ed2024 | 2018-02-20 14:47:18 +0100 | [diff] [blame] | 937 | AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_RESTORATION, unsigned int) |
| 938 | #define AOM_CTRL_AV1E_SET_ENABLE_RESTORATION |
| 939 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 940 | AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_QM, unsigned int) |
| 941 | #define AOM_CTRL_AV1E_SET_ENABLE_QM |
Yaowu Xu | 0818a7c | 2016-08-11 09:39:47 -0700 | [diff] [blame] | 942 | |
Yushin Cho | d808bfc | 2017-08-10 15:54:36 -0700 | [diff] [blame] | 943 | AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DIST_8X8, unsigned int) |
| 944 | #define AOM_CTRL_AV1E_SET_ENABLE_DIST_8X8 |
| 945 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 946 | AOM_CTRL_USE_TYPE(AV1E_SET_QM_MIN, unsigned int) |
| 947 | #define AOM_CTRL_AV1E_SET_QM_MIN |
Yaowu Xu | 0818a7c | 2016-08-11 09:39:47 -0700 | [diff] [blame] | 948 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 949 | AOM_CTRL_USE_TYPE(AV1E_SET_QM_MAX, unsigned int) |
| 950 | #define AOM_CTRL_AV1E_SET_QM_MAX |
Yaowu Xu | 0818a7c | 2016-08-11 09:39:47 -0700 | [diff] [blame] | 951 | |
Yaowu Xu | f7a1242 | 2018-01-31 15:29:20 -0800 | [diff] [blame] | 952 | AOM_CTRL_USE_TYPE(AV1E_SET_QM_Y, unsigned int) |
| 953 | #define AOM_CTRL_AV1E_SET_QM_Y |
| 954 | |
| 955 | AOM_CTRL_USE_TYPE(AV1E_SET_QM_U, unsigned int) |
| 956 | #define AOM_CTRL_AV1E_SET_QM_U |
| 957 | |
| 958 | AOM_CTRL_USE_TYPE(AV1E_SET_QM_V, unsigned int) |
| 959 | #define AOM_CTRL_AV1E_SET_QM_V |
| 960 | |
Thomas Davies | af6df17 | 2016-11-09 14:04:18 +0000 | [diff] [blame] | 961 | AOM_CTRL_USE_TYPE(AV1E_SET_NUM_TG, unsigned int) |
| 962 | #define AOM_CTRL_AV1E_SET_NUM_TG |
| 963 | AOM_CTRL_USE_TYPE(AV1E_SET_MTU, unsigned int) |
| 964 | #define AOM_CTRL_AV1E_SET_MTU |
Thomas Davies | af6df17 | 2016-11-09 14:04:18 +0000 | [diff] [blame] | 965 | |
Andrey Norkin | 28e9ce2 | 2018-01-08 10:11:21 -0800 | [diff] [blame] | 966 | AOM_CTRL_USE_TYPE(AV1E_SET_TIMING_INFO, aom_timing_info_t) |
| 967 | #define AOM_CTRL_AV1E_SET_TIMING_INFO |
| 968 | |
Fangwen Fu | 8d164de | 2016-12-14 13:40:54 -0800 | [diff] [blame] | 969 | AOM_CTRL_USE_TYPE(AV1E_SET_DISABLE_TEMPMV, unsigned int) |
| 970 | #define AOM_CTRL_AV1E_SET_DISABLE_TEMPMV |
Fangwen Fu | 8d164de | 2016-12-14 13:40:54 -0800 | [diff] [blame] | 971 | |
Jingning Han | a446f55 | 2018-02-22 15:42:12 -0800 | [diff] [blame] | 972 | AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DF, unsigned int) |
| 973 | #define AOM_CTRL_AV1E_SET_ENABLE_DF |
| 974 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 975 | AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PARALLEL_DECODING, unsigned int) |
| 976 | #define AOM_CTRL_AV1E_SET_FRAME_PARALLEL_DECODING |
Ivan Maltz | 01b35c3 | 2013-09-05 08:55:47 -0700 | [diff] [blame] | 977 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 978 | AOM_CTRL_USE_TYPE(AV1E_SET_AQ_MODE, unsigned int) |
| 979 | #define AOM_CTRL_AV1E_SET_AQ_MODE |
Guillaume Martres | 1708465 | 2013-11-14 19:23:57 +0100 | [diff] [blame] | 980 | |
Fangwen Fu | 6160df2 | 2017-04-24 09:45:51 -0700 | [diff] [blame] | 981 | AOM_CTRL_USE_TYPE(AV1E_SET_DELTAQ_MODE, unsigned int) |
| 982 | #define AOM_CTRL_AV1E_SET_DELTAQ_MODE |
| 983 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 984 | AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PERIODIC_BOOST, unsigned int) |
| 985 | #define AOM_CTRL_AV1E_SET_FRAME_PERIODIC_BOOST |
Marco Paniconi | 0eb88c9 | 2014-04-03 15:49:03 -0700 | [diff] [blame] | 986 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 987 | AOM_CTRL_USE_TYPE(AV1E_SET_NOISE_SENSITIVITY, unsigned int) |
| 988 | #define AOM_CTRL_AV1E_SET_NOISE_SENSITIVITY |
JackyChen | bb1a236 | 2014-09-12 11:48:44 -0700 | [diff] [blame] | 989 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 990 | AOM_CTRL_USE_TYPE(AV1E_SET_TUNE_CONTENT, int) /* aom_tune_content */ |
| 991 | #define AOM_CTRL_AV1E_SET_TUNE_CONTENT |
Yaowu Xu | e94b415 | 2015-01-13 10:07:20 -0800 | [diff] [blame] | 992 | |
Andrey Norkin | 9e69463 | 2017-12-21 18:50:57 -0800 | [diff] [blame] | 993 | AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_PRIMARIES, int) |
| 994 | #define AOM_CTRL_AV1E_SET_COLOR_PRIMARIES |
| 995 | |
| 996 | AOM_CTRL_USE_TYPE(AV1E_SET_TRANSFER_CHARACTERISTICS, int) |
| 997 | #define AOM_CTRL_AV1E_SET_TRANSFER_CHARACTERISTICS |
| 998 | |
| 999 | AOM_CTRL_USE_TYPE(AV1E_SET_MATRIX_COEFFICIENTS, int) |
| 1000 | #define AOM_CTRL_AV1E_SET_MATRIX_COEFFICIENTS |
| 1001 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1002 | AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_SPACE, int) |
| 1003 | #define AOM_CTRL_AV1E_SET_COLOR_SPACE |
Alex Converse | 4dcb839 | 2015-03-20 14:55:43 -0700 | [diff] [blame] | 1004 | |
anorkin | 76fb126 | 2017-03-22 15:12:12 -0700 | [diff] [blame] | 1005 | AOM_CTRL_USE_TYPE(AV1E_SET_TRANSFER_FUNCTION, int) |
| 1006 | #define AOM_CTRL_AV1E_SET_TRANSFER_FUNCTION |
| 1007 | |
| 1008 | AOM_CTRL_USE_TYPE(AV1E_SET_CHROMA_SAMPLE_POSITION, int) |
| 1009 | #define AOM_CTRL_AV1E_SET_CHROMA_SAMPLE_POSITION |
anorkin | 76fb126 | 2017-03-22 15:12:12 -0700 | [diff] [blame] | 1010 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1011 | AOM_CTRL_USE_TYPE(AV1E_SET_MIN_GF_INTERVAL, unsigned int) |
| 1012 | #define AOM_CTRL_AV1E_SET_MIN_GF_INTERVAL |
Debargha Mukherjee | 9852643 | 2015-04-01 16:39:06 -0700 | [diff] [blame] | 1013 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1014 | AOM_CTRL_USE_TYPE(AV1E_SET_MAX_GF_INTERVAL, unsigned int) |
| 1015 | #define AOM_CTRL_AV1E_SET_MAX_GF_INTERVAL |
Debargha Mukherjee | 9852643 | 2015-04-01 16:39:06 -0700 | [diff] [blame] | 1016 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1017 | AOM_CTRL_USE_TYPE(AV1E_GET_ACTIVEMAP, aom_active_map_t *) |
| 1018 | #define AOM_CTRL_AV1E_GET_ACTIVEMAP |
Ronald S. Bultje | eeb5ef0 | 2015-09-15 21:56:51 -0400 | [diff] [blame] | 1019 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1020 | AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_RANGE, int) |
| 1021 | #define AOM_CTRL_AV1E_SET_COLOR_RANGE |
Yaowu Xu | 7c514e2 | 2015-09-28 15:55:46 -0700 | [diff] [blame] | 1022 | |
Yaowu Xu | 7c514e2 | 2015-09-28 15:55:46 -0700 | [diff] [blame] | 1023 | /*!\brief |
| 1024 | * |
| 1025 | * TODO(rbultje) : add support of the control in ffmpeg |
| 1026 | */ |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1027 | #define AOM_CTRL_AV1E_SET_RENDER_SIZE |
| 1028 | AOM_CTRL_USE_TYPE(AV1E_SET_RENDER_SIZE, int *) |
Geza Lore | 454989f | 2016-03-24 13:56:05 +0000 | [diff] [blame] | 1029 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1030 | AOM_CTRL_USE_TYPE(AV1E_SET_SUPERBLOCK_SIZE, unsigned int) |
| 1031 | #define AOM_CTRL_AV1E_SET_SUPERBLOCK_SIZE |
James Zern | 7dd7a7d | 2015-10-09 16:31:17 -0700 | [diff] [blame] | 1032 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1033 | AOM_CTRL_USE_TYPE(AV1E_SET_TARGET_LEVEL, unsigned int) |
| 1034 | #define AOM_CTRL_AV1E_SET_TARGET_LEVEL |
hui su | be3f069 | 2016-05-05 15:37:37 -0700 | [diff] [blame] | 1035 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1036 | AOM_CTRL_USE_TYPE(AV1E_GET_LEVEL, int *) |
| 1037 | #define AOM_CTRL_AV1E_GET_LEVEL |
Alex Converse | eb780e7 | 2016-12-13 12:46:41 -0800 | [diff] [blame] | 1038 | |
| 1039 | AOM_CTRL_USE_TYPE(AV1E_SET_ANS_WINDOW_SIZE_LOG2, unsigned int) |
| 1040 | #define AOM_CTRL_AV1E_SET_ANS_WINDOW_SIZE_LOG2 |
Yunqing Wang | d8cd55f | 2017-02-27 12:16:00 -0800 | [diff] [blame] | 1041 | |
Yunqing Wang | eeb08a9 | 2017-07-07 21:25:18 -0700 | [diff] [blame] | 1042 | AOM_CTRL_USE_TYPE(AV1E_SET_SINGLE_TILE_DECODING, unsigned int) |
| 1043 | #define AOM_CTRL_AV1E_SET_SINGLE_TILE_DECODING |
Yunqing Wang | ff4fa06 | 2017-04-21 10:56:08 -0700 | [diff] [blame] | 1044 | |
| 1045 | AOM_CTRL_USE_TYPE(AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST, unsigned int) |
| 1046 | #define AOM_CTRL_AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST |
| 1047 | |
Andrey Norkin | 6f1c2f7 | 2018-01-15 20:08:52 -0800 | [diff] [blame] | 1048 | AOM_CTRL_USE_TYPE(AV1E_SET_FILM_GRAIN_TEST_VECTOR, unsigned int) |
| 1049 | #define AOM_CTRL_AV1E_SET_FILM_GRAIN_TEST_VECTOR |
| 1050 | |
Hui Su | 1cb1c00 | 2018-02-05 18:21:20 -0800 | [diff] [blame] | 1051 | AOM_CTRL_USE_TYPE(AV1E_SET_CDF_UPDATE_MODE, int) |
| 1052 | #define AOM_CTRL_AV1E_SET_CDF_UPDATE_MODE |
| 1053 | |
James Zern | 7dd7a7d | 2015-10-09 16:31:17 -0700 | [diff] [blame] | 1054 | /*!\endcond */ |
Alex Converse | c77b2ff | 2016-12-12 17:29:32 -0800 | [diff] [blame] | 1055 | /*! @} - end defgroup aom_encoder */ |
Dmitry Kovalev | e288c60 | 2013-09-29 18:00:15 -0700 | [diff] [blame] | 1056 | #ifdef __cplusplus |
| 1057 | } // extern "C" |
| 1058 | #endif |
| 1059 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 1060 | #endif // AOM_AOMCX_H_ |