WebM VP8 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 
11 
17 #include "vp8.h"
18 
23 #ifndef VP8CX_H
24 #define VP8CX_H
25 #include "vpx_codec_impl_top.h"
26 
33 extern vpx_codec_iface_t vpx_codec_vp8_cx_algo;
34 extern vpx_codec_iface_t *vpx_codec_vp8_cx(void);
35 
36 /* TODO(jkoleszar): These move to VP9 in a later patch set. */
37 extern vpx_codec_iface_t vpx_codec_vp9_cx_algo;
38 extern vpx_codec_iface_t *vpx_codec_vp9_cx(void);
39 extern vpx_codec_iface_t vpx_codec_vp9x_cx_algo;
40 extern vpx_codec_iface_t *vpx_codec_vp9x_cx(void);
41 
45 /*
46  * Algorithm Flags
47  */
48 
55 #define VP8_EFLAG_NO_REF_LAST (1<<16)
56 
57 
64 #define VP8_EFLAG_NO_REF_GF (1<<17)
65 
66 
73 #define VP8_EFLAG_NO_REF_ARF (1<<21)
74 
75 
81 #define VP8_EFLAG_NO_UPD_LAST (1<<18)
82 
83 
89 #define VP8_EFLAG_NO_UPD_GF (1<<22)
90 
91 
97 #define VP8_EFLAG_NO_UPD_ARF (1<<23)
98 
99 
105 #define VP8_EFLAG_FORCE_GF (1<<19)
106 
107 
113 #define VP8_EFLAG_FORCE_ARF (1<<24)
114 
115 
121 #define VP8_EFLAG_NO_UPD_ENTROPY (1<<20)
122 
123 
173 
187 
188 
189  /* TODO(jkoleszar): Move to vp9cx.h */
190  VP9E_SET_LOSSLESS,
191  VP9E_SET_TILE_COLUMNS,
192  VP9E_SET_TILE_ROWS,
193  VP9E_SET_FRAME_PARALLEL_DECODING
194 };
195 
200 typedef enum vpx_scaling_mode_1d {
201  VP8E_NORMAL = 0,
202  VP8E_FOURFIVE = 1,
203  VP8E_THREEFIVE = 2,
204  VP8E_ONETWO = 3
206 
207 
214 typedef struct vpx_roi_map {
215  unsigned char *roi_map;
216  unsigned int rows;
217  unsigned int cols;
218  int delta_q[4];
219  int delta_lf[4];
220  unsigned int static_threshold[4];
221 } vpx_roi_map_t;
222 
230 typedef struct vpx_active_map {
231  unsigned char *active_map;
232  unsigned int rows;
233  unsigned int cols;
235 
241 typedef struct vpx_scaling_mode {
245 
253 typedef enum {
254  VP8_ONE_TOKENPARTITION = 0,
255  VP8_TWO_TOKENPARTITION = 1,
256  VP8_FOUR_TOKENPARTITION = 2,
257  VP8_EIGHT_TOKENPARTITION = 3
259 
260 
266 typedef enum {
267  VP8_TUNE_PSNR,
268  VP8_TUNE_SSIM
269 } vp8e_tuning;
270 
271 
280 /* These controls have been deprecated in favor of the flags parameter to
281  * vpx_codec_encode(). See the definition of VP8_EFLAG_* above.
282  */
286 
290 
296 VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int) /* vp8e_token_partitions */
297 
301 VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vp8e_tuning */
303 
304 VPX_CTRL_USE_TYPE(VP9E_SET_TILE_COLUMNS, int)
305 VPX_CTRL_USE_TYPE(VP9E_SET_TILE_ROWS, int)
306 
309 
311 
312 VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int)
313 
314 VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
316 #include "vpx_codec_impl_bottom.h"
317 #endif
struct vpx_codec_iface vpx_codec_iface_t
Codec interface structure.
Definition: vpx_codec.h:174
unsigned char * roi_map
Definition: vp8cx.h:215
control function to set vp8 encoder cpuused
Definition: vp8cx.h:149
struct vpx_active_map vpx_active_map_t
vpx active region map
unsigned int cols
Definition: vp8cx.h:233
vp8e_enc_control_id
VP8 encoder control functions.
Definition: vp8cx.h:131
Definition: vp8cx.h:133
VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int) VPX_CTRL_USE_TYPE(VP8E_SET_TUNING
VP8 encoder control function parameter type.
enum vpx_scaling_mode_1d VPX_SCALING_MODE
vpx 1-D scaling mode
unsigned int cols
Definition: vp8cx.h:217
Definition: vp8cx.h:137
VPX_SCALING_MODE v_scaling_mode
Definition: vp8cx.h:243
vp8e_token_partitions
VP8 token partition mode.
Definition: vp8cx.h:253
Definition: vp8cx.h:135
Definition: vp8cx.h:165
control function to set constrained quality level
Definition: vp8cx.h:172
Definition: vp8cx.h:164
Max data rate for Intra frames.
Definition: vp8cx.h:186
unsigned int static_threshold[4]
Definition: vp8cx.h:220
Definition: vp8cx.h:158
Definition: vp8cx.h:154
Definition: vp8cx.h:151
int delta_lf[4]
Definition: vp8cx.h:219
#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ)
vpx_codec_control deprecated type definition macro
Definition: vpx_codec.h:440
Definition: vp8cx.h:134
unsigned char * active_map
Definition: vp8cx.h:231
unsigned int rows
Definition: vp8cx.h:232
Definition: vp8cx.h:162
struct vpx_scaling_mode vpx_scaling_mode_t
vpx image scaling mode
Definition: vp8cx.h:163
Provides controls common to both the VP8 encoder and decoder.
Definition: vp8cx.h:132
Definition: vp8cx.h:155
Definition: vp8cx.h:150
VPX_SCALING_MODE h_scaling_mode
Definition: vp8cx.h:242
vpx active region map
Definition: vp8cx.h:230
struct vpx_roi_map vpx_roi_map_t
vpx region of interest map
unsigned int rows
Definition: vp8cx.h:216
Definition: vp8cx.h:153
vpx_scaling_mode_1d
vpx 1-D scaling mode
Definition: vp8cx.h:200
vp8e_tuning
VP8 model tuning parameters.
Definition: vp8cx.h:266
Definition: vp8cx.h:152
vpx region of interest map
Definition: vp8cx.h:214
int delta_q[4]
Definition: vp8cx.h:218
vpx image scaling mode
Definition: vp8cx.h:241
Definition: vp8cx.h:136