From 6a352141ef2167c204a450cea179c65e4e34cb65 Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Mon, 1 Apr 2013 20:04:22 +0000 Subject: [PATCH] vrshrn by 8 for neon. vector rounding shift right with narrowing from u16 to u8. BUG=183 TEST=try bots Review URL: https://webrtc-codereview.appspot.com/1269007 git-svn-id: http://libyuv.googlecode.com/svn/trunk@628 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/row_neon.cc | 12 ++++-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.chromium b/README.chromium index d99d13d8d..b55847b32 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 627 +Version: 628 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 9554f3590..589ade927 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 627 +#define LIBYUV_VERSION 628 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/row_neon.cc b/source/row_neon.cc index a22908b26..ae2ba9be2 100644 --- a/source/row_neon.cc +++ b/source/row_neon.cc @@ -2491,14 +2491,10 @@ void ARGBMultiplyRow_NEON(const uint8* src_argb0, const uint8* src_argb1, "vmull.u8 q1, d2, d3 \n" // multiply G "vmull.u8 q2, d4, d5 \n" // multiply R "vmull.u8 q3, d6, d7 \n" // multiply A - "vrshr.u16 q0, q0, #8 \n" // low 8 bits B - "vrshr.u16 q1, q1, #8 \n" // low 8 bits G - "vrshr.u16 q2, q2, #8 \n" // low 8 bits R - "vrshr.u16 q3, q3, #8 \n" // low 8 bits A - "vmovn.u16 d0, q0 \n" // 16 bit to 8 bit B - "vmovn.u16 d1, q1 \n" // 16 bit to 8 bit G - "vmovn.u16 d2, q2 \n" // 16 bit to 8 bit R - "vmovn.u16 d3, q3 \n" // 16 bit to 8 bit A + "vrshrn.u16 d0, q0, #8 \n" // 16 bit to 8 bit B + "vrshrn.u16 d1, q1, #8 \n" // 16 bit to 8 bit G + "vrshrn.u16 d2, q2, #8 \n" // 16 bit to 8 bit R + "vrshrn.u16 d3, q3, #8 \n" // 16 bit to 8 bit A "vst4.8 {d0, d1, d2, d3}, [%2]! \n" // store 8 ARGB pixels. "bgt 1b \n"