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 #ifndef VPX_VPX_ENCODER_H_ | 10 #ifndef VPX_VPX_ENCODER_H_ |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 * | 154 * |
155 * This enumeration lists the different kinds of data packets that can be | 155 * This enumeration lists the different kinds of data packets that can be |
156 * returned by calls to vpx_codec_get_cx_data(). Algorithms \ref MAY | 156 * returned by calls to vpx_codec_get_cx_data(). Algorithms \ref MAY |
157 * extend this list to provide additional functionality. | 157 * extend this list to provide additional functionality. |
158 */ | 158 */ |
159 enum vpx_codec_cx_pkt_kind { | 159 enum vpx_codec_cx_pkt_kind { |
160 VPX_CODEC_CX_FRAME_PKT, /**< Compressed video frame */ | 160 VPX_CODEC_CX_FRAME_PKT, /**< Compressed video frame */ |
161 VPX_CODEC_STATS_PKT, /**< Two-pass statistics for this frame */ | 161 VPX_CODEC_STATS_PKT, /**< Two-pass statistics for this frame */ |
162 VPX_CODEC_FPMB_STATS_PKT, /**< first pass mb statistics for this frame */ | 162 VPX_CODEC_FPMB_STATS_PKT, /**< first pass mb statistics for this frame */ |
163 VPX_CODEC_PSNR_PKT, /**< PSNR statistics for this frame */ | 163 VPX_CODEC_PSNR_PKT, /**< PSNR statistics for this frame */ |
164 #if CONFIG_SPATIAL_SVC | 164 // TODO(minghai): This is for testing purporses. The released library can't |
| 165 // depend on vpx_config.h |
| 166 #if defined(CONFIG_SPATIAL_SVC) && CONFIG_SPATIAL_SVC |
165 VPX_CODEC_SPATIAL_SVC_LAYER_SIZES, /**< Sizes for each layer in this frame*/ | 167 VPX_CODEC_SPATIAL_SVC_LAYER_SIZES, /**< Sizes for each layer in this frame*/ |
166 VPX_CODEC_SPATIAL_SVC_LAYER_PSNR, /**< PSNR for each layer in this frame*/ | 168 VPX_CODEC_SPATIAL_SVC_LAYER_PSNR, /**< PSNR for each layer in this frame*/ |
167 #endif | 169 #endif |
168 VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */ | 170 VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */ |
169 }; | 171 }; |
170 | 172 |
171 | 173 |
172 /*!\brief Encoder output packet | 174 /*!\brief Encoder output packet |
173 * | 175 * |
174 * This structure contains the different kinds of output data the encoder | 176 * This structure contains the different kinds of output data the encoder |
(...skipping 19 matching lines...) Expand all Loading... |
194 | 196 |
195 } frame; /**< data for compressed frame packet */ | 197 } frame; /**< data for compressed frame packet */ |
196 vpx_fixed_buf_t twopass_stats; /**< data for two-pass packet */ | 198 vpx_fixed_buf_t twopass_stats; /**< data for two-pass packet */ |
197 vpx_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */ | 199 vpx_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */ |
198 struct vpx_psnr_pkt { | 200 struct vpx_psnr_pkt { |
199 unsigned int samples[4]; /**< Number of samples, total/y/u/v */ | 201 unsigned int samples[4]; /**< Number of samples, total/y/u/v */ |
200 uint64_t sse[4]; /**< sum squared error, total/y/u/v */ | 202 uint64_t sse[4]; /**< sum squared error, total/y/u/v */ |
201 double psnr[4]; /**< PSNR, total/y/u/v */ | 203 double psnr[4]; /**< PSNR, total/y/u/v */ |
202 } psnr; /**< data for PSNR packet */ | 204 } psnr; /**< data for PSNR packet */ |
203 vpx_fixed_buf_t raw; /**< data for arbitrary packets */ | 205 vpx_fixed_buf_t raw; /**< data for arbitrary packets */ |
204 #if CONFIG_SPATIAL_SVC | 206 // TODO(minghai): This is for testing purporses. The released library |
| 207 // can't depend on vpx_config.h |
| 208 #if defined(CONFIG_SPATIAL_SVC) && CONFIG_SPATIAL_SVC |
205 size_t layer_sizes[VPX_SS_MAX_LAYERS]; | 209 size_t layer_sizes[VPX_SS_MAX_LAYERS]; |
206 struct vpx_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS]; | 210 struct vpx_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS]; |
207 #endif | 211 #endif |
208 | 212 |
209 /* This packet size is fixed to allow codecs to extend this | 213 /* This packet size is fixed to allow codecs to extend this |
210 * interface without having to manage storage for raw packets, | 214 * interface without having to manage storage for raw packets, |
211 * i.e., if it's smaller than 128 bytes, you can store in the | 215 * i.e., if it's smaller than 128 bytes, you can store in the |
212 * packet list directly. | 216 * packet list directly. |
213 */ | 217 */ |
214 char pad[128 - sizeof(enum vpx_codec_cx_pkt_kind)]; /**< fixed sz */ | 218 char pad[128 - sizeof(enum vpx_codec_cx_pkt_kind)]; /**< fixed sz */ |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 */ | 998 */ |
995 const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx); | 999 const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx); |
996 | 1000 |
997 | 1001 |
998 /*!@} - end defgroup encoder*/ | 1002 /*!@} - end defgroup encoder*/ |
999 #ifdef __cplusplus | 1003 #ifdef __cplusplus |
1000 } | 1004 } |
1001 #endif | 1005 #endif |
1002 #endif // VPX_VPX_ENCODER_H_ | 1006 #endif // VPX_VPX_ENCODER_H_ |
1003 | 1007 |
OLD | NEW |