Commit 04f40278 authored by fbarchard@google.com's avatar fbarchard@google.com

yasm ALIGN uppercase

BUG=none
TEST=untested
R=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/4769005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@885 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 545a51c1
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 884 Version: 885
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
This diff is collapsed.
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 884 #define LIBYUV_VERSION 885
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
/* /*
* Copyright 2012 The LibYuv Project Authors. All rights reserved. * Copyright 2012 The LibYuv Project Authors. All rights reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found * tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "libyuv/basic_types.h" #include "libyuv/basic_types.h"
#ifdef __cplusplus #ifdef __cplusplus
namespace libyuv { namespace libyuv {
extern "C" { extern "C" {
#endif #endif
uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count) { uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count) {
uint32 sse = 0u; uint32 sse = 0u;
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
int diff = src_a[i] - src_b[i]; int diff = src_a[i] - src_b[i];
sse += static_cast<uint32>(diff * diff); sse += static_cast<uint32>(diff * diff);
} }
return sse; return sse;
} }
// hash seed of 5381 recommended. // hash seed of 5381 recommended.
// Internal C version of HashDjb2 with int sized count for efficiency. // Internal C version of HashDjb2 with int sized count for efficiency.
uint32 HashDjb2_C(const uint8* src, int count, uint32 seed) { uint32 HashDjb2_C(const uint8* src, int count, uint32 seed) {
uint32 hash = seed; uint32 hash = seed;
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
hash += (hash << 5) + src[i]; hash += (hash << 5) + src[i];
} }
return hash; return hash;
} }
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
} // namespace libyuv } // namespace libyuv
#endif #endif
/* /*
* Copyright 2012 The LibYuv Project Authors. All rights reserved. * Copyright 2012 The LibYuv Project Authors. All rights reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found * tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "libyuv/basic_types.h" #include "libyuv/basic_types.h"
#ifdef __cplusplus #ifdef __cplusplus
namespace libyuv { namespace libyuv {
extern "C" { extern "C" {
#endif #endif
#if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__) #if !defined(LIBYUV_DISABLE_NEON) && defined(__ARM_NEON__)
uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count) { uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count) {
volatile uint32 sse; volatile uint32 sse;
asm volatile ( asm volatile (
"vmov.u8 q8, #0 \n" "vmov.u8 q8, #0 \n"
"vmov.u8 q10, #0 \n" "vmov.u8 q10, #0 \n"
"vmov.u8 q9, #0 \n" "vmov.u8 q9, #0 \n"
"vmov.u8 q11, #0 \n" "vmov.u8 q11, #0 \n"
".p2align 2 \n" ".p2align 2 \n"
"1: \n" "1: \n"
"vld1.8 {q0}, [%0]! \n" "vld1.8 {q0}, [%0]! \n"
"vld1.8 {q1}, [%1]! \n" "vld1.8 {q1}, [%1]! \n"
"subs %2, %2, #16 \n" "subs %2, %2, #16 \n"
"vsubl.u8 q2, d0, d2 \n" "vsubl.u8 q2, d0, d2 \n"
"vsubl.u8 q3, d1, d3 \n" "vsubl.u8 q3, d1, d3 \n"
"vmlal.s16 q8, d4, d4 \n" "vmlal.s16 q8, d4, d4 \n"
"vmlal.s16 q9, d6, d6 \n" "vmlal.s16 q9, d6, d6 \n"
"vmlal.s16 q10, d5, d5 \n" "vmlal.s16 q10, d5, d5 \n"
"vmlal.s16 q11, d7, d7 \n" "vmlal.s16 q11, d7, d7 \n"
"bgt 1b \n" "bgt 1b \n"
"vadd.u32 q8, q8, q9 \n" "vadd.u32 q8, q8, q9 \n"
"vadd.u32 q10, q10, q11 \n" "vadd.u32 q10, q10, q11 \n"
"vadd.u32 q11, q8, q10 \n" "vadd.u32 q11, q8, q10 \n"
"vpaddl.u32 q1, q11 \n" "vpaddl.u32 q1, q11 \n"
"vadd.u64 d0, d2, d3 \n" "vadd.u64 d0, d2, d3 \n"
"vmov.32 %3, d0[0] \n" "vmov.32 %3, d0[0] \n"
: "+r"(src_a), : "+r"(src_a),
"+r"(src_b), "+r"(src_b),
"+r"(count), "+r"(count),
"=r"(sse) "=r"(sse)
: :
: "memory", "cc", "q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11"); : "memory", "cc", "q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11");
return sse; return sse;
} }
#endif // __ARM_NEON__ #endif // __ARM_NEON__
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
} // namespace libyuv } // namespace libyuv
#endif #endif
This diff is collapsed.
This diff is collapsed.
...@@ -49,17 +49,17 @@ int ARGBToI444(const uint8* src_argb, int src_stride_argb, ...@@ -49,17 +49,17 @@ int ARGBToI444(const uint8* src_argb, int src_stride_argb,
ARGBToYRow_C; ARGBToYRow_C;
void (*ARGBToUV444Row)(const uint8* src_argb, uint8* dst_u, uint8* dst_v, void (*ARGBToUV444Row)(const uint8* src_argb, uint8* dst_u, uint8* dst_v,
int pix) = ARGBToUV444Row_C; int pix) = ARGBToUV444Row_C;
#if defined(HAS_ARGBTOUV444ROW_SSSE3) #if defined(HAS_ARGBTOUV444ROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3) && width >= 16) { if (TestCpuFlag(kCpuHasSSSE3) && width >= 16) {
ARGBToUV444Row = ARGBToUV444Row_Any_SSSE3; ARGBToUV444Row = ARGBToUV444Row_Any_SSSE3;
if (IS_ALIGNED(width, 16)) { if (IS_ALIGNED(width, 16)) {
ARGBToUV444Row = ARGBToUV444Row_Unaligned_SSSE3; ARGBToUV444Row = ARGBToUV444Row_Unaligned_SSSE3;
if (IS_ALIGNED(src_argb, 16) && IS_ALIGNED(src_stride_argb, 16)) { if (IS_ALIGNED(src_argb, 16) && IS_ALIGNED(src_stride_argb, 16)) {
ARGBToUV444Row = ARGBToUV444Row_SSSE3; ARGBToUV444Row = ARGBToUV444Row_SSSE3;
} }
} }
} }
#endif #endif
#if defined(HAS_ARGBTOYROW_SSSE3) #if defined(HAS_ARGBTOYROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3) && width >= 16) { if (TestCpuFlag(kCpuHasSSSE3) && width >= 16) {
ARGBToYRow = ARGBToYRow_Any_SSSE3; ARGBToYRow = ARGBToYRow_Any_SSSE3;
......
...@@ -28,7 +28,7 @@ cglobal %1ToYRow%3, 3, 3, 3, src_yuy2, dst_y, pix ...@@ -28,7 +28,7 @@ cglobal %1ToYRow%3, 3, 3, 3, src_yuy2, dst_y, pix
psrlw m2, m2, 8 psrlw m2, m2, 8
%endif %endif
align 4 ALIGN 4
.convertloop: .convertloop:
mov%2 m0, [src_yuy2q] mov%2 m0, [src_yuy2q]
mov%2 m1, [src_yuy2q + mmsize] mov%2 m1, [src_yuy2q + mmsize]
...@@ -74,7 +74,7 @@ cglobal SplitUVRow%2, 4, 4, 5, src_uv, dst_u, dst_v, pix ...@@ -74,7 +74,7 @@ cglobal SplitUVRow%2, 4, 4, 5, src_uv, dst_u, dst_v, pix
psrlw m4, m4, 8 psrlw m4, m4, 8
sub dst_vq, dst_uq sub dst_vq, dst_uq
align 4 ALIGN 4
.convertloop: .convertloop:
mov%1 m0, [src_uvq] mov%1 m0, [src_uvq]
mov%1 m1, [src_uvq + mmsize] mov%1 m1, [src_uvq + mmsize]
...@@ -113,7 +113,7 @@ SplitUVRow a, ...@@ -113,7 +113,7 @@ SplitUVRow a,
cglobal MergeUVRow_%2, 4, 4, 3, src_u, src_v, dst_uv, pix cglobal MergeUVRow_%2, 4, 4, 3, src_u, src_v, dst_uv, pix
sub src_vq, src_uq sub src_vq, src_uq
align 4 ALIGN 4
.convertloop: .convertloop:
mov%1 m0, [src_uq] mov%1 m0, [src_uq]
mov%1 m1, [src_vq] mov%1 m1, [src_vq]
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment