summaryrefslogtreecommitdiffstats
path: root/media/libwebp/dsp/dec_sse41.c
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-03 14:02:24 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-03 14:02:24 +0100
commit1e1fb5ea2504e548bc17521bdb273c9e59b9cf01 (patch)
tree6bdc1701a04e4eefb2d0b985ca78f6c53cb845b5 /media/libwebp/dsp/dec_sse41.c
parentfcfa07318b5b25d0bb650aa820d99a8c5c14e61b (diff)
parent4662aad03a28a6fa049f2c34ab58069718a229fe (diff)
downloadUXP-1e1fb5ea2504e548bc17521bdb273c9e59b9cf01.tar
UXP-1e1fb5ea2504e548bc17521bdb273c9e59b9cf01.tar.gz
UXP-1e1fb5ea2504e548bc17521bdb273c9e59b9cf01.tar.lz
UXP-1e1fb5ea2504e548bc17521bdb273c9e59b9cf01.tar.xz
UXP-1e1fb5ea2504e548bc17521bdb273c9e59b9cf01.zip
Merge branch 'goanna-gfx'
Diffstat (limited to 'media/libwebp/dsp/dec_sse41.c')
-rw-r--r--media/libwebp/dsp/dec_sse41.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/media/libwebp/dsp/dec_sse41.c b/media/libwebp/dsp/dec_sse41.c
new file mode 100644
index 000000000..4e81ec4d8
--- /dev/null
+++ b/media/libwebp/dsp/dec_sse41.c
@@ -0,0 +1,46 @@
+// Copyright 2015 Google Inc. All Rights Reserved.
+//
+// Use of this source code is governed by a BSD-style license
+// that can be found in the COPYING file in the root of the source
+// tree. An additional intellectual property rights grant can be found
+// in the file PATENTS. All contributing project authors may
+// be found in the AUTHORS file in the root of the source tree.
+// -----------------------------------------------------------------------------
+//
+// SSE4 version of some decoding functions.
+//
+// Author: Skal (pascal.massimino@gmail.com)
+
+#include "./dsp.h"
+
+#if defined(WEBP_USE_SSE41)
+
+#include <smmintrin.h>
+#include "../dec/vp8i_dec.h"
+#include "../utils/utils.h"
+
+static void HE16(uint8_t* dst) { // horizontal
+ int j;
+ const __m128i kShuffle3 = _mm_set1_epi8(3);
+ for (j = 16; j > 0; --j) {
+ const __m128i in = _mm_cvtsi32_si128(WebPMemToUint32(dst - 4));
+ const __m128i values = _mm_shuffle_epi8(in, kShuffle3);
+ _mm_storeu_si128((__m128i*)dst, values);
+ dst += BPS;
+ }
+}
+
+//------------------------------------------------------------------------------
+// Entry point
+
+extern void VP8DspInitSSE41(void);
+
+WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitSSE41(void) {
+ VP8PredLuma16[3] = HE16;
+}
+
+#else // !WEBP_USE_SSE41
+
+WEBP_DSP_INIT_STUB(VP8DspInitSSE41)
+
+#endif // WEBP_USE_SSE41