tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

aomcx.h (78177B)


      1 /*
      2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
      3 *
      4 * This source code is subject to the terms of the BSD 2 Clause License and
      5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
      6 * was not distributed with this source code in the LICENSE file, you can
      7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
      8 * Media Patent License 1.0 was not distributed with this source code in the
      9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
     10 */
     11 #ifndef AOM_AOM_AOMCX_H_
     12 #define AOM_AOM_AOMCX_H_
     13 
     14 /*!\defgroup aom_encoder AOMedia AOM/AV1 Encoder
     15 * \ingroup aom
     16 *
     17 * @{
     18 */
     19 #include "aom/aom.h"
     20 #include "aom/aom_encoder.h"
     21 #include "aom/aom_external_partition.h"
     22 
     23 /*!\file
     24 * \brief Provides definitions for using AOM or AV1 encoder algorithm within the
     25 *        aom Codec Interface.
     26 *
     27 * Several interfaces are excluded with CONFIG_REALTIME_ONLY build:
     28 * Global motion
     29 * Warped motion
     30 * OBMC
     31 * TPL model
     32 * Loop restoration
     33 *
     34 * The following features are also disabled with CONFIG_REALTIME_ONLY:
     35 * AV1E_SET_QUANT_B_ADAPT
     36 * CNN
     37 * 4X rectangular blocks
     38 * 4X rectangular transform in intra prediction
     39 */
     40 
     41 #ifdef __cplusplus
     42 extern "C" {
     43 #endif
     44 
     45 /*!\name Algorithm interface for AV1
     46 *
     47 * This interface provides the capability to encode raw AV1 streams.
     48 *@{
     49 */
     50 
     51 /*!\brief A single instance of the AV1 encoder.
     52 *\deprecated This access mechanism is provided for backwards compatibility;
     53 * prefer aom_codec_av1_cx().
     54 */
     55 extern aom_codec_iface_t aom_codec_av1_cx_algo;
     56 
     57 /*!\brief The interface to the AV1 encoder.
     58 */
     59 extern aom_codec_iface_t *aom_codec_av1_cx(void);
     60 /*!@} - end algorithm interface member group */
     61 
     62 /*
     63 * Algorithm Flags
     64 */
     65 
     66 /*!\brief Don't reference the last frame
     67 *
     68 * When this flag is set, the encoder will not use the last frame as a
     69 * predictor. When not set, the encoder will choose whether to use the
     70 * last frame or not automatically.
     71 */
     72 #define AOM_EFLAG_NO_REF_LAST (1 << 16)
     73 /*!\brief Don't reference the last2 frame
     74 *
     75 * When this flag is set, the encoder will not use the last2 frame as a
     76 * predictor. When not set, the encoder will choose whether to use the
     77 * last2 frame or not automatically.
     78 */
     79 #define AOM_EFLAG_NO_REF_LAST2 (1 << 17)
     80 /*!\brief Don't reference the last3 frame
     81 *
     82 * When this flag is set, the encoder will not use the last3 frame as a
     83 * predictor. When not set, the encoder will choose whether to use the
     84 * last3 frame or not automatically.
     85 */
     86 #define AOM_EFLAG_NO_REF_LAST3 (1 << 18)
     87 /*!\brief Don't reference the golden frame
     88 *
     89 * When this flag is set, the encoder will not use the golden frame as a
     90 * predictor. When not set, the encoder will choose whether to use the
     91 * golden frame or not automatically.
     92 */
     93 #define AOM_EFLAG_NO_REF_GF (1 << 19)
     94 
     95 /*!\brief Don't reference the alternate reference frame
     96 *
     97 * When this flag is set, the encoder will not use the alt ref frame as a
     98 * predictor. When not set, the encoder will choose whether to use the
     99 * alt ref frame or not automatically.
    100 */
    101 #define AOM_EFLAG_NO_REF_ARF (1 << 20)
    102 /*!\brief Don't reference the bwd reference frame
    103 *
    104 * When this flag is set, the encoder will not use the bwd ref frame as a
    105 * predictor. When not set, the encoder will choose whether to use the
    106 * bwd ref frame or not automatically.
    107 */
    108 #define AOM_EFLAG_NO_REF_BWD (1 << 21)
    109 /*!\brief Don't reference the alt2 reference frame
    110 *
    111 * When this flag is set, the encoder will not use the alt2 ref frame as a
    112 * predictor. When not set, the encoder will choose whether to use the
    113 * alt2 ref frame or not automatically.
    114 */
    115 #define AOM_EFLAG_NO_REF_ARF2 (1 << 22)
    116 
    117 /*!\brief Don't update the last frame
    118 *
    119 * When this flag is set, the encoder will not update the last frame with
    120 * the contents of the current frame.
    121 */
    122 #define AOM_EFLAG_NO_UPD_LAST (1 << 23)
    123 
    124 /*!\brief Don't update the golden frame
    125 *
    126 * When this flag is set, the encoder will not update the golden frame with
    127 * the contents of the current frame.
    128 */
    129 #define AOM_EFLAG_NO_UPD_GF (1 << 24)
    130 
    131 /*!\brief Don't update the alternate reference frame
    132 *
    133 * When this flag is set, the encoder will not update the alt ref frame with
    134 * the contents of the current frame.
    135 */
    136 #define AOM_EFLAG_NO_UPD_ARF (1 << 25)
    137 /*!\brief Disable entropy update
    138 *
    139 * When this flag is set, the encoder will not update its internal entropy
    140 * model based on the entropy of this frame.
    141 */
    142 #define AOM_EFLAG_NO_UPD_ENTROPY (1 << 26)
    143 /*!\brief Disable ref frame mvs
    144 *
    145 * When this flag is set, the encoder will not allow frames to
    146 * be encoded using mfmv.
    147 */
    148 #define AOM_EFLAG_NO_REF_FRAME_MVS (1 << 27)
    149 /*!\brief Enable error resilient frame
    150 *
    151 * When this flag is set, the encoder will code frames as error
    152 * resilient.
    153 */
    154 #define AOM_EFLAG_ERROR_RESILIENT (1 << 28)
    155 /*!\brief Enable s frame mode
    156 *
    157 * When this flag is set, the encoder will code frames as an
    158 * s frame.
    159 */
    160 #define AOM_EFLAG_SET_S_FRAME (1 << 29)
    161 /*!\brief Force primary_ref_frame to PRIMARY_REF_NONE
    162 *
    163 * When this flag is set, the encoder will set a frame's primary_ref_frame
    164 * to PRIMARY_REF_NONE
    165 */
    166 #define AOM_EFLAG_SET_PRIMARY_REF_NONE (1 << 30)
    167 
    168 /*!\brief AVx encoder control functions
    169 *
    170 * This set of macros define the control functions available for AVx
    171 * encoder interface.
    172 * The range of encode control ID is 7-229(max).
    173 *
    174 * \sa #aom_codec_control(aom_codec_ctx_t *ctx, int ctrl_id, ...)
    175 */
    176 enum aome_enc_control_id {
    177  /*!\brief Codec control function to set which reference frame encoder can use,
    178   * int parameter.
    179   */
    180  AOME_USE_REFERENCE = 7,
    181 
    182  /*!\brief Codec control function to pass an ROI map to encoder, aom_roi_map_t*
    183   * parameter.
    184   */
    185  AOME_SET_ROI_MAP = 8,
    186 
    187  /*!\brief Codec control function to pass an Active map to encoder,
    188   * aom_active_map_t* parameter.
    189   */
    190  AOME_SET_ACTIVEMAP = 9,
    191 
    192  /* NOTE: enum 10 unused */
    193 
    194  /*!\brief Codec control function to set encoder scaling mode for the next
    195   * frame to be coded, aom_scaling_mode_t* parameter.
    196   */
    197  AOME_SET_SCALEMODE = 11,
    198 
    199  /*!\brief Codec control function to set encoder spatial layer id, int
    200   * parameter.
    201   */
    202  AOME_SET_SPATIAL_LAYER_ID = 12,
    203 
    204  /*!\brief Codec control function to set encoder internal speed settings,
    205   * int parameter
    206   *
    207   * Changes in this value influences the complexity of algorithms used in
    208   * encoding process, values greater than 0 will increase encoder speed at
    209   * the expense of quality.
    210   *
    211   * Valid range: 0..12. 0 runs the slowest, and 12 runs the fastest;
    212   * quality improves as speed decreases (since more compression
    213   * possibilities are explored).
    214   *
    215   * NOTE: 10 - 12 are only allowed in AOM_USAGE_REALTIME. In
    216   * AOM_USAGE_GOOD_QUALITY and AOM_USAGE_ALL_INTRA, 9 is the highest allowed
    217   * value. However, AOM_USAGE_GOOD_QUALITY treats 7..9 the same as 6. Also,
    218   * AOM_USAGE_REALTIME treats 0..4 the same as 5.
    219   */
    220  AOME_SET_CPUUSED = 13,
    221 
    222  /*!\brief Codec control function to enable automatic set and use arf frames,
    223   * unsigned int parameter
    224   *
    225   * - 0 = disable
    226   * - 1 = enable (default)
    227   */
    228  AOME_SET_ENABLEAUTOALTREF = 14,
    229 
    230  /* NOTE: enum 15 unused */
    231 
    232  /*!\brief Codec control function to set the sharpness parameter,
    233   * unsigned int parameter.
    234   *
    235   * This parameter controls the level at which rate-distortion optimization of
    236   * transform coefficients favors sharpness in the block.
    237   *
    238   * Valid range: 0..7. The default is 0.
    239   *
    240   * Values 1-7 will avoid eob and skip block optimization and will change
    241   * rdmult in favor of block sharpness.
    242   *
    243   * In all-intra mode: it also sets the `loop_filter_sharpness` syntax element
    244   * in the bitstream. Larger values increasingly reduce how much the filtering
    245   * can change the sample values on block edges to favor perceived sharpness.
    246   */
    247  AOME_SET_SHARPNESS = AOME_SET_ENABLEAUTOALTREF + 2,  // 16
    248 
    249  /*!\brief Codec control function to set the threshold for MBs treated static,
    250   * unsigned int parameter
    251   */
    252  AOME_SET_STATIC_THRESHOLD = 17,
    253 
    254  /* NOTE: enum 18 unused */
    255 
    256  /*!\brief Codec control function to get last quantizer chosen by the encoder,
    257   * int* parameter
    258   *
    259   * Return value uses internal quantizer scale defined by the codec.
    260   */
    261  AOME_GET_LAST_QUANTIZER = AOME_SET_STATIC_THRESHOLD + 2,  // 19
    262 
    263  /*!\brief Codec control function to get last quantizer chosen by the encoder,
    264   * int* parameter
    265   *
    266   * Return value uses the 0..63 scale as used by the rc_*_quantizer config
    267   * parameters.
    268   */
    269  AOME_GET_LAST_QUANTIZER_64 = 20,
    270 
    271  /*!\brief Codec control function to set the max no of frames to create arf,
    272   * unsigned int parameter
    273   */
    274  AOME_SET_ARNR_MAXFRAMES = 21,
    275 
    276  /*!\brief Codec control function to set the filter strength for the arf,
    277   * unsigned int parameter
    278   */
    279  AOME_SET_ARNR_STRENGTH = 22,
    280 
    281  /* NOTE: enum 23 unused */
    282 
    283  /*!\brief Codec control function to set visual tuning, aom_tune_metric (int)
    284   * parameter
    285   *
    286   * The default is AOM_TUNE_PSNR.
    287   */
    288  AOME_SET_TUNING = AOME_SET_ARNR_STRENGTH + 2,  // 24
    289 
    290  /*!\brief Codec control function to set constrained / constant quality level,
    291   * unsigned int parameter
    292   *
    293   * Valid range: 0..63
    294   *
    295   * \attention For this value to be used aom_codec_enc_cfg_t::rc_end_usage
    296   *            must be set to #AOM_CQ or #AOM_Q.
    297   */
    298  AOME_SET_CQ_LEVEL = 25,
    299 
    300  /*!\brief Codec control function to set max data rate for intra frames,
    301   * unsigned int parameter
    302   *
    303   * This value controls additional clamping on the maximum size of a
    304   * keyframe. It is expressed as a percentage of the average
    305   * per-frame bitrate, with the special (and default) value 0 meaning
    306   * unlimited, or no additional clamping beyond the codec's built-in
    307   * algorithm.
    308   *
    309   * For example, to allocate no more than 4.5 frames worth of bitrate
    310   * to a keyframe, set this to 450.
    311   */
    312  AOME_SET_MAX_INTRA_BITRATE_PCT = 26,
    313 
    314  /*!\brief Codec control function to set number of spatial layers, int
    315   * parameter
    316   *
    317   * Valid range:
    318   *   \li When using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, #AOM_MAX_SS_LAYERS]
    319   *   \li When \em not using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, 3]
    320   */
    321  AOME_SET_NUMBER_SPATIAL_LAYERS = 27,
    322 
    323  /*!\brief Codec control function to set max data rate for inter frames,
    324   * unsigned int parameter
    325   *
    326   * This value controls additional clamping on the maximum size of an
    327   * inter frame. It is expressed as a percentage of the average
    328   * per-frame bitrate, with the special (and default) value 0 meaning
    329   * unlimited, or no additional clamping beyond the codec's built-in
    330   * algorithm.
    331   *
    332   * For example, to allow no more than 4.5 frames worth of bitrate
    333   * to an inter frame, set this to 450.
    334   */
    335  AV1E_SET_MAX_INTER_BITRATE_PCT = AOME_SET_MAX_INTRA_BITRATE_PCT + 2,  // 28
    336 
    337  /*!\brief Boost percentage for Golden Frame in CBR mode, unsigned int
    338   * parameter
    339   *
    340   * This value controls the amount of boost given to Golden Frame in
    341   * CBR mode. It is expressed as a percentage of the average
    342   * per-frame bitrate, with the special (and default) value 0 meaning
    343   * the feature is off, i.e., no golden frame boost in CBR mode and
    344   * average bitrate target is used.
    345   *
    346   * For example, to allow 100% more bits, i.e, 2X, in a golden frame
    347   * than average frame, set this to 100.
    348   */
    349  AV1E_SET_GF_CBR_BOOST_PCT = 29,
    350 
    351  /* NOTE: enum 30 unused */
    352 
    353  /*!\brief Codec control function to set lossless encoding mode, unsigned int
    354   * parameter
    355   *
    356   * AV1 can operate in lossless encoding mode, in which the bitstream
    357   * produced will be able to decode and reconstruct a perfect copy of
    358   * input source.
    359   *
    360   * - 0 = normal coding mode, may be lossy (default)
    361   * - 1 = lossless coding mode
    362   */
    363  AV1E_SET_LOSSLESS = AV1E_SET_GF_CBR_BOOST_PCT + 2,  // 31
    364 
    365  /*!\brief Codec control function to enable the row based multi-threading
    366   * of the encoder, unsigned int parameter
    367   *
    368   * - 0 = disable
    369   * - 1 = enable (default)
    370   */
    371  AV1E_SET_ROW_MT = 32,
    372 
    373  /*!\brief Codec control function to set number of tile columns. unsigned int
    374   * parameter
    375   *
    376   * In encoding and decoding, AV1 allows an input image frame be partitioned
    377   * into separate vertical tile columns, which can be encoded or decoded
    378   * independently. This enables easy implementation of parallel encoding and
    379   * decoding. The parameter for this control describes the number of tile
    380   * columns (in log2 units), which has a valid range of [0, 6]:
    381   * \verbatim
    382                 0 = 1 tile column
    383                 1 = 2 tile columns
    384                 2 = 4 tile columns
    385                 .....
    386                 n = 2**n tile columns
    387     \endverbatim
    388   * By default, the value is 0, i.e. one single column tile for entire image.
    389   */
    390  AV1E_SET_TILE_COLUMNS = 33,
    391 
    392  /*!\brief Codec control function to set number of tile rows, unsigned int
    393   * parameter
    394   *
    395   * In encoding and decoding, AV1 allows an input image frame be partitioned
    396   * into separate horizontal tile rows, which can be encoded or decoded
    397   * independently. The parameter for this control describes the number of tile
    398   * rows (in log2 units), which has a valid range of [0, 6]:
    399   * \verbatim
    400                0 = 1 tile row
    401                1 = 2 tile rows
    402                2 = 4 tile rows
    403                .....
    404                n = 2**n tile rows
    405   \endverbatim
    406   * By default, the value is 0, i.e. one single row tile for entire image.
    407   */
    408  AV1E_SET_TILE_ROWS = 34,
    409 
    410  /*!\brief Codec control function to enable RDO modulated by frame temporal
    411   * dependency, unsigned int parameter
    412   *
    413   * - 0 = disable
    414   * - 1 = enable (default)
    415   *
    416   * \note Excluded from CONFIG_REALTIME_ONLY build.
    417   */
    418  AV1E_SET_ENABLE_TPL_MODEL = 35,
    419 
    420  /*!\brief Codec control function to enable temporal filtering on key frame,
    421   * unsigned int parameter
    422   *
    423   * - 0 = disable
    424   * - 1 = enable without overlay (default)
    425   * - 2 = enable with overlay
    426   */
    427  AV1E_SET_ENABLE_KEYFRAME_FILTERING = 36,
    428 
    429  /*!\brief Codec control function to enable frame parallel decoding feature,
    430   * unsigned int parameter
    431   *
    432   * AV1 has a bitstream feature to reduce decoding dependency between frames
    433   * by turning off backward update of probability context used in encoding
    434   * and decoding. This allows staged parallel processing of more than one
    435   * video frames in the decoder. This control function provides a means to
    436   * turn this feature on or off for bitstreams produced by encoder.
    437   *
    438   * - 0 = disable (default)
    439   * - 1 = enable
    440   */
    441  AV1E_SET_FRAME_PARALLEL_DECODING = 37,
    442 
    443  /*!\brief Codec control function to enable error_resilient_mode, int parameter
    444   *
    445   * AV1 has a bitstream feature to guarantee parsability of a frame
    446   * by turning on the error_resilient_decoding mode, even though the
    447   * reference buffers are unreliable or not received.
    448   *
    449   * - 0 = disable (default)
    450   * - 1 = enable
    451   */
    452  AV1E_SET_ERROR_RESILIENT_MODE = 38,
    453 
    454  /*!\brief Codec control function to enable s_frame_mode, int parameter
    455   *
    456   * AV1 has a bitstream feature to designate certain frames as S-frames,
    457   * from where we can switch to a different stream,
    458   * even though the reference buffers may not be exactly identical.
    459   *
    460   * - 0 = disable (default)
    461   * - 1 = enable
    462   */
    463  AV1E_SET_S_FRAME_MODE = 39,
    464 
    465  /*!\brief Codec control function to set adaptive quantization mode, unsigned
    466   * int parameter
    467   *
    468   * AV1 has a segment based feature that allows encoder to adaptively change
    469   * quantization parameter for each segment within a frame to improve the
    470   * subjective quality. This control makes encoder operate in one of the
    471   * several AQ modes supported.
    472   *
    473   * - 0 = disable (default)
    474   * - 1 = variance
    475   * - 2 = complexity
    476   * - 3 = cyclic refresh
    477   */
    478  AV1E_SET_AQ_MODE = 40,
    479 
    480  /*!\brief Codec control function to enable/disable periodic Q boost, unsigned
    481   * int parameter
    482   *
    483   * One AV1 encoder speed feature is to enable quality boost by lowering
    484   * frame level Q periodically. This control function provides a means to
    485   * turn on/off this feature.
    486   *
    487   * - 0 = disable (default)
    488   * - 1 = enable
    489   */
    490  AV1E_SET_FRAME_PERIODIC_BOOST = 41,
    491 
    492  /*!\brief Codec control function to set noise sensitivity, unsigned int
    493   * parameter
    494   *
    495   * - 0 = disable (default)
    496   * - 1 = enable (Y only)
    497   */
    498  AV1E_SET_NOISE_SENSITIVITY = 42,
    499 
    500  /*!\brief Codec control function to set content type, aom_tune_content
    501   * parameter
    502   *
    503   *  - AOM_CONTENT_DEFAULT = Regular video content (default)
    504   *  - AOM_CONTENT_SCREEN  = Screen capture content
    505   *  - AOM_CONTENT_FILM = Film content
    506   */
    507  AV1E_SET_TUNE_CONTENT = 43,
    508 
    509  /*!\brief Codec control function to set CDF update mode, unsigned int
    510   * parameter
    511   *
    512   *  - 0: no update
    513   *  - 1: update on every frame (default)
    514   *  - 2: selectively update
    515   */
    516  AV1E_SET_CDF_UPDATE_MODE = 44,
    517 
    518  /*!\brief Codec control function to set color space info, int parameter
    519   *
    520   *  - 0 = For future use
    521   *  - 1 = BT.709
    522   *  - 2 = Unspecified (default)
    523   *  - 3 = For future use
    524   *  - 4 = BT.470 System M (historical)
    525   *  - 5 = BT.470 System B, G (historical)
    526   *  - 6 = BT.601
    527   *  - 7 = SMPTE 240
    528   *  - 8 = Generic film (color filters using illuminant C)
    529   *  - 9 = BT.2020, BT.2100
    530   *  - 10 = SMPTE 428 (CIE 1921 XYZ)
    531   *  - 11 = SMPTE RP 431-2
    532   *  - 12 = SMPTE EG 432-1
    533   *  - 13..21 = For future use
    534   *  - 22 = EBU Tech. 3213-E
    535   *  - 23 = For future use
    536   */
    537  AV1E_SET_COLOR_PRIMARIES = 45,
    538 
    539  /*!\brief Codec control function to set transfer function info, int parameter
    540   *
    541   * - 0 = For future use
    542   * - 1 = BT.709
    543   * - 2 = Unspecified (default)
    544   * - 3 = For future use
    545   * - 4 = BT.470 System M (historical)
    546   * - 5 = BT.470 System B, G (historical)
    547   * - 6 = BT.601
    548   * - 7 = SMPTE 240 M
    549   * - 8 = Linear
    550   * - 9 = Logarithmic (100 : 1 range)
    551   * - 10 = Logarithmic (100 * Sqrt(10) : 1 range)
    552   * - 11 = IEC 61966-2-4
    553   * - 12 = BT.1361
    554   * - 13 = sRGB or sYCC
    555   * - 14 = BT.2020 10-bit systems
    556   * - 15 = BT.2020 12-bit systems
    557   * - 16 = SMPTE ST 2084, ITU BT.2100 PQ
    558   * - 17 = SMPTE ST 428
    559   * - 18 = BT.2100 HLG, ARIB STD-B67
    560   * - 19 = For future use
    561   */
    562  AV1E_SET_TRANSFER_CHARACTERISTICS = 46,
    563 
    564  /*!\brief Codec control function to set transfer function info, int parameter
    565   *
    566   * - 0 = Identity matrix
    567   * - 1 = BT.709
    568   * - 2 = Unspecified (default)
    569   * - 3 = For future use
    570   * - 4 = US FCC 73.628
    571   * - 5 = BT.470 System B, G (historical)
    572   * - 6 = BT.601
    573   * - 7 = SMPTE 240 M
    574   * - 8 = YCgCo
    575   * - 9 = BT.2020 non-constant luminance, BT.2100 YCbCr
    576   * - 10 = BT.2020 constant luminance
    577   * - 11 = SMPTE ST 2085 YDzDx
    578   * - 12 = Chromaticity-derived non-constant luminance
    579   * - 13 = Chromaticity-derived constant luminance
    580   * - 14 = BT.2100 ICtCp
    581   * - 15 = For future use
    582   */
    583  AV1E_SET_MATRIX_COEFFICIENTS = 47,
    584 
    585  /*!\brief Codec control function to set chroma 4:2:0 sample position info,
    586   * aom_chroma_sample_position_t parameter
    587   *
    588   * AOM_CSP_UNKNOWN is default
    589   */
    590  AV1E_SET_CHROMA_SAMPLE_POSITION = 48,
    591 
    592  /*!\brief Codec control function to set minimum interval between GF/ARF
    593   * frames, unsigned int parameter
    594   *
    595   * By default the value is set as 4.
    596   */
    597  AV1E_SET_MIN_GF_INTERVAL = 49,
    598 
    599  /*!\brief Codec control function to set minimum interval between GF/ARF
    600   * frames, unsigned int parameter
    601   *
    602   * By default the value is set as 16.
    603   */
    604  AV1E_SET_MAX_GF_INTERVAL = 50,
    605 
    606  /*!\brief Codec control function to get an active map back from the encoder,
    607    aom_active_map_t* parameter
    608   */
    609  AV1E_GET_ACTIVEMAP = 51,
    610 
    611  /*!\brief Codec control function to set color range bit, int parameter
    612   *
    613   * - 0 = Limited range, 16..235 or HBD equivalent (default)
    614   * - 1 = Full range, 0..255 or HBD equivalent
    615   */
    616  AV1E_SET_COLOR_RANGE = 52,
    617 
    618  /*!\brief Codec control function to set intended rendering image size,
    619   * int32_t[2] parameter
    620   *
    621   * By default, this is identical to the image size in pixels.
    622   */
    623  AV1E_SET_RENDER_SIZE = 53,
    624 
    625  /*!\brief Control to set target sequence level index for a certain operating
    626   * point (OP), int parameter
    627   * Possible values are in the form of "ABxy".
    628   *  - AB: OP index.
    629   *  - xy: Target level index for the OP. Possible values are:
    630   *    + 0~27: corresponding to level 2.0 ~ 8.3. Note:
    631   *      > Levels 2.2 (2), 2.3 (3), 3.2 (6), 3.3 (7), 4.2 (10) & 4.3 (11) are
    632   *        undefined.
    633   *      > Levels 7.x and 8.x (20~27) are in draft status, available under the
    634   *        config flag CONFIG_CWG_C013.
    635   *    + 31: maximum parameters level, no level-based constraints.
    636   *    + 32: keep level stats only for level monitoring.
    637   *
    638   * E.g.:
    639   * - "0" means target level index 0 (2.0) for the 0th OP;
    640   * - "109" means target level index 9 (4.1) for the 1st OP;
    641   * - "1019" means target level index 19 (6.3) for the 10th OP.
    642   *
    643   * If the target level is not specified for an OP, the maximum parameters
    644   * level of 31 is used as default.
    645   */
    646  AV1E_SET_TARGET_SEQ_LEVEL_IDX = 54,
    647 
    648  /*!\brief Codec control function to get sequence level index for each
    649   * operating point. int* parameter. There can be at most 32 operating points.
    650   * The results will be written into a provided integer array of sufficient
    651   * size.
    652   */
    653  AV1E_GET_SEQ_LEVEL_IDX = 55,
    654 
    655  /*!\brief Codec control function to set intended superblock size, unsigned int
    656   * parameter
    657   *
    658   * By default, the superblock size is determined separately for each
    659   * frame by the encoder.
    660   */
    661  AV1E_SET_SUPERBLOCK_SIZE = 56,
    662 
    663  /*!\brief Codec control function to enable automatic set and use of
    664   * bwd-pred frames, unsigned int parameter
    665   *
    666   * - 0 = disable (default)
    667   * - 1 = enable
    668   */
    669  AOME_SET_ENABLEAUTOBWDREF = 57,
    670 
    671  /*!\brief Codec control function to encode with CDEF, unsigned int parameter
    672   *
    673   * CDEF is the constrained directional enhancement filter which is an
    674   * in-loop filter aiming to remove coding artifacts
    675   *
    676   * - 0 = disable
    677   * - 1 = enable for all frames (default)
    678   * - 2 = disable for non-reference frames
    679   * - 3 = enable adaptively based on frame qindex
    680   */
    681  AV1E_SET_ENABLE_CDEF = 58,
    682 
    683  /*!\brief Codec control function to encode with Loop Restoration Filter,
    684   * unsigned int parameter
    685   *
    686   * - 0 = disable
    687   * - 1 = enable (default)
    688   *
    689   * \note Excluded from CONFIG_REALTIME_ONLY build.
    690   */
    691  AV1E_SET_ENABLE_RESTORATION = 59,
    692 
    693  /*!\brief Codec control function to force video mode, unsigned int parameter
    694   *
    695   * - 0 = do not force video mode (default)
    696   * - 1 = force video mode even for a single frame
    697   */
    698  AV1E_SET_FORCE_VIDEO_MODE = 60,
    699 
    700  /*!\brief Codec control function to predict with OBMC mode, unsigned int
    701   * parameter
    702   *
    703   * - 0 = disable
    704   * - 1 = enable (default)
    705   *
    706   * \note Excluded from CONFIG_REALTIME_ONLY build.
    707   */
    708  AV1E_SET_ENABLE_OBMC = 61,
    709 
    710  /*!\brief Codec control function to encode without trellis quantization,
    711   * unsigned int parameter
    712   *
    713   * - 0 = apply trellis quantization (default)
    714   * - 1 = do not apply trellis quantization
    715   * - 2 = disable trellis quantization in rd search
    716   * - 3 = disable trellis quantization in estimate yrd
    717   */
    718  AV1E_SET_DISABLE_TRELLIS_QUANT = 62,
    719 
    720  /*!\brief Codec control function to encode with quantisation matrices,
    721   * unsigned int parameter
    722   *
    723   * AOM can operate with default quantisation matrices dependent on
    724   * quantisation level and block type.
    725   *
    726   * - 0 = disable (default)
    727   * - 1 = enable
    728   */
    729  AV1E_SET_ENABLE_QM = 63,
    730 
    731  /*!\brief Codec control function to set the min quant matrix flatness,
    732   * unsigned int parameter
    733   *
    734   * AOM can operate with different ranges of quantisation matrices.
    735   * As quantisation levels increase, the matrices get flatter. This
    736   * control sets the minimum level of flatness from which the matrices
    737   * are determined.
    738   *
    739   * By default, the encoder sets this minimum at level 5 (4 in all intra
    740   * mode).
    741   */
    742  AV1E_SET_QM_MIN = 64,
    743 
    744  /*!\brief Codec control function to set the max quant matrix flatness,
    745   * unsigned int parameter
    746   *
    747   * AOM can operate with different ranges of quantisation matrices.
    748   * As quantisation levels increase, the matrices get flatter. This
    749   * control sets the maximum level of flatness possible.
    750   *
    751   * By default, the encoder sets this maximum at level 9 (10 in all intra
    752   * mode)
    753   */
    754  AV1E_SET_QM_MAX = 65,
    755 
    756  /*!\brief Codec control function to set the min quant matrix flatness,
    757   * unsigned int parameter
    758   *
    759   * AOM can operate with different ranges of quantisation matrices.
    760   * As quantisation levels increase, the matrices get flatter. This
    761   * control sets the flatness for luma (Y).
    762   *
    763   * By default, the encoder sets this minimum at half the available
    764   * range.
    765   */
    766  AV1E_SET_QM_Y = 66,
    767 
    768  /*!\brief Codec control function to set the min quant matrix flatness,
    769   * unsigned int parameter
    770   *
    771   * AOM can operate with different ranges of quantisation matrices.
    772   * As quantisation levels increase, the matrices get flatter. This
    773   * control sets the flatness for chroma (U).
    774   *
    775   * By default, the encoder sets this minimum at half the available
    776   * range.
    777   */
    778  AV1E_SET_QM_U = 67,
    779 
    780  /*!\brief Codec control function to set the min quant matrix flatness,
    781   * unsigned int parameter
    782   *
    783   * AOM can operate with different ranges of quantisation matrices.
    784   * As quantisation levels increase, the matrices get flatter. This
    785   * control sets the flatness for chrome (V).
    786   *
    787   * By default, the encoder sets this minimum at half the available
    788   * range.
    789   */
    790  AV1E_SET_QM_V = 68,
    791 
    792  /* NOTE: enum 69 unused */
    793 
    794  /*!\brief Codec control function to set a maximum number of tile groups,
    795   * unsigned int parameter
    796   *
    797   * This will set the maximum number of tile groups. This will be
    798   * overridden if an MTU size is set. The default value is 1.
    799   */
    800  AV1E_SET_NUM_TG = 70,
    801 
    802  /*!\brief Codec control function to set an MTU size for a tile group, unsigned
    803   * int parameter
    804   *
    805   * This will set the maximum number of bytes in a tile group. This can be
    806   * exceeded only if a single tile is larger than this amount.
    807   *
    808   * By default, the value is 0, in which case a fixed number of tile groups
    809   * is used.
    810   */
    811  AV1E_SET_MTU = 71,
    812 
    813  /* NOTE: enum 72 unused */
    814 
    815  /*!\brief Codec control function to enable/disable rectangular partitions, int
    816   * parameter
    817   *
    818   * - 0 = disable
    819   * - 1 = enable (default)
    820   */
    821  AV1E_SET_ENABLE_RECT_PARTITIONS = 73,
    822 
    823  /*!\brief Codec control function to enable/disable AB partitions, int
    824   * parameter
    825   *
    826   * - 0 = disable
    827   * - 1 = enable (default)
    828   */
    829  AV1E_SET_ENABLE_AB_PARTITIONS = 74,
    830 
    831  /*!\brief Codec control function to enable/disable 1:4 and 4:1 partitions, int
    832   * parameter
    833   *
    834   * - 0 = disable
    835   * - 1 = enable (default)
    836   */
    837  AV1E_SET_ENABLE_1TO4_PARTITIONS = 75,
    838 
    839  /*!\brief Codec control function to set min partition size, int parameter
    840   *
    841   * min_partition_size is applied to both width and height of the partition.
    842   * i.e, both width and height of a partition can not be smaller than
    843   * the min_partition_size, except the partition at the picture boundary.
    844   *
    845   * Valid values: [4, 8, 16, 32, 64, 128]. The default value is 4 for
    846   * 4x4.
    847   */
    848  AV1E_SET_MIN_PARTITION_SIZE = 76,
    849 
    850  /*!\brief Codec control function to set max partition size, int parameter
    851   *
    852   * max_partition_size is applied to both width and height of the partition.
    853   * i.e, both width and height of a partition can not be larger than
    854   * the max_partition_size.
    855   *
    856   * Valid values:[4, 8, 16, 32, 64, 128] The default value is 128 for
    857   * 128x128.
    858   */
    859  AV1E_SET_MAX_PARTITION_SIZE = 77,
    860 
    861  /*!\brief Codec control function to turn on / off intra edge filter
    862   * at sequence level, int parameter
    863   *
    864   * - 0 = disable
    865   * - 1 = enable (default)
    866   */
    867  AV1E_SET_ENABLE_INTRA_EDGE_FILTER = 78,
    868 
    869  /*!\brief Codec control function to turn on / off frame order hint (int
    870   * parameter). Affects: joint compound mode, motion field motion vector,
    871   * ref frame sign bias
    872   *
    873   * - 0 = disable
    874   * - 1 = enable (default)
    875   */
    876  AV1E_SET_ENABLE_ORDER_HINT = 79,
    877 
    878  /*!\brief Codec control function to turn on / off 64-length transforms, int
    879   * parameter
    880   *
    881   * This will enable or disable usage of length 64 transforms in any
    882   * direction.
    883   *
    884   * - 0 = disable
    885   * - 1 = enable (default)
    886   */
    887  AV1E_SET_ENABLE_TX64 = 80,
    888 
    889  /*!\brief Codec control function to turn on / off flip and identity
    890   * transforms, int parameter
    891   *
    892   * This will enable or disable usage of flip and identity transform
    893   * types in any direction. If enabled, this includes:
    894   * - FLIPADST_DCT
    895   * - DCT_FLIPADST
    896   * - FLIPADST_FLIPADST
    897   * - ADST_FLIPADST
    898   * - FLIPADST_ADST
    899   * - IDTX
    900   * - V_DCT
    901   * - H_DCT
    902   * - V_ADST
    903   * - H_ADST
    904   * - V_FLIPADST
    905   * - H_FLIPADST
    906   *
    907   * Valid values:
    908   * - 0 = disable
    909   * - 1 = enable (default)
    910   */
    911  AV1E_SET_ENABLE_FLIP_IDTX = 81,
    912 
    913  /*!\brief Codec control function to turn on / off rectangular transforms, int
    914   * parameter
    915   *
    916   * This will enable or disable usage of rectangular transforms. NOTE:
    917   * Rectangular transforms only enabled when corresponding rectangular
    918   * partitions are.
    919   *
    920   * - 0 = disable
    921   * - 1 = enable (default)
    922   */
    923  AV1E_SET_ENABLE_RECT_TX = 82,
    924 
    925  /*!\brief Codec control function to turn on / off dist-wtd compound mode
    926   * at sequence level, int parameter
    927   *
    928   * This will enable or disable distance-weighted compound mode.
    929   * \attention If AV1E_SET_ENABLE_ORDER_HINT is 0, then this flag is forced
    930   * to 0.
    931   *
    932   * - 0 = disable
    933   * - 1 = enable (default)
    934   */
    935  AV1E_SET_ENABLE_DIST_WTD_COMP = 83,
    936 
    937  /*!\brief Codec control function to turn on / off ref frame mvs (mfmv) usage
    938   * at sequence level, int parameter
    939   *
    940   * \attention If AV1E_SET_ENABLE_ORDER_HINT is 0, then this flag is forced
    941   * to 0.
    942   *
    943   * - 0 = disable
    944   * - 1 = enable (default)
    945   */
    946  AV1E_SET_ENABLE_REF_FRAME_MVS = 84,
    947 
    948  /*!\brief Codec control function to set temporal mv prediction
    949   * enabling/disabling at frame level, int parameter
    950   *
    951   * \attention If AV1E_SET_ENABLE_REF_FRAME_MVS is 0, then this flag is
    952   * forced to 0.
    953   *
    954   * - 0 = disable
    955   * - 1 = enable (default)
    956   */
    957  AV1E_SET_ALLOW_REF_FRAME_MVS = 85,
    958 
    959  /*!\brief Codec control function to turn on / off dual interpolation filter
    960   * for a sequence, int parameter
    961   *
    962   * - 0 = disable
    963   * - 1 = enable
    964   */
    965  AV1E_SET_ENABLE_DUAL_FILTER = 86,
    966 
    967  /*!\brief Codec control function to turn on / off delta quantization in chroma
    968   * planes for a sequence, int parameter
    969   *
    970   * - 0 = disable (default)
    971   * - 1 = enable
    972   */
    973  AV1E_SET_ENABLE_CHROMA_DELTAQ = 87,
    974 
    975  /*!\brief Codec control function to turn on / off masked compound usage
    976   * (wedge and diff-wtd compound modes) for a sequence, int parameter
    977   *
    978   * - 0 = disable
    979   * - 1 = enable (default)
    980   */
    981  AV1E_SET_ENABLE_MASKED_COMP = 88,
    982 
    983  /*!\brief Codec control function to turn on / off one sided compound usage
    984   * for a sequence, int parameter
    985   *
    986   * - 0 = disable
    987   * - 1 = enable (default)
    988   */
    989  AV1E_SET_ENABLE_ONESIDED_COMP = 89,
    990 
    991  /*!\brief Codec control function to turn on / off interintra compound
    992   * for a sequence, int parameter
    993   *
    994   * - 0 = disable
    995   * - 1 = enable (default)
    996   */
    997  AV1E_SET_ENABLE_INTERINTRA_COMP = 90,
    998 
    999  /*!\brief Codec control function to turn on / off smooth inter-intra
   1000   * mode for a sequence, int parameter
   1001   *
   1002   * - 0 = disable
   1003   * - 1 = enable (default)
   1004   */
   1005  AV1E_SET_ENABLE_SMOOTH_INTERINTRA = 91,
   1006 
   1007  /*!\brief Codec control function to turn on / off difference weighted
   1008   * compound, int parameter
   1009   *
   1010   * - 0 = disable
   1011   * - 1 = enable (default)
   1012   */
   1013  AV1E_SET_ENABLE_DIFF_WTD_COMP = 92,
   1014 
   1015  /*!\brief Codec control function to turn on / off interinter wedge
   1016   * compound, int parameter
   1017   *
   1018   * - 0 = disable
   1019   * - 1 = enable (default)
   1020   */
   1021  AV1E_SET_ENABLE_INTERINTER_WEDGE = 93,
   1022 
   1023  /*!\brief Codec control function to turn on / off interintra wedge
   1024   * compound, int parameter
   1025   *
   1026   * - 0 = disable
   1027   * - 1 = enable (default)
   1028   */
   1029  AV1E_SET_ENABLE_INTERINTRA_WEDGE = 94,
   1030 
   1031  /*!\brief Codec control function to turn on / off global motion usage
   1032   * for a sequence, int parameter
   1033   *
   1034   * - 0 = disable
   1035   * - 1 = enable (default)
   1036   *
   1037   * \note Excluded from CONFIG_REALTIME_ONLY build.
   1038   */
   1039  AV1E_SET_ENABLE_GLOBAL_MOTION = 95,
   1040 
   1041  /*!\brief Codec control function to turn on / off warped motion usage
   1042   * at sequence level, int parameter
   1043   *
   1044   * - 0 = disable
   1045   * - 1 = enable (default)
   1046   *
   1047   * \note Excluded from CONFIG_REALTIME_ONLY build.
   1048   */
   1049  AV1E_SET_ENABLE_WARPED_MOTION = 96,
   1050 
   1051  /*!\brief Codec control function to turn on / off warped motion usage
   1052   * at frame level, int parameter
   1053   *
   1054   * \attention If AV1E_SET_ENABLE_WARPED_MOTION is 0, then this flag is
   1055   * forced to 0.
   1056   *
   1057   * - 0 = disable
   1058   * - 1 = enable (default)
   1059   *
   1060   * \note Excluded from CONFIG_REALTIME_ONLY build.
   1061   */
   1062  AV1E_SET_ALLOW_WARPED_MOTION = 97,
   1063 
   1064  /*!\brief Codec control function to turn on / off filter intra usage at
   1065   * sequence level, int parameter
   1066   *
   1067   * - 0 = disable
   1068   * - 1 = enable (default)
   1069   */
   1070  AV1E_SET_ENABLE_FILTER_INTRA = 98,
   1071 
   1072  /*!\brief Codec control function to turn on / off smooth intra modes usage,
   1073   * int parameter
   1074   *
   1075   * This will enable or disable usage of smooth, smooth_h and smooth_v intra
   1076   * modes.
   1077   *
   1078   * - 0 = disable
   1079   * - 1 = enable (default)
   1080   */
   1081  AV1E_SET_ENABLE_SMOOTH_INTRA = 99,
   1082 
   1083  /*!\brief Codec control function to turn on / off Paeth intra mode usage, int
   1084   * parameter
   1085   *
   1086   * - 0 = disable
   1087   * - 1 = enable (default)
   1088   */
   1089  AV1E_SET_ENABLE_PAETH_INTRA = 100,
   1090 
   1091  /*!\brief Codec control function to turn on / off CFL uv intra mode usage, int
   1092   * parameter
   1093   *
   1094   * This will enable or disable usage of chroma-from-luma intra mode.
   1095   *
   1096   * - 0 = disable
   1097   * - 1 = enable (default)
   1098   */
   1099  AV1E_SET_ENABLE_CFL_INTRA = 101,
   1100 
   1101  /*!\brief Codec control function to turn on / off frame superresolution, int
   1102   * parameter
   1103   *
   1104   * - 0 = disable
   1105   * - 1 = enable (default)
   1106   */
   1107  AV1E_SET_ENABLE_SUPERRES = 102,
   1108 
   1109  /*!\brief Codec control function to turn on / off overlay frames for
   1110   * filtered ALTREF frames, int parameter
   1111   *
   1112   * This will enable or disable coding of overlay frames for filtered ALTREF
   1113   * frames. When set to 0, overlay frames are not used but show existing frame
   1114   * is used to display the filtered ALTREF frame as is. As a result the decoded
   1115   * frame rate remains the same as the display frame rate. The default is 1.
   1116   */
   1117  AV1E_SET_ENABLE_OVERLAY = 103,
   1118 
   1119  /*!\brief Codec control function to turn on/off palette mode, int parameter */
   1120  AV1E_SET_ENABLE_PALETTE = 104,
   1121 
   1122  /*!\brief Codec control function to turn on/off intra block copy mode, int
   1123     parameter */
   1124  AV1E_SET_ENABLE_INTRABC = 105,
   1125 
   1126  /*!\brief Codec control function to turn on/off intra angle delta, int
   1127     parameter */
   1128  AV1E_SET_ENABLE_ANGLE_DELTA = 106,
   1129 
   1130  /*!\brief Codec control function to set the delta q mode, unsigned int
   1131   * parameter
   1132   *
   1133   * AV1 supports a delta q mode feature, that allows modulating q per
   1134   * superblock.
   1135   *
   1136   * - 0 = deltaq signaling off
   1137   * - 1 = use modulation to maximize objective quality (default)
   1138   * - 2 = use modulation for local test
   1139   * - 3 = use modulation for key frame perceptual quality optimization
   1140   * - 4 = use modulation for user rating based perceptual quality optimization
   1141   * - 5 = use modulation for HDR video
   1142   * - 6 = use modulation for all intra using Variance Boost
   1143   *
   1144   * \attention Delta q modes 1-5 are unsupported and are silently ignored in
   1145   * non-RD mode. Non-RD mode is enabled by setting cpu-used >= 8 (all intra
   1146   * usage) and cpu-used >= 7 (realtime usage).
   1147   */
   1148  AV1E_SET_DELTAQ_MODE = 107,
   1149 
   1150  /*!\brief Codec control function to turn on/off loopfilter modulation
   1151   * when delta q modulation is enabled, unsigned int parameter.
   1152   *
   1153   * \attention AV1 only supports loopfilter modulation when delta q
   1154   * modulation is enabled as well.
   1155   */
   1156  AV1E_SET_DELTALF_MODE = 108,
   1157 
   1158  /*!\brief Codec control function to set the single tile decoding mode,
   1159   * unsigned int parameter
   1160   *
   1161   * \attention Only applicable if large scale tiling is on.
   1162   *
   1163   * - 0 = single tile decoding is off
   1164   * - 1 = single tile decoding is on (default)
   1165   */
   1166  AV1E_SET_SINGLE_TILE_DECODING = 109,
   1167 
   1168  /*!\brief Codec control function to enable the extreme motion vector unit
   1169   * test, unsigned int parameter
   1170   *
   1171   * - 0 = off
   1172   * - 1 = MAX_EXTREME_MV
   1173   * - 2 = MIN_EXTREME_MV
   1174   *
   1175   * \note This is only used in motion vector unit test.
   1176   */
   1177  AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST = 110,
   1178 
   1179  /*!\brief Codec control function to signal picture timing info in the
   1180   * bitstream, aom_timing_info_type_t parameter. Default is
   1181   * AOM_TIMING_UNSPECIFIED.
   1182   */
   1183  AV1E_SET_TIMING_INFO_TYPE = 111,
   1184 
   1185  /*!\brief Codec control function to add film grain parameters (one of several
   1186   * preset types) info in the bitstream, int parameter
   1187   *
   1188   Valid range: 0..16, 0 is unknown, 1..16 are test vectors
   1189   */
   1190  AV1E_SET_FILM_GRAIN_TEST_VECTOR = 112,
   1191 
   1192  /*!\brief Codec control function to set the path to the film grain parameters,
   1193   * const char* parameter
   1194   */
   1195  AV1E_SET_FILM_GRAIN_TABLE = 113,
   1196 
   1197  /*!\brief Sets the noise level, int parameter */
   1198  AV1E_SET_DENOISE_NOISE_LEVEL = 114,
   1199 
   1200  /*!\brief Sets the denoisers block size, unsigned int parameter */
   1201  AV1E_SET_DENOISE_BLOCK_SIZE = 115,
   1202 
   1203  /*!\brief Sets the chroma subsampling x value, unsigned int parameter */
   1204  AV1E_SET_CHROMA_SUBSAMPLING_X = 116,
   1205 
   1206  /*!\brief Sets the chroma subsampling y value, unsigned int parameter */
   1207  AV1E_SET_CHROMA_SUBSAMPLING_Y = 117,
   1208 
   1209  /*!\brief Control to use a reduced tx type set, int parameter */
   1210  AV1E_SET_REDUCED_TX_TYPE_SET = 118,
   1211 
   1212  /*!\brief Control to use dct only for intra modes, int parameter */
   1213  AV1E_SET_INTRA_DCT_ONLY = 119,
   1214 
   1215  /*!\brief Control to use dct only for inter modes, int parameter */
   1216  AV1E_SET_INTER_DCT_ONLY = 120,
   1217 
   1218  /*!\brief Control to use default tx type only for intra modes, int parameter
   1219   */
   1220  AV1E_SET_INTRA_DEFAULT_TX_ONLY = 121,
   1221 
   1222  /*!\brief Control to use adaptive quantize_b, int parameter */
   1223  AV1E_SET_QUANT_B_ADAPT = 122,
   1224 
   1225  /*!\brief Control to select maximum height for the GF group pyramid structure,
   1226   * unsigned int parameter
   1227   *
   1228   * Valid range: 0..5
   1229   */
   1230  AV1E_SET_GF_MAX_PYRAMID_HEIGHT = 123,
   1231 
   1232  /*!\brief Control to select maximum reference frames allowed per frame, int
   1233   * parameter
   1234   *
   1235   * Valid range: 3..7
   1236   */
   1237  AV1E_SET_MAX_REFERENCE_FRAMES = 124,
   1238 
   1239  /*!\brief Control to use reduced set of single and compound references, int
   1240     parameter */
   1241  AV1E_SET_REDUCED_REFERENCE_SET = 125,
   1242 
   1243  /*!\brief Control to set frequency of the cost updates for coefficients,
   1244   * unsigned int parameter
   1245   *
   1246   * - 0 = update at SB level (default)
   1247   * - 1 = update at SB row level in tile
   1248   * - 2 = update at tile level
   1249   * - 3 = turn off
   1250   */
   1251  AV1E_SET_COEFF_COST_UPD_FREQ = 126,
   1252 
   1253  /*!\brief Control to set frequency of the cost updates for mode, unsigned int
   1254   * parameter
   1255   *
   1256   * - 0 = update at SB level (default)
   1257   * - 1 = update at SB row level in tile
   1258   * - 2 = update at tile level
   1259   * - 3 = turn off
   1260   */
   1261  AV1E_SET_MODE_COST_UPD_FREQ = 127,
   1262 
   1263  /*!\brief Control to set frequency of the cost updates for motion vectors,
   1264   * unsigned int parameter
   1265   *
   1266   * - 0 = update at SB level (default)
   1267   * - 1 = update at SB row level in tile
   1268   * - 2 = update at tile level
   1269   * - 3 = turn off
   1270   */
   1271  AV1E_SET_MV_COST_UPD_FREQ = 128,
   1272 
   1273  /*!\brief Control to set bit mask that specifies which tier each of the 32
   1274   * possible operating points conforms to, unsigned int parameter
   1275   *
   1276   * - 0 = main tier (default)
   1277   * - 1 = high tier
   1278   */
   1279  AV1E_SET_TIER_MASK = 129,
   1280 
   1281  /*!\brief Control to set minimum compression ratio, unsigned int parameter
   1282   * Take integer values. If non-zero, encoder will try to keep the compression
   1283   * ratio of each frame to be higher than the given value divided by 100.
   1284   * E.g. 850 means minimum compression ratio of 8.5.
   1285   */
   1286  AV1E_SET_MIN_CR = 130,
   1287 
   1288  /* NOTE: enums 145-149 unused */
   1289 
   1290  /*!\brief Codec control function to set the layer id, aom_svc_layer_id_t*
   1291   * parameter
   1292   */
   1293  AV1E_SET_SVC_LAYER_ID = 131,
   1294 
   1295  /*!\brief Codec control function to set SVC parameters, aom_svc_params_t*
   1296   * parameter
   1297   */
   1298  AV1E_SET_SVC_PARAMS = 132,
   1299 
   1300  /*!\brief Codec control function to set the reference frame config,
   1301   * aom_svc_ref_frame_config_t* parameter
   1302   */
   1303  AV1E_SET_SVC_REF_FRAME_CONFIG = 133,
   1304 
   1305  /*!\brief Codec control function to set the path to the VMAF model used when
   1306   * tuning the encoder for VMAF, const char* parameter
   1307   */
   1308  AV1E_SET_VMAF_MODEL_PATH = 134,
   1309 
   1310  /*!\brief Codec control function to enable EXT_TILE_DEBUG in AV1 encoder,
   1311   * unsigned int parameter
   1312   *
   1313   * - 0 = disable (default)
   1314   * - 1 = enable
   1315   *
   1316   * \note This is only used in lightfield example test.
   1317   */
   1318  AV1E_ENABLE_EXT_TILE_DEBUG = 135,
   1319 
   1320  /*!\brief Codec control function to enable the superblock multipass unit test
   1321   * in AV1 to ensure that the encoder does not leak state between different
   1322   * passes. unsigned int parameter.
   1323   *
   1324   * - 0 = disable (default)
   1325   * - 1 = enable
   1326   *
   1327   * \note This is only used in sb_multipass unit test.
   1328   */
   1329  AV1E_ENABLE_SB_MULTIPASS_UNIT_TEST = 136,
   1330 
   1331  /*!\brief Control to select minimum height for the GF group pyramid structure,
   1332   * unsigned int parameter
   1333   *
   1334   * Valid values: 0..5
   1335   */
   1336  AV1E_SET_GF_MIN_PYRAMID_HEIGHT = 137,
   1337 
   1338  /*!\brief Control to set average complexity of the corpus in the case of
   1339   * single pass vbr based on LAP, unsigned int parameter
   1340   */
   1341  AV1E_SET_VBR_CORPUS_COMPLEXITY_LAP = 138,
   1342 
   1343  /*!\brief Control to get baseline gf interval
   1344   */
   1345  AV1E_GET_BASELINE_GF_INTERVAL = 139,
   1346 
   1347  /*\brief Control to set encoding the denoised frame from denoise-noise-level
   1348   *
   1349   * - 0 = disabled/encode the original frame
   1350   * - 1 = enabled/encode the denoised frame (default)
   1351   */
   1352  AV1E_SET_ENABLE_DNL_DENOISING = 140,
   1353 
   1354  /*!\brief Codec control function to turn on / off D45 to D203 intra mode
   1355   * usage, int parameter
   1356   *
   1357   * This will enable or disable usage of D45 to D203 intra modes, which are a
   1358   * subset of directional modes. This control has no effect if directional
   1359   * modes are disabled (AV1E_SET_ENABLE_DIRECTIONAL_INTRA set to 0).
   1360   *
   1361   * - 0 = disable
   1362   * - 1 = enable (default)
   1363   */
   1364  AV1E_SET_ENABLE_DIAGONAL_INTRA = 141,
   1365 
   1366  /*!\brief Control to set frequency of the cost updates for intrabc motion
   1367   * vectors, unsigned int parameter
   1368   *
   1369   * - 0 = update at SB level (default)
   1370   * - 1 = update at SB row level in tile
   1371   * - 2 = update at tile level
   1372   * - 3 = turn off
   1373   */
   1374  AV1E_SET_DV_COST_UPD_FREQ = 142,
   1375 
   1376  /*!\brief Codec control to set the path for partition stats read and write.
   1377   * const char * parameter.
   1378   */
   1379  AV1E_SET_PARTITION_INFO_PATH = 143,
   1380 
   1381  /*!\brief Codec control to use an external partition model
   1382   * A set of callback functions is passed through this control
   1383   * to let the encoder encode with given partitions.
   1384   */
   1385  AV1E_SET_EXTERNAL_PARTITION = 144,
   1386 
   1387  /*!\brief Codec control function to turn on / off directional intra mode
   1388   * usage, int parameter
   1389   *
   1390   * - 0 = disable
   1391   * - 1 = enable (default)
   1392   */
   1393  AV1E_SET_ENABLE_DIRECTIONAL_INTRA = 145,
   1394 
   1395  /*!\brief Control to turn on / off transform size search.
   1396   * Note: it can not work with non RD pick mode in real-time encoding,
   1397   * where the max transform size is only 16x16.
   1398   * It will be ignored if non RD pick mode is set.
   1399   *
   1400   * - 0 = disable, transforms always have the largest possible size
   1401   * - 1 = enable, search for the best transform size for each block (default)
   1402   */
   1403  AV1E_SET_ENABLE_TX_SIZE_SEARCH = 146,
   1404 
   1405  /*!\brief Codec control function to set reference frame compound prediction.
   1406   * aom_svc_ref_frame_comp_pred_t* parameter
   1407   */
   1408  AV1E_SET_SVC_REF_FRAME_COMP_PRED = 147,
   1409 
   1410  /*!\brief Set --deltaq-mode strength, where the value is a percentage,
   1411   * unsigned int parameter.
   1412   *
   1413   * Valid range: [0, 1000]
   1414   */
   1415  AV1E_SET_DELTAQ_STRENGTH = 148,
   1416 
   1417  /*!\brief Codec control to control loop filter
   1418   *
   1419   * - 0 = Loop filter is disabled for all frames
   1420   * - 1 = Loop filter is enabled for all frames
   1421   * - 2 = Loop filter is disabled for non-reference frames
   1422   * - 3 = Loop filter is disabled for the frames with low motion
   1423   */
   1424  AV1E_SET_LOOPFILTER_CONTROL = 149,
   1425 
   1426  /*!\brief Codec control function to get the loopfilter chosen by the encoder,
   1427   * int* parameter
   1428   */
   1429  AOME_GET_LOOPFILTER_LEVEL = 150,
   1430 
   1431  /*!\brief Codec control to automatically turn off several intra coding tools,
   1432   * unsigned int parameter
   1433   * - 0 = do not use the feature
   1434   * - 1 = enable the automatic decision to turn off several intra tools
   1435   */
   1436  AV1E_SET_AUTO_INTRA_TOOLS_OFF = 151,
   1437 
   1438  /*!\brief Codec control function to set flag for rate control used by external
   1439   * encoders.
   1440   * - 1 = Enable rate control for external encoders. This will disable content
   1441   * dependency in rate control and cyclic refresh.
   1442   * - 0 = Default. Disable rate control for external encoders.
   1443   */
   1444  AV1E_SET_RTC_EXTERNAL_RC = 152,
   1445 
   1446  /*!\brief Codec control function to enable frame parallel multi-threading
   1447   * of the encoder, unsigned int parameter
   1448   *
   1449   * - 0 = disable (default)
   1450   * - 1 = enable
   1451   */
   1452  AV1E_SET_FP_MT = 153,
   1453 
   1454  /*!\brief Codec control to enable actual frame parallel encode or
   1455   * simulation of frame parallel encode in FPMT unit test, unsigned int
   1456   * parameter
   1457   *
   1458   * - 0 = simulate frame parallel encode
   1459   * - 1 = actual frame parallel encode (default)
   1460   *
   1461   * \note This is only used in FPMT unit test.
   1462   */
   1463  AV1E_SET_FP_MT_UNIT_TEST = 154,
   1464 
   1465  /*!\brief Codec control function to get the target sequence level index for
   1466   * each operating point. int* parameter. There can be at most 32 operating
   1467   * points. The results will be written into a provided integer array of
   1468   * sufficient size. If a target level is not set, the result will be 31.
   1469   * Please refer to https://aomediacodec.github.io/av1-spec/#levels for more
   1470   * details on level definitions and indices.
   1471   */
   1472  AV1E_GET_TARGET_SEQ_LEVEL_IDX = 155,
   1473 
   1474  /*!\brief Codec control function to get the number of operating points. int*
   1475   * parameter.
   1476   */
   1477  AV1E_GET_NUM_OPERATING_POINTS = 156,
   1478 
   1479  /*!\brief Codec control function to skip the application of post-processing
   1480   * filters on reconstructed frame, unsigned int parameter
   1481   *
   1482   * - 0 = disable (default)
   1483   * - 1 = enable
   1484   *
   1485   * \attention For this value to be used aom_codec_enc_cfg_t::g_usage
   1486   *            must be set to AOM_USAGE_ALL_INTRA.
   1487   */
   1488  AV1E_SET_SKIP_POSTPROC_FILTERING = 157,
   1489 
   1490  /*!\brief Codec control function to enable the superblock level
   1491   * qp sweep in AV1 to ensure that end-to-end test runs well,
   1492   * unsigned int parameter.
   1493   *
   1494   * - 0 = disable (default)
   1495   * - 1 = enable
   1496   *
   1497   * \note This is only used in sb_qp_sweep unit test.
   1498   */
   1499  AV1E_ENABLE_SB_QP_SWEEP = 158,
   1500 
   1501  /*!\brief Codec control to set quantizer for the next frame, int parameter.
   1502   *
   1503   * - Valid range [0, 63]
   1504   *
   1505   * This will turn off cyclic refresh. Only applicable to 1-pass.
   1506   */
   1507  AV1E_SET_QUANTIZER_ONE_PASS = 159,
   1508 
   1509  /*!\brief Codec control to enable the rate distribution guided delta
   1510   * quantization in all intra mode, unsigned int parameter
   1511   *
   1512   * - 0 = disable (default)
   1513   * - 1 = enable
   1514   *
   1515   * \attention This feature requires --deltaq-mode=3, also an input file
   1516   *            which contains rate distribution for each 16x16 block,
   1517   *            passed in by --rate-distribution-info=rate_distribution.txt.
   1518   */
   1519  AV1E_ENABLE_RATE_GUIDE_DELTAQ = 160,
   1520 
   1521  /*!\brief Codec control to set the input file for rate distribution used
   1522   * in all intra mode, const char * parameter
   1523   * The input should be the name of a text file, which
   1524   * contains (rows x cols) float values separated by space.
   1525   * Each float value represent the number of bits for each 16x16 block.
   1526   * rows = (frame_height + 15) / 16
   1527   * cols = (frame_width + 15) / 16
   1528   *
   1529   * \attention This feature requires --enable-rate-guide-deltaq=1.
   1530   */
   1531  AV1E_SET_RATE_DISTRIBUTION_INFO = 161,
   1532 
   1533  /*!\brief Codec control to get the CDEF strength for Y / luma plane,
   1534   * int * parameter.
   1535   * Returns an integer array of CDEF_MAX_STRENGTHS elements.
   1536   */
   1537  AV1E_GET_LUMA_CDEF_STRENGTH = 162,
   1538 
   1539  /*!\brief Codec control to set the target bitrate in kilobits per second,
   1540   * unsigned int parameter. For 1 pass CBR mode, single layer encoding.
   1541   * This controls replaces the call aom_codec_enc_config_set(&codec, &cfg)
   1542   * when only target bitrate is changed, and so is much cheaper as it
   1543   * bypasses a lot of unneeded code checks.
   1544   */
   1545  AV1E_SET_BITRATE_ONE_PASS_CBR = 163,
   1546 
   1547  /*!\brief Codec control to set the maximum number of consecutive frame drops,
   1548   * in units of frames, allowed for the frame dropper in 1 pass
   1549   * CBR mode, int parameter. Value of zero has no effect.
   1550   * \deprecated Use the new control AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.
   1551   */
   1552  AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR = 164,
   1553 
   1554  /*!\brief Codec control to set the frame drop mode for SVC,
   1555   * unsigned int parameter. The valid values are constants of the
   1556   * AOM_SVC_FRAME_DROP_MODE enum: AOM_LAYER_DROP or AOM_FULL_SUPERFRAME_DROP.
   1557   */
   1558  AV1E_SET_SVC_FRAME_DROP_MODE = 165,
   1559 
   1560  /*!\brief Codec control to set auto tiling, unsigned int parameter.
   1561   * Value of 1 means encoder will set number of tile_columns and tile_rows,
   1562   * based on the number of threads and resolution. This will override any
   1563   * settings set via SET_TILE_COLUMNS/ROWS. If the value is 0 no change is
   1564   * done, the previous setting (if any) for tile_columns/rows is preserved.
   1565   */
   1566  AV1E_SET_AUTO_TILES = 166,
   1567 
   1568  /*!\brief Codec control to get the high motion content flag, used for
   1569   * screen content realtime (RTC) encoding, int * parameter.
   1570   * Returns an integer.
   1571   * 1 means high motion content flag is set to 1, 0 means set to 0.
   1572   */
   1573  AV1E_GET_HIGH_MOTION_CONTENT_SCREEN_RTC = 167,
   1574 
   1575  /*!\brief Codec control to enable post encode frame drop for RTC encoding,
   1576   * int parameter.
   1577   *
   1578   * Value of 1 means encoder will enable post encode drop. Default is 0 (not
   1579   * enabled). Post encode drop is only allowed when frame dropping is enabled
   1580   * (aom_codec_enc_cfg::rc_dropframe_thresh > 0).
   1581   */
   1582  AV1E_SET_POSTENCODE_DROP_RTC = 168,
   1583 
   1584  /*!\brief Codec control to set the maximum number of consecutive frame drops,
   1585   * in units of time (milliseconds), allowed for the frame dropper in 1 pass
   1586   * CBR mode, int parameter. Value of zero has no effect.
   1587   */
   1588  AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR = 169,
   1589 
   1590  /*!\brief Codec control to enable the low complexity decode mode, unsigned
   1591   * int parameter. Value of zero means this mode is disabled.
   1592   */
   1593  AV1E_SET_ENABLE_LOW_COMPLEXITY_DECODE = 170,
   1594 
   1595  /*!\brief Codec control to set the screen content detection mode,
   1596   * aom_screen_detection_mode parameter.
   1597   *
   1598   * - 1: AOM_SCREEN_DETECTION_STANDARD = standard (default)
   1599   * - 2: AOM_SCREEN_DETECTION_ANTIALIASING_AWARE = anti-aliased text and
   1600   *   graphics aware
   1601   */
   1602  AV1E_SET_SCREEN_CONTENT_DETECTION_MODE = 171,
   1603 
   1604  /*!\brief Codec control to enable adaptive sharpness, which modulates
   1605   * sharpness based on frame QP, unsigned int parameter.
   1606   *
   1607   * Adaptive sharpness helps mitigate blocking artifacts in the low to medium
   1608   * quality range.
   1609   *
   1610   * - 0 = disable (default)
   1611   * - 1 = enable
   1612   *
   1613   * \note When adaptive sharpness is enabled, AOME_SET_SHARPNESS acts as a
   1614   * "maximum sharpness" value. Adaptive sharpness can still modulate effective
   1615   * sharpness between 0 and the maximum sharpness. As a consequence, adaptive
   1616   * sharpness only has effects when sharpness is greater than 0.
   1617   */
   1618  AV1E_SET_ENABLE_ADAPTIVE_SHARPNESS = 172,
   1619 
   1620  // Any new encoder control IDs should be added above.
   1621  // Maximum allowed encoder control ID is 229.
   1622  // No encoder control ID should be added below.
   1623 };
   1624 
   1625 /*!\brief aom 1-D scaling mode
   1626 *
   1627 * This set of constants define 1-D aom scaling modes
   1628 */
   1629 typedef enum aom_scaling_mode_1d {
   1630  AOME_NORMAL = 0,
   1631  AOME_FOURFIVE = 1,
   1632  AOME_THREEFIVE = 2,
   1633  AOME_THREEFOUR = 3,
   1634  AOME_ONEFOUR = 4,
   1635  AOME_ONEEIGHT = 5,
   1636  AOME_ONETWO = 6,
   1637  AOME_TWOTHREE = 7,
   1638  AOME_ONETHREE = 8
   1639 } AOM_SCALING_MODE;
   1640 
   1641 /*!\brief Max number of segments
   1642 *
   1643 * This is the limit of number of segments allowed within a frame.
   1644 *
   1645 * Currently same as "MAX_SEGMENTS" in AV1, the maximum that AV1 supports.
   1646 *
   1647 */
   1648 #define AOM_MAX_SEGMENTS 8
   1649 
   1650 /*!\brief  aom region of interest map
   1651 *
   1652 * These defines the data structures for the region of interest map
   1653 */
   1654 typedef struct aom_roi_map {
   1655  /*! If ROI is enabled. */
   1656  uint8_t enabled;
   1657  /*! An id between 0 and 7 for each 4x4 region within a frame. */
   1658  unsigned char *roi_map;
   1659  unsigned int rows;               /**< Number of rows. */
   1660  unsigned int cols;               /**< Number of columns. */
   1661  int delta_q[AOM_MAX_SEGMENTS];   /**< Quantizer deltas. */
   1662  int delta_lf[AOM_MAX_SEGMENTS];  /**< Loop filter deltas. */
   1663  int skip[AOM_MAX_SEGMENTS];      /**< Skip this block. */
   1664  int ref_frame[AOM_MAX_SEGMENTS]; /**< Reference frame for this block. */
   1665  int delta_qp_enabled;            /**< Delta qp feature enabled. */
   1666  int reference_enabled;           /**< Reference frame feature enabled. */
   1667  int rdmult_delta_qp;             /**< RD mult for delta qp feature. */
   1668 } aom_roi_map_t;
   1669 
   1670 /*!\brief  aom active region map
   1671 *
   1672 * These defines the data structures for active region map
   1673 *
   1674 */
   1675 
   1676 typedef struct aom_active_map {
   1677  /*!\brief specify an on (1) or off (0) each 16x16 region within a frame */
   1678  unsigned char *active_map;
   1679  unsigned int rows; /**< number of rows */
   1680  unsigned int cols; /**< number of cols */
   1681 } aom_active_map_t;
   1682 
   1683 /*!\brief  aom image scaling mode
   1684 *
   1685 * This defines the data structure for image scaling mode
   1686 *
   1687 */
   1688 typedef struct aom_scaling_mode {
   1689  AOM_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */
   1690  AOM_SCALING_MODE v_scaling_mode; /**< vertical scaling mode   */
   1691 } aom_scaling_mode_t;
   1692 
   1693 /*!\brief AV1 encoder content type */
   1694 typedef enum {
   1695  AOM_CONTENT_DEFAULT,
   1696  AOM_CONTENT_SCREEN,
   1697  AOM_CONTENT_FILM,
   1698  AOM_CONTENT_INVALID
   1699 } aom_tune_content;
   1700 
   1701 /*!\brief Screen content detection mode */
   1702 typedef enum {
   1703  /** Standard */
   1704  AOM_SCREEN_DETECTION_STANDARD = 1,
   1705  /** Anti-aliased text and graphics aware */
   1706  AOM_SCREEN_DETECTION_ANTIALIASING_AWARE = 2
   1707 } aom_screen_detection_mode;
   1708 
   1709 /*!\brief AV1 encoder timing info type signaling */
   1710 typedef enum {
   1711  AOM_TIMING_UNSPECIFIED,
   1712  AOM_TIMING_EQUAL,
   1713  AOM_TIMING_DEC_MODEL
   1714 } aom_timing_info_type_t;
   1715 
   1716 /*!\brief Model tuning parameters
   1717 *
   1718 * Changes the encoder to tune for certain types of input material.
   1719 *
   1720 * \note
   1721 * AOM_TUNE_IQ and AOM_TUNE_SSIMULACRA2 are restricted to all intra mode
   1722 * (AOM_USAGE_ALL_INTRA). Setting the tuning option to either AOM_TUNE_IQ or
   1723 * AOM_TUNE_SSIMULACRA2 causes the following options to be set (expressed as
   1724 * command-line options):
   1725 *   * --enable-qm=1
   1726 *   * --qm-min=2
   1727 *   * --qm-max=10
   1728 *   * --sharpness=7
   1729 *   * --dist-metric=qm-psnr
   1730 *   * --enable-cdef=3
   1731 *   * --enable-chroma-deltaq=1
   1732 *   * --deltaq-mode=6
   1733 *   * --screen-detection-mode=2
   1734 * AOM_TUNE_IQ additionally sets the following options:
   1735 *   * --enable-adaptive-sharpness=1
   1736 */
   1737 typedef enum {
   1738  AOM_TUNE_PSNR = 0,
   1739  AOM_TUNE_SSIM = 1,
   1740  /* NOTE: enums 2 and 3 unused */
   1741  AOM_TUNE_VMAF_WITH_PREPROCESSING = 4,
   1742  AOM_TUNE_VMAF_WITHOUT_PREPROCESSING = 5,
   1743  AOM_TUNE_VMAF_MAX_GAIN = 6,
   1744  AOM_TUNE_VMAF_NEG_MAX_GAIN = 7,
   1745  AOM_TUNE_BUTTERAUGLI = 8,
   1746  AOM_TUNE_VMAF_SALIENCY_MAP = 9,
   1747 /*!\brief Allows detection of the presence of AOM_TUNE_IQ at compile time. */
   1748 #define AOM_HAVE_TUNE_IQ 1
   1749  /* Image quality (or intra quality). Increases image quality and consistency,
   1750   * guided by the SSIMULACRA 2 metric and subjective quality checks. Shares
   1751   * the rdmult code with AOM_TUNE_SSIM.
   1752   */
   1753  AOM_TUNE_IQ = 10,
   1754 /*!\brief Allows detection of the presence of AOM_TUNE_SSIMULACRA2 at compile
   1755 * time. */
   1756 #define AOM_HAVE_TUNE_SSIMULACRA2 1
   1757  /* Tune that optimizes for maximum SSIMULACRA 2 scores. Shares the rdmult code
   1758     with AOM_TUNE_SSIM. */
   1759  AOM_TUNE_SSIMULACRA2 = 11,
   1760 } aom_tune_metric;
   1761 
   1762 /*!\brief Distortion metric to use for RD optimization.
   1763 *
   1764 * Changes the encoder to use a different distortion metric for RD search. Note
   1765 * that this value operates on a "lower level" compared to aom_tune_metric - it
   1766 * affects the distortion metric inside a block, while aom_tune_metric only
   1767 * affects RD across blocks.
   1768 *
   1769 */
   1770 typedef enum {
   1771  // Use PSNR for in-block rate-distortion optimization.
   1772  AOM_DIST_METRIC_PSNR,
   1773  // Use quantization matrix-weighted PSNR for in-block rate-distortion
   1774  // optimization. If --enable-qm=1 is not specified, this falls back to
   1775  // behaving in the same way as AOM_DIST_METRIC_PSNR.
   1776  AOM_DIST_METRIC_QM_PSNR,
   1777 } aom_dist_metric;
   1778 
   1779 #define AOM_MAX_LAYERS 32   /**< Max number of layers */
   1780 #define AOM_MAX_SS_LAYERS 4 /**< Max number of spatial layers */
   1781 #define AOM_MAX_TS_LAYERS 8 /**< Max number of temporal layers */
   1782 
   1783 /*!\brief Struct for spatial and temporal layer ID */
   1784 typedef struct aom_svc_layer_id {
   1785  int spatial_layer_id;  /**< Spatial layer ID */
   1786  int temporal_layer_id; /**< Temporal layer ID */
   1787 } aom_svc_layer_id_t;
   1788 
   1789 /*!\brief Parameter type for SVC
   1790 *
   1791 * In the arrays of size AOM_MAX_LAYERS, the index for spatial layer `sl` and
   1792 * temporal layer `tl` is sl * number_temporal_layers + tl.
   1793 *
   1794 */
   1795 typedef struct aom_svc_params {
   1796  /*!Number of spatial layers
   1797   *
   1798   * Valid range:
   1799   *   \li When using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, #AOM_MAX_SS_LAYERS]
   1800   *   \li When \em not using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, 3]
   1801   */
   1802  int number_spatial_layers;
   1803  /*!Number of temporal layers
   1804   *
   1805   * Valid range:
   1806   *   \li When using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, #AOM_MAX_TS_LAYERS]
   1807   *   \li When \em not using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, 3]
   1808   */
   1809  int number_temporal_layers;
   1810  int max_quantizers[AOM_MAX_LAYERS];        /**< Max Q for each layer */
   1811  int min_quantizers[AOM_MAX_LAYERS];        /**< Min Q for each layer */
   1812  int scaling_factor_num[AOM_MAX_SS_LAYERS]; /**< Scaling factor-numerator */
   1813  int scaling_factor_den[AOM_MAX_SS_LAYERS]; /**< Scaling factor-denominator */
   1814  /*! Target bitrate for each layer, in kilobits per second */
   1815  int layer_target_bitrate[AOM_MAX_LAYERS];
   1816  /*! Frame rate factor for each temporal layer */
   1817  int framerate_factor[AOM_MAX_TS_LAYERS];
   1818 } aom_svc_params_t;
   1819 
   1820 /*!\brief Parameters for setting ref frame config */
   1821 typedef struct aom_svc_ref_frame_config {
   1822  // Three arrays need to be set: reference[], ref_id[], refresh[].
   1823  // reference[i]: is a boolean flag to indicate which of the 7 possible
   1824  // references are used for prediction. Values are 0 (not used as reference)
   1825  // or 1 (use as reference). The index 0 - 6 refers to the references:
   1826  // last(0), last2(1), last3(2), golden(3), bwdref(4), altref2(5), altref(6).
   1827  // ref_idx[i]: maps a reference to one of the 8 buffers slots, values are
   1828  // 0 - 7. The ref_idx for a unused reference (reference[i] = 1, and not used
   1829  // for refresh, see below) can be set to the ref_idx of the first reference
   1830  // used (usually LAST).
   1831  // refresh[i] is a boolean flag to indicate if a buffer is updated/refreshed
   1832  // with the current encoded frame. Values are 0 (no refresh) or 1 (refresh).
   1833  // The refresh is done internally by looking at the ref_idx[j], for j = 0 - 6,
   1834  // so to refresh a buffer slot (i) a reference must be mapped to that slot
   1835  // (i = ref_idx[j]).
   1836  // Examples for usage (for RTC encoding) are in: examples/svc_encoder_rtc.c.
   1837  int reference[7]; /**< Reference flag for each of the 7 references. */
   1838  /*! Buffer slot index (0..7) for each of 7 references indexed above. */
   1839  int ref_idx[7];
   1840  int refresh[8]; /**< Refresh flag for each of the 8 buffer slots. */
   1841 } aom_svc_ref_frame_config_t;
   1842 
   1843 /*!\brief Parameters for setting ref frame compound prediction */
   1844 typedef struct aom_svc_ref_frame_comp_pred {
   1845  // Use compound prediction for the ref_frame pairs GOLDEN_LAST (0),
   1846  // LAST2_LAST (1), and ALTREF_LAST (2).
   1847  int use_comp_pred[3]; /**<Compound reference flag. */
   1848 } aom_svc_ref_frame_comp_pred_t;
   1849 
   1850 /*!\brief Frame drop modes for spatial/quality layer SVC */
   1851 typedef enum {
   1852  AOM_LAYER_DROP,           /**< Any spatial layer can drop. */
   1853  AOM_FULL_SUPERFRAME_DROP, /**< Only full superframe can drop. */
   1854 } AOM_SVC_FRAME_DROP_MODE;
   1855 
   1856 /*!\cond */
   1857 /*!\brief Encoder control function parameter type
   1858 *
   1859 * Defines the data types that AOME/AV1E control functions take.
   1860 *
   1861 * \note Additional common controls are defined in aom.h.
   1862 *
   1863 * \note For each control ID "X", a macro-define of
   1864 * AOM_CTRL_X is provided. It is used at compile time to determine
   1865 * if the control ID is supported by the libaom library available,
   1866 * when the libaom version cannot be controlled.
   1867 */
   1868 AOM_CTRL_USE_TYPE(AOME_USE_REFERENCE, int)
   1869 #define AOM_CTRL_AOME_USE_REFERENCE
   1870 
   1871 AOM_CTRL_USE_TYPE(AOME_SET_ROI_MAP, aom_roi_map_t *)
   1872 #define AOM_CTRL_AOME_SET_ROI_MAP
   1873 
   1874 AOM_CTRL_USE_TYPE(AOME_SET_ACTIVEMAP, aom_active_map_t *)
   1875 #define AOM_CTRL_AOME_SET_ACTIVEMAP
   1876 
   1877 AOM_CTRL_USE_TYPE(AOME_SET_SCALEMODE, aom_scaling_mode_t *)
   1878 #define AOM_CTRL_AOME_SET_SCALEMODE
   1879 
   1880 AOM_CTRL_USE_TYPE(AOME_SET_SPATIAL_LAYER_ID, int)
   1881 #define AOM_CTRL_AOME_SET_SPATIAL_LAYER_ID
   1882 
   1883 AOM_CTRL_USE_TYPE(AOME_SET_CPUUSED, int)
   1884 #define AOM_CTRL_AOME_SET_CPUUSED
   1885 
   1886 AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOALTREF, unsigned int)
   1887 #define AOM_CTRL_AOME_SET_ENABLEAUTOALTREF
   1888 
   1889 AOM_CTRL_USE_TYPE(AOME_SET_SHARPNESS, unsigned int)
   1890 #define AOM_CTRL_AOME_SET_SHARPNESS
   1891 
   1892 AOM_CTRL_USE_TYPE(AOME_SET_STATIC_THRESHOLD, unsigned int)
   1893 #define AOM_CTRL_AOME_SET_STATIC_THRESHOLD
   1894 
   1895 AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER, int *)
   1896 #define AOM_CTRL_AOME_GET_LAST_QUANTIZER
   1897 
   1898 AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER_64, int *)
   1899 #define AOM_CTRL_AOME_GET_LAST_QUANTIZER_64
   1900 
   1901 AOM_CTRL_USE_TYPE(AOME_SET_ARNR_MAXFRAMES, unsigned int)
   1902 #define AOM_CTRL_AOME_SET_ARNR_MAXFRAMES
   1903 
   1904 AOM_CTRL_USE_TYPE(AOME_SET_ARNR_STRENGTH, unsigned int)
   1905 #define AOM_CTRL_AOME_SET_ARNR_STRENGTH
   1906 
   1907 AOM_CTRL_USE_TYPE(AOME_SET_TUNING, int) /* aom_tune_metric */
   1908 #define AOM_CTRL_AOME_SET_TUNING
   1909 
   1910 AOM_CTRL_USE_TYPE(AOME_SET_CQ_LEVEL, unsigned int)
   1911 #define AOM_CTRL_AOME_SET_CQ_LEVEL
   1912 
   1913 AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
   1914 #define AOM_CTRL_AOME_SET_MAX_INTRA_BITRATE_PCT
   1915 
   1916 AOM_CTRL_USE_TYPE(AOME_SET_NUMBER_SPATIAL_LAYERS, int)
   1917 #define AOM_CTRL_AOME_SET_NUMBER_SPATIAL_LAYERS
   1918 // TODO(aomedia:3231): Deprecated. Remove it.
   1919 #define AOME_CTRL_AOME_SET_NUMBER_SPATIAL_LAYERS
   1920 
   1921 AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTER_BITRATE_PCT, unsigned int)
   1922 #define AOM_CTRL_AV1E_SET_MAX_INTER_BITRATE_PCT
   1923 // TODO(aomedia:3231): Deprecated. Remove it.
   1924 #define AOM_CTRL_AOME_SET_MAX_INTER_BITRATE_PCT
   1925 
   1926 AOM_CTRL_USE_TYPE(AV1E_SET_GF_CBR_BOOST_PCT, unsigned int)
   1927 #define AOM_CTRL_AV1E_SET_GF_CBR_BOOST_PCT
   1928 
   1929 AOM_CTRL_USE_TYPE(AV1E_SET_LOSSLESS, unsigned int)
   1930 #define AOM_CTRL_AV1E_SET_LOSSLESS
   1931 
   1932 AOM_CTRL_USE_TYPE(AV1E_SET_ROW_MT, unsigned int)
   1933 #define AOM_CTRL_AV1E_SET_ROW_MT
   1934 
   1935 AOM_CTRL_USE_TYPE(AV1E_SET_TILE_COLUMNS, unsigned int)
   1936 #define AOM_CTRL_AV1E_SET_TILE_COLUMNS
   1937 
   1938 AOM_CTRL_USE_TYPE(AV1E_SET_TILE_ROWS, unsigned int)
   1939 #define AOM_CTRL_AV1E_SET_TILE_ROWS
   1940 
   1941 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_TPL_MODEL, unsigned int)
   1942 #define AOM_CTRL_AV1E_SET_ENABLE_TPL_MODEL
   1943 
   1944 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_KEYFRAME_FILTERING, unsigned int)
   1945 #define AOM_CTRL_AV1E_SET_ENABLE_KEYFRAME_FILTERING
   1946 
   1947 AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PARALLEL_DECODING, unsigned int)
   1948 #define AOM_CTRL_AV1E_SET_FRAME_PARALLEL_DECODING
   1949 
   1950 AOM_CTRL_USE_TYPE(AV1E_SET_ERROR_RESILIENT_MODE, int)
   1951 #define AOM_CTRL_AV1E_SET_ERROR_RESILIENT_MODE
   1952 
   1953 AOM_CTRL_USE_TYPE(AV1E_SET_S_FRAME_MODE, int)
   1954 #define AOM_CTRL_AV1E_SET_S_FRAME_MODE
   1955 
   1956 AOM_CTRL_USE_TYPE(AV1E_SET_AQ_MODE, unsigned int)
   1957 #define AOM_CTRL_AV1E_SET_AQ_MODE
   1958 
   1959 AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PERIODIC_BOOST, unsigned int)
   1960 #define AOM_CTRL_AV1E_SET_FRAME_PERIODIC_BOOST
   1961 
   1962 AOM_CTRL_USE_TYPE(AV1E_SET_NOISE_SENSITIVITY, unsigned int)
   1963 #define AOM_CTRL_AV1E_SET_NOISE_SENSITIVITY
   1964 
   1965 AOM_CTRL_USE_TYPE(AV1E_SET_TUNE_CONTENT, int) /* aom_tune_content */
   1966 #define AOM_CTRL_AV1E_SET_TUNE_CONTENT
   1967 
   1968 AOM_CTRL_USE_TYPE(AV1E_SET_CDF_UPDATE_MODE, unsigned int)
   1969 #define AOM_CTRL_AV1E_SET_CDF_UPDATE_MODE
   1970 
   1971 AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_PRIMARIES, int)
   1972 #define AOM_CTRL_AV1E_SET_COLOR_PRIMARIES
   1973 
   1974 AOM_CTRL_USE_TYPE(AV1E_SET_TRANSFER_CHARACTERISTICS, int)
   1975 #define AOM_CTRL_AV1E_SET_TRANSFER_CHARACTERISTICS
   1976 
   1977 AOM_CTRL_USE_TYPE(AV1E_SET_MATRIX_COEFFICIENTS, int)
   1978 #define AOM_CTRL_AV1E_SET_MATRIX_COEFFICIENTS
   1979 
   1980 AOM_CTRL_USE_TYPE(AV1E_SET_CHROMA_SAMPLE_POSITION, int)
   1981 #define AOM_CTRL_AV1E_SET_CHROMA_SAMPLE_POSITION
   1982 
   1983 AOM_CTRL_USE_TYPE(AV1E_SET_MIN_GF_INTERVAL, unsigned int)
   1984 #define AOM_CTRL_AV1E_SET_MIN_GF_INTERVAL
   1985 
   1986 AOM_CTRL_USE_TYPE(AV1E_SET_MAX_GF_INTERVAL, unsigned int)
   1987 #define AOM_CTRL_AV1E_SET_MAX_GF_INTERVAL
   1988 
   1989 AOM_CTRL_USE_TYPE(AV1E_GET_ACTIVEMAP, aom_active_map_t *)
   1990 #define AOM_CTRL_AV1E_GET_ACTIVEMAP
   1991 
   1992 AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_RANGE, int)
   1993 #define AOM_CTRL_AV1E_SET_COLOR_RANGE
   1994 
   1995 AOM_CTRL_USE_TYPE(AV1E_SET_RENDER_SIZE, int *)
   1996 #define AOM_CTRL_AV1E_SET_RENDER_SIZE
   1997 
   1998 AOM_CTRL_USE_TYPE(AV1E_SET_TARGET_SEQ_LEVEL_IDX, int)
   1999 #define AOM_CTRL_AV1E_SET_TARGET_SEQ_LEVEL_IDX
   2000 
   2001 AOM_CTRL_USE_TYPE(AV1E_GET_SEQ_LEVEL_IDX, int *)
   2002 #define AOM_CTRL_AV1E_GET_SEQ_LEVEL_IDX
   2003 
   2004 AOM_CTRL_USE_TYPE(AV1E_SET_SUPERBLOCK_SIZE, unsigned int)
   2005 #define AOM_CTRL_AV1E_SET_SUPERBLOCK_SIZE
   2006 
   2007 AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOBWDREF, unsigned int)
   2008 #define AOM_CTRL_AOME_SET_ENABLEAUTOBWDREF
   2009 
   2010 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_CDEF, unsigned int)
   2011 #define AOM_CTRL_AV1E_SET_ENABLE_CDEF
   2012 
   2013 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_RESTORATION, unsigned int)
   2014 #define AOM_CTRL_AV1E_SET_ENABLE_RESTORATION
   2015 
   2016 AOM_CTRL_USE_TYPE(AV1E_SET_FORCE_VIDEO_MODE, unsigned int)
   2017 #define AOM_CTRL_AV1E_SET_FORCE_VIDEO_MODE
   2018 
   2019 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_OBMC, unsigned int)
   2020 #define AOM_CTRL_AV1E_SET_ENABLE_OBMC
   2021 
   2022 AOM_CTRL_USE_TYPE(AV1E_SET_DISABLE_TRELLIS_QUANT, unsigned int)
   2023 #define AOM_CTRL_AV1E_SET_DISABLE_TRELLIS_QUANT
   2024 
   2025 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_QM, unsigned int)
   2026 #define AOM_CTRL_AV1E_SET_ENABLE_QM
   2027 
   2028 // TODO(aomedia:3231): Remove these two lines.
   2029 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DIST_8X8, unsigned int)
   2030 #define AOM_CTRL_AV1E_SET_ENABLE_DIST_8X8
   2031 
   2032 AOM_CTRL_USE_TYPE(AV1E_SET_QM_MIN, unsigned int)
   2033 #define AOM_CTRL_AV1E_SET_QM_MIN
   2034 
   2035 AOM_CTRL_USE_TYPE(AV1E_SET_QM_MAX, unsigned int)
   2036 #define AOM_CTRL_AV1E_SET_QM_MAX
   2037 
   2038 AOM_CTRL_USE_TYPE(AV1E_SET_QM_Y, unsigned int)
   2039 #define AOM_CTRL_AV1E_SET_QM_Y
   2040 
   2041 AOM_CTRL_USE_TYPE(AV1E_SET_QM_U, unsigned int)
   2042 #define AOM_CTRL_AV1E_SET_QM_U
   2043 
   2044 AOM_CTRL_USE_TYPE(AV1E_SET_QM_V, unsigned int)
   2045 #define AOM_CTRL_AV1E_SET_QM_V
   2046 
   2047 AOM_CTRL_USE_TYPE(AV1E_SET_NUM_TG, unsigned int)
   2048 #define AOM_CTRL_AV1E_SET_NUM_TG
   2049 
   2050 AOM_CTRL_USE_TYPE(AV1E_SET_MTU, unsigned int)
   2051 #define AOM_CTRL_AV1E_SET_MTU
   2052 
   2053 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_RECT_PARTITIONS, int)
   2054 #define AOM_CTRL_AV1E_SET_ENABLE_RECT_PARTITIONS
   2055 
   2056 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_AB_PARTITIONS, int)
   2057 #define AOM_CTRL_AV1E_SET_ENABLE_AB_PARTITIONS
   2058 
   2059 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_1TO4_PARTITIONS, int)
   2060 #define AOM_CTRL_AV1E_SET_ENABLE_1TO4_PARTITIONS
   2061 
   2062 AOM_CTRL_USE_TYPE(AV1E_SET_MIN_PARTITION_SIZE, int)
   2063 #define AOM_CTRL_AV1E_SET_MIN_PARTITION_SIZE
   2064 
   2065 AOM_CTRL_USE_TYPE(AV1E_SET_MAX_PARTITION_SIZE, int)
   2066 #define AOM_CTRL_AV1E_SET_MAX_PARTITION_SIZE
   2067 
   2068 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_INTRA_EDGE_FILTER, int)
   2069 #define AOM_CTRL_AV1E_SET_ENABLE_INTRA_EDGE_FILTER
   2070 
   2071 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_ORDER_HINT, int)
   2072 #define AOM_CTRL_AV1E_SET_ENABLE_ORDER_HINT
   2073 
   2074 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_TX64, int)
   2075 #define AOM_CTRL_AV1E_SET_ENABLE_TX64
   2076 
   2077 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_FLIP_IDTX, int)
   2078 #define AOM_CTRL_AV1E_SET_ENABLE_FLIP_IDTX
   2079 
   2080 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_RECT_TX, int)
   2081 #define AOM_CTRL_AV1E_SET_ENABLE_RECT_TX
   2082 
   2083 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DIST_WTD_COMP, int)
   2084 #define AOM_CTRL_AV1E_SET_ENABLE_DIST_WTD_COMP
   2085 
   2086 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_REF_FRAME_MVS, int)
   2087 #define AOM_CTRL_AV1E_SET_ENABLE_REF_FRAME_MVS
   2088 
   2089 AOM_CTRL_USE_TYPE(AV1E_SET_ALLOW_REF_FRAME_MVS, int)
   2090 #define AOM_CTRL_AV1E_SET_ALLOW_REF_FRAME_MVS
   2091 
   2092 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DUAL_FILTER, int)
   2093 #define AOM_CTRL_AV1E_SET_ENABLE_DUAL_FILTER
   2094 
   2095 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_CHROMA_DELTAQ, int)
   2096 #define AOM_CTRL_AV1E_SET_ENABLE_CHROMA_DELTAQ
   2097 
   2098 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_MASKED_COMP, int)
   2099 #define AOM_CTRL_AV1E_SET_ENABLE_MASKED_COMP
   2100 
   2101 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_ONESIDED_COMP, int)
   2102 #define AOM_CTRL_AV1E_SET_ENABLE_ONESIDED_COMP
   2103 
   2104 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_INTERINTRA_COMP, int)
   2105 #define AOM_CTRL_AV1E_SET_ENABLE_INTERINTRA_COMP
   2106 
   2107 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_SMOOTH_INTERINTRA, int)
   2108 #define AOM_CTRL_AV1E_SET_ENABLE_SMOOTH_INTERINTRA
   2109 
   2110 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DIFF_WTD_COMP, int)
   2111 #define AOM_CTRL_AV1E_SET_ENABLE_DIFF_WTD_COMP
   2112 
   2113 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_INTERINTER_WEDGE, int)
   2114 #define AOM_CTRL_AV1E_SET_ENABLE_INTERINTER_WEDGE
   2115 
   2116 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_INTERINTRA_WEDGE, int)
   2117 #define AOM_CTRL_AV1E_SET_ENABLE_INTERINTRA_WEDGE
   2118 
   2119 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_GLOBAL_MOTION, int)
   2120 #define AOM_CTRL_AV1E_SET_ENABLE_GLOBAL_MOTION
   2121 
   2122 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_WARPED_MOTION, int)
   2123 #define AOM_CTRL_AV1E_SET_ENABLE_WARPED_MOTION
   2124 
   2125 AOM_CTRL_USE_TYPE(AV1E_SET_ALLOW_WARPED_MOTION, int)
   2126 #define AOM_CTRL_AV1E_SET_ALLOW_WARPED_MOTION
   2127 
   2128 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_FILTER_INTRA, int)
   2129 #define AOM_CTRL_AV1E_SET_ENABLE_FILTER_INTRA
   2130 
   2131 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_SMOOTH_INTRA, int)
   2132 #define AOM_CTRL_AV1E_SET_ENABLE_SMOOTH_INTRA
   2133 
   2134 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_PAETH_INTRA, int)
   2135 #define AOM_CTRL_AV1E_SET_ENABLE_PAETH_INTRA
   2136 
   2137 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_CFL_INTRA, int)
   2138 #define AOM_CTRL_AV1E_SET_ENABLE_CFL_INTRA
   2139 
   2140 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_SUPERRES, int)
   2141 #define AOM_CTRL_AV1E_SET_ENABLE_SUPERRES
   2142 
   2143 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_OVERLAY, int)
   2144 #define AOM_CTRL_AV1E_SET_ENABLE_OVERLAY
   2145 
   2146 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_PALETTE, int)
   2147 #define AOM_CTRL_AV1E_SET_ENABLE_PALETTE
   2148 
   2149 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_INTRABC, int)
   2150 #define AOM_CTRL_AV1E_SET_ENABLE_INTRABC
   2151 
   2152 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_ANGLE_DELTA, int)
   2153 #define AOM_CTRL_AV1E_SET_ENABLE_ANGLE_DELTA
   2154 
   2155 AOM_CTRL_USE_TYPE(AV1E_SET_DELTAQ_MODE, unsigned int)
   2156 #define AOM_CTRL_AV1E_SET_DELTAQ_MODE
   2157 
   2158 AOM_CTRL_USE_TYPE(AV1E_SET_DELTALF_MODE, unsigned int)
   2159 #define AOM_CTRL_AV1E_SET_DELTALF_MODE
   2160 
   2161 AOM_CTRL_USE_TYPE(AV1E_SET_SINGLE_TILE_DECODING, unsigned int)
   2162 #define AOM_CTRL_AV1E_SET_SINGLE_TILE_DECODING
   2163 
   2164 AOM_CTRL_USE_TYPE(AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST, unsigned int)
   2165 #define AOM_CTRL_AV1E_ENABLE_MOTION_VECTOR_UNIT_TEST
   2166 
   2167 AOM_CTRL_USE_TYPE(AV1E_SET_TIMING_INFO_TYPE, int) /* aom_timing_info_type_t */
   2168 #define AOM_CTRL_AV1E_SET_TIMING_INFO_TYPE
   2169 
   2170 AOM_CTRL_USE_TYPE(AV1E_SET_FILM_GRAIN_TEST_VECTOR, int)
   2171 #define AOM_CTRL_AV1E_SET_FILM_GRAIN_TEST_VECTOR
   2172 
   2173 AOM_CTRL_USE_TYPE(AV1E_SET_FILM_GRAIN_TABLE, const char *)
   2174 #define AOM_CTRL_AV1E_SET_FILM_GRAIN_TABLE
   2175 
   2176 AOM_CTRL_USE_TYPE(AV1E_SET_DENOISE_NOISE_LEVEL, int)
   2177 #define AOM_CTRL_AV1E_SET_DENOISE_NOISE_LEVEL
   2178 
   2179 AOM_CTRL_USE_TYPE(AV1E_SET_DENOISE_BLOCK_SIZE, unsigned int)
   2180 #define AOM_CTRL_AV1E_SET_DENOISE_BLOCK_SIZE
   2181 
   2182 AOM_CTRL_USE_TYPE(AV1E_SET_CHROMA_SUBSAMPLING_X, unsigned int)
   2183 #define AOM_CTRL_AV1E_SET_CHROMA_SUBSAMPLING_X
   2184 
   2185 AOM_CTRL_USE_TYPE(AV1E_SET_CHROMA_SUBSAMPLING_Y, unsigned int)
   2186 #define AOM_CTRL_AV1E_SET_CHROMA_SUBSAMPLING_Y
   2187 
   2188 AOM_CTRL_USE_TYPE(AV1E_SET_REDUCED_TX_TYPE_SET, int)
   2189 #define AOM_CTRL_AV1E_SET_REDUCED_TX_TYPE_SET
   2190 
   2191 AOM_CTRL_USE_TYPE(AV1E_SET_INTRA_DCT_ONLY, int)
   2192 #define AOM_CTRL_AV1E_SET_INTRA_DCT_ONLY
   2193 
   2194 AOM_CTRL_USE_TYPE(AV1E_SET_INTER_DCT_ONLY, int)
   2195 #define AOM_CTRL_AV1E_SET_INTER_DCT_ONLY
   2196 
   2197 AOM_CTRL_USE_TYPE(AV1E_SET_INTRA_DEFAULT_TX_ONLY, int)
   2198 #define AOM_CTRL_AV1E_SET_INTRA_DEFAULT_TX_ONLY
   2199 
   2200 AOM_CTRL_USE_TYPE(AV1E_SET_QUANT_B_ADAPT, int)
   2201 #define AOM_CTRL_AV1E_SET_QUANT_B_ADAPT
   2202 
   2203 AOM_CTRL_USE_TYPE(AV1E_SET_GF_MAX_PYRAMID_HEIGHT, unsigned int)
   2204 #define AOM_CTRL_AV1E_SET_GF_MAX_PYRAMID_HEIGHT
   2205 
   2206 AOM_CTRL_USE_TYPE(AV1E_SET_MAX_REFERENCE_FRAMES, int)
   2207 #define AOM_CTRL_AV1E_SET_MAX_REFERENCE_FRAMES
   2208 
   2209 AOM_CTRL_USE_TYPE(AV1E_SET_REDUCED_REFERENCE_SET, int)
   2210 #define AOM_CTRL_AV1E_SET_REDUCED_REFERENCE_SET
   2211 
   2212 AOM_CTRL_USE_TYPE(AV1E_SET_COEFF_COST_UPD_FREQ, unsigned int)
   2213 #define AOM_CTRL_AV1E_SET_COEFF_COST_UPD_FREQ
   2214 
   2215 AOM_CTRL_USE_TYPE(AV1E_SET_MODE_COST_UPD_FREQ, unsigned int)
   2216 #define AOM_CTRL_AV1E_SET_MODE_COST_UPD_FREQ
   2217 
   2218 AOM_CTRL_USE_TYPE(AV1E_SET_MV_COST_UPD_FREQ, unsigned int)
   2219 #define AOM_CTRL_AV1E_SET_MV_COST_UPD_FREQ
   2220 
   2221 AOM_CTRL_USE_TYPE(AV1E_SET_TIER_MASK, unsigned int)
   2222 #define AOM_CTRL_AV1E_SET_TIER_MASK
   2223 
   2224 AOM_CTRL_USE_TYPE(AV1E_SET_MIN_CR, unsigned int)
   2225 #define AOM_CTRL_AV1E_SET_MIN_CR
   2226 
   2227 AOM_CTRL_USE_TYPE(AV1E_SET_SVC_LAYER_ID, aom_svc_layer_id_t *)
   2228 #define AOM_CTRL_AV1E_SET_SVC_LAYER_ID
   2229 // TODO(aomedia:3231): Deprecated. Remove it.
   2230 #define AOME_CTRL_AV1E_SET_SVC_LAYER_ID
   2231 
   2232 AOM_CTRL_USE_TYPE(AV1E_SET_SVC_PARAMS, aom_svc_params_t *)
   2233 #define AOM_CTRL_AV1E_SET_SVC_PARAMS
   2234 // TODO(aomedia:3231): Deprecated. Remove it.
   2235 #define AOME_CTRL_AV1E_SET_SVC_PARAMS
   2236 
   2237 AOM_CTRL_USE_TYPE(AV1E_SET_SVC_REF_FRAME_CONFIG, aom_svc_ref_frame_config_t *)
   2238 #define AOM_CTRL_AV1E_SET_SVC_REF_FRAME_CONFIG
   2239 // TODO(aomedia:3231): Deprecated. Remove it.
   2240 #define AOME_CTRL_AV1E_SET_SVC_REF_FRAME_CONFIG
   2241 
   2242 AOM_CTRL_USE_TYPE(AV1E_SET_VMAF_MODEL_PATH, const char *)
   2243 #define AOM_CTRL_AV1E_SET_VMAF_MODEL_PATH
   2244 
   2245 AOM_CTRL_USE_TYPE(AV1E_ENABLE_EXT_TILE_DEBUG, unsigned int)
   2246 #define AOM_CTRL_AV1E_ENABLE_EXT_TILE_DEBUG
   2247 
   2248 AOM_CTRL_USE_TYPE(AV1E_ENABLE_SB_MULTIPASS_UNIT_TEST, unsigned int)
   2249 #define AOM_CTRL_AV1E_ENABLE_SB_MULTIPASS_UNIT_TEST
   2250 
   2251 AOM_CTRL_USE_TYPE(AV1E_SET_GF_MIN_PYRAMID_HEIGHT, unsigned int)
   2252 #define AOM_CTRL_AV1E_SET_GF_MIN_PYRAMID_HEIGHT
   2253 
   2254 AOM_CTRL_USE_TYPE(AV1E_SET_VBR_CORPUS_COMPLEXITY_LAP, unsigned int)
   2255 #define AOM_CTRL_AV1E_SET_VBR_CORPUS_COMPLEXITY_LAP
   2256 
   2257 AOM_CTRL_USE_TYPE(AV1E_GET_BASELINE_GF_INTERVAL, int *)
   2258 #define AOM_CTRL_AV1E_GET_BASELINE_GF_INTERVAL
   2259 
   2260 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DNL_DENOISING, int)
   2261 #define AOM_CTRL_AV1E_SET_ENABLE_DNL_DENOISING
   2262 
   2263 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DIAGONAL_INTRA, int)
   2264 #define AOM_CTRL_AV1E_SET_ENABLE_DIAGONAL_INTRA
   2265 
   2266 AOM_CTRL_USE_TYPE(AV1E_SET_DV_COST_UPD_FREQ, unsigned int)
   2267 #define AOM_CTRL_AV1E_SET_DV_COST_UPD_FREQ
   2268 
   2269 AOM_CTRL_USE_TYPE(AV1E_SET_PARTITION_INFO_PATH, const char *)
   2270 #define AOM_CTRL_AV1E_SET_PARTITION_INFO_PATH
   2271 
   2272 AOM_CTRL_USE_TYPE(AV1E_SET_EXTERNAL_PARTITION, aom_ext_part_funcs_t *)
   2273 #define AOM_CTRL_AV1E_SET_EXTERNAL_PARTITION
   2274 
   2275 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_DIRECTIONAL_INTRA, int)
   2276 #define AOM_CTRL_AV1E_SET_ENABLE_DIRECTIONAL_INTRA
   2277 
   2278 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_TX_SIZE_SEARCH, int)
   2279 #define AOM_CTRL_AV1E_SET_ENABLE_TX_SIZE_SEARCH
   2280 
   2281 AOM_CTRL_USE_TYPE(AV1E_SET_SVC_REF_FRAME_COMP_PRED,
   2282                  aom_svc_ref_frame_comp_pred_t *)
   2283 #define AOM_CTRL_AV1E_SET_SVC_REF_FRAME_COMP_PRED
   2284 // TODO(aomedia:3231): Deprecated. Remove it.
   2285 #define AOME_CTRL_AV1E_SET_SVC_REF_FRAME_COMP_PRED
   2286 
   2287 AOM_CTRL_USE_TYPE(AV1E_SET_DELTAQ_STRENGTH, unsigned int)
   2288 #define AOM_CTRL_AV1E_SET_DELTAQ_STRENGTH
   2289 
   2290 AOM_CTRL_USE_TYPE(AV1E_SET_LOOPFILTER_CONTROL, int)
   2291 #define AOM_CTRL_AV1E_SET_LOOPFILTER_CONTROL
   2292 
   2293 AOM_CTRL_USE_TYPE(AOME_GET_LOOPFILTER_LEVEL, int *)
   2294 #define AOM_CTRL_AOME_GET_LOOPFILTER_LEVEL
   2295 
   2296 AOM_CTRL_USE_TYPE(AV1E_SET_AUTO_INTRA_TOOLS_OFF, unsigned int)
   2297 #define AOM_CTRL_AV1E_SET_AUTO_INTRA_TOOLS_OFF
   2298 
   2299 AOM_CTRL_USE_TYPE(AV1E_SET_RTC_EXTERNAL_RC, int)
   2300 #define AOM_CTRL_AV1E_SET_RTC_EXTERNAL_RC
   2301 
   2302 AOM_CTRL_USE_TYPE(AV1E_SET_FP_MT, unsigned int)
   2303 #define AOM_CTRL_AV1E_SET_FP_MT
   2304 
   2305 AOM_CTRL_USE_TYPE(AV1E_SET_FP_MT_UNIT_TEST, unsigned int)
   2306 #define AOM_CTRL_AV1E_SET_FP_MT_UNIT_TEST
   2307 
   2308 AOM_CTRL_USE_TYPE(AV1E_GET_TARGET_SEQ_LEVEL_IDX, int *)
   2309 #define AOM_CTRL_AV1E_GET_TARGET_SEQ_LEVEL_IDX
   2310 
   2311 AOM_CTRL_USE_TYPE(AV1E_GET_NUM_OPERATING_POINTS, int *)
   2312 #define AOM_CTRL_AV1E_GET_NUM_OPERATING_POINTS
   2313 
   2314 AOM_CTRL_USE_TYPE(AV1E_SET_SKIP_POSTPROC_FILTERING, unsigned int)
   2315 #define AOM_CTRL_AV1E_SET_SKIP_POSTPROC_FILTERING
   2316 
   2317 AOM_CTRL_USE_TYPE(AV1E_ENABLE_SB_QP_SWEEP, unsigned int)
   2318 #define AOM_CTRL_AV1E_ENABLE_SB_QP_SWEEP
   2319 
   2320 AOM_CTRL_USE_TYPE(AV1E_SET_QUANTIZER_ONE_PASS, int)
   2321 #define AOM_CTRL_AV1E_SET_QUANTIZER_ONE_PASS
   2322 
   2323 AOM_CTRL_USE_TYPE(AV1E_ENABLE_RATE_GUIDE_DELTAQ, unsigned int)
   2324 #define AOM_CTRL_AV1E_ENABLE_RATE_GUIDE_DELTAQ
   2325 
   2326 AOM_CTRL_USE_TYPE(AV1E_SET_RATE_DISTRIBUTION_INFO, const char *)
   2327 #define AOM_CTRL_AV1E_SET_RATE_DISTRIBUTION_INFO
   2328 
   2329 AOM_CTRL_USE_TYPE(AV1E_GET_LUMA_CDEF_STRENGTH, int *)
   2330 #define AOM_CTRL_AV1E_GET_LUMA_CDEF_STRENGTH
   2331 
   2332 AOM_CTRL_USE_TYPE(AV1E_SET_BITRATE_ONE_PASS_CBR, unsigned int)
   2333 #define AOM_CTRL_AV1E_SET_BITRATE_ONE_PASS_CBR
   2334 
   2335 AOM_CTRL_USE_TYPE(AV1E_SET_SVC_FRAME_DROP_MODE, unsigned int)
   2336 #define AOM_CTRL_AV1E_SET_SVC_FRAME_DROP_MODE
   2337 
   2338 AOM_CTRL_USE_TYPE(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR, int)
   2339 #define AOM_CTRL_AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR
   2340 
   2341 AOM_CTRL_USE_TYPE(AV1E_SET_AUTO_TILES, unsigned int)
   2342 #define AOM_CTRL_AV1E_SET_AUTO_TILES
   2343 
   2344 AOM_CTRL_USE_TYPE(AV1E_GET_HIGH_MOTION_CONTENT_SCREEN_RTC, int *)
   2345 #define AOM_CTRL_AV1E_GET_HIGH_MOTION_CONTENT_SCREEN_RTC
   2346 
   2347 AOM_CTRL_USE_TYPE(AV1E_SET_POSTENCODE_DROP_RTC, int)
   2348 #define AOM_CTRL_AV1E_SET_POSTENCODE_DROP_RTC
   2349 
   2350 AOM_CTRL_USE_TYPE(AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR, int)
   2351 #define AOM_CTRL_AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR
   2352 
   2353 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_LOW_COMPLEXITY_DECODE, unsigned int)
   2354 #define AOM_CTRL_AV1E_SET_ENABLE_LOW_COMPLEXITY_DECODE
   2355 
   2356 AOM_CTRL_USE_TYPE(AV1E_SET_SCREEN_CONTENT_DETECTION_MODE,
   2357                  int) /* aom_screen_detection_mode */
   2358 #define AOM_CTRL_SET_SCREEN_CONTENT_DETECTION_MODE
   2359 
   2360 AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_ADAPTIVE_SHARPNESS, unsigned int)
   2361 #define AOM_CTRL_AV1E_SET_ENABLE_ADAPTIVE_SHARPNESS
   2362 
   2363 /*!\endcond */
   2364 /*! @} - end defgroup aom_encoder */
   2365 #ifdef __cplusplus
   2366 }  // extern "C"
   2367 #endif
   2368 
   2369 #endif  // AOM_AOM_AOMCX_H_