From 63996ab7cac1d0f8a4db43698eb42f5f9877e2e2 Mon Sep 17 00:00:00 2001 From: "yang.zhang@arm.com" Date: Tue, 10 Feb 2015 06:04:12 +0000 Subject: [PATCH] Fix the bug (0 extension from int to int64) in ScaleARGBRowDownEven_NEON. Reason of this bug is that ARM64 can't extend the sign bit of a 32-bit integer to 64-bit integer automatically. ScaleARGBRowDownEven_NEON is also enabled for ARM64. BUG=319 TESTED=libyuv_unittest R=fbarchard@google.com Change-Id: Ib8d30a05156239247296aa8bb4faa94b4f69a9c3 Review URL: https://webrtc-codereview.appspot.com/32949004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1273 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- source/rotate_argb.cc | 2 +- source/scale_neon64.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rotate_argb.cc b/source/rotate_argb.cc index d86d0383b..b9673db15 100644 --- a/source/rotate_argb.cc +++ b/source/rotate_argb.cc @@ -31,7 +31,7 @@ void ScaleARGBRowDownEven_SSE2(const uint8* src_ptr, int src_stride, uint8* dst_ptr, int dst_width); #endif #if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON)) + (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) #define HAS_SCALEARGBROWDOWNEVEN_NEON void ScaleARGBRowDownEven_NEON(const uint8* src_ptr, int src_stride, int src_stepx, diff --git a/source/scale_neon64.cc b/source/scale_neon64.cc index 933abd461..fb68b67d2 100644 --- a/source/scale_neon64.cc +++ b/source/scale_neon64.cc @@ -701,7 +701,7 @@ void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride, : "+r"(src_argb), // %0 "+r"(dst_argb), // %1 "+r"(dst_width) // %2 - : "r"(src_stepx * 4) // %3 + : "r"(static_cast(src_stepx * 4)) // %3 : "memory", "cc", "v0" ); }