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

Unified Diff: source/libvpx/vpx/src/vpx_decoder.c

Issue 554673004: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vpx/src/vpx_codec.c ('k') | source/libvpx/vpx/src/vpx_encoder.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vpx/src/vpx_decoder.c
===================================================================
--- source/libvpx/vpx/src/vpx_decoder.c (revision 291857)
+++ source/libvpx/vpx/src/vpx_decoder.c (working copy)
@@ -18,9 +18,13 @@
#define SAVE_STATUS(ctx,var) (ctx?(ctx->err = var):var)
+static vpx_codec_alg_priv_t *get_alg_priv(vpx_codec_ctx_t *ctx) {
+ return (vpx_codec_alg_priv_t *)ctx->priv;
+}
+
vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
vpx_codec_iface_t *iface,
- vpx_codec_dec_cfg_t *cfg,
+ const vpx_codec_dec_cfg_t *cfg,
vpx_codec_flags_t flags,
int ver) {
vpx_codec_err_t res;
@@ -94,7 +98,7 @@
si->w = 0;
si->h = 0;
- res = ctx->iface->dec.get_si(ctx->priv->alg_priv, si);
+ res = ctx->iface->dec.get_si(get_alg_priv(ctx), si);
}
return SAVE_STATUS(ctx, res);
@@ -115,8 +119,8 @@
else if (!ctx->iface || !ctx->priv)
res = VPX_CODEC_ERROR;
else {
- res = ctx->iface->dec.decode(ctx->priv->alg_priv, data, data_sz,
- user_priv, deadline);
+ res = ctx->iface->dec.decode(get_alg_priv(ctx), data, data_sz, user_priv,
+ deadline);
}
return SAVE_STATUS(ctx, res);
@@ -129,7 +133,7 @@
if (!ctx || !iter || !ctx->iface || !ctx->priv)
img = NULL;
else
- img = ctx->iface->dec.get_frame(ctx->priv->alg_priv, iter);
+ img = ctx->iface->dec.get_frame(get_alg_priv(ctx), iter);
return img;
}
@@ -185,7 +189,7 @@
!(ctx->iface->caps & VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) {
res = VPX_CODEC_ERROR;
} else {
- res = ctx->iface->dec.set_fb_fn(ctx->priv->alg_priv, cb_get, cb_release,
+ res = ctx->iface->dec.set_fb_fn(get_alg_priv(ctx), cb_get, cb_release,
cb_priv);
}
« no previous file with comments | « source/libvpx/vpx/src/vpx_codec.c ('k') | source/libvpx/vpx/src/vpx_encoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698