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

Side by Side Diff: source/libvpx/vpx/src/vpx_decoder.c

Issue 111463005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years 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/svc_encodeframe.c ('k') | source/libvpx/vpx/svc_context.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 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 166
167 vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx , 167 vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx ,
168 vpx_codec_put_slice_cb_fn_t cb, 168 vpx_codec_put_slice_cb_fn_t cb,
169 void *user_ priv) { 169 void *user_ priv) {
170 vpx_codec_err_t res; 170 vpx_codec_err_t res;
171 171
172 if (!ctx || !cb) 172 if (!ctx || !cb)
173 res = VPX_CODEC_INVALID_PARAM; 173 res = VPX_CODEC_INVALID_PARAM;
174 else if (!ctx->iface || !ctx->priv 174 else if (!ctx->iface || !ctx->priv
175 || !(ctx->iface->caps & VPX_CODEC_CAP_PUT_FRAME)) 175 || !(ctx->iface->caps & VPX_CODEC_CAP_PUT_SLICE))
176 res = VPX_CODEC_ERROR; 176 res = VPX_CODEC_ERROR;
177 else { 177 else {
178 ctx->priv->dec.put_slice_cb.u.put_slice = cb; 178 ctx->priv->dec.put_slice_cb.u.put_slice = cb;
179 ctx->priv->dec.put_slice_cb.user_priv = user_priv; 179 ctx->priv->dec.put_slice_cb.user_priv = user_priv;
180 res = VPX_CODEC_OK; 180 res = VPX_CODEC_OK;
181 } 181 }
182 182
183 return SAVE_STATUS(ctx, res); 183 return SAVE_STATUS(ctx, res);
184 } 184 }
185 185
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 /* Everything look ok, set the mmap in the decoder */ 219 /* Everything look ok, set the mmap in the decoder */
220 res = ctx->iface->set_mmap(ctx, mmap); 220 res = ctx->iface->set_mmap(ctx, mmap);
221 221
222 if (res) 222 if (res)
223 break; 223 break;
224 } 224 }
225 } 225 }
226 226
227 return SAVE_STATUS(ctx, res); 227 return SAVE_STATUS(ctx, res);
228 } 228 }
229
230 vpx_codec_err_t vpx_codec_set_frame_buffers(
231 vpx_codec_ctx_t *ctx,
232 vpx_codec_frame_buffer_t *fb_list, int fb_count,
233 vpx_realloc_frame_buffer_cb_fn_t cb, void *user_priv) {
234 vpx_codec_err_t res;
235
236 if (!ctx || !fb_list || fb_count <= 0 || !cb) {
237 res = VPX_CODEC_INVALID_PARAM;
238 } else if (!ctx->iface || !ctx->priv ||
239 !(ctx->iface->caps & VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) {
240 res = VPX_CODEC_ERROR;
241 } else {
242 res = ctx->iface->dec.set_fb(ctx->priv->alg_priv, fb_list, fb_count,
243 cb, user_priv);
244 }
245
246 return SAVE_STATUS(ctx, res);
247 }
OLDNEW
« no previous file with comments | « source/libvpx/vpx/src/svc_encodeframe.c ('k') | source/libvpx/vpx/svc_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698