mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 17:26:49 +08:00
HalfFloat_SSE2 use movd from memory
pshufd requires 16 byte aligned memory or a register. Use movd to a register to avoid a segfault if memory for float is misaligned Bug: libyuv:759 Test: 32 bit build of LibYUVPlanarTest.TestHalfFloatPlane_16bit_denormal Change-Id: I6fdcc4317453af5acd4700f9d46425bb2f4a205b Reviewed-on: https://chromium-review.googlesource.com/840459 Reviewed-by: Miguel Casas <mcasas@chromium.org> Reviewed-by: Frank Barchard <fbarchard@chromium.org> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
56eb5a4775
commit
c67db60534
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 1684
|
||||
Version: 1685
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 1684
|
||||
#define LIBYUV_VERSION 1685
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
@ -5910,7 +5910,8 @@ static float kScaleBias = 1.9259299444e-34f;
|
||||
void HalfFloatRow_SSE2(const uint16* src, uint16* dst, float scale, int width) {
|
||||
scale *= kScaleBias;
|
||||
asm volatile (
|
||||
"pshufd $0x0,%3,%%xmm4 \n"
|
||||
"movd %3,%%xmm4 \n"
|
||||
"pshufd $0x0,%%xmm4,%%xmm4 \n"
|
||||
"pxor %%xmm5,%%xmm5 \n"
|
||||
"sub %0,%1 \n"
|
||||
|
||||
@ -5935,11 +5936,7 @@ void HalfFloatRow_SSE2(const uint16* src, uint16* dst, float scale, int width) {
|
||||
: "+r"(src), // %0
|
||||
"+r"(dst), // %1
|
||||
"+r"(width) // %2
|
||||
#if defined(__x86_64__)
|
||||
: "x"(scale) // %3
|
||||
#else
|
||||
: "m"(scale) // %3
|
||||
#endif
|
||||
: "memory", "cc",
|
||||
"xmm2", "xmm3", "xmm4", "xmm5"
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user