]> granicus.if.org Git - libvpx/blob - vpx/vp8cx.h
remove vp10
[libvpx] / vpx / vp8cx.h
1 /*
2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
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_VP8CX_H_
11 #define 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
21 /*!\file
22  * \brief Provides definitions for using VP8 or VP9 encoder algorithm within the
23  *        vpx Codec Interface.
24  */
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 /*!\name Algorithm interface for VP8
31  *
32  * This interface provides the capability to encode raw VP8 streams.
33  * @{
34  */
35 extern vpx_codec_iface_t  vpx_codec_vp8_cx_algo;
36 extern vpx_codec_iface_t *vpx_codec_vp8_cx(void);
37 /*!@} - end algorithm interface member group*/
38
39 /*!\name Algorithm interface for VP9
40  *
41  * This interface provides the capability to encode raw VP9 streams.
42  * @{
43  */
44 extern vpx_codec_iface_t  vpx_codec_vp9_cx_algo;
45 extern vpx_codec_iface_t *vpx_codec_vp9_cx(void);
46 /*!@} - end algorithm interface member group*/
47
48 /*
49  * Algorithm Flags
50  */
51
52 /*!\brief Don't reference the last frame
53  *
54  * When this flag is set, the encoder will not use the last frame as a
55  * predictor. When not set, the encoder will choose whether to use the
56  * last frame or not automatically.
57  */
58 #define VP8_EFLAG_NO_REF_LAST      (1<<16)
59
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
70 /*!\brief Don't reference the alternate reference frame
71  *
72  * When this flag is set, the encoder will not use the alt ref frame as a
73  * predictor. When not set, the encoder will choose whether to use the
74  * alt ref frame or not automatically.
75  */
76 #define VP8_EFLAG_NO_REF_ARF       (1<<21)
77
78
79 /*!\brief Don't update the last frame
80  *
81  * When this flag is set, the encoder will not update the last frame with
82  * the contents of the current frame.
83  */
84 #define VP8_EFLAG_NO_UPD_LAST      (1<<18)
85
86
87 /*!\brief Don't update the golden frame
88  *
89  * When this flag is set, the encoder will not update the golden frame with
90  * the contents of the current frame.
91  */
92 #define VP8_EFLAG_NO_UPD_GF        (1<<22)
93
94
95 /*!\brief Don't update the alternate reference frame
96  *
97  * When this flag is set, the encoder will not update the alt ref frame with
98  * the contents of the current frame.
99  */
100 #define VP8_EFLAG_NO_UPD_ARF       (1<<23)
101
102
103 /*!\brief Force golden frame update
104  *
105  * When this flag is set, the encoder copy the contents of the current frame
106  * to the golden frame buffer.
107  */
108 #define VP8_EFLAG_FORCE_GF         (1<<19)
109
110
111 /*!\brief Force alternate reference frame update
112  *
113  * When this flag is set, the encoder copy the contents of the current frame
114  * to the alternate reference frame buffer.
115  */
116 #define VP8_EFLAG_FORCE_ARF        (1<<24)
117
118
119 /*!\brief Disable entropy update
120  *
121  * When this flag is set, the encoder will not update its internal entropy
122  * model based on the entropy of this frame.
123  */
124 #define VP8_EFLAG_NO_UPD_ENTROPY   (1<<20)
125
126
127 /*!\brief VPx encoder control functions
128  *
129  * This set of macros define the control functions available for VPx
130  * encoder interface.
131  *
132  * \sa #vpx_codec_control
133  */
134 enum vp8e_enc_control_id {
135   /*!\brief Codec control function to pass an ROI map to encoder.
136    *
137    * Supported in codecs: VP8, VP9
138    */
139   VP8E_SET_ROI_MAP           = 8,
140
141   /*!\brief Codec control function to pass an Active map to encoder.
142    *
143    * Supported in codecs: VP8, VP9
144    */
145   VP8E_SET_ACTIVEMAP,
146
147   /*!\brief Codec control function to set encoder scaling mode.
148    *
149    * Supported in codecs: VP8, VP9
150    */
151   VP8E_SET_SCALEMODE         = 11,
152
153   /*!\brief Codec control function to set encoder internal speed settings.
154    *
155    * Changes in this value influences, among others, the encoder's selection
156    * of motion estimation methods. Values greater than 0 will increase encoder
157    * speed at the expense of quality.
158    *
159    * \note Valid range for VP8: -16..16
160    * \note Valid range for VP9: -8..8
161    *
162    * Supported in codecs: VP8, VP9
163    */
164   VP8E_SET_CPUUSED           = 13,
165
166   /*!\brief Codec control function to enable automatic set and use alf frames.
167    *
168    * Supported in codecs: VP8, VP9
169    */
170   VP8E_SET_ENABLEAUTOALTREF,
171
172   /*!\brief control function to set noise sensitivity
173    *
174    * 0: off, 1: OnYOnly, 2: OnYUV,
175    * 3: OnYUVAggressive, 4: Adaptive
176    *
177    * Supported in codecs: VP8
178    */
179   VP8E_SET_NOISE_SENSITIVITY,
180
181   /*!\brief Codec control function to set sharpness.
182    *
183    * Supported in codecs: VP8, VP9
184    */
185   VP8E_SET_SHARPNESS,
186
187   /*!\brief Codec control function to set the threshold for MBs treated static.
188    *
189    * Supported in codecs: VP8, VP9
190    */
191   VP8E_SET_STATIC_THRESHOLD,
192
193   /*!\brief Codec control function to set the number of token partitions.
194    *
195    * Supported in codecs: VP8
196    */
197   VP8E_SET_TOKEN_PARTITIONS,
198
199   /*!\brief Codec control function to get last quantizer chosen by the encoder.
200    *
201    * Return value uses internal quantizer scale defined by the codec.
202    *
203    * Supported in codecs: VP8, VP9
204    */
205   VP8E_GET_LAST_QUANTIZER,
206
207   /*!\brief Codec control function to get last quantizer chosen by the encoder.
208    *
209    * Return value uses the 0..63 scale as used by the rc_*_quantizer config
210    * parameters.
211    *
212    * Supported in codecs: VP8, VP9
213    */
214   VP8E_GET_LAST_QUANTIZER_64,
215
216   /*!\brief Codec control function to set the max no of frames to create arf.
217    *
218    * Supported in codecs: VP8, VP9
219    */
220   VP8E_SET_ARNR_MAXFRAMES,
221
222   /*!\brief Codec control function to set the filter strength for the arf.
223    *
224    * Supported in codecs: VP8, VP9
225    */
226   VP8E_SET_ARNR_STRENGTH,
227
228   /*!\deprecated control function to set the filter type to use for the arf. */
229   VP8E_SET_ARNR_TYPE,
230
231   /*!\brief Codec control function to set visual tuning.
232    *
233    * Supported in codecs: VP8, VP9
234    */
235   VP8E_SET_TUNING,
236
237   /*!\brief Codec control function to set constrained quality level.
238    *
239    * \attention For this value to be used vpx_codec_enc_cfg_t::g_usage must be
240    *            set to #VPX_CQ.
241    * \note Valid range: 0..63
242    *
243    * Supported in codecs: VP8, VP9
244    */
245   VP8E_SET_CQ_LEVEL,
246
247   /*!\brief Codec control function to set Max data rate for Intra frames.
248    *
249    * This value controls additional clamping on the maximum size of a
250    * keyframe. It is expressed as a percentage of the average
251    * per-frame bitrate, with the special (and default) value 0 meaning
252    * unlimited, or no additional clamping beyond the codec's built-in
253    * algorithm.
254    *
255    * For example, to allocate no more than 4.5 frames worth of bitrate
256    * to a keyframe, set this to 450.
257    *
258    * Supported in codecs: VP8, VP9
259    */
260   VP8E_SET_MAX_INTRA_BITRATE_PCT,
261
262   /*!\brief Codec control function to set reference and update frame flags.
263    *
264    *  Supported in codecs: VP8
265    */
266   VP8E_SET_FRAME_FLAGS,
267
268   /*!\brief Codec control function to set max data rate for Inter frames.
269    *
270    * This value controls additional clamping on the maximum size of an
271    * inter frame. It is expressed as a percentage of the average
272    * per-frame bitrate, with the special (and default) value 0 meaning
273    * unlimited, or no additional clamping beyond the codec's built-in
274    * algorithm.
275    *
276    * For example, to allow no more than 4.5 frames worth of bitrate
277    * to an inter frame, set this to 450.
278    *
279    * Supported in codecs: VP9
280    */
281   VP9E_SET_MAX_INTER_BITRATE_PCT,
282
283   /*!\brief Boost percentage for Golden Frame in CBR mode.
284    *
285    * This value controls the amount of boost given to Golden Frame in
286    * CBR mode. It is expressed as a percentage of the average
287    * per-frame bitrate, with the special (and default) value 0 meaning
288    * the feature is off, i.e., no golden frame boost in CBR mode and
289    * average bitrate target is used.
290    *
291    * For example, to allow 100% more bits, i.e, 2X, in a golden frame
292    * than average frame, set this to 100.
293    *
294    * Supported in codecs: VP9
295    */
296   VP9E_SET_GF_CBR_BOOST_PCT,
297
298   /*!\brief Codec control function to set the temporal layer id.
299    *
300    * For temporal scalability: this control allows the application to set the
301    * layer id for each frame to be encoded. Note that this control must be set
302    * for every frame prior to encoding. The usage of this control function
303    * supersedes the internal temporal pattern counter, which is now deprecated.
304    *
305    * Supported in codecs: VP8
306    */
307   VP8E_SET_TEMPORAL_LAYER_ID,
308
309   /*!\brief Codec control function to set encoder screen content mode.
310    *
311    * 0: off, 1: On, 2: On with more aggressive rate control.
312    *
313    * Supported in codecs: VP8
314    */
315   VP8E_SET_SCREEN_CONTENT_MODE,
316
317   /*!\brief Codec control function to set lossless encoding mode.
318    *
319    * VP9 can operate in lossless encoding mode, in which the bitstream
320    * produced will be able to decode and reconstruct a perfect copy of
321    * input source. This control function provides a mean to switch encoder
322    * into lossless coding mode(1) or normal coding mode(0) that may be lossy.
323    *                          0 = lossy coding mode
324    *                          1 = lossless coding mode
325    *
326    *  By default, encoder operates in normal coding mode (maybe lossy).
327    *
328    * Supported in codecs: VP9
329    */
330   VP9E_SET_LOSSLESS,
331
332   /*!\brief Codec control function to set number of tile columns.
333    *
334    * In encoding and decoding, VP9 allows an input image frame be partitioned
335    * into separated vertical tile columns, which can be encoded or decoded
336    * independently. This enables easy implementation of parallel encoding and
337    * decoding. This control requests the encoder to use column tiles in
338    * encoding an input frame, with number of tile columns (in Log2 unit) as
339    * the parameter:
340    *             0 = 1 tile column
341    *             1 = 2 tile columns
342    *             2 = 4 tile columns
343    *             .....
344    *             n = 2**n tile columns
345    * The requested tile columns will be capped by encoder based on image size
346    * limitation (The minimum width of a tile column is 256 pixel, the maximum
347    * is 4096).
348    *
349    * By default, the value is 0, i.e. one single column tile for entire image.
350    *
351    * Supported in codecs: VP9
352    */
353   VP9E_SET_TILE_COLUMNS,
354
355   /*!\brief Codec control function to set number of tile rows.
356    *
357    * In encoding and decoding, VP9 allows an input image frame be partitioned
358    * into separated horizontal tile rows. Tile rows are encoded or decoded
359    * sequentially. Even though encoding/decoding of later tile rows depends on
360    * earlier ones, this allows the encoder to output data packets for tile rows
361    * prior to completely processing all tile rows in a frame, thereby reducing
362    * the latency in processing between input and output. The parameter
363    * for this control describes the number of tile rows, which has a valid
364    * range [0, 2]:
365    *            0 = 1 tile row
366    *            1 = 2 tile rows
367    *            2 = 4 tile rows
368    *
369    * By default, the value is 0, i.e. one single row tile for entire image.
370    *
371    * Supported in codecs: VP9
372    */
373   VP9E_SET_TILE_ROWS,
374
375   /*!\brief Codec control function to enable frame parallel decoding feature.
376    *
377    * VP9 has a bitstream feature to reduce decoding dependency between frames
378    * by turning off backward update of probability context used in encoding
379    * and decoding. This allows staged parallel processing of more than one
380    * video frames in the decoder. This control function provides a mean to
381    * turn this feature on or off for bitstreams produced by encoder.
382    *
383    * By default, this feature is off.
384    *
385    * Supported in codecs: VP9
386    */
387   VP9E_SET_FRAME_PARALLEL_DECODING,
388
389   /*!\brief Codec control function to set adaptive quantization mode.
390    *
391    * VP9 has a segment based feature that allows encoder to adaptively change
392    * quantization parameter for each segment within a frame to improve the
393    * subjective quality. This control makes encoder operate in one of the
394    * several AQ_modes supported.
395    *
396    * By default, encoder operates with AQ_Mode 0(adaptive quantization off).
397    *
398    * Supported in codecs: VP9
399    */
400   VP9E_SET_AQ_MODE,
401
402   /*!\brief Codec control function to enable/disable periodic Q boost.
403    *
404    * One VP9 encoder speed feature is to enable quality boost by lowering
405    * frame level Q periodically. This control function provides a mean to
406    * turn on/off this feature.
407    *               0 = off
408    *               1 = on
409    *
410    * By default, the encoder is allowed to use this feature for appropriate
411    * encoding modes.
412    *
413    * Supported in codecs: VP9
414    */
415   VP9E_SET_FRAME_PERIODIC_BOOST,
416
417   /*!\brief Codec control function to set noise sensitivity.
418    *
419    *  0: off, 1: On(YOnly)
420    *
421    * Supported in codecs: VP9
422    */
423   VP9E_SET_NOISE_SENSITIVITY,
424
425   /*!\brief Codec control function to turn on/off SVC in encoder.
426    * \note Return value is VPX_CODEC_INVALID_PARAM if the encoder does not
427    *       support SVC in its current encoding mode
428    *  0: off, 1: on
429    *
430    * Supported in codecs: VP9
431    */
432   VP9E_SET_SVC,
433
434   /*!\brief Codec control function to set parameters for SVC.
435    * \note Parameters contain min_q, max_q, scaling factor for each of the
436    *       SVC layers.
437    *
438    * Supported in codecs: VP9
439    */
440   VP9E_SET_SVC_PARAMETERS,
441
442   /*!\brief Codec control function to set svc layer for spatial and temporal.
443    * \note Valid ranges: 0..#vpx_codec_enc_cfg::ss_number_layers for spatial
444    *                     layer and 0..#vpx_codec_enc_cfg::ts_number_layers for
445    *                     temporal layer.
446    *
447    * Supported in codecs: VP9
448    */
449   VP9E_SET_SVC_LAYER_ID,
450
451   /*!\brief Codec control function to set content type.
452    * \note Valid parameter range:
453    *              VP9E_CONTENT_DEFAULT = Regular video content (Default)
454    *              VP9E_CONTENT_SCREEN  = Screen capture content
455    *
456    * Supported in codecs: VP9
457    */
458   VP9E_SET_TUNE_CONTENT,
459
460   /*!\brief Codec control function to get svc layer ID.
461    * \note The layer ID returned is for the data packet from the registered
462    *       callback function.
463    *
464    * Supported in codecs: VP9
465    */
466   VP9E_GET_SVC_LAYER_ID,
467
468   /*!\brief Codec control function to register callback to get per layer packet.
469    * \note Parameter for this control function is a structure with a callback
470    *       function and a pointer to private data used by the callback.
471    *
472    * Supported in codecs: VP9
473    */
474   VP9E_REGISTER_CX_CALLBACK,
475
476   /*!\brief Codec control function to set color space info.
477    * \note Valid ranges: 0..7, default is "UNKNOWN".
478    *                     0 = UNKNOWN,
479    *                     1 = BT_601
480    *                     2 = BT_709
481    *                     3 = SMPTE_170
482    *                     4 = SMPTE_240
483    *                     5 = BT_2020
484    *                     6 = RESERVED
485    *                     7 = SRGB
486    *
487    * Supported in codecs: VP9
488    */
489   VP9E_SET_COLOR_SPACE,
490
491   /*!\brief Codec control function to set temporal layering mode.
492    * \note Valid ranges: 0..3, default is "0" (VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING).
493    *                     0 = VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING
494    *                     1 = VP9E_TEMPORAL_LAYERING_MODE_BYPASS
495    *                     2 = VP9E_TEMPORAL_LAYERING_MODE_0101
496    *                     3 = VP9E_TEMPORAL_LAYERING_MODE_0212
497    *
498    * Supported in codecs: VP9
499    */
500   VP9E_SET_TEMPORAL_LAYERING_MODE,
501
502   /*!\brief Codec control function to set minimum interval between GF/ARF frames
503    *
504    * By default the value is set as 4.
505    *
506    * Supported in codecs: VP9
507    */
508   VP9E_SET_MIN_GF_INTERVAL,
509
510   /*!\brief Codec control function to set minimum interval between GF/ARF frames
511    *
512    * By default the value is set as 16.
513    *
514    * Supported in codecs: VP9
515    */
516   VP9E_SET_MAX_GF_INTERVAL,
517
518   /*!\brief Codec control function to get an Active map back from the encoder.
519    *
520    * Supported in codecs: VP9
521    */
522   VP9E_GET_ACTIVEMAP,
523
524   /*!\brief Codec control function to set color range bit.
525    * \note Valid ranges: 0..1, default is 0
526    *                     0 = Limited range (16..235 or HBD equivalent)
527    *                     1 = Full range (0..255 or HBD equivalent)
528    *
529    * Supported in codecs: VP9
530    */
531   VP9E_SET_COLOR_RANGE,
532
533   /*!\brief Codec control function to set the frame flags and buffer indices
534    * for spatial layers. The frame flags and buffer indices are set using the
535    * struct #vpx_svc_ref_frame_config defined below.
536    *
537    * Supported in codecs: VP9
538   */
539   VP9E_SET_SVC_REF_FRAME_CONFIG,
540
541   /*!\brief Codec control function to set intended rendering image size.
542    *
543    * By default, this is identical to the image size in pixels.
544    *
545    * Supported in codecs: VP9
546    */
547   VP9E_SET_RENDER_SIZE,
548
549   /*!\brief Codec control function to set target level.
550    *
551    * 255: off (default); 0: only keep level stats; 10: target for level 1.0;
552    * 11: target for level 1.1; ... 62: target for level 6.2
553    *
554    * Supported in codecs: VP9
555    */
556   VP9E_SET_TARGET_LEVEL,
557
558   /*!\brief Codec control function to get bitstream level.
559    *
560    * Supported in codecs: VP9
561    */
562   VP9E_GET_LEVEL
563 };
564
565 /*!\brief vpx 1-D scaling mode
566  *
567  * This set of constants define 1-D vpx scaling modes
568  */
569 typedef enum vpx_scaling_mode_1d {
570   VP8E_NORMAL      = 0,
571   VP8E_FOURFIVE    = 1,
572   VP8E_THREEFIVE   = 2,
573   VP8E_ONETWO      = 3
574 } VPX_SCALING_MODE;
575
576 /*!\brief Temporal layering mode enum for VP9 SVC.
577  *
578  * This set of macros define the different temporal layering modes.
579  * Supported codecs: VP9 (in SVC mode)
580  *
581  */
582 typedef enum vp9e_temporal_layering_mode {
583   /*!\brief No temporal layering.
584    * Used when only spatial layering is used.
585    */
586   VP9E_TEMPORAL_LAYERING_MODE_NOLAYERING   = 0,
587
588   /*!\brief Bypass mode.
589    * Used when application needs to control temporal layering.
590    * This will only work when the number of spatial layers equals 1.
591    */
592   VP9E_TEMPORAL_LAYERING_MODE_BYPASS       = 1,
593
594   /*!\brief 0-1-0-1... temporal layering scheme with two temporal layers.
595    */
596   VP9E_TEMPORAL_LAYERING_MODE_0101         = 2,
597
598   /*!\brief 0-2-1-2... temporal layering scheme with three temporal layers.
599    */
600   VP9E_TEMPORAL_LAYERING_MODE_0212         = 3
601 } VP9E_TEMPORAL_LAYERING_MODE;
602
603 /*!\brief  vpx region of interest map
604  *
605  * These defines the data structures for the region of interest map
606  *
607  */
608
609 typedef struct vpx_roi_map {
610   /*! An id between 0 and 3 for each 16x16 region within a frame. */
611   unsigned char *roi_map;
612   unsigned int rows;       /**< Number of rows. */
613   unsigned int cols;       /**< Number of columns. */
614   // TODO(paulwilkins): broken for VP9 which has 8 segments
615   // q and loop filter deltas for each segment
616   // (see MAX_MB_SEGMENTS)
617   int delta_q[4];          /**< Quantizer deltas. */
618   int delta_lf[4];         /**< Loop filter deltas. */
619   /*! Static breakout threshold for each segment. */
620   unsigned int static_threshold[4];
621 } vpx_roi_map_t;
622
623 /*!\brief  vpx active region map
624  *
625  * These defines the data structures for active region map
626  *
627  */
628
629
630 typedef struct vpx_active_map {
631   unsigned char  *active_map; /**< specify an on (1) or off (0) each 16x16 region within a frame */
632   unsigned int    rows;       /**< number of rows */
633   unsigned int    cols;       /**< number of cols */
634 } vpx_active_map_t;
635
636 /*!\brief  vpx image scaling mode
637  *
638  * This defines the data structure for image scaling mode
639  *
640  */
641 typedef struct vpx_scaling_mode {
642   VPX_SCALING_MODE    h_scaling_mode;  /**< horizontal scaling mode */
643   VPX_SCALING_MODE    v_scaling_mode;  /**< vertical scaling mode   */
644 } vpx_scaling_mode_t;
645
646 /*!\brief VP8 token partition mode
647  *
648  * This defines VP8 partitioning mode for compressed data, i.e., the number of
649  * sub-streams in the bitstream. Used for parallelized decoding.
650  *
651  */
652
653 typedef enum {
654   VP8_ONE_TOKENPARTITION   = 0,
655   VP8_TWO_TOKENPARTITION   = 1,
656   VP8_FOUR_TOKENPARTITION  = 2,
657   VP8_EIGHT_TOKENPARTITION = 3
658 } vp8e_token_partitions;
659
660 /*!brief VP9 encoder content type */
661 typedef enum {
662   VP9E_CONTENT_DEFAULT,
663   VP9E_CONTENT_SCREEN,
664   VP9E_CONTENT_INVALID
665 } vp9e_tune_content;
666
667 /*!\brief VP8 model tuning parameters
668  *
669  * Changes the encoder to tune for certain types of input material.
670  *
671  */
672 typedef enum {
673   VP8_TUNE_PSNR,
674   VP8_TUNE_SSIM
675 } vp8e_tuning;
676
677 /*!\brief  vp9 svc layer parameters
678  *
679  * This defines the spatial and temporal layer id numbers for svc encoding.
680  * This is used with the #VP9E_SET_SVC_LAYER_ID control to set the spatial and
681  * temporal layer id for the current frame.
682  *
683  */
684 typedef struct vpx_svc_layer_id {
685   int spatial_layer_id;       /**< Spatial layer id number. */
686   int temporal_layer_id;      /**< Temporal layer id number. */
687 } vpx_svc_layer_id_t;
688
689 /*!\brief  vp9 svc frame flag parameters.
690  *
691  * This defines the frame flags and buffer indices for each spatial layer for
692  * svc encoding.
693  * This is used with the #VP9E_SET_SVC_REF_FRAME_CONFIG control to set frame
694  * flags and buffer indices for each spatial layer for the current (super)frame.
695  *
696  */
697 typedef struct vpx_svc_ref_frame_config {
698   int frame_flags[VPX_TS_MAX_LAYERS];  /**< Frame flags. */
699   int lst_fb_idx[VPX_TS_MAX_LAYERS];  /**< Last buffer index. */
700   int gld_fb_idx[VPX_TS_MAX_LAYERS];  /**< Golden buffer index. */
701   int alt_fb_idx[VPX_TS_MAX_LAYERS];  /**< Altref buffer index. */
702 } vpx_svc_ref_frame_config_t;
703
704 /*!\cond */
705 /*!\brief VP8 encoder control function parameter type
706  *
707  * Defines the data types that VP8E control functions take. Note that
708  * additional common controls are defined in vp8.h
709  *
710  */
711
712 VPX_CTRL_USE_TYPE(VP8E_SET_FRAME_FLAGS,        int)
713 #define VPX_CTRL_VP8E_SET_FRAME_FLAGS
714 VPX_CTRL_USE_TYPE(VP8E_SET_TEMPORAL_LAYER_ID,  int)
715 #define VPX_CTRL_VP8E_SET_TEMPORAL_LAYER_ID
716 VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP,            vpx_roi_map_t *)
717 #define VPX_CTRL_VP8E_SET_ROI_MAP
718 VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP,          vpx_active_map_t *)
719 #define VPX_CTRL_VP8E_SET_ACTIVEMAP
720 VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE,          vpx_scaling_mode_t *)
721 #define VPX_CTRL_VP8E_SET_SCALEMODE
722
723 VPX_CTRL_USE_TYPE(VP9E_SET_SVC,                int)
724 #define VPX_CTRL_VP9E_SET_SVC
725 VPX_CTRL_USE_TYPE(VP9E_SET_SVC_PARAMETERS,     void *)
726 #define VPX_CTRL_VP9E_SET_SVC_PARAMETERS
727 VPX_CTRL_USE_TYPE(VP9E_REGISTER_CX_CALLBACK,   void *)
728 #define VPX_CTRL_VP9E_REGISTER_CX_CALLBACK
729 VPX_CTRL_USE_TYPE(VP9E_SET_SVC_LAYER_ID,       vpx_svc_layer_id_t *)
730 #define VPX_CTRL_VP9E_SET_SVC_LAYER_ID
731
732 VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED,            int)
733 #define VPX_CTRL_VP8E_SET_CPUUSED
734 VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF,   unsigned int)
735 #define VPX_CTRL_VP8E_SET_ENABLEAUTOALTREF
736 VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY,  unsigned int)
737 #define VPX_CTRL_VP8E_SET_NOISE_SENSITIVITY
738 VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS,          unsigned int)
739 #define VPX_CTRL_VP8E_SET_SHARPNESS
740 VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD,   unsigned int)
741 #define VPX_CTRL_VP8E_SET_STATIC_THRESHOLD
742 VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS,   int) /* vp8e_token_partitions */
743 #define VPX_CTRL_VP8E_SET_TOKEN_PARTITIONS
744
745 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES,     unsigned int)
746 #define VPX_CTRL_VP8E_SET_ARNR_MAXFRAMES
747 VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH,     unsigned int)
748 #define VPX_CTRL_VP8E_SET_ARNR_STRENGTH
749 VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ARNR_TYPE,     unsigned int)
750 #define VPX_CTRL_VP8E_SET_ARNR_TYPE
751 VPX_CTRL_USE_TYPE(VP8E_SET_TUNING,             int) /* vp8e_tuning */
752 #define VPX_CTRL_VP8E_SET_TUNING
753 VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL,      unsigned int)
754 #define VPX_CTRL_VP8E_SET_CQ_LEVEL
755
756 VPX_CTRL_USE_TYPE(VP9E_SET_TILE_COLUMNS,  int)
757 #define VPX_CTRL_VP9E_SET_TILE_COLUMNS
758 VPX_CTRL_USE_TYPE(VP9E_SET_TILE_ROWS,  int)
759 #define VPX_CTRL_VP9E_SET_TILE_ROWS
760
761 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER,     int *)
762 #define VPX_CTRL_VP8E_GET_LAST_QUANTIZER
763 VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64,  int *)
764 #define VPX_CTRL_VP8E_GET_LAST_QUANTIZER_64
765 VPX_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID,  vpx_svc_layer_id_t *)
766 #define VPX_CTRL_VP9E_GET_SVC_LAYER_ID
767
768 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
769 #define VPX_CTRL_VP8E_SET_MAX_INTRA_BITRATE_PCT
770 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTER_BITRATE_PCT, unsigned int)
771 #define VPX_CTRL_VP8E_SET_MAX_INTER_BITRATE_PCT
772
773 VPX_CTRL_USE_TYPE(VP8E_SET_SCREEN_CONTENT_MODE, unsigned int)
774 #define VPX_CTRL_VP8E_SET_SCREEN_CONTENT_MODE
775
776 VPX_CTRL_USE_TYPE(VP9E_SET_GF_CBR_BOOST_PCT, unsigned int)
777 #define VPX_CTRL_VP9E_SET_GF_CBR_BOOST_PCT
778
779 VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int)
780 #define VPX_CTRL_VP9E_SET_LOSSLESS
781
782 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
783 #define VPX_CTRL_VP9E_SET_FRAME_PARALLEL_DECODING
784
785 VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int)
786 #define VPX_CTRL_VP9E_SET_AQ_MODE
787
788 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int)
789 #define VPX_CTRL_VP9E_SET_FRAME_PERIODIC_BOOST
790
791 VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY,  unsigned int)
792 #define VPX_CTRL_VP9E_SET_NOISE_SENSITIVITY
793
794 VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */
795 #define VPX_CTRL_VP9E_SET_TUNE_CONTENT
796
797 VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int)
798 #define VPX_CTRL_VP9E_SET_COLOR_SPACE
799
800 VPX_CTRL_USE_TYPE(VP9E_SET_MIN_GF_INTERVAL,  unsigned int)
801 #define VPX_CTRL_VP9E_SET_MIN_GF_INTERVAL
802
803 VPX_CTRL_USE_TYPE(VP9E_SET_MAX_GF_INTERVAL,  unsigned int)
804 #define VPX_CTRL_VP9E_SET_MAX_GF_INTERVAL
805
806 VPX_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, vpx_active_map_t *)
807 #define VPX_CTRL_VP9E_GET_ACTIVEMAP
808
809 VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_RANGE, int)
810 #define VPX_CTRL_VP9E_SET_COLOR_RANGE
811
812 VPX_CTRL_USE_TYPE(VP9E_SET_SVC_REF_FRAME_CONFIG, vpx_svc_ref_frame_config_t *)
813 #define VPX_CTRL_VP9E_SET_SVC_REF_FRAME_CONFIG
814
815 VPX_CTRL_USE_TYPE(VP9E_SET_RENDER_SIZE, int *)
816 #define VPX_CTRL_VP9E_SET_RENDER_SIZE
817
818 VPX_CTRL_USE_TYPE(VP9E_SET_TARGET_LEVEL,  unsigned int)
819 #define VPX_CTRL_VP9E_SET_TARGET_LEVEL
820
821 VPX_CTRL_USE_TYPE(VP9E_GET_LEVEL, int *)
822 #define VPX_CTRL_VP9E_GET_LEVEL
823
824 /*!\endcond */
825 /*! @} - end defgroup vp8_encoder */
826 #ifdef __cplusplus
827 }  // extern "C"
828 #endif
829
830 #endif  // VPX_VP8CX_H_