summaryrefslogtreecommitdiff
path: root/vp8/decoder/decodframe.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-06-28 00:05:04 -0400
committerJohn Koleszar <jkoleszar@google.com>2011-06-28 00:05:04 -0400
commitd7c6c9472f6b36a6615e9225322a737169b73451 (patch)
tree170fe747712fb8e0a04a622720cc2a4dcc89e00f /vp8/decoder/decodframe.c
parent3ce5adb15434556f15e6388b535c988515d40e56 (diff)
parent7985e023ebd83351b670bf5b18060f4d391b3a64 (diff)
downloadlibvpx-d7c6c9472f6b36a6615e9225322a737169b73451.tar
libvpx-d7c6c9472f6b36a6615e9225322a737169b73451.tar.gz
libvpx-d7c6c9472f6b36a6615e9225322a737169b73451.tar.bz2
libvpx-d7c6c9472f6b36a6615e9225322a737169b73451.zip
Merge remote branch 'internal/upstream-experimental' into HEAD
Diffstat (limited to 'vp8/decoder/decodframe.c')
-rw-r--r--vp8/decoder/decodframe.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 2086493a4..f69b09e21 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -239,12 +239,13 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
#if CONFIG_ERROR_CONCEALMENT
if (pbi->ec_enabled &&
- (mb_idx > pbi->mvs_corrupt_from_mb ||
+ (mb_idx >= pbi->mvs_corrupt_from_mb ||
vp8dx_bool_error(xd->current_bc)))
{
/* MB with corrupt residuals or corrupt mode/motion vectors.
* Better to use the predictor as reconstruction.
*/
+ vpx_memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
vp8_conceal_corrupt_mb(xd);
return;
}
@@ -474,7 +475,13 @@ static void setup_token_decoder(VP8D_COMP *pbi,
const unsigned char *partition;
/* Parse number of token partitions to use */
- pc->multi_token_partition = (TOKEN_PARTITION)vp8_read_literal(&pbi->bc, 2);
+ const TOKEN_PARTITION multi_token_partition =
+ (TOKEN_PARTITION)vp8_read_literal(&pbi->bc, 2);
+ /* Only update the multi_token_partition field if we are sure the value
+ * is correct. */
+ if (!pbi->ec_enabled || !vp8dx_bool_error(&pbi->bc))
+ pc->multi_token_partition = multi_token_partition;
+
num_part = 1 << pc->multi_token_partition;
/* Set up pointers to the first partition */