[x265-commits] [x265] linux: fix pixelharness on linux which has full-range rand()
Steve Borho
steve at borho.org
Thu Nov 7 23:44:06 CET 2013
details: http://hg.videolan.org/x265/rev/1ea82d16d334
branches:
changeset: 4941:1ea82d16d334
user: Steve Borho <steve at borho.org>
date: Thu Nov 07 16:39:54 2013 -0600
description:
linux: fix pixelharness on linux which has full-range rand()
Subject: [x265] linux: disable sse_12x16 for GCC and clang
details: http://hg.videolan.org/x265/rev/fd0ebb4b4709
branches:
changeset: 4942:fd0ebb4b4709
user: Steve Borho <steve at borho.org>
date: Thu Nov 07 16:40:19 2013 -0600
description:
linux: disable sse_12x16 for GCC and clang
diffstat:
source/common/vec/pixel-sse41.cpp | 2 +-
source/test/pixelharness.cpp | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r 014e3303ad3d -r fd0ebb4b4709 source/common/vec/pixel-sse41.cpp
--- a/source/common/vec/pixel-sse41.cpp Thu Nov 07 15:53:39 2013 -0600
+++ b/source/common/vec/pixel-sse41.cpp Thu Nov 07 16:40:19 2013 -0600
@@ -974,7 +974,7 @@ void Setup_Vec_PixelPrimitives_sse41(Enc
SETUP_SSE(16, 4);
SETUP_SSE(16, 12);
SETUP_SSE(4, 16);
-#if !defined(__clang__)
+#if !defined(__clang__) && !defined(__GNUC__)
SETUP_SSE(12, 16);
#endif
diff -r 014e3303ad3d -r fd0ebb4b4709 source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp Thu Nov 07 15:53:39 2013 -0600
+++ b/source/test/pixelharness.cpp Thu Nov 07 16:40:19 2013 -0600
@@ -63,10 +63,10 @@ PixelHarness::PixelHarness()
pbuf3[i] = rand() & PIXEL_MAX;
pbuf4[i] = rand() & PIXEL_MAX;
- sbuf1[i] = (rand() & (2 * SHORT_MAX + 1)) - SHORT_MAX - 1; //max(SHORT_MIN, min(rand(), SHORT_MAX));
- sbuf2[i] = (rand() & (2 * SHORT_MAX + 1)) - SHORT_MAX - 1; //max(SHORT_MIN, min(rand(), SHORT_MAX));
-
- ibuf1[i] = (rand() & (2 * SHORT_MAX + 1)) - SHORT_MAX - 1;
+#define SMAX (1<<12)
+ sbuf1[i] = (rand() % (2 * SMAX + 1)) - SMAX - 1; //max(SHORT_MIN, min(rand(), SMAX));
+ sbuf2[i] = (rand() % (2 * SMAX + 1)) - SMAX - 1; //max(SHORT_MIN, min(rand(), SMAX));
+ ibuf1[i] = (rand() % (2 * SMAX + 1)) - SMAX - 1;
}
}
More information about the x265-commits
mailing list