aomcx.h 71 KB

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