WebM Codec SDK
vp8cx.h
Go to the documentation of this file.
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 
18 #include "./vp8.h"
19 #include "./vpx_encoder.h"
20 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
35 extern vpx_codec_iface_t vpx_codec_vp8_cx_algo;
36 extern vpx_codec_iface_t *vpx_codec_vp8_cx(void);
44 extern vpx_codec_iface_t vpx_codec_vp9_cx_algo;
45 extern vpx_codec_iface_t *vpx_codec_vp9_cx(void);
49 /*
50  * Algorithm Flags
51  */
52 
59 #define VP8_EFLAG_NO_REF_LAST (1<<16)
60 
61 
68 #define VP8_EFLAG_NO_REF_GF (1<<17)
69 
70 
77 #define VP8_EFLAG_NO_REF_ARF (1<<21)
78 
79 
85 #define VP8_EFLAG_NO_UPD_LAST (1<<18)
86 
87 
93 #define VP8_EFLAG_NO_UPD_GF (1<<22)
94 
95 
101 #define VP8_EFLAG_NO_UPD_ARF (1<<23)
102 
103 
109 #define VP8_EFLAG_FORCE_GF (1<<19)
110 
111 
117 #define VP8_EFLAG_FORCE_ARF (1<<24)
118 
119 
125 #define VP8_EFLAG_NO_UPD_ENTROPY (1<<20)
126 
127 
141 
147 
153 
159 
165 
171 
184 
190 
199 
205 
211 
217 
225 
234 
240 
246 
249 
255 
265 
280 
286 
301 
316 
327 
335 
350 
373 
393 
407 
420 
435 
443 
452 
460 
469 
478 
486 
494 
509 
520 
526 };
527 
532 typedef enum vpx_scaling_mode_1d {
533  VP8E_NORMAL = 0,
534  VP8E_FOURFIVE = 1,
535  VP8E_THREEFIVE = 2,
536  VP8E_ONETWO = 3
538 
550 
556 
560 
565 
572 typedef struct vpx_roi_map {
574  unsigned char *roi_map;
575  unsigned int rows;
576  unsigned int cols;
577  // TODO(paulwilkins): broken for VP9 which has 8 segments
578  // q and loop filter deltas for each segment
579  // (see MAX_MB_SEGMENTS)
580  int delta_q[4];
581  int delta_lf[4];
583  unsigned int static_threshold[4];
584 } vpx_roi_map_t;
585 
593 typedef struct vpx_active_map {
594  unsigned char *active_map;
595  unsigned int rows;
596  unsigned int cols;
598 
604 typedef struct vpx_scaling_mode {
608 
616 typedef enum {
617  VP8_ONE_TOKENPARTITION = 0,
618  VP8_TWO_TOKENPARTITION = 1,
619  VP8_FOUR_TOKENPARTITION = 2,
620  VP8_EIGHT_TOKENPARTITION = 3
622 
624 typedef enum {
625  VP9E_CONTENT_DEFAULT,
626  VP9E_CONTENT_SCREEN,
627  VP9E_CONTENT_INVALID
629 
635 typedef enum {
636  VP8_TUNE_PSNR,
637  VP8_TUNE_SSIM
638 } vp8e_tuning;
639 
647 typedef struct vpx_svc_layer_id {
651 
660 /* These controls have been deprecated in favor of the flags parameter to
661  * vpx_codec_encode(). See the definition of VP8_EFLAG_* above.
662  */
666 
672 
677 
683 VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int) /* vp8e_token_partitions */
684 
688 VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vp8e_tuning */
690 
693 
697 
699 VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTER_BITRATE_PCT, unsigned int)
700 
702 
704 
706 
708 
709 VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int)
710 
712 
714 
715 VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vp9e_tune_content */
716 
718 
721 #ifdef __cplusplus
722 } // extern "C"
723 #endif
724 
725 #endif // VPX_VP8CX_H_
unsigned char * roi_map
Definition: vp8cx.h:574
Codec control function to set encoder internal speed settings.
Definition: vp8cx.h:183
struct vpx_active_map vpx_active_map_t
vpx active region map
Describes the encoder algorithm interface to applications.
unsigned int cols
Definition: vp8cx.h:596
vp8e_enc_control_id
VPx encoder control functions.
Definition: vp8cx.h:135
Codec control function to set reference update mode in encoder.
Definition: vp8cx.h:146
Codec control function to set content type.
Definition: vp8cx.h:477
Codec control function to set noise sensitivity.
Definition: vp8cx.h:442
enum vpx_scaling_mode_1d VPX_SCALING_MODE
vpx 1-D scaling mode
unsigned int cols
Definition: vp8cx.h:576
Codec control function to set reference and update frame flags.
Definition: vp8cx.h:285
Codec control function to set encoder scaling mode.
Definition: vp8cx.h:170
VPX_SCALING_MODE v_scaling_mode
Definition: vp8cx.h:606
vp8e_token_partitions
VP8 token partition mode.
Definition: vp8cx.h:616
enum vp9e_temporal_layering_mode VP9E_TEMPORAL_LAYERING_MODE
Temporal layering mode enum for VP9 SVC.
Codec control function to pass an ROI map to encoder.
Definition: vp8cx.h:158
Codec control function to set visual tuning.
Definition: vp8cx.h:254
Codec control function to set constrained quality level.
Definition: vp8cx.h:264
Definition: vp8cx.h:248
int spatial_layer_id
Definition: vp8cx.h:648
Codec control function to set Max data rate for Intra frames.
Definition: vp8cx.h:279
Codec control function to set parameters for SVC.
Definition: vp8cx.h:459
Codec control function to set number of tile columns.
Definition: vp8cx.h:372
#define VPX_CTRL_USE_TYPE(id, typ)
vpx_codec_control type definition macro
Definition: vpx_codec.h:423
unsigned int static_threshold[4]
Definition: vp8cx.h:583
Codec control function to set adaptive quantization mode.
Definition: vp8cx.h:419
Codec control function to set color space info.
Definition: vp8cx.h:508
Codec control function to get svc layer ID.
Definition: vp8cx.h:485
Codec control function to set lossless encoding mode.
Definition: vp8cx.h:349
Codec control function to get last quantizer chosen by the encoder.
Definition: vp8cx.h:233
vp9 svc layer parameters
Definition: vp8cx.h:647
Codec control function to set the temporal layer id.
Definition: vp8cx.h:326
0-1-0-1... temporal layering scheme with two temporal layers.
Definition: vp8cx.h:559
Codec control function to set the number of token partitions.
Definition: vp8cx.h:216
control function to set noise sensitivity
Definition: vp8cx.h:198
const struct vpx_codec_iface vpx_codec_iface_t
Codec interface structure.
Definition: vpx_codec.h:173
Boost percentage for Golden Frame in CBR mode.
Definition: vp8cx.h:315
int delta_lf[4]
Definition: vp8cx.h:581
vp9e_temporal_layering_mode
Temporal layering mode enum for VP9 SVC.
Definition: vp8cx.h:545
0-2-1-2... temporal layering scheme with three temporal layers.
Definition: vp8cx.h:563
No temporal layering. Used when only spatial layering is used.
Definition: vp8cx.h:549
#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ)
vpx_codec_control deprecated type definition macro
Definition: vpx_codec.h:450
Codec control function to set which reference frame encoder can use.
Definition: vp8cx.h:152
unsigned char * active_map
Definition: vp8cx.h:594
Codec control function to set encoder screen content mode.
Definition: vp8cx.h:334
Bypass mode. Used when application needs to control temporal layering. This will only work when the n...
Definition: vp8cx.h:555
unsigned int rows
Definition: vp8cx.h:595
Codec control function to set the max no of frames to create arf.
Definition: vp8cx.h:239
int temporal_layer_id
Definition: vp8cx.h:649
struct vpx_scaling_mode vpx_scaling_mode_t
vpx image scaling mode
Codec control function to register callback to get per layer packet.
Definition: vp8cx.h:493
Codec control function to set the filter strength for the arf.
Definition: vp8cx.h:245
Codec control function to enable/disable periodic Q boost.
Definition: vp8cx.h:434
Codec control function to get an Active map back from the encoder.
Definition: vp8cx.h:525
Provides controls common to both the VP8 encoder and decoder.
Codec control function to set mode of entropy update in encoder.
Definition: vp8cx.h:140
struct vpx_svc_layer_id vpx_svc_layer_id_t
vp9 svc layer parameters
Codec control function to get last quantizer chosen by the encoder.
Definition: vp8cx.h:224
Codec control function to enable automatic set and use alf frames.
Definition: vp8cx.h:189
Codec control function to set temporal layering mode.
Definition: vp8cx.h:519
VPX_SCALING_MODE h_scaling_mode
Definition: vp8cx.h:605
Codec control function to turn on/off SVC in encoder.
Definition: vp8cx.h:451
vpx active region map
Definition: vp8cx.h:593
struct vpx_roi_map vpx_roi_map_t
vpx region of interest map
unsigned int rows
Definition: vp8cx.h:575
Codec control function to enable frame parallel decoding feature.
Definition: vp8cx.h:406
Codec control function to set max data rate for Inter frames.
Definition: vp8cx.h:300
Codec control function to set the threshold for MBs treated static.
Definition: vp8cx.h:210
vpx_scaling_mode_1d
vpx 1-D scaling mode
Definition: vp8cx.h:532
Codec control function to set number of tile rows.
Definition: vp8cx.h:392
vp8e_tuning
VP8 model tuning parameters.
Definition: vp8cx.h:635
Codec control function to set sharpness.
Definition: vp8cx.h:204
vpx region of interest map
Definition: vp8cx.h:572
int delta_q[4]
Definition: vp8cx.h:580
vpx image scaling mode
Definition: vp8cx.h:604
Codec control function to set svc layer for spatial and temporal.
Definition: vp8cx.h:468
Codec control function to pass an Active map to encoder.
Definition: vp8cx.h:164
vp9e_tune_content
Definition: vp8cx.h:624