Add unit test to test tile decoding error handling.

Also fix bugs related with corrupted frame handling.
Return VPX_CODEC_CORRUPT_FRAME when getting corrupted
block.

Change-Id: I7207ccc7c68c4df2b40b561315d16e49ccf7ff41
This commit is contained in:
hkuang
2014-07-01 16:04:53 -07:00
parent 84744a497a
commit c147cf3d3b
6 changed files with 59 additions and 20 deletions

View File

@@ -858,6 +858,7 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
decode_partition(tile_data->cm, &tile_data->xd, &tile, mi_row, mi_col,
&tile_data->bit_reader, BLOCK_64X64);
}
pbi->mb.corrupted |= tile_data->xd.corrupted;
}
// Loopfilter one row.
if (cm->lf.filter_level) {
@@ -1411,6 +1412,9 @@ void vp9_decode_frame(VP9Decoder *pbi,
} else {
debug_check_frame_counts(cm);
}
} else {
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
"Decode failed. Frame data is corrupted.");
}
if (cm->refresh_frame_context)