From 01d23109ab037b4a8a05d9062950dd043fca4fb8 Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 29 Mar 2017 23:30:11 -0700 Subject: [PATCH 1/2] vp9: make VPX_CODEC_USE_FRAME_THREADING a no-op this is unmaintained and due to be removed BUG=webm:1395 Change-Id: Iaffa6aa057c820fd1a182b93ebb45d4286e1306e --- vp9/vp9_dx_iface.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c index 3c68003a0..1da1794b7 100644 --- a/vp9/vp9_dx_iface.c +++ b/vp9/vp9_dx_iface.c @@ -47,12 +47,9 @@ static vpx_codec_err_t decoder_init(vpx_codec_ctx_t *ctx, ctx->priv->init_flags = ctx->init_flags; priv->si.sz = sizeof(priv->si); priv->flushed = 0; - // Only do frame parallel decode when threads > 1. - priv->frame_parallel_decode = - (ctx->config.dec && (ctx->config.dec->threads > 1) && - (ctx->init_flags & VPX_CODEC_USE_FRAME_THREADING)) - ? 1 - : 0; + // TODO(jzern): remnants of frame-level parallel decoding should be + // removed. cf., https://bugs.chromium.org/p/webm/issues/detail?id=1395 + priv->frame_parallel_decode = 0; if (ctx->config.dec) { priv->cfg = *ctx->config.dec; ctx->config.dec = &priv->cfg; From 6fed5692d2bf4b5ea54ac9e02261d7a097d88dbc Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 29 Mar 2017 23:31:53 -0700 Subject: [PATCH 2/2] vpxdec: silently ignore -frame-parallel BUG=webm:1395 Change-Id: Ibf47cc931e51b71e49067c6d7b7a39ab57c11c96 --- vpxdec.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vpxdec.c b/vpxdec.c index cb5c1b2a0..fa85ac858 100644 --- a/vpxdec.c +++ b/vpxdec.c @@ -75,7 +75,7 @@ static const arg_def_t outputfile = static const arg_def_t threadsarg = ARG_DEF("t", "threads", 1, "Max threads to use"); static const arg_def_t frameparallelarg = - ARG_DEF(NULL, "frame-parallel", 0, "Frame parallel decode"); + ARG_DEF(NULL, "frame-parallel", 0, "Frame parallel decode (ignored)"); static const arg_def_t verbosearg = ARG_DEF("v", "verbose", 0, "Show version string"); static const arg_def_t error_concealment = @@ -493,7 +493,7 @@ static int main_loop(int argc, const char **argv_) { size_t bytes_in_buffer = 0, buffer_size = 0; FILE *infile; int frame_in = 0, frame_out = 0, flipuv = 0, noblit = 0; - int do_md5 = 0, progress = 0, frame_parallel = 0; + int do_md5 = 0, progress = 0; int stop_after = 0, postproc = 0, summary = 0, quiet = 1; int arg_skip = 0; int ec_enabled = 0; @@ -591,8 +591,9 @@ static int main_loop(int argc, const char **argv_) { else if (arg_match(&arg, &threadsarg, argi)) cfg.threads = arg_parse_uint(&arg); #if CONFIG_VP9_DECODER - else if (arg_match(&arg, &frameparallelarg, argi)) - frame_parallel = 1; + else if (arg_match(&arg, &frameparallelarg, argi)) { + /* ignored for compatibility */ + } #endif else if (arg_match(&arg, &verbosearg, argi)) quiet = 0; @@ -725,8 +726,7 @@ static int main_loop(int argc, const char **argv_) { if (!interface) interface = get_vpx_decoder_by_index(0); dec_flags = (postproc ? VPX_CODEC_USE_POSTPROC : 0) | - (ec_enabled ? VPX_CODEC_USE_ERROR_CONCEALMENT : 0) | - (frame_parallel ? VPX_CODEC_USE_FRAME_THREADING : 0); + (ec_enabled ? VPX_CODEC_USE_ERROR_CONCEALMENT : 0); if (vpx_codec_dec_init(&decoder, interface->codec_interface(), &cfg, dec_flags)) { fprintf(stderr, "Failed to initialize decoder: %s\n", @@ -840,7 +840,7 @@ static int main_loop(int argc, const char **argv_) { vpx_usec_timer_mark(&timer); dx_time += (unsigned int)vpx_usec_timer_elapsed(&timer); - if (!frame_parallel && !corrupted && + if (!corrupted && vpx_codec_control(&decoder, VP8D_GET_FRAME_CORRUPTED, &corrupted)) { warn("Failed VP8_GET_FRAME_CORRUPTED: %s", vpx_codec_error(&decoder)); if (!keep_going) goto fail;