summaryrefslogtreecommitdiff
path: root/vp9/decoder
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2016-01-04 18:24:18 -0800
committerYaowu Xu <yaowu@google.com>2016-01-05 14:55:05 -0800
commit2bd4f444092bf1902a1caca66e14e8e75189191d (patch)
treefa4e3ff63716a937f474ecbf7e511d6be0bc909e /vp9/decoder
parentce6d3f1de4cf64879d15ebd4a00d59f31d046ccc (diff)
downloadlibvpx-2bd4f444092bf1902a1caca66e14e8e75189191d.tar
libvpx-2bd4f444092bf1902a1caca66e14e8e75189191d.tar.gz
libvpx-2bd4f444092bf1902a1caca66e14e8e75189191d.tar.bz2
libvpx-2bd4f444092bf1902a1caca66e14e8e75189191d.zip
Assert no mv clamping for scaled references
Under --enable-better-hw-compabibility, this commit adds the asserts that no mv clamping is applied for scaled references, so when built with this configure option, decoder will assert if an input bitstream triggger mv clamping for scaled reference frames. Change-Id: I786e86a2bbbfb5bc2d2b706a31b0ffa8fe2eb0cb
Diffstat (limited to 'vp9/decoder')
-rw-r--r--vp9/decoder/vp9_decodeframe.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index 39e4dcfe3..3fd87cc3a 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -587,7 +587,12 @@ static void dec_build_inter_predictors(VP9Decoder *const pbi, MACROBLOCKD *xd,
// Co-ordinate of containing block to pixel precision.
int x_start = (-xd->mb_to_left_edge >> (3 + pd->subsampling_x));
int y_start = (-xd->mb_to_top_edge >> (3 + pd->subsampling_y));
-
+#if CONFIG_BETTER_HW_COMPATIBILITY
+ assert(xd->mi[0]->mbmi.sb_type != BLOCK_4X8 &&
+ xd->mi[0]->mbmi.sb_type != BLOCK_8X4);
+ assert(mv_q4.row == mv->row * (1 << (1 - pd->subsampling_y)) &&
+ mv_q4.col == mv->col * (1 << (1 - pd->subsampling_x)));
+#endif
// Co-ordinate of the block to 1/16th pixel precision.
x0_16 = (x_start + x) << SUBPEL_BITS;
y0_16 = (y_start + y) << SUBPEL_BITS;