ref: c32a3b8e25fde000742be39a2142ab1143e54b35
parent: 48f0935b81c242fd3bc5f13b6be9a556617e3d95
parent: 537cb060360941e753ce30cf34a062054f3de4a5
author: hkuang <[email protected]>
date: Thu Jun 12 11:01:38 EDT 2014
Merge "Initially add frame_parallel_decode flag."
--- a/vp9/decoder/vp9_decoder.h
+++ b/vp9/decoder/vp9_decoder.h
@@ -43,6 +43,8 @@
int refresh_frame_flags;
+ int frame_parallel_decode; // frame-based threading.
+
VP9Worker lf_worker;
VP9Worker *tile_workers;
int num_tile_workers;
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -39,6 +39,7 @@
void *decrypt_state;
vpx_image_t img;
int invert_tile_order;
+ int frame_parallel_decode; // frame-based threading.
// External frame buffer info to save for VP9 common.
void *ext_priv; // Private data associated with the external frame buffers.
@@ -66,7 +67,12 @@
ctx->priv->alg_priv = alg_priv;
ctx->priv->alg_priv->si.sz = sizeof(ctx->priv->alg_priv->si);
ctx->priv->init_flags = ctx->init_flags;
+ ctx->priv->alg_priv->frame_parallel_decode =
+ (ctx->init_flags & VPX_CODEC_USE_FRAME_THREADING);
+ // Disable frame parallel decoding for now.
+ ctx->priv->alg_priv->frame_parallel_decode = 0;
+
if (ctx->config.dec) {
// Update the reference to the config structure to an internal copy.
ctx->priv->alg_priv->cfg = *ctx->config.dec;
@@ -231,6 +237,7 @@
ctx->pbi->max_threads = ctx->cfg.threads;
ctx->pbi->inv_tile_order = ctx->invert_tile_order;
+ ctx->pbi->frame_parallel_decode = ctx->frame_parallel_decode;
// If postprocessing was enabled by the application and a
// configuration has not been provided, default it.