| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | #ifndef VPX_VPX_VP8CX_H_ |
| 11 | #define VPX_VPX_VP8CX_H_ |
| 12 |
| 13 | /*!\defgroup vp8_encoder WebM VP8/VP9 Encoder |
| 14 | * \ingroup vp8 |
| 15 | * |
| 16 | * @{ |
| 17 | */ |
| 18 | #include "./vp8.h" |
| 19 | #include "./vpx_encoder.h" |
| 20 | #include "./vpx_ext_ratectrl.h" |
| 21 |
| 22 | /*!\file |
| 23 | * \brief Provides definitions for using VP8 or VP9 encoder algorithm within the |
| 24 | * vpx Codec Interface. |
| 25 | */ |
| 26 |
| 27 | #ifdef __cplusplus |
| 28 | extern "C" { |
| 29 | #endif |
| 30 |
| 31 | /*!\name Algorithm interface for VP8 |
| 32 | * |
| 33 | * This interface provides the capability to encode raw VP8 streams. |
| 34 | * @{ |
| 35 | */ |
| 36 | extern vpx_codec_iface_t vpx_codec_vp8_cx_algo; |
| 37 | extern vpx_codec_iface_t *vpx_codec_vp8_cx(void); |
| 38 | /*!@} - end algorithm interface member group*/ |
| 39 |
| 40 | /*!\name Algorithm interface for VP9 |
| 41 | * |
| 42 | * This interface provides the capability to encode raw VP9 streams. |
| 43 | * @{ |
| 44 | */ |
| 45 | extern vpx_codec_iface_t vpx_codec_vp9_cx_algo; |
| 46 | extern vpx_codec_iface_t *vpx_codec_vp9_cx(void); |
| 47 | /*!@} - end algorithm interface member group*/ |
| 48 |
| 49 | /* |
| 50 | * Algorithm Flags |
| 51 | */ |
| 52 |
| 53 | /*!\brief Don't reference the last frame |
| 54 | * |
| 55 | * When this flag is set, the encoder will not use the last frame as a |
| 56 | * predictor. When not set, the encoder will choose whether to use the |
| 57 | * last frame or not automatically. |
| 58 | */ |
| 59 | #define VP8_EFLAG_NO_REF_LAST (1 << 16) |
| 60 |
| 61 | /*!\brief Don't reference the golden frame |
| 62 | * |
| 63 | * When this flag is set, the encoder will not use the golden frame as a |
| 64 | * predictor. When not set, the encoder will choose whether to use the |
| 65 | * golden frame or not automatically. |
| 66 | */ |
| 67 | #define VP8_EFLAG_NO_REF_GF (1 << 17) |
| 68 |
| 69 | /*!\brief Don't reference the alternate reference frame |
| 70 | * |
| 71 | * When this flag is set, the encoder will not use the alt ref frame as a |
| 72 | * predictor. When not set, the encoder will choose whether to use the |
| 73 | * alt ref frame or not automatically. |
| 74 | */ |
| 75 | #define VP8_EFLAG_NO_REF_ARF (1 << 21) |
| 76 |
| 77 | /*!\brief Don't update the last frame |
| 78 | * |
| 79 | * When this flag is set, the encoder will not update the last frame with |
| 80 | * the contents of the current frame. |
| 81 | */ |
| 82 | #define VP8_EFLAG_NO_UPD_LAST (1 << 18) |
| 83 |
| 84 | /*!\brief Don't update the golden frame |
| 85 | * |
| 86 | * When this flag is set, the encoder will not update the golden frame with |
| 87 | * the contents of the current frame. |
| 88 | */ |
| 89 | #define VP8_EFLAG_NO_UPD_GF (1 << 22) |
| 90 |
| 91 | /*!\brief Don't update the alternate reference frame |
| 92 | * |
| 93 | * When this flag is set, the encoder will not update the alt ref frame with |
| 94 | * the contents of the current frame. |
| 95 | */ |
| 96 | #define VP8_EFLAG_NO_UPD_ARF (1 << 23) |
| 97 |
| 98 | /*!\brief Force golden frame update |
| 99 | * |
| 100 | * When this flag is set, the encoder copy the contents of the current frame |
| 101 | * to the golden frame buffer. |
| 102 | */ |
| 103 | #define VP8_EFLAG_FORCE_GF (1 << 19) |
| 104 |
| 105 | /*!\brief Force alternate reference frame update |
| 106 | * |
| 107 | * When this flag is set, the encoder copy the contents of the current frame |
| 108 | * to the alternate reference frame buffer. |
| 109 | */ |
| 110 | #define VP8_EFLAG_FORCE_ARF (1 << 24) |
| 111 |
| 112 | /*!\brief Disable entropy update |
| 113 | * |
| 114 | * When this flag is set, the encoder will not update its internal entropy |
| 115 | * model based on the entropy of this frame. |
| 116 | */ |
| 117 | #define VP8_EFLAG_NO_UPD_ENTROPY (1 << 20) |
| 118 |
| 119 | /*!\brief VPx encoder control functions |
| 120 | * |
| 121 | * This set of macros define the control functions available for VPx |
| 122 | * encoder interface. |
| 123 | * |
| 124 | * \sa #vpx_codec_control |
| 125 | */ |
| 126 | enum vp8e_enc_control_id { |
| 127 | /*!\brief Codec control function to pass an ROI map to encoder. |
| 128 | * |
| 129 | * Supported in codecs: VP8 |
| 130 | */ |
| 131 | VP8E_SET_ROI_MAP = 8, |
| 132 |
| 133 | /*!\brief Codec control function to pass an Active map to encoder. |
| 134 | * |
| 135 | * Supported in codecs: VP8, VP9 |
| 136 | */ |
| 137 | VP8E_SET_ACTIVEMAP, |
| 138 |
| 139 | /*!\brief Codec control function to set encoder scaling mode. |
| 140 | * |
| 141 | * Supported in codecs: VP8, VP9 |
| 142 | */ |
| 143 | VP8E_SET_SCALEMODE = 11, |
| 144 |
| 145 | /*!\brief Codec control function to set encoder internal speed settings. |
| 146 | * |
| 147 | * Changes in this value influences, among others, the encoder's selection |
| 148 | * of motion estimation methods. Values greater than 0 will increase encoder |
| 149 | * speed at the expense of quality. |
| 150 | * |
| 151 | * \note Valid range for VP8: -16..16 |
| 152 | * \note Valid range for VP9: -9..9 |
| 153 | * |
| 154 | * Supported in codecs: VP8, VP9 |
| 155 | */ |
| 156 | VP8E_SET_CPUUSED = 13, |
| 157 |
| 158 | /*!\brief Codec control function to enable automatic use of arf frames. |
| 159 | * |
| 160 | * \note Valid range for VP8: 0..1 |
| 161 | * \note Valid range for VP9: 0..6 |
| 162 | * |
| 163 | * Supported in codecs: VP8, VP9 |
| 164 | */ |
| 165 | VP8E_SET_ENABLEAUTOALTREF, |
| 166 |
| 167 | /*!\brief control function to set noise sensitivity |
| 168 | * |
| 169 | * 0: off, 1: OnYOnly, 2: OnYUV, |
| 170 | * 3: OnYUVAggressive, 4: Adaptive |
| 171 | * |
| 172 | * Supported in codecs: VP8 |
| 173 | */ |
| 174 | VP8E_SET_NOISE_SENSITIVITY, |
| 175 |
| 176 | /*!\brief Codec control function to set higher sharpness at the expense |
| 177 | * of a lower PSNR. |
| 178 | * |
| 179 | * \note Valid range: 0..7 |
| 180 | * |
| 181 | * Supported in codecs: VP8, VP9 |
| 182 | */ |
| 183 | VP8E_SET_SHARPNESS, |
| 184 |
| 185 | /*!\brief Codec control function to set the threshold for MBs treated static. |
| 186 | * |
| 187 | * Supported in codecs: VP8, VP9 |
| 188 | */ |
| 189 | VP8E_SET_STATIC_THRESHOLD, |
| 190 |
| 191 | /*!\brief Codec control function to set the number of token partitions. |
| 192 | * |
| 193 | * Supported in codecs: VP8 |
| 194 | */ |
| 195 | VP8E_SET_TOKEN_PARTITIONS, |
| 196 |
| 197 | /*!\brief Codec control function to get last quantizer chosen by the encoder. |
| 198 | * |
| 199 | * Return value uses internal quantizer scale defined by the codec. |
| 200 | * |
| 201 | * Supported in codecs: VP8, VP9 |
| 202 | */ |
| 203 | VP8E_GET_LAST_QUANTIZER, |
| 204 |
| 205 | /*!\brief Codec control function to get last quantizer chosen by the encoder. |
| 206 | * |
| 207 | * Return value uses the 0..63 scale as used by the rc_*_quantizer config |
| 208 | * parameters. |
| 209 | * |
| 210 | * Supported in codecs: VP8, VP9 |
| 211 | */ |
| 212 | VP8E_GET_LAST_QUANTIZER_64, |
| 213 |
| 214 | /*!\brief Codec control function to set the max no of frames to create arf. |
| 215 | * |
| 216 | * Supported in codecs: VP8, VP9 |
| 217 | */ |
| 218 | VP8E_SET_ARNR_MAXFRAMES, |
| 219 |
| 220 | /*!\brief Codec control function to set the filter strength for the arf. |
| 221 | * |
| 222 | * Supported in codecs: VP8, VP9 |
| 223 | */ |
| 224 | VP8E_SET_ARNR_STRENGTH, |
| 225 |
| 226 | /*!\deprecated control function to set the filter type to use for the arf. */ |
| 227 | VP8E_SET_ARNR_TYPE, |
| 228 |
| 229 | /*!\brief Codec control function to set visual tuning. |
| 230 | * |
| 231 | * Supported in codecs: VP8, VP9 |
| 232 | */ |
| 233 | VP8E_SET_TUNING, |
| 234 |
| 235 | /*!\brief Codec control function to set constrained / constant quality level. |
| 236 | * |
| 237 | * \attention For this value to be used vpx_codec_enc_cfg_t::rc_end_usage must |
| 238 | * be set to #VPX_CQ or #VPX_Q |
| 239 | * \note Valid range: 0..63 |
| 240 | * |
| 241 | * Supported in codecs: VP8, VP9 |
| 242 | */ |
| 243 | VP8E_SET_CQ_LEVEL, |
| 244 |
| 245 | /*!\brief Codec control function to set Max data rate for Intra frames. |
| 246 | * |
| 247 | * This value controls additional clamping on the maximum size of a |
| 248 | * keyframe. It is expressed as a percentage of the average |
| 249 | * per-frame bitrate, with the special (and default) value 0 meaning |
| 250 | * unlimited, or no additional clamping beyond the codec's built-in |
| 251 | * algorithm. |
| 252 | * |
| 253 | * For example, to allocate no more than 4.5 frames worth of bitrate |
| 254 | * to a keyframe, set this to 450. |
| 255 | * |
| 256 | * Supported in codecs: VP8, VP9 |
| 257 | */ |
| 258 | VP8E_SET_MAX_INTRA_BITRATE_PCT, |
| 259 |
| 260 | /*!\brief Codec control function to set reference and update frame flags. |
| 261 | * |
| 262 | * Supported in codecs: VP8 |
| 263 | */ |
| 264 | VP8E_SET_FRAME_FLAGS, |
| 265 |
| 266 | /*!\brief Codec control function to set max data rate for Inter frames. |
| 267 | * |
| 268 | * This value controls additional clamping on the maximum size of an |
| 269 | * inter frame. It is expressed as a percentage of the average |
| 270 | * per-frame bitrate, with the special (and default) value 0 meaning |
| 271 | * unlimited, or no additional clamping beyond the codec's built-in |
| 272 | * algorithm. |
| 273 | * |
| 274 | * For example, to allow no more than 4.5 frames worth of bitrate |
| 275 | * to an inter frame, set this to 450. |
| 276 | * |
| 277 | * Supported in codecs: VP9 |
| 278 | */ |
| 279 | VP9E_SET_MAX_INTER_BITRATE_PCT, |
| 280 |
| 281 | /*!\brief Boost percentage for Golden Frame in CBR mode. |
| 282 | * |
| 283 | * This value controls the amount of boost given to Golden Frame in |
| 284 | * CBR mode. It is expressed as a percentage of the average |
| 285 | * per-frame bitrate, with the special (and default) value 0 meaning |
| 286 | * the feature is off, i.e., no golden frame boost in CBR mode and |
| 287 | * average bitrate target is used. |
| 288 | * |
| 289 | * For example, to allow 100% more bits, i.e, 2X, in a golden frame |
| 290 | * than average frame, set this to 100. |
| 291 | * |
| 292 | * Supported in codecs: VP9 |
| 293 | */ |
| 294 | VP9E_SET_GF_CBR_BOOST_PCT, |
| 295 |
| 296 | /*!\brief Codec control function to set the temporal layer id. |
| 297 | * |
| 298 | * For temporal scalability: this control allows the application to set the |
| 299 | * layer id for each frame to be encoded. Note that this control must be set |
| 300 | * for every frame prior to encoding. The usage of this control function |
| 301 | * supersedes the internal temporal pattern counter, which is now deprecated. |
| 302 | * |
| 303 | * Supported in codecs: VP8 |
| 304 | */ |
| 305 | VP8E_SET_TEMPORAL_LAYER_ID, |
| 306 |
| 307 | /*!\brief Codec control function to set encoder screen content mode. |
| 308 | * |
| 309 | * 0: off, 1: On, 2: On with more aggressive rate control. |
| 310 | * |
| 311 | * Supported in codecs: VP8 |
| 312 | */ |
| 313 | VP8E_SET_SCREEN_CONTENT_MODE, |
| 314 |
| 315 | /*!\brief Codec control function to set lossless encoding mode. |
| 316 | * |
| 317 | * VP9 can operate in lossless encoding mode, in which the bitstream |
| 318 | * produced will be able to decode and reconstruct a perfect copy of |
| 319 | * input source. This control function provides a mean to switch encoder |
| 320 | * into lossless coding mode(1) or normal coding mode(0) that may be lossy. |
| 321 | * 0 = lossy coding mode |
| 322 | * 1 = lossless coding mode |
| 323 | * |
| 324 | * By default, encoder operates in normal coding mode (maybe lossy). |
| 325 | * |
| 326 | * Supported in codecs: VP9 |
| 327 | */ |
| 328 | VP9E_SET_LOSSLESS, |
| 329 |
| 330 | /*!\brief Codec control function to set number of tile columns. |
| 331 | * |
| 332 | * In encoding and decoding, VP9 allows an input image frame be partitioned |
| 333 | * into separated vertical tile columns, which can be encoded or decoded |
| 334 | * independently. This enables easy implementation of parallel encoding and |
| 335 | * decoding. This control requests the encoder to use column tiles in |
| 336 | * encoding an input frame, with number of tile columns (in Log2 unit) as |
| 337 | * the parameter: |
| 338 | * 0 = 1 tile column |
| 339 | * 1 = 2 tile columns |
| 340 | * 2 = 4 tile columns |
| 341 | * ..... |
| 342 | * n = 2**n tile columns |
| 343 | * The requested tile columns will be capped by the encoder based on image |
| 344 | * size limitations (The minimum width of a tile column is 256 pixels, the |
| 345 | * maximum is 4096). |
| 346 | * |
| 347 | * By default, the value is 6, i.e., the maximum number of tiles supported by |
| 348 | * the resolution. |
| 349 | * |
| 350 | * Supported in codecs: VP9 |
| 351 | */ |
| 352 | VP9E_SET_TILE_COLUMNS, |
| 353 |
| 354 | /*!\brief Codec control function to set number of tile rows. |
| 355 | * |
| 356 | * In encoding and decoding, VP9 allows an input image frame be partitioned |
| 357 | * into separated horizontal tile rows. Tile rows are encoded or decoded |
| 358 | * sequentially. Even though encoding/decoding of later tile rows depends on |
| 359 | * earlier ones, this allows the encoder to output data packets for tile rows |
| 360 | * prior to completely processing all tile rows in a frame, thereby reducing |
| 361 | * the latency in processing between input and output. The parameter |
| 362 | * for this control describes the number of tile rows, which has a valid |
| 363 | * range [0, 2]: |
| 364 | * 0 = 1 tile row |
| 365 | * 1 = 2 tile rows |
| 366 | * 2 = 4 tile rows |
| 367 | * |
| 368 | * By default, the value is 0, i.e. one single row tile for entire image. |
| 369 | * |
| 370 | * Supported in codecs: VP9 |
| 371 | */ |
| 372 | VP9E_SET_TILE_ROWS, |
| 373 |
| 374 | /*!\brief Codec control function to enable frame parallel decoding feature. |
| 375 | * |
| 376 | * VP9 has a bitstream feature to reduce decoding dependency between frames |
| 377 | * by turning off backward update of probability context used in encoding |
| 378 | * and decoding. This allows staged parallel processing of more than one |
| 379 | * video frame in the decoder. This control function provides a means to |
| 380 | * turn this feature on or off for bitstreams produced by encoder. |
| 381 | * |
| 382 | * By default, this feature is on. |
| 383 | * |
| 384 | * Supported in codecs: VP9 |
| 385 | */ |
| 386 | VP9E_SET_FRAME_PARALLEL_DECODING, |
| 387 |
| 388 | /*!\brief Codec control function to set adaptive quantization mode. |
| 389 | * |
| 390 | * VP9 has a segment based feature that allows encoder to adaptively change |
| 391 | * quantization parameter for each segment within a frame to improve the |
| 392 | * subjective quality. This control makes encoder operate in one of the |
| 393 | * several AQ_modes supported. |
| 394 | * |
| 395 | * By default, encoder operates with AQ_Mode 0(adaptive quantization off). |
| 396 | * |
| 397 | * Supported in codecs: VP9 |
| 398 | */ |
| 399 | VP9E_SET_AQ_MODE, |
| 400 |
| 401 | /*!\brief Codec control function to enable/disable periodic Q boost. |
| 402 | * |
| 403 | * One VP9 encoder speed feature is to enable quality boost by lowering |
| 404 | * frame level Q periodically. This control function provides a mean to |
| 405 | * turn on/off this feature. |
| 406 | * 0 = off |
| 407 | * 1 = on |
| 408 | * |
| 409 | * By default, the encoder is allowed to use this feature for appropriate |
| 410 | * encoding modes. |
| 411 | * |
| 412 | * Supported in codecs: VP9 |
| 413 | */ |
| 414 | VP9E_SET_FRAME_PERIODIC_BOOST, |
| 415 |
| 416 | /*!\brief Codec control function to set noise sensitivity. |
| 417 | * |
| 418 | * 0: off, 1: On(YOnly), 2: For SVC only, on top two spatial layers(YOnly) |
| 419 | * |
| 420 | * Supported in codecs: VP9 |
| 421 | */ |
| 422 | VP9E_SET_NOISE_SENSITIVITY, |
| 423 |
| 424 | /*!\brief Codec control function to turn on/off SVC in encoder. |
| 425 | * \note Return value is VPX_CODEC_INVALID_PARAM if the encoder does not |
| 426 | * support SVC in its current encoding mode |
| 427 | * 0: off, 1: on |
| 428 | * |
| 429 | * Supported in codecs: VP9 |
| 430 | */ |
| 431 | VP9E_SET_SVC, |
| 432 |
| 433 | /*!\brief Codec control function to pass an ROI map to encoder. |
| 434 | * |
| 435 | * Supported in codecs: VP9 |
| 436 | */ |
| 437 | VP9E_SET_ROI_MAP, |
| 438 |
| 439 | /*!\brief Codec control function to set parameters for SVC. |
| 440 | * \note Parameters contain min_q, max_q, scaling factor for each of the |
| 441 | * SVC layers. |
| 442 | * |
| 443 | * Supported in codecs: VP9 |
| 444 | */ |
| 445 | VP9E_SET_SVC_PARAMETERS, |
| 446 |
| 447 | /*!\brief Codec control function to set svc layer for spatial and temporal. |
| 448 | * \note Valid ranges: 0..#vpx_codec_enc_cfg::ss_number_layers for spatial |
| 449 | * layer and 0..#vpx_codec_enc_cfg::ts_number_layers for |
| 450 | * temporal layer. |
| 451 | * |
| 452 | * Supported in codecs: VP9 |
| 453 | */ |
| 454 | VP9E_SET_SVC_LAYER_ID, |
| 455 |
| 456 | /*!\brief Codec control function to set content type. |
| 457 | * \note Valid parameter range: |
| 458 | * VP9E_CONTENT_DEFAULT = Regular video content (Default) |
| 459 | * VP9E_CONTENT_SCREEN = Screen capture content |
| 460 | * VP9E_CONTENT_FILM = Film content: improves grain retention |
| 461 | * |
| 462 | * Supported in codecs: VP9 |
| 463 | */ |
| 464 | VP9E_SET_TUNE_CONTENT, |
| 465 |
| 466 | /*!\brief Codec control function to get svc layer ID. |
| 467 | * \note The layer ID returned is for the data packet from the registered |
| 468 | * callback function. |
| 469 | * |
| 470 | * Supported in codecs: VP9 |
| 471 | */ |
| 472 | VP9E_GET_SVC_LAYER_ID, |
| 473 |
| 474 | /*!\brief Codec control function to register callback to get per layer packet. |
| 475 | * \note Parameter for this control function is a structure with a callback |
| 476 | * function and a pointer to private data used by the callback. |
| 477 | * |
| 478 | * Supported in codecs: VP9 |
| 479 | */ |
| 480 | VP9E_REGISTER_CX_CALLBACK, |
| 481 |
| 482 | /*!\brief Codec control function to set color space info. |
| 483 | * \note Valid ranges: 0..7, default is "UNKNOWN". |
| 484 | * 0 = UNKNOWN, |
| 485 | * 1 = BT_601 |
| 486 | * 2 = BT_709 |
| 487 | * 3 = SMPTE_170 |
| 488 | * 4 = SMPTE_240 |
| 489 | * 5 = BT_2020 |
| 490 | * 6 = RESERVED |
| 491 | * 7 = SRGB |
| 492 | * |
| 493 | * Supported in codecs: VP9 |
| 494 | */ |
| 495 | VP9E_SET_COLOR_SPACE, |
| 496 |
| 497 | /*!\brief Codec control function to set temporal layering mode. |
| 498 | * \note Valid ranges: 0..3, default is "0" |
| 499 | * (VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING). |
| 500 | * 0 = VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING |
| 501 | * 1 = VP9E_TEMPORAL_LAYERING_MODE_BYPASS |
| 502 | * 2 = VP9E_TEMPORAL_LAYERING_MODE_0101 |
| 503 | * 3 = VP9E_TEMPORAL_LAYERING_MODE_0212 |
| 504 | * |
| 505 | * Supported in codecs: VP9 |
| 506 | */ |
| 507 | VP9E_SET_TEMPORAL_LAYERING_MODE, |
| 508 |
| 509 | /*!\brief Codec control function to set minimum interval between GF/ARF frames |
| 510 | * |
| 511 | * By default the value is set as 4. |
| 512 | * |
| 513 | * Supported in codecs: VP9 |
| 514 | */ |
| 515 | VP9E_SET_MIN_GF_INTERVAL, |
| 516 |
| 517 | /*!\brief Codec control function to set minimum interval between GF/ARF frames |
| 518 | * |
| 519 | * By default the value is set as 16. |
| 520 | * |
| 521 | * Supported in codecs: VP9 |
| 522 | */ |
| 523 | VP9E_SET_MAX_GF_INTERVAL, |
| 524 |
| 525 | /*!\brief Codec control function to get an Active map back from the encoder. |
| 526 | * |
| 527 | * Supported in codecs: VP9 |
| 528 | */ |
| 529 | VP9E_GET_ACTIVEMAP, |
| 530 |
| 531 | /*!\brief Codec control function to set color range bit. |
| 532 | * \note Valid ranges: 0..1, default is 0 |
| 533 | * 0 = Limited range (16..235 or HBD equivalent) |
| 534 | * 1 = Full range (0..255 or HBD equivalent) |
| 535 | * |
| 536 | * Supported in codecs: VP9 |
| 537 | */ |
| 538 | VP9E_SET_COLOR_RANGE, |
| 539 |
| 540 | /*!\brief Codec control function to set the frame flags and buffer indices |
| 541 | * for spatial layers. The frame flags and buffer indices are set using the |
| 542 | * struct #vpx_svc_ref_frame_config defined below. |
| 543 | * |
| 544 | * Supported in codecs: VP9 |
| 545 | */ |
| 546 | VP9E_SET_SVC_REF_FRAME_CONFIG, |
| 547 |
| 548 | /*!\brief Codec control function to set intended rendering image size. |
| 549 | * |
| 550 | * By default, this is identical to the image size in pixels. |
| 551 | * |
| 552 | * Supported in codecs: VP9 |
| 553 | */ |
| 554 | VP9E_SET_RENDER_SIZE, |
| 555 |
| 556 | /*!\brief Codec control function to set target level. |
| 557 | * |
| 558 | * 255: off (default); 0: only keep level stats; 10: target for level 1.0; |
| 559 | * 11: target for level 1.1; ... 62: target for level 6.2 |
| 560 | * |
| 561 | * Supported in codecs: VP9 |
| 562 | */ |
| 563 | VP9E_SET_TARGET_LEVEL, |
| 564 |
| 565 | /*!\brief Codec control function to set row level multi-threading. |
| 566 | * |
| 567 | * 0 : off, 1 : on |
| 568 | * |
| 569 | * Supported in codecs: VP9 |
| 570 | */ |
| 571 | VP9E_SET_ROW_MT, |
| 572 |
| 573 | /*!\brief Codec control function to get bitstream level. |
| 574 | * |
| 575 | * Supported in codecs: VP9 |
| 576 | */ |
| 577 | VP9E_GET_LEVEL, |
| 578 |
| 579 | /*!\brief Codec control function to enable/disable special mode for altref |
| 580 | * adaptive quantization. You can use it with --aq-mode concurrently. |
| 581 | * |
| 582 | * Enable special adaptive quantization for altref frames based on their |
| 583 | * expected prediction quality for the future frames. |
| 584 | * |
| 585 | * Supported in codecs: VP9 |
| 586 | */ |
| 587 | VP9E_SET_ALT_REF_AQ, |
| 588 |
| 589 | /*!\brief Boost percentage for Golden Frame in CBR mode. |
| 590 | * |
| 591 | * This value controls the amount of boost given to Golden Frame in |
| 592 | * CBR mode. It is expressed as a percentage of the average |
| 593 | * per-frame bitrate, with the special (and default) value 0 meaning |
| 594 | * the feature is off, i.e., no golden frame boost in CBR mode and |
| 595 | * average bitrate target is used. |
| 596 | * |
| 597 | * For example, to allow 100% more bits, i.e, 2X, in a golden frame |
| 598 | * than average frame, set this to 100. |
| 599 | * |
| 600 | * Supported in codecs: VP8 |
| 601 | */ |
| 602 | VP8E_SET_GF_CBR_BOOST_PCT, |
| 603 |
| 604 | /*!\brief Codec control function to enable the extreme motion vector unit test |
| 605 | * in VP9. Please note that this is only used in motion vector unit test. |
| 606 | * |
| 607 | * 0 : off, 1 : MAX_EXTREME_MV, 2 : MIN_EXTREME_MV |
| 608 | * |
| 609 | * Supported in codecs: VP9 |
| 610 | */ |
| 611 | VP9E_ENABLE_MOTION_VECTOR_UNIT_TEST, |
| 612 |
| 613 | /*!\brief Codec control function to constrain the inter-layer prediction |
| 614 | * (prediction of lower spatial resolution) in VP9 SVC. |
| 615 | * |
| 616 | * 0 : inter-layer prediction on, 1 : off, 2 : off only on non-key frames |
| 617 | * |
| 618 | * Supported in codecs: VP9 |
| 619 | */ |
| 620 | VP9E_SET_SVC_INTER_LAYER_PRED, |
| 621 |
| 622 | /*!\brief Codec control function to set mode and thresholds for frame |
| 623 | * dropping in SVC. Drop frame thresholds are set per-layer. Mode is set as: |
| 624 | * 0 : layer-dependent dropping, 1 : constrained dropping, current layer drop |
| 625 | * forces drop on all upper layers. Default mode is 0. |
| 626 | * |
| 627 | * Supported in codecs: VP9 |
| 628 | */ |
| 629 | VP9E_SET_SVC_FRAME_DROP_LAYER, |
| 630 |
| 631 | /*!\brief Codec control function to get the refresh and reference flags and |
| 632 | * the buffer indices, up to the last encoded spatial layer. |
| 633 | * |
| 634 | * Supported in codecs: VP9 |
| 635 | */ |
| 636 | VP9E_GET_SVC_REF_FRAME_CONFIG, |
| 637 |
| 638 | /*!\brief Codec control function to enable/disable use of golden reference as |
| 639 | * a second temporal reference for SVC. Only used when inter-layer prediction |
| 640 | * is disabled on INTER frames. |
| 641 | * |
| 642 | * 0: Off, 1: Enabled (default) |
| 643 | * |
| 644 | * Supported in codecs: VP9 |
| 645 | */ |
| 646 | VP9E_SET_SVC_GF_TEMPORAL_REF, |
| 647 |
| 648 | /*!\brief Codec control function to enable spatial layer sync frame, for any |
| 649 | * spatial layer. Enabling it for layer k means spatial layer k will disable |
| 650 | * all temporal prediction, but keep the inter-layer prediction. It will |
| 651 | * refresh any temporal reference buffer for that layer, and reset the |
| 652 | * temporal layer for the superframe to 0. Setting the layer sync for base |
| 653 | * spatial layer forces a key frame. Default is off (0) for all spatial |
| 654 | * layers. Spatial layer sync flag is reset to 0 after each encoded layer, |
| 655 | * so when control is invoked it is only used for the current superframe. |
| 656 | * |
| 657 | * 0: Off (default), 1: Enabled |
| 658 | * |
| 659 | * Supported in codecs: VP9 |
| 660 | */ |
| 661 | VP9E_SET_SVC_SPATIAL_LAYER_SYNC, |
| 662 |
| 663 | /*!\brief Codec control function to enable temporal dependency model. |
| 664 | * |
| 665 | * Vp9 allows the encoder to run temporal dependency model and use it to |
| 666 | * improve the compression performance. To enable, set this parameter to be |
| 667 | * 1. The default value is set to be 1. |
| 668 | */ |
| 669 | VP9E_SET_TPL, |
| 670 |
| 671 | /*!\brief Codec control function to enable postencode frame drop. |
| 672 | * |
| 673 | * This will allow encoder to drop frame after it's encoded. |
| 674 | * |
| 675 | * 0: Off (default), 1: Enabled |
| 676 | * |
| 677 | * Supported in codecs: VP9 |
| 678 | */ |
| 679 | VP9E_SET_POSTENCODE_DROP, |
| 680 |
| 681 | /*!\brief Codec control function to set delta q for uv. |
| 682 | * |
| 683 | * Cap it at +/-15. |
| 684 | * |
| 685 | * Supported in codecs: VP9 |
| 686 | */ |
| 687 | VP9E_SET_DELTA_Q_UV, |
| 688 |
| 689 | /*!\brief Codec control function to disable increase Q on overshoot in CBR. |
| 690 | * |
| 691 | * 0: On (default), 1: Disable. |
| 692 | * |
| 693 | * Supported in codecs: VP9 |
| 694 | */ |
| 695 | VP9E_SET_DISABLE_OVERSHOOT_MAXQ_CBR, |
| 696 |
| 697 | /*!\brief Codec control function to disable loopfilter. |
| 698 | * |
| 699 | * 0: Loopfilter on all frames, 1: Disable on non reference frames. |
| 700 | * 2: Disable on all frames. |
| 701 | * |
| 702 | * Supported in codecs: VP9 |
| 703 | */ |
| 704 | VP9E_SET_DISABLE_LOOPFILTER, |
| 705 |
| 706 | /*!\brief Codec control function to enable external rate control library. |
| 707 | * |
| 708 | * args[0]: path of the rate control library |
| 709 | * |
| 710 | * args[1]: private config of the rate control library |
| 711 | * |
| 712 | * Supported in codecs: VP9 |
| 713 | */ |
| 714 | VP9E_SET_EXTERNAL_RATE_CONTROL, |
| 715 | }; |
| 716 |
| 717 | /*!\brief vpx 1-D scaling mode |
| 718 | * |
| 719 | * This set of constants define 1-D vpx scaling modes |
| 720 | */ |
| 721 | typedef enum vpx_scaling_mode_1d { |
| 722 | VP8E_NORMAL = 0, |
| 723 | VP8E_FOURFIVE = 1, |
| 724 | VP8E_THREEFIVE = 2, |
| 725 | VP8E_ONETWO = 3 |
| 726 | } VPX_SCALING_MODE; |
| 727 |
| 728 | /*!\brief Temporal layering mode enum for VP9 SVC. |
| 729 | * |
| 730 | * This set of macros define the different temporal layering modes. |
| 731 | * Supported codecs: VP9 (in SVC mode) |
| 732 | * |
| 733 | */ |
| 734 | typedef enum vp9e_temporal_layering_mode { |
| 735 | /*!\brief No temporal layering. |
| 736 | * Used when only spatial layering is used. |
| 737 | */ |
| 738 | VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING = 0, |
| 739 |
| 740 | /*!\brief Bypass mode. |
| 741 | * Used when application needs to control temporal layering. |
| 742 | * This will only work when the number of spatial layers equals 1. |
| 743 | */ |
| 744 | VP9E_TEMPORAL_LAYERING_MODE_BYPASS = 1, |
| 745 |
| 746 | /*!\brief 0-1-0-1... temporal layering scheme with two temporal layers. |
| 747 | */ |
| 748 | VP9E_TEMPORAL_LAYERING_MODE_0101 = 2, |
| 749 |
| 750 | /*!\brief 0-2-1-2... temporal layering scheme with three temporal layers. |
| 751 | */ |
| 752 | VP9E_TEMPORAL_LAYERING_MODE_0212 = 3 |
| 753 | } VP9E_TEMPORAL_LAYERING_MODE; |
| 754 |
| 755 | /*!\brief vpx region of interest map |
| 756 | * |
| 757 | * These defines the data structures for the region of interest map |
| 758 | * |
| 759 | */ |
| 760 |
| 761 | typedef struct vpx_roi_map { |
| 762 | /*! If ROI is enabled. */ |
| 763 | uint8_t enabled; |
| 764 | /*! An id between 0-3 (0-7 for vp9) for each 16x16 (8x8 for VP9) |
| 765 | * region within a frame. */ |
| 766 | unsigned char *roi_map; |
| 767 | unsigned int rows; /**< Number of rows. */ |
| 768 | unsigned int cols; /**< Number of columns. */ |
| 769 | /*! VP8 only uses the first 4 segments. VP9 uses 8 segments. */ |
| 770 | int delta_q[8]; /**< Quantizer deltas. */ |
| 771 | int delta_lf[8]; /**< Loop filter deltas. */ |
| 772 | /*! skip and ref frame segment is only used in VP9. */ |
| 773 | int skip[8]; /**< Skip this block. */ |
| 774 | int ref_frame[8]; /**< Reference frame for this block. */ |
| 775 | /*! Static breakout threshold for each segment. Only used in VP8. */ |
| 776 | unsigned int static_threshold[4]; |
| 777 | } vpx_roi_map_t; |
| 778 |
| 779 | /*!\brief vpx active region map |
| 780 | * |
| 781 | * These defines the data structures for active region map |
| 782 | * |
| 783 | */ |
| 784 |
| 785 | typedef struct vpx_active_map { |
| 786 | /*!\brief specify an on (1) or off (0) each 16x16 region within a frame */ |
| 787 | unsigned char *active_map; |
| 788 | unsigned int rows; /**< number of rows */ |
| 789 | unsigned int cols; /**< number of cols */ |
| 790 | } vpx_active_map_t; |
| 791 |
| 792 | /*!\brief vpx image scaling mode |
| 793 | * |
| 794 | * This defines the data structure for image scaling mode |
| 795 | * |
| 796 | */ |
| 797 | typedef struct vpx_scaling_mode { |
| 798 | VPX_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */ |
| 799 | VPX_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */ |
| 800 | } vpx_scaling_mode_t; |
| 801 |
| 802 | /*!\brief VP8 token partition mode |
| 803 | * |
| 804 | * This defines VP8 partitioning mode for compressed data, i.e., the number of |
| 805 | * sub-streams in the bitstream. Used for parallelized decoding. |
| 806 | * |
| 807 | */ |
| 808 |
| 809 | typedef enum { |
| 810 | VP8_ONE_TOKENPARTITION = 0, |
| 811 | VP8_TWO_TOKENPARTITION = 1, |
| 812 | VP8_FOUR_TOKENPARTITION = 2, |
| 813 | VP8_EIGHT_TOKENPARTITION = 3 |
| 814 | } vp8e_token_partitions; |
| 815 |
| 816 | /*!brief VP9 encoder content type */ |
| 817 | typedef enum { |
| 818 | VP9E_CONTENT_DEFAULT, |
| 819 | VP9E_CONTENT_SCREEN, |
| 820 | VP9E_CONTENT_FILM, |
| 821 | VP9E_CONTENT_INVALID |
| 822 | } vp9e_tune_content; |
| 823 |
| 824 | /*!\brief VP8 model tuning parameters |
| 825 | * |
| 826 | * Changes the encoder to tune for certain types of input material. |
| 827 | * |
| 828 | */ |
| 829 | typedef enum { VP8_TUNE_PSNR, VP8_TUNE_SSIM } vp8e_tuning; |
| 830 |
| 831 | /*!\brief vp9 svc layer parameters |
| 832 | * |
| 833 | * This defines the spatial and temporal layer id numbers for svc encoding. |
| 834 | * This is used with the #VP9E_SET_SVC_LAYER_ID control to set the spatial and |
| 835 | * temporal layer id for the current frame. |
| 836 | * |
| 837 | */ |
| 838 | typedef struct vpx_svc_layer_id { |
| 839 | int spatial_layer_id; /**< First spatial layer to start encoding. */ |
| 840 | // TODO(jianj): Deprecated, to be removed. |
| 841 | int temporal_layer_id; /**< Temporal layer id number. */ |
| 842 | int temporal_layer_id_per_spatial[VPX_SS_MAX_LAYERS]; /**< Temp layer id. */ |
| 843 | } vpx_svc_layer_id_t; |
| 844 |
| 845 | /*!\brief vp9 svc frame flag parameters. |
| 846 | * |
| 847 | * This defines the frame flags and buffer indices for each spatial layer for |
| 848 | * svc encoding. |
| 849 | * This is used with the #VP9E_SET_SVC_REF_FRAME_CONFIG control to set frame |
| 850 | * flags and buffer indices for each spatial layer for the current (super)frame. |
| 851 | * |
| 852 | */ |
| 853 | typedef struct vpx_svc_ref_frame_config { |
| 854 | int lst_fb_idx[VPX_SS_MAX_LAYERS]; /**< Last buffer index. */ |
| 855 | int gld_fb_idx[VPX_SS_MAX_LAYERS]; /**< Golden buffer index. */ |
| 856 | int alt_fb_idx[VPX_SS_MAX_LAYERS]; /**< Altref buffer index. */ |
| 857 | int update_buffer_slot[VPX_SS_MAX_LAYERS]; /**< Update reference frames. */ |
| 858 | // TODO(jianj): Remove update_last/golden/alt_ref, these are deprecated. |
| 859 | int update_last[VPX_SS_MAX_LAYERS]; /**< Update last. */ |
| 860 | int update_golden[VPX_SS_MAX_LAYERS]; /**< Update golden. */ |
| 861 | int update_alt_ref[VPX_SS_MAX_LAYERS]; /**< Update altref. */ |
| 862 | int reference_last[VPX_SS_MAX_LAYERS]; /**< Last as reference. */ |
| 863 | int reference_golden[VPX_SS_MAX_LAYERS]; /**< Golden as reference. */ |
| 864 | int reference_alt_ref[VPX_SS_MAX_LAYERS]; /**< Altref as reference. */ |
| 865 | int64_t duration[VPX_SS_MAX_LAYERS]; /**< Duration per spatial layer. */ |
| 866 | } vpx_svc_ref_frame_config_t; |
| 867 |
| 868 | /*!\brief VP9 svc frame dropping mode. |
| 869 | * |
| 870 | * This defines the frame drop mode for SVC. |
| 871 | * |
| 872 | */ |
| 873 | typedef enum { |
| 874 | CONSTRAINED_LAYER_DROP, |
| 875 | /**< Upper layers are constrained to drop if current layer drops. */ |
| 876 | LAYER_DROP, /**< Any spatial layer can drop. */ |
| 877 | FULL_SUPERFRAME_DROP, /**< Only full superframe can drop. */ |
| 878 | CONSTRAINED_FROM_ABOVE_DROP, |
| 879 | /**< Lower layers are constrained to drop if current layer drops. */ |
| 880 | } SVC_LAYER_DROP_MODE; |
| 881 |
| 882 | /*!\brief vp9 svc frame dropping parameters. |
| 883 | * |
| 884 | * This defines the frame drop thresholds for each spatial layer, and |
| 885 | * the frame dropping mode: 0 = layer based frame dropping (default), |
| 886 | * 1 = constrained dropping where current layer drop forces all upper |
| 887 | * spatial layers to drop. |
| 888 | */ |
| 889 | typedef struct vpx_svc_frame_drop { |
| 890 | int framedrop_thresh[VPX_SS_MAX_LAYERS]; /**< Frame drop thresholds */ |
| 891 | SVC_LAYER_DROP_MODE |
| 892 | framedrop_mode; /**< Layer-based or constrained dropping. */ |
| 893 | int max_consec_drop; /**< Maximum consecutive drops, for any layer. */ |
| 894 | } vpx_svc_frame_drop_t; |
| 895 |
| 896 | /*!\brief vp9 svc spatial layer sync parameters. |
| 897 | * |
| 898 | * This defines the spatial layer sync flag, defined per spatial layer. |
| 899 | * |
| 900 | */ |
| 901 | typedef struct vpx_svc_spatial_layer_sync { |
| 902 | int spatial_layer_sync[VPX_SS_MAX_LAYERS]; /**< Sync layer flags */ |
| 903 | int base_layer_intra_only; /**< Flag for setting Intra-only frame on base */ |
| 904 | } vpx_svc_spatial_layer_sync_t; |
| 905 |
| 906 | /*!\cond */ |
| 907 | /*!\brief VP8 encoder control function parameter type |
| 908 | * |
| 909 | * Defines the data types that VP8E control functions take. Note that |
| 910 | * additional common controls are defined in vp8.h |
| 911 | * |
| 912 | */ |
| 913 |
| 914 | VPX_CTRL_USE_TYPE(VP8E_SET_FRAME_FLAGS, int) |
| 915 | #define VPX_CTRL_VP8E_SET_FRAME_FLAGS |
| 916 | VPX_CTRL_USE_TYPE(VP8E_SET_TEMPORAL_LAYER_ID, int) |
| 917 | #define VPX_CTRL_VP8E_SET_TEMPORAL_LAYER_ID |
| 918 | VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *) |
| 919 | #define VPX_CTRL_VP8E_SET_ROI_MAP |
| 920 | VPX_CTRL_USE_TYPE(VP9E_SET_ROI_MAP, vpx_roi_map_t *) |
| 921 | #define VPX_CTRL_VP9E_SET_ROI_MAP |
| 922 | VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *) |
| 923 | #define VPX_CTRL_VP8E_SET_ACTIVEMAP |
| 924 | VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *) |
| 925 | #define VPX_CTRL_VP8E_SET_SCALEMODE |
| 926 |
| 927 | VPX_CTRL_USE_TYPE(VP9E_SET_SVC, int) |
| 928 | #define VPX_CTRL_VP9E_SET_SVC |
| 929 | VPX_CTRL_USE_TYPE(VP9E_SET_SVC_PARAMETERS, void *) |
| 930 | #define VPX_CTRL_VP9E_SET_SVC_PARAMETERS |
| 931 | VPX_CTRL_USE_TYPE(VP9E_REGISTER_CX_CALLBACK, void *) |
| 932 | #define VPX_CTRL_VP9E_REGISTER_CX_CALLBACK |
| 933 | VPX_CTRL_USE_TYPE(VP9E_SET_SVC_LAYER_ID, vpx_svc_layer_id_t *) |
| 934 | #define VPX_CTRL_VP9E_SET_SVC_LAYER_ID |
| 935 |
| 936 | VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int) |
| 937 | #define VPX_CTRL_VP8E_SET_CPUUSED |
| 938 | VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int) |
| 939 | #define VPX_CTRL_VP8E_SET_ENABLEAUTOALTREF |
| 940 | VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int) |
| 941 | #define VPX_CTRL_VP8E_SET_NOISE_SENSITIVITY |
| 942 | VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int) |
| 943 | #define VPX_CTRL_VP8E_SET_SHARPNESS |
| 944 | VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int) |
| 945 | #define VPX_CTRL_VP8E_SET_STATIC_THRESHOLD |
| 946 | VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int) /* vp8e_token_partitions */ |
| 947 | #define VPX_CTRL_VP8E_SET_TOKEN_PARTITIONS |
| 948 |
| 949 | VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int) |
| 950 | #define VPX_CTRL_VP8E_SET_ARNR_MAXFRAMES |
| 951 | VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH, unsigned int) |
| 952 | #define VPX_CTRL_VP8E_SET_ARNR_STRENGTH |
| 953 | VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ARNR_TYPE, unsigned int) |
| 954 | #define VPX_CTRL_VP8E_SET_ARNR_TYPE |
| 955 | VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vp8e_tuning */ |
| 956 | #define VPX_CTRL_VP8E_SET_TUNING |
| 957 | VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL, unsigned int) |
| 958 | #define VPX_CTRL_VP8E_SET_CQ_LEVEL |
| 959 |
| 960 | VPX_CTRL_USE_TYPE(VP9E_SET_TILE_COLUMNS, int) |
| 961 | #define VPX_CTRL_VP9E_SET_TILE_COLUMNS |
| 962 | VPX_CTRL_USE_TYPE(VP9E_SET_TILE_ROWS, int) |
| 963 | #define VPX_CTRL_VP9E_SET_TILE_ROWS |
| 964 |
| 965 | VPX_CTRL_USE_TYPE(VP9E_SET_TPL, int) |
| 966 | #define VPX_CTRL_VP9E_SET_TPL |
| 967 |
| 968 | VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *) |
| 969 | #define VPX_CTRL_VP8E_GET_LAST_QUANTIZER |
| 970 | VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *) |
| 971 | #define VPX_CTRL_VP8E_GET_LAST_QUANTIZER_64 |
| 972 | VPX_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID, vpx_svc_layer_id_t *) |
| 973 | #define VPX_CTRL_VP9E_GET_SVC_LAYER_ID |
| 974 |
| 975 | VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int) |
| 976 | #define VPX_CTRL_VP8E_SET_MAX_INTRA_BITRATE_PCT |
| 977 | VPX_CTRL_USE_TYPE(VP9E_SET_MAX_INTER_BITRATE_PCT, unsigned int) |
| 978 | #define VPX_CTRL_VP9E_SET_MAX_INTER_BITRATE_PCT |
| 979 |
| 980 | VPX_CTRL_USE_TYPE(VP8E_SET_GF_CBR_BOOST_PCT, unsigned int) |
| 981 | #define VPX_CTRL_VP8E_SET_GF_CBR_BOOST_PCT |
| 982 |
| 983 | VPX_CTRL_USE_TYPE(VP8E_SET_SCREEN_CONTENT_MODE, unsigned int) |
| 984 | #define VPX_CTRL_VP8E_SET_SCREEN_CONTENT_MODE |
| 985 |
| 986 | VPX_CTRL_USE_TYPE(VP9E_SET_GF_CBR_BOOST_PCT, unsigned int) |
| 987 | #define VPX_CTRL_VP9E_SET_GF_CBR_BOOST_PCT |
| 988 |
| 989 | VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int) |
| 990 | #define VPX_CTRL_VP9E_SET_LOSSLESS |
| 991 |
| 992 | VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int) |
| 993 | #define VPX_CTRL_VP9E_SET_FRAME_PARALLEL_DECODING |
| 994 |
| 995 | VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int) |
| 996 | #define VPX_CTRL_VP9E_SET_AQ_MODE |
| 997 |
| 998 | VPX_CTRL_USE_TYPE(VP9E_SET_ALT_REF_AQ, int) |
| 999 | #define VPX_CTRL_VP9E_SET_ALT_REF_AQ |
| 1000 |
| 1001 | VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int) |
| 1002 | #define VPX_CTRL_VP9E_SET_FRAME_PERIODIC_BOOST |
| 1003 |
| 1004 | VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int) |
| 1005 | #define VPX_CTRL_VP9E_SET_NOISE_SENSITIVITY |
| 1006 |
| 1007 | VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */ |
| 1008 | #define VPX_CTRL_VP9E_SET_TUNE_CONTENT |
| 1009 |
| 1010 | VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int) |
| 1011 | #define VPX_CTRL_VP9E_SET_COLOR_SPACE |
| 1012 |
| 1013 | VPX_CTRL_USE_TYPE(VP9E_SET_MIN_GF_INTERVAL, unsigned int) |
| 1014 | #define VPX_CTRL_VP9E_SET_MIN_GF_INTERVAL |
| 1015 |
| 1016 | VPX_CTRL_USE_TYPE(VP9E_SET_MAX_GF_INTERVAL, unsigned int) |
| 1017 | #define VPX_CTRL_VP9E_SET_MAX_GF_INTERVAL |
| 1018 |
| 1019 | VPX_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, vpx_active_map_t *) |
| 1020 | #define VPX_CTRL_VP9E_GET_ACTIVEMAP |
| 1021 |
| 1022 | VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_RANGE, int) |
| 1023 | #define VPX_CTRL_VP9E_SET_COLOR_RANGE |
| 1024 |
| 1025 | VPX_CTRL_USE_TYPE(VP9E_SET_SVC_REF_FRAME_CONFIG, vpx_svc_ref_frame_config_t *) |
| 1026 | #define VPX_CTRL_VP9E_SET_SVC_REF_FRAME_CONFIG |
| 1027 |
| 1028 | VPX_CTRL_USE_TYPE(VP9E_SET_RENDER_SIZE, int *) |
| 1029 | #define VPX_CTRL_VP9E_SET_RENDER_SIZE |
| 1030 |
| 1031 | VPX_CTRL_USE_TYPE(VP9E_SET_TARGET_LEVEL, unsigned int) |
| 1032 | #define VPX_CTRL_VP9E_SET_TARGET_LEVEL |
| 1033 |
| 1034 | VPX_CTRL_USE_TYPE(VP9E_SET_ROW_MT, unsigned int) |
| 1035 | #define VPX_CTRL_VP9E_SET_ROW_MT |
| 1036 |
| 1037 | VPX_CTRL_USE_TYPE(VP9E_GET_LEVEL, int *) |
| 1038 | #define VPX_CTRL_VP9E_GET_LEVEL |
| 1039 |
| 1040 | VPX_CTRL_USE_TYPE(VP9E_ENABLE_MOTION_VECTOR_UNIT_TEST, unsigned int) |
| 1041 | #define VPX_CTRL_VP9E_ENABLE_MOTION_VECTOR_UNIT_TEST |
| 1042 |
| 1043 | VPX_CTRL_USE_TYPE(VP9E_SET_SVC_INTER_LAYER_PRED, unsigned int) |
| 1044 | #define VPX_CTRL_VP9E_SET_SVC_INTER_LAYER_PRED |
| 1045 |
| 1046 | VPX_CTRL_USE_TYPE(VP9E_SET_SVC_FRAME_DROP_LAYER, vpx_svc_frame_drop_t *) |
| 1047 | #define VPX_CTRL_VP9E_SET_SVC_FRAME_DROP_LAYER |
| 1048 |
| 1049 | VPX_CTRL_USE_TYPE(VP9E_GET_SVC_REF_FRAME_CONFIG, vpx_svc_ref_frame_config_t *) |
| 1050 | #define VPX_CTRL_VP9E_GET_SVC_REF_FRAME_CONFIG |
| 1051 |
| 1052 | VPX_CTRL_USE_TYPE(VP9E_SET_SVC_GF_TEMPORAL_REF, unsigned int) |
| 1053 | #define VPX_CTRL_VP9E_SET_SVC_GF_TEMPORAL_REF |
| 1054 |
| 1055 | VPX_CTRL_USE_TYPE(VP9E_SET_SVC_SPATIAL_LAYER_SYNC, |
| 1056 | vpx_svc_spatial_layer_sync_t *) |
| 1057 | #define VPX_CTRL_VP9E_SET_SVC_SPATIAL_LAYER_SYNC |
| 1058 |
| 1059 | VPX_CTRL_USE_TYPE(VP9E_SET_POSTENCODE_DROP, unsigned int) |
| 1060 | #define VPX_CTRL_VP9E_SET_POSTENCODE_DROP |
| 1061 |
| 1062 | VPX_CTRL_USE_TYPE(VP9E_SET_DELTA_Q_UV, int) |
| 1063 | #define VPX_CTRL_VP9E_SET_DELTA_Q_UV |
| 1064 |
| 1065 | VPX_CTRL_USE_TYPE(VP9E_SET_DISABLE_OVERSHOOT_MAXQ_CBR, int) |
| 1066 | #define VPX_CTRL_VP9E_SET_DISABLE_OVERSHOOT_MAXQ_CBR |
| 1067 |
| 1068 | VPX_CTRL_USE_TYPE(VP9E_SET_DISABLE_LOOPFILTER, int) |
| 1069 | #define VPX_CTRL_VP9E_SET_DISABLE_LOOPFILTER |
| 1070 |
| 1071 | VPX_CTRL_USE_TYPE(VP9E_SET_EXTERNAL_RATE_CONTROL, vpx_rc_funcs_t *) |
| 1072 | #define VPX_CTRL_VP9E_SET_EXTERNAL_RATE_CONTROL |
| 1073 |
| 1074 | /*!\endcond */ |
| 1075 | /*! @} - end defgroup vp8_encoder */ |
| 1076 | #ifdef __cplusplus |
| 1077 | } // extern "C" |
| 1078 | #endif |
| 1079 |
| 1080 | #endif // VPX_VPX_VP8CX_H_ |
| 1081 |