summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2015-12-02 17:00:26 -0800
committerYaowu Xu <yaowu@google.com>2016-01-04 18:33:37 -0800
commit03a021a6fc22f15b3083d6fa4285dcd9a87fc9cf (patch)
treeef5f3b19b5f657e8d615ef1fabb34cf9bc1e879a /vp9
parente99e4a64e0ca6a00335a2d4171c2e71cc3064ca7 (diff)
downloadlibvpx-03a021a6fc22f15b3083d6fa4285dcd9a87fc9cf.tar
libvpx-03a021a6fc22f15b3083d6fa4285dcd9a87fc9cf.tar.gz
libvpx-03a021a6fc22f15b3083d6fa4285dcd9a87fc9cf.tar.bz2
libvpx-03a021a6fc22f15b3083d6fa4285dcd9a87fc9cf.zip
Assert no 8x4/4x8 partition for scaled references
This commit adds a new configure option: --enable-better-hw-compatibility The purpose of the configure option is to provide information on known hardware decoder implementation bugs, so encoder implementers may choose to implement their encoders in a way to avoid triggering these decoder bugs. The WebM team were made aware of that a number of hardware decoders have trouble in handling the combination of scaled frame reference frame and 8x4 or 4x8 partitions. This commit added asserts to vp9 decoder, so when built with above configure option, the decoder can assert if an input bitstream triggers such decoder bug. Change-Id: I386204cfa80ed16b50ebde57f886121ed76200bf
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_reconinter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c
index d8c14ecc8..3eb19b124 100644
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -187,6 +187,10 @@ static void build_inter_predictors(MACROBLOCKD *xd, int plane, int block,
const int is_scaled = vp9_is_scaled(sf);
if (is_scaled) {
+#if CONFIG_BETTER_HW_COMPATIBILITY
+ assert(xd->mi[0]->mbmi.sb_type != BLOCK_4X8 &&
+ xd->mi[0]->mbmi.sb_type != BLOCK_8X4);
+#endif
// Co-ordinate of containing block to pixel precision.
const int x_start = (-xd->mb_to_left_edge >> (3 + pd->subsampling_x));
const int y_start = (-xd->mb_to_top_edge >> (3 + pd->subsampling_y));