Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: source/libvpx/vpx/vpx_encoder.h

Issue 1029663003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/vpx/vpx_codec.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #define VPX_SS_DEFAULT_LAYERS 1 52 #define VPX_SS_DEFAULT_LAYERS 1
53 53
54 /*!\brief Current ABI version number 54 /*!\brief Current ABI version number
55 * 55 *
56 * \internal 56 * \internal
57 * If this file is altered in any way that changes the ABI, this value 57 * If this file is altered in any way that changes the ABI, this value
58 * must be bumped. Examples include, but are not limited to, changing 58 * must be bumped. Examples include, but are not limited to, changing
59 * types, removing or reassigning enums, adding/removing/rearranging 59 * types, removing or reassigning enums, adding/removing/rearranging
60 * fields to structures 60 * fields to structures
61 */ 61 */
62 #define VPX_ENCODER_ABI_VERSION (3 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer */ 62 #define VPX_ENCODER_ABI_VERSION (4 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer */
63 63
64 64
65 /*! \brief Encoder capabilities bitfield 65 /*! \brief Encoder capabilities bitfield
66 * 66 *
67 * Each encoder advertises the capabilities it supports as part of its 67 * Each encoder advertises the capabilities it supports as part of its
68 * ::vpx_codec_iface_t interface structure. Capabilities are extra 68 * ::vpx_codec_iface_t interface structure. Capabilities are extra
69 * interfaces or functionality, and are not required to be supported 69 * interfaces or functionality, and are not required to be supported
70 * by an encoder. 70 * by an encoder.
71 * 71 *
72 * The available flags are specified by VPX_CODEC_CAP_* defines. 72 * The available flags are specified by VPX_CODEC_CAP_* defines.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // TODO(minghai): This is for testing purporses. The released library can't 164 // Spatial SVC is still experimental and may be removed before the next ABI
165 // depend on vpx_config.h 165 // bump.
166 #if defined(CONFIG_SPATIAL_SVC) && CONFIG_SPATIAL_SVC 166 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
167 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*/
168 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*/
169 #endif 169 #endif
170 VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */ 170 VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */
171 }; 171 };
172 172
173 173
174 /*!\brief Encoder output packet 174 /*!\brief Encoder output packet
175 * 175 *
176 * 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
196 196
197 } frame; /**< data for compressed frame packet */ 197 } frame; /**< data for compressed frame packet */
198 vpx_fixed_buf_t twopass_stats; /**< data for two-pass packet */ 198 vpx_fixed_buf_t twopass_stats; /**< data for two-pass packet */
199 vpx_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */ 199 vpx_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */
200 struct vpx_psnr_pkt { 200 struct vpx_psnr_pkt {
201 unsigned int samples[4]; /**< Number of samples, total/y/u/v */ 201 unsigned int samples[4]; /**< Number of samples, total/y/u/v */
202 uint64_t sse[4]; /**< sum squared error, total/y/u/v */ 202 uint64_t sse[4]; /**< sum squared error, total/y/u/v */
203 double psnr[4]; /**< PSNR, total/y/u/v */ 203 double psnr[4]; /**< PSNR, total/y/u/v */
204 } psnr; /**< data for PSNR packet */ 204 } psnr; /**< data for PSNR packet */
205 vpx_fixed_buf_t raw; /**< data for arbitrary packets */ 205 vpx_fixed_buf_t raw; /**< data for arbitrary packets */
206 // TODO(minghai): This is for testing purporses. The released library 206 // Spatial SVC is still experimental and may be removed before the next
207 // can't depend on vpx_config.h 207 // ABI bump.
208 #if defined(CONFIG_SPATIAL_SVC) && CONFIG_SPATIAL_SVC 208 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
209 size_t layer_sizes[VPX_SS_MAX_LAYERS]; 209 size_t layer_sizes[VPX_SS_MAX_LAYERS];
210 struct vpx_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS]; 210 struct vpx_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS];
211 #endif 211 #endif
212 212
213 /* This packet size is fixed to allow codecs to extend this 213 /* This packet size is fixed to allow codecs to extend this
214 * interface without having to manage storage for raw packets, 214 * interface without having to manage storage for raw packets,
215 * 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
216 * packet list directly. 216 * packet list directly.
217 */ 217 */
218 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 */ 1014 */
1015 const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx); 1015 const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx);
1016 1016
1017 1017
1018 /*!@} - end defgroup encoder*/ 1018 /*!@} - end defgroup encoder*/
1019 #ifdef __cplusplus 1019 #ifdef __cplusplus
1020 } 1020 }
1021 #endif 1021 #endif
1022 #endif // VPX_VPX_ENCODER_H_ 1022 #endif // VPX_VPX_ENCODER_H_
1023 1023
OLDNEW
« no previous file with comments | « source/libvpx/vpx/vpx_codec.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698