diff --git a/README.chromium b/README.chromium index 66d3ab3b3..3d87f9a51 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 666 +Version: 667 License File: LICENSE Description: diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 1ea91cb53..c91174421 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 666 +#define LIBYUV_VERSION 667 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/row_common.cc b/source/row_common.cc index c0ec0e3f4..e336d6557 100644 --- a/source/row_common.cc +++ b/source/row_common.cc @@ -737,14 +737,14 @@ void ARGBMultiplyRow_C(const uint8* src_argb0, const uint8* src_argb1, void ARGBAddRow_C(const uint8* src_argb0, const uint8* src_argb1, uint8* dst_argb, int width) { for (int i = 0; i < width; ++i) { - const uint32 b = src_argb0[0]; - const uint32 g = src_argb0[1]; - const uint32 r = src_argb0[2]; - const uint32 a = src_argb0[3]; - const uint32 b_add = src_argb1[0]; - const uint32 g_add = src_argb1[1]; - const uint32 r_add = src_argb1[2]; - const uint32 a_add = src_argb1[3]; + const int b = src_argb0[0]; + const int g = src_argb0[1]; + const int r = src_argb0[2]; + const int a = src_argb0[3]; + const int b_add = src_argb1[0]; + const int g_add = src_argb1[1]; + const int r_add = src_argb1[2]; + const int a_add = src_argb1[3]; dst_argb[0] = SHADE(b, b_add); dst_argb[1] = SHADE(g, g_add); dst_argb[2] = SHADE(r, r_add); @@ -756,19 +756,19 @@ void ARGBAddRow_C(const uint8* src_argb0, const uint8* src_argb1, } #undef SHADE -#define SHADE(f, v) ((f - v) > f) ? 0 : (f - v) +#define SHADE(f, v) ((f - v) < 0) ? 0 : (f - v) void ARGBSubtractRow_C(const uint8* src_argb0, const uint8* src_argb1, uint8* dst_argb, int width) { for (int i = 0; i < width; ++i) { - const uint32 b = src_argb0[0]; - const uint32 g = src_argb0[1]; - const uint32 r = src_argb0[2]; - const uint32 a = src_argb0[3]; - const uint32 b_sub = src_argb1[0]; - const uint32 g_sub = src_argb1[1]; - const uint32 r_sub = src_argb1[2]; - const uint32 a_sub = src_argb1[3]; + const int b = src_argb0[0]; + const int g = src_argb0[1]; + const int r = src_argb0[2]; + const int a = src_argb0[3]; + const int b_sub = src_argb1[0]; + const int g_sub = src_argb1[1]; + const int r_sub = src_argb1[2]; + const int a_sub = src_argb1[3]; dst_argb[0] = SHADE(b, b_sub); dst_argb[1] = SHADE(g, g_sub); dst_argb[2] = SHADE(r, r_sub); diff --git a/source/row_win.cc b/source/row_win.cc index 6f71c942a..3e3c2666d 100644 --- a/source/row_win.cc +++ b/source/row_win.cc @@ -5350,9 +5350,9 @@ void ARGBMultiplyRow_AVX2(const uint8* src_argb0, const uint8* src_argb1, vpmulhuw ymm0, ymm0, ymm2 // src_argb0 * src_argb1 low 4 vpmulhuw ymm1, ymm1, ymm3 // src_argb0 * src_argb1 high 4 vpackuswb ymm0, ymm0, ymm1 - sub ecx, 8 vmovdqu [eax + edx], ymm0 lea eax, [eax + 32] + sub ecx, 8 jg convertloop pop esi @@ -5381,9 +5381,9 @@ void ARGBAddRow_AVX2(const uint8* src_argb0, const uint8* src_argb1, convertloop: vmovdqu ymm0, [eax] // read 8 pixels from src_argb0 vpaddusb ymm0, ymm0, [eax + esi] // add 8 pixels from src_argb1 - sub ecx, 8 vmovdqu [eax + edx], ymm0 lea eax, [eax + 32] + sub ecx, 8 jg convertloop pop esi @@ -5411,9 +5411,9 @@ void ARGBSubtractRow_AVX2(const uint8* src_argb0, const uint8* src_argb1, convertloop: vmovdqu ymm0, [eax] // read 8 pixels from src_argb0 vpsubusb ymm0, ymm0, [eax + esi] // src_argb0 - src_argb1 - sub ecx, 8 vmovdqu [eax + edx], ymm0 lea eax, [eax + 32] + sub ecx, 8 jg convertloop pop esi