mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Neon constants need address of not value
BUG=19 TEST=none Review URL: https://webrtc-codereview.appspot.com/510002 git-svn-id: http://libyuv.googlecode.com/svn/trunk@246 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
4660679ff3
commit
5e642d0ea7
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 245
|
Version: 246
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 245
|
#define LIBYUV_VERSION 246
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ extern "C" {
|
|||||||
|
|
||||||
#if !defined(YUV_DISABLE_ASM) && defined(__ARM_NEON__)
|
#if !defined(YUV_DISABLE_ASM) && defined(__ARM_NEON__)
|
||||||
|
|
||||||
static const uvec8 vtbl_4x4_transpose =
|
static const uvec8 kVTbl4x4Transpose =
|
||||||
{ 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15 };
|
{ 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15 };
|
||||||
|
|
||||||
void TransposeWx8_NEON(const uint8* src, int src_stride,
|
void TransposeWx8_NEON(const uint8* src, int src_stride,
|
||||||
@ -179,12 +179,12 @@ void TransposeWx8_NEON(const uint8* src, int src_stride,
|
|||||||
"+r"(dst), // %2
|
"+r"(dst), // %2
|
||||||
"+r"(dst_stride), // %3
|
"+r"(dst_stride), // %3
|
||||||
"+r"(width) // %4
|
"+r"(width) // %4
|
||||||
: "r"(vtbl_4x4_transpose) // %5
|
: "r"(&kVTbl4x4Transpose) // %5
|
||||||
: "memory", "cc", "r9", "q0", "q1", "q2", "q3"
|
: "memory", "cc", "r9", "q0", "q1", "q2", "q3"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const uvec8 vtbl_4x4_transpose_di =
|
static const uvec8 kVTbl4x4TransposeDi =
|
||||||
{ 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 };
|
{ 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 };
|
||||||
|
|
||||||
void TransposeUVWx8_NEON(const uint8* src, int src_stride,
|
void TransposeUVWx8_NEON(const uint8* src, int src_stride,
|
||||||
@ -391,7 +391,7 @@ void TransposeUVWx8_NEON(const uint8* src, int src_stride,
|
|||||||
"+r"(dst_b), // %4
|
"+r"(dst_b), // %4
|
||||||
"+r"(dst_stride_b), // %5
|
"+r"(dst_stride_b), // %5
|
||||||
"+r"(width) // %6
|
"+r"(width) // %6
|
||||||
: "r"(vtbl_4x4_transpose_di)// %7
|
: "r"(&kVTbl4x4TransposeDi) // %7
|
||||||
: "memory", "cc", "r9",
|
: "memory", "cc", "r9",
|
||||||
"q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11"
|
"q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11"
|
||||||
);
|
);
|
||||||
|
|||||||
@ -79,8 +79,8 @@ YUVTORGB
|
|||||||
"+r"(v_buf), // %2
|
"+r"(v_buf), // %2
|
||||||
"+r"(rgb_buf), // %3
|
"+r"(rgb_buf), // %3
|
||||||
"+r"(width) // %4
|
"+r"(width) // %4
|
||||||
: "r"(kUVToRB), // %5
|
: "r"(&kUVToRB), // %5
|
||||||
"r"(kUVToG) // %6
|
"r"(&kUVToG) // %6
|
||||||
: "cc", "memory", "q0", "q1", "q2", "q3", "q8", "q9",
|
: "cc", "memory", "q0", "q1", "q2", "q3", "q8", "q9",
|
||||||
"q10", "q11", "q12", "q13", "q14", "q15"
|
"q10", "q11", "q12", "q13", "q14", "q15"
|
||||||
);
|
);
|
||||||
@ -112,8 +112,8 @@ YUVTORGB
|
|||||||
"+r"(v_buf), // %2
|
"+r"(v_buf), // %2
|
||||||
"+r"(rgb_buf), // %3
|
"+r"(rgb_buf), // %3
|
||||||
"+r"(width) // %4
|
"+r"(width) // %4
|
||||||
: "r"(kUVToRB), // %5
|
: "r"(&kUVToRB), // %5
|
||||||
"r"(kUVToG) // %6
|
"r"(&kUVToG) // %6
|
||||||
: "cc", "memory", "q0", "q1", "q2", "q3", "q8", "q9",
|
: "cc", "memory", "q0", "q1", "q2", "q3", "q8", "q9",
|
||||||
"q10", "q11", "q12", "q13", "q14", "q15"
|
"q10", "q11", "q12", "q13", "q14", "q15"
|
||||||
);
|
);
|
||||||
@ -145,8 +145,8 @@ YUVTORGB
|
|||||||
"+r"(v_buf), // %2
|
"+r"(v_buf), // %2
|
||||||
"+r"(rgb_buf), // %3
|
"+r"(rgb_buf), // %3
|
||||||
"+r"(width) // %4
|
"+r"(width) // %4
|
||||||
: "r"(kUVToRB), // %5
|
: "r"(&kUVToRB), // %5
|
||||||
"r"(kUVToG) // %6
|
"r"(&kUVToG) // %6
|
||||||
: "cc", "memory", "q0", "q1", "q2", "q3", "q8", "q9",
|
: "cc", "memory", "q0", "q1", "q2", "q3", "q8", "q9",
|
||||||
"q10", "q11", "q12", "q13", "q14", "q15"
|
"q10", "q11", "q12", "q13", "q14", "q15"
|
||||||
);
|
);
|
||||||
|
|||||||
@ -269,14 +269,14 @@ static void ScaleRowDown34_1_Int_NEON(const uint8* src_ptr, int src_stride,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define HAS_SCALEROWDOWN38_NEON
|
#define HAS_SCALEROWDOWN38_NEON
|
||||||
const uvec8 shuf38 =
|
const uvec8 kShuf38 =
|
||||||
{ 0, 3, 6, 8, 11, 14, 16, 19, 22, 24, 27, 30, 0, 0, 0, 0 };
|
{ 0, 3, 6, 8, 11, 14, 16, 19, 22, 24, 27, 30, 0, 0, 0, 0 };
|
||||||
const uvec8 shuf38_2 =
|
const uvec8 kShuf38_2 =
|
||||||
{ 0, 8, 16, 2, 10, 17, 4, 12, 18, 6, 14, 19, 0, 0, 0, 0 };
|
{ 0, 8, 16, 2, 10, 17, 4, 12, 18, 6, 14, 19, 0, 0, 0, 0 };
|
||||||
const vec16 mult38_div6 =
|
const vec16 kMult38_Div6 =
|
||||||
{ 65536 / 12, 65536 / 12, 65536 / 12, 65536 / 12,
|
{ 65536 / 12, 65536 / 12, 65536 / 12, 65536 / 12,
|
||||||
65536 / 12, 65536 / 12, 65536 / 12, 65536 / 12 };
|
65536 / 12, 65536 / 12, 65536 / 12, 65536 / 12 };
|
||||||
const vec16 mult38_div9 =
|
const vec16 kMult38_Div9 =
|
||||||
{ 65536 / 18, 65536 / 18, 65536 / 18, 65536 / 18,
|
{ 65536 / 18, 65536 / 18, 65536 / 18, 65536 / 18,
|
||||||
65536 / 18, 65536 / 18, 65536 / 18, 65536 / 18 };
|
65536 / 18, 65536 / 18, 65536 / 18, 65536 / 18 };
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ static void ScaleRowDown38_NEON(const uint8* src_ptr, int,
|
|||||||
: "+r"(src_ptr), // %0
|
: "+r"(src_ptr), // %0
|
||||||
"+r"(dst_ptr), // %1
|
"+r"(dst_ptr), // %1
|
||||||
"+r"(dst_width) // %2
|
"+r"(dst_width) // %2
|
||||||
: "r"(shuf38) // %3
|
: "r"(&kShuf38) // %3
|
||||||
: "d0", "d1", "d2", "d3", "d4", "d5", "memory", "cc"
|
: "d0", "d1", "d2", "d3", "d4", "d5", "memory", "cc"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -402,9 +402,9 @@ static void ScaleRowDown38_3_Int_NEON(const uint8* src_ptr, int src_stride,
|
|||||||
"+r"(dst_ptr), // %1
|
"+r"(dst_ptr), // %1
|
||||||
"+r"(dst_width), // %2
|
"+r"(dst_width), // %2
|
||||||
"+r"(src_stride) // %3
|
"+r"(src_stride) // %3
|
||||||
: "r"(mult38_div6), // %4
|
: "r"(&kMult38_Div6), // %4
|
||||||
"r"(shuf38_2), // %5
|
"r"(&kShuf38_2), // %5
|
||||||
"r"(mult38_div9) // %6
|
"r"(&kMult38_Div9) // %6
|
||||||
: "r4", "q0", "q1", "q2", "q3", "q8", "q9",
|
: "r4", "q0", "q1", "q2", "q3", "q8", "q9",
|
||||||
"q13", "q14", "q15", "memory", "cc"
|
"q13", "q14", "q15", "memory", "cc"
|
||||||
);
|
);
|
||||||
@ -497,8 +497,8 @@ static void ScaleRowDown38_2_Int_NEON(const uint8* src_ptr, int src_stride,
|
|||||||
"+r"(dst_ptr), // %1
|
"+r"(dst_ptr), // %1
|
||||||
"+r"(dst_width), // %2
|
"+r"(dst_width), // %2
|
||||||
"+r"(src_stride) // %3
|
"+r"(src_stride) // %3
|
||||||
: "r"(mult38_div6), // %4
|
: "r"(kMult38_Div6), // %4
|
||||||
"r"(shuf38_2) // %5
|
"r"(kShuf38_2) // %5
|
||||||
: "q0", "q1", "q2", "q3", "q13", "q14", "memory", "cc"
|
: "q0", "q1", "q2", "q3", "q13", "q14", "memory", "cc"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -636,10 +636,10 @@ extern "C" TALIGN16(const uint8, madd21[16]) =
|
|||||||
extern "C" TALIGN16(const int16, round34[8]) =
|
extern "C" TALIGN16(const int16, round34[8]) =
|
||||||
{ 2, 2, 2, 2, 2, 2, 2, 2 };
|
{ 2, 2, 2, 2, 2, 2, 2, 2 };
|
||||||
|
|
||||||
extern "C" TALIGN16(const uint8, shuf38a[16]) =
|
extern "C" TALIGN16(const uint8, kShuf38a[16]) =
|
||||||
{ 0, 3, 6, 8, 11, 14, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 };
|
{ 0, 3, 6, 8, 11, 14, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 };
|
||||||
|
|
||||||
extern "C" TALIGN16(const uint8, shuf38b[16]) =
|
extern "C" TALIGN16(const uint8, kShuf38b[16]) =
|
||||||
{ 128, 128, 128, 128, 128, 128, 0, 3, 6, 8, 11, 14, 128, 128, 128, 128 };
|
{ 128, 128, 128, 128, 128, 128, 0, 3, 6, 8, 11, 14, 128, 128, 128, 128 };
|
||||||
|
|
||||||
// Arrange words 0,3,6 into 0,1,2
|
// Arrange words 0,3,6 into 0,1,2
|
||||||
@ -1131,8 +1131,8 @@ static void ScaleRowDown38_SSSE3(const uint8* src_ptr, int src_stride,
|
|||||||
// src_stride ignored
|
// src_stride ignored
|
||||||
mov edx, [esp + 12] // dst_ptr
|
mov edx, [esp + 12] // dst_ptr
|
||||||
mov ecx, [esp + 16] // dst_width
|
mov ecx, [esp + 16] // dst_width
|
||||||
movdqa xmm4, _shuf38a
|
movdqa xmm4, _kShuf38a
|
||||||
movdqa xmm5, _shuf38b
|
movdqa xmm5, _kShuf38b
|
||||||
|
|
||||||
align 16
|
align 16
|
||||||
xloop:
|
xloop:
|
||||||
@ -1983,8 +1983,8 @@ extern "C" void ScaleRowDown38_SSSE3(const uint8* src_ptr, int src_stride,
|
|||||||
"mov 0x28(%esp),%edx \n"
|
"mov 0x28(%esp),%edx \n"
|
||||||
"mov 0x2c(%esp),%edi \n"
|
"mov 0x2c(%esp),%edi \n"
|
||||||
"mov 0x30(%esp),%ecx \n"
|
"mov 0x30(%esp),%ecx \n"
|
||||||
"movdqa _shuf38a ,%xmm4 \n"
|
"movdqa _kShuf38a ,%xmm4 \n"
|
||||||
"movdqa _shuf38b ,%xmm5 \n"
|
"movdqa _kShuf38b ,%xmm5 \n"
|
||||||
|
|
||||||
"1:"
|
"1:"
|
||||||
"movdqa (%esi),%xmm0 \n"
|
"movdqa (%esi),%xmm0 \n"
|
||||||
@ -2491,8 +2491,8 @@ static void ScaleRowDown38_SSSE3(const uint8* src_ptr, int src_stride,
|
|||||||
: "+r"(src_ptr), // %0
|
: "+r"(src_ptr), // %0
|
||||||
"+r"(dst_ptr), // %1
|
"+r"(dst_ptr), // %1
|
||||||
"+r"(dst_width) // %2
|
"+r"(dst_width) // %2
|
||||||
: "r"(_shuf38a), // %3
|
: "r"(_kShuf38a), // %3
|
||||||
"r"(_shuf38b) // %4
|
"r"(_kShuf38b) // %4
|
||||||
: "memory", "cc"
|
: "memory", "cc"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user