Commit 5f885866 authored by fbarchard@google.com's avatar fbarchard@google.com

Box filter start from 0,0. Fixes crash that overreads horizontally.

BUG=185
TEST=scale_test
Review URL: https://webrtc-codereview.appspot.com/1094009

git-svn-id: http://libyuv.googlecode.com/svn/trunk@571 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent a00da62e
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 570
Version: 571
License: BSD
License File: LICENSE
......
......@@ -245,7 +245,7 @@ extern "C" {
#define HAS_ARGBCOLORMATRIXROW_NEON
#define HAS_ARGBGRAYROW_NEON
#define HAS_ARGBINTERPOLATEROW_NEON
//#define HAS_ARGBMULTIPLYROW_NEON
// #define HAS_ARGBMULTIPLYROW_NEON
#define HAS_ARGBQUANTIZEROW_NEON
#define HAS_ARGBSEPIAROW_NEON
#define HAS_ARGBSHADEROW_NEON
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 570
#define LIBYUV_VERSION 571
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -3008,8 +3008,10 @@ static void ScalePlaneBox(int src_width, int src_height,
assert(dst_height > 0);
int dx = (src_width << 16) / dst_width;
int dy = (src_height << 16) / dst_height;
int x = (dx >= 65536) ? ((dx >> 1) - 32768) : (dx >> 1);
int y = (dy >= 65536) ? ((dy >> 1) - 32768) : (dy >> 1);
// int x = (dx >= 65536) ? ((dx >> 1) - 32768) : (dx >> 1);
// int y = (dy >= 65536) ? ((dy >> 1) - 32768) : (dy >> 1);
int x = 0;
int y = 0;
int maxy = (src_height << 16);
if (!IS_ALIGNED(src_width, 16) || (src_width > kMaxInputWidth) ||
dst_height * 2 > src_height) {
......
......@@ -304,8 +304,7 @@ TEST_F(libyuvTest, ScaleDownBy8_Bilinear) {
EXPECT_LE(max_diff, 1);
}
// TODO(fbarchard): Fix bug. Re-enable.
TEST_F(libyuvTest, DISABLED_ScaleDownBy8_Box) {
TEST_F(libyuvTest, ScaleDownBy8_Box) {
const int src_width = benchmark_width_;
const int src_height = benchmark_height_;
const int dst_width = src_width / 8;
......@@ -344,7 +343,7 @@ TEST_F(libyuvTest, ScaleDownBy16_Bilinear) {
EXPECT_LE(max_diff, 1);
}
TEST_F(libyuvTest, DISABLED_ScaleDownBy16_Box) {
TEST_F(libyuvTest, ScaleDownBy16_Box) {
const int src_width = benchmark_width_;
const int src_height = benchmark_height_;
const int dst_width = src_width / 16;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment