[x265] [PATCH 1 of 1] sse.inc: Created comman macro PROCESS_SSE_SS4x1 for functions sse_ss4, sse_ss8, sse_ss16, sse_ss24, sse_ss32, sse_ss48, sse_ss64
dnyaneshwar at multicorewareinc.com
dnyaneshwar at multicorewareinc.com
Wed Oct 9 14:55:42 CEST 2013
# HG changeset patch
# User Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
# Date 1381323196 -19800
# Wed Oct 09 18:23:16 2013 +0530
# Node ID ea905eb4f7a43370e60447cbca0eaf1a7046ec78
# Parent fc7fbdd18bc0d6d7f98180332e065d83c054fe02
sse.inc: Created comman macro PROCESS_SSE_SS4x1 for functions sse_ss4, sse_ss8, sse_ss16, sse_ss24, sse_ss32, sse_ss48, sse_ss64.
diff -r fc7fbdd18bc0 -r ea905eb4f7a4 source/common/vec/sse.inc
--- a/source/common/vec/sse.inc Wed Oct 09 00:00:10 2013 -0500
+++ b/source/common/vec/sse.inc Wed Oct 09 18:23:16 2013 +0530
@@ -26,6 +26,17 @@
// Vector class versions of pixel comparison performance primitives
+#define PROCESS_SSE_SS4x1(BASE)\
+ m1 = _mm_loadu_si128((__m128i const*)(fenc + BASE)); \
+ n1 = _mm_loadu_si128((__m128i const*)(fref + BASE)); \
+ sign1 = _mm_srai_epi16(m1, 15); \
+ tmp1 = _mm_unpacklo_epi16(m1, sign1); \
+ sign2 = _mm_srai_epi16(n1, 15); \
+ tmp2 = _mm_unpacklo_epi16(n1, sign2); \
+ diff = _mm_sub_epi32(tmp1, tmp2); \
+ diff = _mm_mullo_epi32(diff, diff); \
+ sum = _mm_add_epi32(sum, diff)
+
template<int ly>
int sse_pp4(pixel* fenc, intptr_t strideFenc, pixel* fref, intptr_t strideFref)
{
More information about the x265-devel
mailing list