summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2014-03-31 07:08:40 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-03-31 07:08:40 -0700
commit6618b73b5e0eac51df9997b6bc78b76c70fff2dc (patch)
tree2f33000556dc5731f4a21fb46ddf242ddfb0ce6b
parent8a099deb60d17d7dd7729398e2194e40c6b4ec45 (diff)
parent4f857bacd22ea4e95c0bd8a0de3da3dcd017eff3 (diff)
downloadlibvpx-6618b73b5e0eac51df9997b6bc78b76c70fff2dc.tar
libvpx-6618b73b5e0eac51df9997b6bc78b76c70fff2dc.tar.gz
libvpx-6618b73b5e0eac51df9997b6bc78b76c70fff2dc.tar.bz2
libvpx-6618b73b5e0eac51df9997b6bc78b76c70fff2dc.zip
Merge "[BITSTREAM]Fix the scaling calculation"
-rw-r--r--test/test-data.sha12
-rw-r--r--test/test.mk2
-rw-r--r--test/test_vectors.cc2
-rw-r--r--vp9/common/vp9_scale.c4
4 files changed, 7 insertions, 3 deletions
diff --git a/test/test-data.sha1 b/test/test-data.sha1
index 1a6406b59..b8f668a78 100644
--- a/test/test-data.sha1
+++ b/test/test-data.sha1
@@ -589,3 +589,5 @@ b3c48382cf7d0454e83a02497c229d27720f9e20 vp90-2-11-size-351x287.webm.md5
92a756469fa438220524e7fa6ac1d38c89514d17 vp90-2-12-droppable_2.ivf.md5
c21e97e4ba486520118d78b01a5cb6e6dc33e190 vp90-2-12-droppable_3.ivf
601abc9e4176c70f82ac0381365e9b151fdd24cd vp90-2-12-droppable_3.ivf.md5
+61c640dad23cd4f7ad811b867e7b7e3521f4e3ba vp90-2-13-largescaling.webm
+bca1b02eebdb088fa3f389fe0e7571e75a71f523 vp90-2-13-largescaling.webm.md5
diff --git a/test/test.mk b/test/test.mk
index 31baf059c..4d96bc69d 100644
--- a/test/test.mk
+++ b/test/test.mk
@@ -694,6 +694,8 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_2.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_2.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_3.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_3.ivf.md5
+LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-13-largescaling.webm
+LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-13-largescaling.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm.md5
diff --git a/test/test_vectors.cc b/test/test_vectors.cc
index 175151eaf..8c789ffe7 100644
--- a/test/test_vectors.cc
+++ b/test/test_vectors.cc
@@ -164,7 +164,7 @@ const char *const kVP9TestVectors[] = {
"vp90-2-11-size-351x287.webm", "vp90-2-11-size-351x288.webm",
"vp90-2-11-size-352x287.webm", "vp90-2-12-droppable_1.ivf",
"vp90-2-12-droppable_2.ivf", "vp90-2-12-droppable_3.ivf",
- "vp91-2-04-yv444.webm"
+ "vp90-2-13-largescaling.webm", "vp91-2-04-yv444.webm"
};
const int kNumVP9TestVectors = NELEMENTS(kVP9TestVectors);
#endif // CONFIG_VP9_DECODER
diff --git a/vp9/common/vp9_scale.c b/vp9/common/vp9_scale.c
index e0f1e3410..d3405fcdb 100644
--- a/vp9/common/vp9_scale.c
+++ b/vp9/common/vp9_scale.c
@@ -13,11 +13,11 @@
#include "vp9/common/vp9_scale.h"
static INLINE int scaled_x(int val, const struct scale_factors *sf) {
- return val * sf->x_scale_fp >> REF_SCALE_SHIFT;
+ return (int)((int64_t)val * sf->x_scale_fp >> REF_SCALE_SHIFT);
}
static INLINE int scaled_y(int val, const struct scale_factors *sf) {
- return val * sf->y_scale_fp >> REF_SCALE_SHIFT;
+ return (int)((int64_t)val * sf->y_scale_fp >> REF_SCALE_SHIFT);
}
static int unscaled_value(int val, const struct scale_factors *sf) {