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

Side by Side Diff: source/libvpx/vpx/svc_context.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, 3 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/src/vpx_encoder.c ('k') | source/libvpx/vpx/vp8cx.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) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 * Set SVC options 45 * Set SVC options
46 * options are supplied as a single string separated by spaces 46 * options are supplied as a single string separated by spaces
47 * Format: encoding-mode=<i|ip|alt-ip|gf> 47 * Format: encoding-mode=<i|ip|alt-ip|gf>
48 * layers=<layer_count> 48 * layers=<layer_count>
49 * scaling-factors=<n1>/<d1>,<n2>/<d2>,... 49 * scaling-factors=<n1>/<d1>,<n2>/<d2>,...
50 * quantizers=<q1>,<q2>,... 50 * quantizers=<q1>,<q2>,...
51 */ 51 */
52 vpx_codec_err_t vpx_svc_set_options(SvcContext *svc_ctx, const char *options); 52 vpx_codec_err_t vpx_svc_set_options(SvcContext *svc_ctx, const char *options);
53 53
54 /** 54 /**
55 * Set SVC quantizer values
56 * values comma separated, ordered from lowest resolution to highest
57 * e.g., "60,53,39,33,27"
58 */
59 vpx_codec_err_t vpx_svc_set_quantizers(SvcContext *svc_ctx,
60 const char *quantizer_values);
61
62 /**
63 * Set SVC scale factors
64 * values comma separated, ordered from lowest resolution to highest
65 * e.g., "4/16,5/16,7/16,11/16,16/16"
66 */
67 vpx_codec_err_t vpx_svc_set_scale_factors(SvcContext *svc_ctx,
68 const char *scale_factors);
69
70 /**
71 * initialize SVC encoding 55 * initialize SVC encoding
72 */ 56 */
73 vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, 57 vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
74 vpx_codec_iface_t *iface, 58 vpx_codec_iface_t *iface,
75 vpx_codec_enc_cfg_t *cfg); 59 vpx_codec_enc_cfg_t *cfg);
76 /** 60 /**
77 * encode a frame of video with multiple layers 61 * encode a frame of video with multiple layers
78 */ 62 */
79 vpx_codec_err_t vpx_svc_encode(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, 63 vpx_codec_err_t vpx_svc_encode(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
80 struct vpx_image *rawimg, vpx_codec_pts_t pts, 64 struct vpx_image *rawimg, vpx_codec_pts_t pts,
81 int64_t duration, int deadline); 65 int64_t duration, int deadline);
82 66
83 /** 67 /**
84 * finished with svc encoding, release allocated resources 68 * finished with svc encoding, release allocated resources
85 */ 69 */
86 void vpx_svc_release(SvcContext *svc_ctx); 70 void vpx_svc_release(SvcContext *svc_ctx);
87 71
88 /** 72 /**
89 * dump accumulated statistics and reset accumulated values 73 * dump accumulated statistics and reset accumulated values
90 */ 74 */
91 const char *vpx_svc_dump_statistics(SvcContext *svc_ctx); 75 const char *vpx_svc_dump_statistics(SvcContext *svc_ctx);
92 76
93 /** 77 /**
94 * get status message from previous encode 78 * get status message from previous encode
95 */ 79 */
96 const char *vpx_svc_get_message(const SvcContext *svc_ctx); 80 const char *vpx_svc_get_message(const SvcContext *svc_ctx);
97 81
98 /**
99 * return size of encoded data to be returned by vpx_svc_get_buffer.
100 * it needs to be called before vpx_svc_get_buffer.
101 */
102 size_t vpx_svc_get_frame_size(const SvcContext *svc_ctx);
103
104 /**
105 * return buffer with encoded data. encoder will maintain a list of frame
106 * buffers. each call of vpx_svc_get_buffer() will return one frame.
107 */
108 void *vpx_svc_get_buffer(SvcContext *svc_ctx);
109
110 /**
111 * return size of two pass rate control stats data to be returned by
112 * vpx_svc_get_rc_stats_buffer
113 */
114 size_t vpx_svc_get_rc_stats_buffer_size(const SvcContext *svc_ctx);
115
116 /**
117 * return buffer two pass of rate control stats data
118 */
119 char *vpx_svc_get_rc_stats_buffer(const SvcContext *svc_ctx);
120
121 /**
122 * return spatial resolution of the specified layer
123 */
124 vpx_codec_err_t vpx_svc_get_layer_resolution(const SvcContext *svc_ctx,
125 int layer,
126 unsigned int *width,
127 unsigned int *height);
128 /**
129 * return number of frames that have been encoded
130 */
131 int vpx_svc_get_encode_frame_count(const SvcContext *svc_ctx);
132
133 /**
134 * return 1 if last encoded frame was a keyframe
135 */
136 int vpx_svc_is_keyframe(const SvcContext *svc_ctx);
137
138 /**
139 * force the next frame to be a keyframe
140 */
141 void vpx_svc_set_keyframe(SvcContext *svc_ctx);
142
143 #ifdef __cplusplus 82 #ifdef __cplusplus
144 } // extern "C" 83 } // extern "C"
145 #endif 84 #endif
146 85
147 #endif // VPX_SVC_CONTEXT_H_ 86 #endif // VPX_SVC_CONTEXT_H_
OLDNEW
« no previous file with comments | « source/libvpx/vpx/src/vpx_encoder.c ('k') | source/libvpx/vpx/vp8cx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698