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

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

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vpx/vp8cx.h ('k') | source/libvpx/vpx/vpx_frame_buffer.h » ('j') | 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #if CONFIG_SPATIAL_SVC
165 VPX_CODEC_SPATIAL_SVC_LAYER_SIZES, /**< Sizes for each layer in this frame*/ 165 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*/
166 #endif 167 #endif
167 VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */ 168 VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */
168 }; 169 };
169 170
170 171
171 /*!\brief Encoder output packet 172 /*!\brief Encoder output packet
172 * 173 *
173 * This structure contains the different kinds of output data the encoder 174 * This structure contains the different kinds of output data the encoder
174 * may produce while compressing a frame. 175 * may produce while compressing a frame.
175 */ 176 */
(...skipping 19 matching lines...) Expand all
195 vpx_fixed_buf_t twopass_stats; /**< data for two-pass packet */ 196 vpx_fixed_buf_t twopass_stats; /**< data for two-pass packet */
196 vpx_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */ 197 vpx_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */
197 struct vpx_psnr_pkt { 198 struct vpx_psnr_pkt {
198 unsigned int samples[4]; /**< Number of samples, total/y/u/v */ 199 unsigned int samples[4]; /**< Number of samples, total/y/u/v */
199 uint64_t sse[4]; /**< sum squared error, total/y/u/v */ 200 uint64_t sse[4]; /**< sum squared error, total/y/u/v */
200 double psnr[4]; /**< PSNR, total/y/u/v */ 201 double psnr[4]; /**< PSNR, total/y/u/v */
201 } psnr; /**< data for PSNR packet */ 202 } psnr; /**< data for PSNR packet */
202 vpx_fixed_buf_t raw; /**< data for arbitrary packets */ 203 vpx_fixed_buf_t raw; /**< data for arbitrary packets */
203 #if CONFIG_SPATIAL_SVC 204 #if CONFIG_SPATIAL_SVC
204 size_t layer_sizes[VPX_SS_MAX_LAYERS]; 205 size_t layer_sizes[VPX_SS_MAX_LAYERS];
206 struct vpx_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS];
205 #endif 207 #endif
206 208
207 /* This packet size is fixed to allow codecs to extend this 209 /* This packet size is fixed to allow codecs to extend this
208 * interface without having to manage storage for raw packets, 210 * interface without having to manage storage for raw packets,
209 * i.e., if it's smaller than 128 bytes, you can store in the 211 * i.e., if it's smaller than 128 bytes, you can store in the
210 * packet list directly. 212 * packet list directly.
211 */ 213 */
212 char pad[128 - sizeof(enum vpx_codec_cx_pkt_kind)]; /**< fixed sz */ 214 char pad[128 - sizeof(enum vpx_codec_cx_pkt_kind)]; /**< fixed sz */
213 } data; /**< packet data */ 215 } data; /**< packet data */
214 } vpx_codec_cx_pkt_t; /**< alias for struct vpx_codec_cx_pkt */ 216 } vpx_codec_cx_pkt_t; /**< alias for struct vpx_codec_cx_pkt */
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 /*!\brief Template defining the membership of frames to temporal layers. 704 /*!\brief Template defining the membership of frames to temporal layers.
703 * 705 *
704 * This array defines the membership of frames to temporal coding layers. 706 * This array defines the membership of frames to temporal coding layers.
705 * For a 2-layer encoding that assigns even numbered frames to one temporal 707 * For a 2-layer encoding that assigns even numbered frames to one temporal
706 * layer (0) and odd numbered frames to a second temporal layer (1) with 708 * layer (0) and odd numbered frames to a second temporal layer (1) with
707 * ts_periodicity=8, then ts_layer_id = (0,1,0,1,0,1,0,1). 709 * ts_periodicity=8, then ts_layer_id = (0,1,0,1,0,1,0,1).
708 */ 710 */
709 unsigned int ts_layer_id[VPX_TS_MAX_PERIODICITY]; 711 unsigned int ts_layer_id[VPX_TS_MAX_PERIODICITY];
710 } vpx_codec_enc_cfg_t; /**< alias for struct vpx_codec_enc_cfg */ 712 } vpx_codec_enc_cfg_t; /**< alias for struct vpx_codec_enc_cfg */
711 713
714 /*!\brief vp9 svc extra configure parameters
715 *
716 * This defines max/min quantizers and scale factors for each layer
717 *
718 */
719 typedef struct vpx_svc_parameters {
720 int max_quantizers[VPX_SS_MAX_LAYERS];
721 int min_quantizers[VPX_SS_MAX_LAYERS];
722 int scaling_factor_num[VPX_SS_MAX_LAYERS];
723 int scaling_factor_den[VPX_SS_MAX_LAYERS];
724 } vpx_svc_extra_cfg_t;
725
712 726
713 /*!\brief Initialize an encoder instance 727 /*!\brief Initialize an encoder instance
714 * 728 *
715 * Initializes a encoder context using the given interface. Applications 729 * Initializes a encoder context using the given interface. Applications
716 * should call the vpx_codec_enc_init convenience macro instead of this 730 * should call the vpx_codec_enc_init convenience macro instead of this
717 * function directly, to ensure that the ABI version number parameter 731 * function directly, to ensure that the ABI version number parameter
718 * is properly initialized. 732 * is properly initialized.
719 * 733 *
720 * If the library was configured with --disable-multithread, this call 734 * If the library was configured with --disable-multithread, this call
721 * is not thread safe and should be guarded with a lock if being used 735 * is not thread safe and should be guarded with a lock if being used
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 */ 994 */
981 const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx); 995 const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx);
982 996
983 997
984 /*!@} - end defgroup encoder*/ 998 /*!@} - end defgroup encoder*/
985 #ifdef __cplusplus 999 #ifdef __cplusplus
986 } 1000 }
987 #endif 1001 #endif
988 #endif // VPX_VPX_ENCODER_H_ 1002 #endif // VPX_VPX_ENCODER_H_
989 1003
OLDNEW
« no previous file with comments | « source/libvpx/vpx/vp8cx.h ('k') | source/libvpx/vpx/vpx_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698