From 3e38762d6b03a9b8fb3ee2ab1a23143a8199bf0f Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Wed, 7 Oct 2015 11:02:33 -0700 Subject: [PATCH] fix avx2 box filter bug for yuv down sampling. offset to second group of pixels was off by 16. should have been 32, not 16. requires avx2 hardware and wide image for test. R=harryjin@google.com TBR=harryjin@google.com BUG=libyuv:492,libyuv:501 Review URL: https://codereview.chromium.org/1395603002 . --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/scale_gcc.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.chromium b/README.chromium index 837bfe389..f47a21fcb 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1502 +Version: 1503 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 81394a574..403d9c968 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 1502 +#define LIBYUV_VERSION 1503 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/scale_gcc.cc b/source/scale_gcc.cc index 86d030972..f0509a069 100644 --- a/source/scale_gcc.cc +++ b/source/scale_gcc.cc @@ -619,9 +619,9 @@ void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width) { "vpunpcklbw %%ymm5,%%ymm3,%%ymm2 \n" "vpunpckhbw %%ymm5,%%ymm3,%%ymm3 \n" "vpaddusw " MEMACCESS(1) ",%%ymm2,%%ymm0 \n" - "vpaddusw " MEMACCESS2(0x10,1) ",%%ymm3,%%ymm1 \n" + "vpaddusw " MEMACCESS2(0x20,1) ",%%ymm3,%%ymm1 \n" "vmovdqu %%ymm0," MEMACCESS(1) " \n" - "vmovdqu %%ymm1," MEMACCESS2(0x10,1) " \n" + "vmovdqu %%ymm1," MEMACCESS2(0x20,1) " \n" "lea " MEMLEA(0x40,1) ",%1 \n" "sub $0x20,%2 \n" "jg 1b \n"