WebM Codec SDK: vpx/vp8.h Source File

WebM Codec SDK

vp8.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
30 #ifndef VPX_VP8_H_
31 #define VPX_VP8_H_
32
33 #include "./vpx_codec.h"
34 #include "./vpx_image.h"
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
44 enum vp8_com_control_id {
47 VP8_SET_REFERENCE = 1,
48 VP8_COPY_REFERENCE = 2,
49 VP8_SET_POSTPROC = 3,
50 VP8_SET_DBG_COLOR_REF_FRAME = 4,
51 VP8_SET_DBG_COLOR_MB_MODES = 5,
52 VP8_SET_DBG_COLOR_B_MODES = 6,
53 VP8_SET_DBG_DISPLAY_MV = 7,
55 /* TODO(jkoleszar): The encoder incorrectly reuses some of these values (5+)
56 * for its control ids. These should be migrated to something like the
57 * VP8_DECODER_CTRL_ID_START range next time we're ready to break the ABI.
58 */
59 VP9_GET_REFERENCE = 128,
60 VP8_COMMON_CTRL_ID_MAX,
61 VP8_DECODER_CTRL_ID_START = 256
62 };
63
68 enum vp8_postproc_level {
69 VP8_NOFILTERING = 0,
70 VP8_DEBLOCK = 1 << 0,
71 VP8_DEMACROBLOCK = 1 << 1,
72 VP8_ADDNOISE = 1 << 2,
73 VP8_DEBUG_TXT_FRAME_INFO = 1 << 3,
74 VP8_DEBUG_TXT_MBLK_MODES =
75 1 << 4,
76 VP8_DEBUG_TXT_DC_DIFF = 1 << 5,
77 VP8_DEBUG_TXT_RATE_INFO = 1 << 6,
78 VP8_MFQE = 1 << 10
79 };
80
88 typedef struct vp8_postproc_cfg {
91 int post_proc_flag;
92 int deblocking_level;
93 int noise_level;
94 } vp8_postproc_cfg_t;
95
100 typedef enum vpx_ref_frame_type {
101 VP8_LAST_FRAME = 1,
102 VP8_GOLD_FRAME = 2,
103 VP8_ALTR_FRAME = 4
104 } vpx_ref_frame_type_t;
105
110 typedef struct vpx_ref_frame {
111 vpx_ref_frame_type_t frame_type;
112 vpx_image_t img;
113 } vpx_ref_frame_t;
114
119 typedef struct vp9_ref_frame {
120 int idx;
121 vpx_image_t img;
122 } vp9_ref_frame_t;
123
129 VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *)
130 #define VPX_CTRL_VP8_SET_REFERENCE
131 VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *)
132 #define VPX_CTRL_VP8_COPY_REFERENCE
133 VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *)
134 #define VPX_CTRL_VP8_SET_POSTPROC
135 VPX_CTRL_USE_TYPE_DEPRECATED(VP8_SET_DBG_COLOR_REF_FRAME, int)
136 #define VPX_CTRL_VP8_SET_DBG_COLOR_REF_FRAME
137 VPX_CTRL_USE_TYPE_DEPRECATED(VP8_SET_DBG_COLOR_MB_MODES, int)
138 #define VPX_CTRL_VP8_SET_DBG_COLOR_MB_MODES
139 VPX_CTRL_USE_TYPE_DEPRECATED(VP8_SET_DBG_COLOR_B_MODES, int)
140 #define VPX_CTRL_VP8_SET_DBG_COLOR_B_MODES
141 VPX_CTRL_USE_TYPE_DEPRECATED(VP8_SET_DBG_DISPLAY_MV, int)
142 #define VPX_CTRL_VP8_SET_DBG_DISPLAY_MV
143 VPX_CTRL_USE_TYPE(VP9_GET_REFERENCE, vp9_ref_frame_t *)
144 #define VPX_CTRL_VP9_GET_REFERENCE
145
149 #ifdef __cplusplus
150 } // extern "C"
151 #endif
152
153 #endif // VPX_VP8_H_
vpx_image
Image Descriptor.
Definition: vpx_image.h:88
vp8_postproc_cfg_t
struct vp8_postproc_cfg vp8_postproc_cfg_t
post process flags
VP8_SET_DBG_COLOR_REF_FRAME
Definition: vp8.h:50
vp8_postproc_cfg::noise_level
int noise_level
Definition: vp8.h:93
vpx_ref_frame_t
struct vpx_ref_frame vpx_ref_frame_t
reference frame data struct
vp9_ref_frame_t
struct vp9_ref_frame vp9_ref_frame_t
VP9 specific reference frame data struct.
vpx_ref_frame_type_t
enum vpx_ref_frame_type vpx_ref_frame_type_t
reference frame type
VP8_DEBUG_TXT_MBLK_MODES
Definition: vp8.h:74
VP8_COPY_REFERENCE
Definition: vp8.h:48
VPX_CTRL_USE_TYPE
#define VPX_CTRL_USE_TYPE(id, typ)
vpx_codec_control type definition macro
Definition: vpx_codec.h:419
vp9_ref_frame::img
vpx_image_t img
Definition: vp8.h:121
vp8_postproc_level
vp8_postproc_level
post process flags
Definition: vp8.h:68
VP8_SET_POSTPROC
Definition: vp8.h:49
vpx_image.h
Describes the vpx image descriptor and associated operations.
VP8_DEBUG_TXT_RATE_INFO
Definition: vp8.h:77
VPX_CTRL_USE_TYPE_DEPRECATED
#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ)
vpx_codec_control deprecated type definition macro
Definition: vpx_codec.h:445
vpx_ref_frame::img
vpx_image_t img
Definition: vp8.h:112
vp8_postproc_cfg::deblocking_level
int deblocking_level
Definition: vp8.h:92
VP8_SET_DBG_DISPLAY_MV
Definition: vp8.h:53
VP8_SET_DBG_COLOR_MB_MODES
Definition: vp8.h:51
vp9_ref_frame
VP9 specific reference frame data struct.
Definition: vp8.h:119
VP8_SET_DBG_COLOR_B_MODES
Definition: vp8.h:52
vpx_ref_frame
reference frame data struct
Definition: vp8.h:110
vpx_ref_frame_type
vpx_ref_frame_type
reference frame type
Definition: vp8.h:100
vpx_ref_frame::frame_type
vpx_ref_frame_type_t frame_type
Definition: vp8.h:111
vp9_ref_frame::idx
int idx
Definition: vp8.h:120
vpx_codec.h
Describes the codec algorithm interface to applications.
vp8_postproc_cfg
post process flags
Definition: vp8.h:88
VP8_DEBUG_TXT_DC_DIFF
Definition: vp8.h:76
vp8_com_control_id
vp8_com_control_id
Control functions.
Definition: vp8.h:44
VP9_GET_REFERENCE
Definition: vp8.h:59
VP8_DEBUG_TXT_FRAME_INFO
Definition: vp8.h:73
vp8_postproc_cfg::post_proc_flag
int post_proc_flag
the types of post processing to be done, should be combination of "vp8_postproc_level" ...
Definition: vp8.h:91
VP8_SET_REFERENCE
pass in an external frame into decoder to be used as reference frame
Definition: vp8.h:47