diff --git a/README.chromium b/README.chromium index b6bec7381..85372c79d 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 260 +Version: 261 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index c91a698aa..07f36c327 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,7 +11,7 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 260 +#define LIBYUV_VERSION 261 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/scale_argb.cc b/source/scale_argb.cc index 7db8cf0a0..a7c1fe383 100644 --- a/source/scale_argb.cc +++ b/source/scale_argb.cc @@ -543,7 +543,7 @@ static void ScaleARGBFilterRows_C(uint8* dst_ptr, int y1_fraction = source_y_fraction; int y0_fraction = 256 - y1_fraction; const uint8* src_ptr1 = src_ptr + src_stride; - uint8* end = dst_ptr + dst_width; + uint8* end = dst_ptr + (dst_width << 2); do { dst_ptr[0] = (src_ptr[0] * y0_fraction + src_ptr1[0] * y1_fraction) >> 8; dst_ptr[1] = (src_ptr[1] * y0_fraction + src_ptr1[1] * y1_fraction) >> 8; @@ -557,7 +557,11 @@ static void ScaleARGBFilterRows_C(uint8* dst_ptr, src_ptr1 += 8; dst_ptr += 8; } while (dst_ptr < end); - dst_ptr[0] = dst_ptr[-1]; + // Duplicate the last pixel (4 bytes) for filtering. + dst_ptr[0] = dst_ptr[-4]; + dst_ptr[1] = dst_ptr[-3]; + dst_ptr[2] = dst_ptr[-2]; + dst_ptr[3] = dst_ptr[-1]; } /** diff --git a/unit_test/scale_argb_test.cc b/unit_test/scale_argb_test.cc index 80edc3b6d..489d91323 100644 --- a/unit_test/scale_argb_test.cc +++ b/unit_test/scale_argb_test.cc @@ -102,7 +102,7 @@ TEST_F(libyuvTest, ARGBScaleDownBy2) { const int dst_height = src_height / 2; int err = 0; - for (int f = 0; f < 1; ++f) { + for (int f = 0; f < 2; ++f) { err += ARGBTestFilter(src_width, src_height, dst_width, dst_height, static_cast(f)); @@ -119,7 +119,7 @@ TEST_F(libyuvTest, ARGBScaleDownBy4) { const int dst_height = src_height / 4; int err = 0; - for (int f = 0; f < 1; ++f) { + for (int f = 0; f < 2; ++f) { err += ARGBTestFilter(src_width, src_height, dst_width, dst_height, static_cast(f)); @@ -136,7 +136,7 @@ TEST_F(libyuvTest, ARGBScaleDownBy34) { const int dst_height = src_height * 3 / 4; int err = 0; - for (int f = 0; f < 1; ++f) { + for (int f = 0; f < 2; ++f) { err += ARGBTestFilter(src_width, src_height, dst_width, dst_height, static_cast(f)); @@ -152,7 +152,7 @@ TEST_F(libyuvTest, ARGBScaleDownBy38) { int dst_height = src_height * 3 / 8; int err = 0; - for (int f = 0; f < 1; ++f) { + for (int f = 0; f < 2; ++f) { err += ARGBTestFilter(src_width, src_height, dst_width, dst_height, static_cast(f)); @@ -168,7 +168,7 @@ TEST_F(libyuvTest, ARGBScalePlaneBilinear) { int dst_height = 768; int err = 0; - for (int f = 0; f < 1; ++f) { + for (int f = 0; f < 2; ++f) { err += ARGBTestFilter(src_width, src_height, dst_width, dst_height, static_cast(f));