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

Unified Diff: source/libvpx/vp8/vp8_dx_iface.c

Issue 341293003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 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/vp8/vp8_cx_iface.c ('k') | source/libvpx/vp8/vp8cx.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/vp8_dx_iface.c
===================================================================
--- source/libvpx/vp8/vp8_dx_iface.c (revision 278778)
+++ source/libvpx/vp8/vp8_dx_iface.c (working copy)
@@ -386,8 +386,10 @@
/* Set these even if already initialized. The caller may have changed the
* decrypt config between frames.
*/
- ctx->yv12_frame_buffers.pbi[0]->decrypt_cb = ctx->decrypt_cb;
- ctx->yv12_frame_buffers.pbi[0]->decrypt_state = ctx->decrypt_state;
+ if (ctx->decoder_init) {
+ ctx->yv12_frame_buffers.pbi[0]->decrypt_cb = ctx->decrypt_cb;
+ ctx->yv12_frame_buffers.pbi[0]->decrypt_state = ctx->decrypt_state;
+ }
if (!res)
{
@@ -574,8 +576,7 @@
static vpx_codec_err_t vp8_set_reference(vpx_codec_alg_priv_t *ctx,
- int ctr_id,
- va_list args)
+ va_list args)
{
vpx_ref_frame_t *data = va_arg(args, vpx_ref_frame_t *);
@@ -596,8 +597,7 @@
}
static vpx_codec_err_t vp8_get_reference(vpx_codec_alg_priv_t *ctx,
- int ctr_id,
- va_list args)
+ va_list args)
{
vpx_ref_frame_t *data = va_arg(args, vpx_ref_frame_t *);
@@ -618,7 +618,6 @@
}
static vpx_codec_err_t vp8_set_postproc(vpx_codec_alg_priv_t *ctx,
- int ctr_id,
va_list args)
{
#if CONFIG_POSTPROC
@@ -638,31 +637,56 @@
#endif
}
-static vpx_codec_err_t vp8_set_dbg_options(vpx_codec_alg_priv_t *ctx,
- int ctrl_id,
- va_list args)
-{
+
+static vpx_codec_err_t vp8_set_dbg_color_ref_frame(vpx_codec_alg_priv_t *ctx,
+ va_list args) {
#if CONFIG_POSTPROC_VISUALIZER && CONFIG_POSTPROC
- int data = va_arg(args, int);
+ ctx->dbg_color_ref_frame_flag = va_arg(args, int);
+ return VPX_CODEC_OK;
+#else
+ (void)ctx;
+ (void)args;
+ return VPX_CODEC_INCAPABLE;
+#endif
+}
-#define MAP(id, var) case id: var = data; break;
+static vpx_codec_err_t vp8_set_dbg_color_mb_modes(vpx_codec_alg_priv_t *ctx,
+ va_list args) {
+#if CONFIG_POSTPROC_VISUALIZER && CONFIG_POSTPROC
+ ctx->dbg_color_mb_modes_flag = va_arg(args, int);
+ return VPX_CODEC_OK;
+#else
+ (void)ctx;
+ (void)args;
+ return VPX_CODEC_INCAPABLE;
+#endif
+}
- switch (ctrl_id)
- {
- MAP (VP8_SET_DBG_COLOR_REF_FRAME, ctx->dbg_color_ref_frame_flag);
- MAP (VP8_SET_DBG_COLOR_MB_MODES, ctx->dbg_color_mb_modes_flag);
- MAP (VP8_SET_DBG_COLOR_B_MODES, ctx->dbg_color_b_modes_flag);
- MAP (VP8_SET_DBG_DISPLAY_MV, ctx->dbg_display_mv_flag);
- }
+static vpx_codec_err_t vp8_set_dbg_color_b_modes(vpx_codec_alg_priv_t *ctx,
+ va_list args) {
+#if CONFIG_POSTPROC_VISUALIZER && CONFIG_POSTPROC
+ ctx->dbg_color_b_modes_flag = va_arg(args, int);
+ return VPX_CODEC_OK;
+#else
+ (void)ctx;
+ (void)args;
+ return VPX_CODEC_INCAPABLE;
+#endif
+}
- return VPX_CODEC_OK;
+static vpx_codec_err_t vp8_set_dbg_display_mv(vpx_codec_alg_priv_t *ctx,
+ va_list args) {
+#if CONFIG_POSTPROC_VISUALIZER && CONFIG_POSTPROC
+ ctx->dbg_display_mv_flag = va_arg(args, int);
+ return VPX_CODEC_OK;
#else
- return VPX_CODEC_INCAPABLE;
+ (void)ctx;
+ (void)args;
+ return VPX_CODEC_INCAPABLE;
#endif
}
static vpx_codec_err_t vp8_get_last_ref_updates(vpx_codec_alg_priv_t *ctx,
- int ctrl_id,
va_list args)
{
int *update_info = va_arg(args, int *);
@@ -683,7 +707,6 @@
extern int vp8dx_references_buffer( VP8_COMMON *oci, int ref_frame );
static vpx_codec_err_t vp8_get_last_ref_frame(vpx_codec_alg_priv_t *ctx,
- int ctrl_id,
va_list args)
{
int *ref_info = va_arg(args, int *);
@@ -704,7 +727,6 @@
}
static vpx_codec_err_t vp8_get_frame_corrupted(vpx_codec_alg_priv_t *ctx,
- int ctrl_id,
va_list args)
{
@@ -723,7 +745,6 @@
}
static vpx_codec_err_t vp8_set_decryptor(vpx_codec_alg_priv_t *ctx,
- int ctrl_id,
va_list args)
{
vpx_decrypt_init *init = va_arg(args, vpx_decrypt_init *);
@@ -746,10 +767,10 @@
{VP8_SET_REFERENCE, vp8_set_reference},
{VP8_COPY_REFERENCE, vp8_get_reference},
{VP8_SET_POSTPROC, vp8_set_postproc},
- {VP8_SET_DBG_COLOR_REF_FRAME, vp8_set_dbg_options},
- {VP8_SET_DBG_COLOR_MB_MODES, vp8_set_dbg_options},
- {VP8_SET_DBG_COLOR_B_MODES, vp8_set_dbg_options},
- {VP8_SET_DBG_DISPLAY_MV, vp8_set_dbg_options},
+ {VP8_SET_DBG_COLOR_REF_FRAME, vp8_set_dbg_color_ref_frame},
+ {VP8_SET_DBG_COLOR_MB_MODES, vp8_set_dbg_color_mb_modes},
+ {VP8_SET_DBG_COLOR_B_MODES, vp8_set_dbg_color_b_modes},
+ {VP8_SET_DBG_DISPLAY_MV, vp8_set_dbg_display_mv},
{VP8D_GET_LAST_REF_UPDATES, vp8_get_last_ref_updates},
{VP8D_GET_FRAME_CORRUPTED, vp8_get_frame_corrupted},
{VP8D_GET_LAST_REF_USED, vp8_get_last_ref_frame},
« no previous file with comments | « source/libvpx/vp8/vp8_cx_iface.c ('k') | source/libvpx/vp8/vp8cx.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698