Commit d985cf1f authored by fbarchard@google.com's avatar fbarchard@google.com

clamp maxy for first row of bilinear

BUG=153
TEST=none
Review URL: https://webrtc-codereview.appspot.com/934014

git-svn-id: http://libyuv.googlecode.com/svn/trunk@490 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 752cb9e0
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 489
Version: 490
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 489
#define LIBYUV_VERSION 490
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -3115,6 +3115,9 @@ void ScalePlaneBilinear(int src_width, int src_height,
int x = (dx >= 65536) ? ((dx >> 1) - 32768) : (dx >> 1);
int y = (dy >= 65536) ? ((dy >> 1) - 32768) : (dy >> 1);
int maxy = (src_height > 1) ? ((src_height - 1) << 16) - 1 : 0;
if (y > maxy) {
y = maxy;
}
for (int j = 0; j < dst_height; ++j) {
int yi = y >> 16;
int yf = (y >> 8) & 255;
......
......@@ -30,7 +30,7 @@ static uint32 ReferenceHashDjb2(const uint8* src, uint64 count, uint32 seed) {
return hash;
}
TEST_F(libyuvTest, BenchmakDjb2_OPT) {
TEST_F(libyuvTest, BenchmakDjb2_Opt) {
const int kMaxTest = benchmark_width_ * benchmark_height_;
align_buffer_64(src_a, kMaxTest)
......@@ -46,7 +46,7 @@ TEST_F(libyuvTest, BenchmakDjb2_OPT) {
free_aligned_buffer_64(src_a)
}
TEST_F(libyuvTest, BenchmakDjb2_Unaligned_OPT) {
TEST_F(libyuvTest, BenchmakDjb2_Unaligned) {
const int kMaxTest = benchmark_width_ * benchmark_height_;
align_buffer_64(src_a, kMaxTest + 1)
for (int i = 0; i < kMaxTest; ++i) {
......@@ -61,7 +61,7 @@ TEST_F(libyuvTest, BenchmakDjb2_Unaligned_OPT) {
free_aligned_buffer_64(src_a)
}
TEST_F(libyuvTest, BenchmarkSumSquareError_OPT) {
TEST_F(libyuvTest, BenchmarkSumSquareError_Opt) {
const int kMaxWidth = 4096 * 3;
align_buffer_64(src_a, kMaxWidth)
align_buffer_64(src_b, kMaxWidth)
......@@ -134,7 +134,7 @@ TEST_F(libyuvTest, SumSquareError) {
free_aligned_buffer_64(src_b)
}
TEST_F(libyuvTest, BenchmarkPsnr_OPT) {
TEST_F(libyuvTest, BenchmarkPsnr_Opt) {
align_buffer_64(src_a, benchmark_width_ * benchmark_height_)
align_buffer_64(src_b, benchmark_width_ * benchmark_height_)
for (int i = 0; i < benchmark_width_ * benchmark_height_; ++i) {
......@@ -151,7 +151,7 @@ TEST_F(libyuvTest, BenchmarkPsnr_OPT) {
benchmark_width_, benchmark_height_);
opt_time = (get_time() - opt_time) / benchmark_iterations_;
printf("BenchmarkPsnr_OPT - %8.2f us opt\n", opt_time * 1e6);
printf("BenchmarkPsnr_Opt - %8.2f us opt\n", opt_time * 1e6);
EXPECT_EQ(0, 0);
......@@ -236,7 +236,7 @@ TEST_F(libyuvTest, Psnr) {
free_aligned_buffer_64(src_b)
}
TEST_F(libyuvTest, BenchmarkSsim_OPT) {
TEST_F(libyuvTest, BenchmarkSsim_Opt) {
align_buffer_64(src_a, benchmark_width_ * benchmark_height_)
align_buffer_64(src_b, benchmark_width_ * benchmark_height_)
for (int i = 0; i < benchmark_width_ * benchmark_height_; ++i) {
......@@ -253,7 +253,7 @@ TEST_F(libyuvTest, BenchmarkSsim_OPT) {
benchmark_width_, benchmark_height_);
opt_time = (get_time() - opt_time) / benchmark_iterations_;
printf("BenchmarkSsim_OPT - %8.2f us opt\n", opt_time * 1e6);
printf("BenchmarkSsim_Opt - %8.2f us opt\n", opt_time * 1e6);
EXPECT_EQ(0, 0); // Pass if we get this far.
......
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