summaryrefslogtreecommitdiff
path: root/vp8/decoder/onyxd_if.c
diff options
context:
space:
mode:
authorStefan Holmer <holmer@google.com>2011-08-08 10:56:20 +0200
committerStefan Holmer <holmer@google.com>2011-08-12 16:10:04 +0200
commit3e10be93f2e9f8707e5b4ce235081fdd2471c31d (patch)
tree6cfa86855e30df271d5922d6b1eb8238599c806c /vp8/decoder/onyxd_if.c
parent810a06b12caf7206bf8ed78c8abfb04620b2a90c (diff)
downloadlibvpx-3e10be93f2e9f8707e5b4ce235081fdd2471c31d.tar
libvpx-3e10be93f2e9f8707e5b4ce235081fdd2471c31d.tar.gz
libvpx-3e10be93f2e9f8707e5b4ce235081fdd2471c31d.tar.bz2
libvpx-3e10be93f2e9f8707e5b4ce235081fdd2471c31d.zip
Disable error concealment until first key frame is decoded
When error concealment is enabled the first key frame must be successfully received before error concealment is activated. Error concealment will be activated when the delta following delta frame is received. Also fixed a couple of bugs related to error tracking in multi-threading. And avoiding decoding corrupt residual when we have multiple non-resilient partitions. Change-Id: I45c4bb296e2f05f57624aef500a874faf431a60d
Diffstat (limited to 'vp8/decoder/onyxd_if.c')
-rw-r--r--vp8/decoder/onyxd_if.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/vp8/decoder/onyxd_if.c b/vp8/decoder/onyxd_if.c
index 224619480..db6528c80 100644
--- a/vp8/decoder/onyxd_if.c
+++ b/vp8/decoder/onyxd_if.c
@@ -101,9 +101,21 @@ VP8D_PTR vp8dx_create_decompressor(VP8D_CONFIG *oxcf)
#else
pbi->ec_enabled = 0;
#endif
+ /* Error concealment is activated after a key frame has been
+ * decoded without errors when error concealment is enabled.
+ */
+ pbi->ec_active = 0;
+
+ pbi->decoded_key_frame = 0;
pbi->input_partition = oxcf->input_partition;
+ /* Independent partitions is activated when a frame updates the
+ * token probability table to have equal probabilities over the
+ * PREV_COEF context.
+ */
+ pbi->independent_partitions = 0;
+
return (VP8D_PTR) pbi;
}
@@ -346,11 +358,15 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
/* If error concealment is disabled we won't signal missing frames to
* the decoder.
*/
- if (!pbi->ec_enabled)
+ if (!pbi->ec_active)
{
/* Signal that we have no frame to show. */
cm->show_frame = 0;
+ pbi->num_partitions = 0;
+ if (pbi->input_partition)
+ pbi->common.multi_token_partition = 0;
+
/* Nothing more to do. */
return 0;
}
@@ -379,6 +395,10 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
#endif
pbi->common.error.setjmp = 0;
+ pbi->num_partitions = 0;
+ if (pbi->input_partition)
+ pbi->common.multi_token_partition = 0;
+
/* We do not know if the missing frame(s) was supposed to update
* any of the reference buffers, but we act conservative and
* mark only the last buffer as corrupted.