OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 | |
12 /*!\defgroup vp8 VP8 | 11 /*!\defgroup vp8 VP8 |
13 * \ingroup codecs | 12 * \ingroup codecs |
14 * VP8 is vpx's newest video compression algorithm that uses motion | 13 * VP8 is vpx's newest video compression algorithm that uses motion |
15 * compensated prediction, Discrete Cosine Transform (DCT) coding of the | 14 * compensated prediction, Discrete Cosine Transform (DCT) coding of the |
16 * prediction error signal and context dependent entropy coding techniques | 15 * prediction error signal and context dependent entropy coding techniques |
17 * based on arithmetic principles. It features: | 16 * based on arithmetic principles. It features: |
18 * - YUV 4:2:0 image format | 17 * - YUV 4:2:0 image format |
19 * - Macro-block based coding (16x16 luma plus two 8x8 chroma) | 18 * - Macro-block based coding (16x16 luma plus two 8x8 chroma) |
20 * - 1/4 (1/8) pixel accuracy motion compensated prediction | 19 * - 1/4 (1/8) pixel accuracy motion compensated prediction |
21 * - 4x4 DCT transform | 20 * - 4x4 DCT transform |
22 * - 128 level linear quantizer | 21 * - 128 level linear quantizer |
23 * - In loop deblocking filter | 22 * - In loop deblocking filter |
24 * - Context-based entropy coding | 23 * - Context-based entropy coding |
25 * | 24 * |
26 * @{ | 25 * @{ |
27 */ | 26 */ |
28 /*!\file | 27 /*!\file |
29 * \brief Provides controls common to both the VP8 encoder and decoder. | 28 * \brief Provides controls common to both the VP8 encoder and decoder. |
30 */ | 29 */ |
31 #ifndef VP8_H | 30 #ifndef VP8_H |
32 #define VP8_H | 31 #define VP8_H |
33 #include "vpx_codec_impl_top.h" | 32 |
| 33 #include "./vpx_codec.h" |
| 34 #include "./vpx_image.h" |
| 35 |
| 36 #ifdef __cplusplus |
| 37 extern "C" { |
| 38 #endif |
34 | 39 |
35 /*!\brief Control functions | 40 /*!\brief Control functions |
36 * | 41 * |
37 * The set of macros define the control functions of VP8 interface | 42 * The set of macros define the control functions of VP8 interface |
38 */ | 43 */ |
39 enum vp8_com_control_id { | 44 enum vp8_com_control_id { |
40 VP8_SET_REFERENCE = 1, /**< pass in an external frame into decode
r to be used as reference frame */ | 45 VP8_SET_REFERENCE = 1, /**< pass in an external frame into decode
r to be used as reference frame */ |
41 VP8_COPY_REFERENCE = 2, /**< get a copy of reference frame from th
e decoder */ | 46 VP8_COPY_REFERENCE = 2, /**< get a copy of reference frame from th
e decoder */ |
42 VP8_SET_POSTPROC = 3, /**< set the decoder's post processing set
tings */ | 47 VP8_SET_POSTPROC = 3, /**< set the decoder's post processing set
tings */ |
43 VP8_SET_DBG_COLOR_REF_FRAME = 4, /**< set the reference frames to color for
each macroblock */ | 48 VP8_SET_DBG_COLOR_REF_FRAME = 4, /**< set the reference frames to color for
each macroblock */ |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 * The set of macros define the type of VP8 reference frames | 93 * The set of macros define the type of VP8 reference frames |
89 */ | 94 */ |
90 typedef enum vpx_ref_frame_type { | 95 typedef enum vpx_ref_frame_type { |
91 VP8_LAST_FRAME = 1, | 96 VP8_LAST_FRAME = 1, |
92 VP8_GOLD_FRAME = 2, | 97 VP8_GOLD_FRAME = 2, |
93 VP8_ALTR_FRAME = 4 | 98 VP8_ALTR_FRAME = 4 |
94 } vpx_ref_frame_type_t; | 99 } vpx_ref_frame_type_t; |
95 | 100 |
96 /*!\brief reference frame data struct | 101 /*!\brief reference frame data struct |
97 * | 102 * |
98 * define the data struct to access vp8 reference frames | 103 * Define the data struct to access vp8 reference frames. |
99 */ | 104 */ |
100 | |
101 typedef struct vpx_ref_frame { | 105 typedef struct vpx_ref_frame { |
102 vpx_ref_frame_type_t frame_type; /**< which reference frame */ | 106 vpx_ref_frame_type_t frame_type; /**< which reference frame */ |
103 vpx_image_t img; /**< reference frame data in image format
*/ | 107 vpx_image_t img; /**< reference frame data in image format
*/ |
104 } vpx_ref_frame_t; | 108 } vpx_ref_frame_t; |
105 | 109 |
| 110 /*!\brief VP9 specific reference frame data struct |
| 111 * |
| 112 * Define the data struct to access vp9 reference frames. |
| 113 */ |
106 typedef struct vp9_ref_frame { | 114 typedef struct vp9_ref_frame { |
107 int idx; /**< frame index to get (input) */ | 115 int idx; /**< frame index to get (input) */ |
108 vpx_image_t img; /**< img structure to populate (output) */ | 116 vpx_image_t img; /**< img structure to populate (output) */ |
109 } vp9_ref_frame_t; | 117 } vp9_ref_frame_t; |
110 | 118 |
111 /*!\brief vp8 decoder control function parameter type | 119 /*!\brief vp8 decoder control function parameter type |
112 * | 120 * |
113 * defines the data type for each of VP8 decoder control function requires | 121 * defines the data type for each of VP8 decoder control function requires |
114 */ | 122 */ |
115 | |
116 VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *) | 123 VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *) |
117 VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *) | 124 VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *) |
118 VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *) | 125 VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *) |
119 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int) | 126 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int) |
120 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int) | 127 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int) |
121 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int) | 128 VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int) |
122 VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int) | 129 VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int) |
123 VPX_CTRL_USE_TYPE(VP9_GET_REFERENCE, vp9_ref_frame_t *) | 130 VPX_CTRL_USE_TYPE(VP9_GET_REFERENCE, vp9_ref_frame_t *) |
124 | 131 |
125 | |
126 /*! @} - end defgroup vp8 */ | 132 /*! @} - end defgroup vp8 */ |
127 | 133 |
128 #include "vpx_codec_impl_bottom.h" | 134 #ifdef __cplusplus |
| 135 } // extern "C" |
129 #endif | 136 #endif |
| 137 |
| 138 #endif |
OLD | NEW |