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