Merge pull request #10304 from akallabeth/neon-sse-guard
Neon sse guard
This commit is contained in:
commit
a01639e3c4
@ -96,6 +96,36 @@ macro (freerdp_compile_options_add)
|
||||
set (LIBFREERDP_COMPILE_OPTIONS ${LIBFREERDP_COMPILE_OPTIONS} PARENT_SCOPE)
|
||||
endmacro()
|
||||
|
||||
set(OPUS_DEFAULT OFF)
|
||||
if (NOT WITH_DSP_FFMPEG)
|
||||
find_package(Opus)
|
||||
if (Opus_FOUND)
|
||||
set(OPUS_DEFAULT ${OPUS_FOUND})
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(OPUS opus)
|
||||
set(OPUS_DEFAULT ${OPUS_FOUND})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message("Using OPUS: ${OPUS_DEFAULT}")
|
||||
endif()
|
||||
|
||||
option(WITH_OPUS "compile with opus codec support" ${OPUS_DEFAULT})
|
||||
if (WITH_OPUS)
|
||||
find_package(Opus)
|
||||
if (Opus_FOUND)
|
||||
freerdp_library_add(${OPUS_LIBRARIES})
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(OPUS REQUIRED opus)
|
||||
freerdp_library_add(${OPUS_LIBRARIES})
|
||||
freerdp_include_directory_add(${OPUS_INCLUDE_DIRS})
|
||||
link_directories(${OPUS_LIBRARY_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WITH_SWSCALE)
|
||||
find_package(SWScale REQUIRED)
|
||||
endif(WITH_SWSCALE)
|
||||
|
@ -109,38 +109,6 @@ if(LAME_FOUND)
|
||||
include_directories(${LAME_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
set(OPUS_DEFAULT OFF)
|
||||
if (NOT WITH_DSP_FFMPEG)
|
||||
find_package(Opus)
|
||||
if (Opus_FOUND)
|
||||
set(OPUS_DEFAULT ${OPUS_FOUND})
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(OPUS opus)
|
||||
set(OPUS_DEFAULT ${OPUS_FOUND})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message("Using OPUS: ${OPUS_DEFAULT}")
|
||||
endif()
|
||||
|
||||
option(WITH_OPUS "compile with opus codec support" ${OPUS_DEFAULT})
|
||||
if (WITH_OPUS)
|
||||
find_package(Opus)
|
||||
if (Opus_FOUND)
|
||||
list(APPEND CODEC_LIBS ${OPUS_LIBRARIES})
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(OPUS REQUIRED opus)
|
||||
if(OPUS_FOUND)
|
||||
list(APPEND CODEC_LIBS ${OPUS_LIBRARIES})
|
||||
include_directories(${OPUS_INCLUDE_DIRS})
|
||||
link_directories(${OPUS_LIBRARY_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FAAD2_FOUND)
|
||||
list(APPEND CODEC_LIBS ${FAAD2_LIBRARIES})
|
||||
include_directories(${FAAD2_INCLUDE_DIRS})
|
||||
|
@ -18,6 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <winpr/platform.h>
|
||||
#include <winpr/sysinfo.h>
|
||||
#include <freerdp/config.h>
|
||||
#include <freerdp/log.h>
|
||||
@ -27,9 +28,15 @@
|
||||
|
||||
#define TAG FREERDP_TAG("codec.nsc.neon")
|
||||
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(_M_ARM64) || defined(_M_ARM)
|
||||
#define NEON_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void nsc_init_neon(NSC_CONTEXT* context)
|
||||
{
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(NEON_ENABLED)
|
||||
if (!IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE))
|
||||
return;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include <winpr/platform.h>
|
||||
#include <freerdp/config.h>
|
||||
#include <freerdp/log.h>
|
||||
|
||||
@ -26,6 +27,12 @@
|
||||
#define TAG FREERDP_TAG("codec.rfx.neon")
|
||||
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(_M_ARM64) || defined(_M_ARM)
|
||||
#define NEON_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(NEON_ENABLED)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -520,11 +527,11 @@ static void rfx_dwt_2d_extrapolate_decode_neon(INT16* buffer, INT16* temp)
|
||||
rfx_dwt_2d_decode_extrapolate_block_neon(&buffer[3007], temp, 2);
|
||||
rfx_dwt_2d_decode_extrapolate_block_neon(&buffer[0], temp, 1);
|
||||
}
|
||||
#endif // WITH_NEON
|
||||
#endif // NEON_ENABLED
|
||||
|
||||
void rfx_init_neon(RFX_CONTEXT* context)
|
||||
{
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(NEON_ENABLED)
|
||||
if (IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE))
|
||||
{
|
||||
DEBUG_RFX("Using NEON optimizations");
|
||||
|
@ -17,6 +17,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <winpr/platform.h>
|
||||
#include <freerdp/config.h>
|
||||
#include <freerdp/log.h>
|
||||
|
||||
@ -26,6 +27,12 @@
|
||||
#define TAG FREERDP_TAG("codec.nsc.sse2")
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64) || defined(_M_IX86_AMD64)
|
||||
#define SSE2_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -381,7 +388,7 @@ static BOOL nsc_encode_sse2(NSC_CONTEXT* context, const BYTE* data, UINT32 scanl
|
||||
|
||||
void nsc_init_sse2(NSC_CONTEXT* context)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
if (!IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE))
|
||||
return;
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <winpr/platform.h>
|
||||
#include <freerdp/config.h>
|
||||
#include <freerdp/log.h>
|
||||
|
||||
@ -27,6 +28,12 @@
|
||||
#define TAG FREERDP_TAG("codec.rfx.sse2")
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64) || defined(_M_IX86_AMD64)
|
||||
#define SSE2_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -485,7 +492,7 @@ static void rfx_dwt_2d_encode_sse2(INT16* WINPR_RESTRICT buffer, INT16* WINPR_RE
|
||||
|
||||
void rfx_init_sse2(RFX_CONTEXT* context)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
if (!IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE))
|
||||
return;
|
||||
|
||||
|
@ -23,15 +23,13 @@
|
||||
#include <freerdp/primitives.h>
|
||||
#include <winpr/sysinfo.h>
|
||||
|
||||
#if defined(WITH_NEON)
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
#include "prim_YCoCg.h"
|
||||
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(NEON_ENABLED)
|
||||
#include <arm_neon.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
static pstatus_t neon_YCoCgToRGB_8u_X(const BYTE* WINPR_RESTRICT pSrc, INT32 srcStep,
|
||||
@ -159,7 +157,7 @@ static pstatus_t neon_YCoCgToRGB_8u_AC4R(const BYTE* WINPR_RESTRICT pSrc, INT32
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_YCoCg_neon(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(NEON_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_YCoCg(prims);
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "prim_internal.h"
|
||||
#include "prim_YUV.h"
|
||||
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(NEON_ENABLED)
|
||||
#include <arm_neon.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
@ -744,7 +744,7 @@ static pstatus_t neon_YUV420CombineToYUV444(avc444_frame_type type,
|
||||
|
||||
void primitives_init_YUV_neon(primitives_t* prims)
|
||||
{
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(NEON_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_YUV(prims);
|
||||
|
||||
|
@ -23,16 +23,14 @@
|
||||
#include <freerdp/primitives.h>
|
||||
#include <winpr/sysinfo.h>
|
||||
|
||||
#if defined(WITH_NEON)
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
#include "prim_colors.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifdef WITH_NEON
|
||||
#if defined(NEON_ENABLED)
|
||||
#include <arm_neon.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
static pstatus_t
|
||||
@ -344,12 +342,12 @@ neon_RGBToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit
|
||||
return generic->RGBToRGB_16s8u_P3AC4R(pSrc, srcStep, pDst, dstStep, DstFormat, roi);
|
||||
}
|
||||
}
|
||||
#endif /* WITH_NEON */
|
||||
#endif /* NEON_ENABLED */
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_colors_neon(primitives_t* prims)
|
||||
{
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(NEON_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_colors(prims);
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#ifndef FREERDP_LIB_PRIM_INTERNAL_H
|
||||
#define FREERDP_LIB_PRIM_INTERNAL_H
|
||||
|
||||
#include <winpr/platform.h>
|
||||
#include <freerdp/config.h>
|
||||
|
||||
#include <freerdp/primitives.h>
|
||||
@ -33,15 +34,27 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WITH_SSE2) || defined(WITH_NEON) || defined(WITH_OPENCL)
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64) || defined(_M_IX86_AMD64)
|
||||
#define SSE2_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WITH_NEON)
|
||||
#if defined(_M_ARM64) || defined(_M_ARM)
|
||||
#define NEON_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SSE2_ENABLED) || defined(NEON_ENABLED) || defined(WITH_OPENCL)
|
||||
#define HAVE_OPTIMIZED_PRIMITIVES 1
|
||||
#endif
|
||||
|
||||
#if defined(WITH_SSE2) || defined(WITH_NEON)
|
||||
#if defined(SSE2_ENABLED) || defined(NEON_ENABLED)
|
||||
#define HAVE_CPU_OPTIMIZED_PRIMITIVES 1
|
||||
#endif
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
/* Use lddqu for unaligned; load for 16-byte aligned. */
|
||||
#define LOAD_SI128(_ptr_) \
|
||||
(((const ULONG_PTR)(_ptr_)&0x0f) ? _mm_lddqu_si128((const __m128i*)(_ptr_)) \
|
||||
|
@ -25,15 +25,13 @@
|
||||
|
||||
#include "prim_YCoCg.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#include <emmintrin.h>
|
||||
#include <tmmintrin.h>
|
||||
#endif
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <tmmintrin.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -436,12 +434,12 @@ static pstatus_t ssse3_YCoCgRToRGB_8u_AC4R(const BYTE* WINPR_RESTRICT pSrc, INT3
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_SSE2 */
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_YCoCg_ssse3(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_YCoCg(prims);
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "prim_internal.h"
|
||||
#include "prim_YUV.h"
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <tmmintrin.h>
|
||||
|
||||
@ -1498,7 +1498,7 @@ static pstatus_t ssse3_YUV420CombineToYUV444(avc444_frame_type type,
|
||||
|
||||
void primitives_init_YUV_ssse3(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_YUV(prims);
|
||||
|
||||
|
@ -22,15 +22,13 @@
|
||||
|
||||
#include "prim_add.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#include <emmintrin.h>
|
||||
#include <pmmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <pmmintrin.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -172,13 +170,12 @@ static pstatus_t sse3_add_16s_inplace(INT16* WINPR_RESTRICT pSrcDst1,
|
||||
|
||||
return PRIMITIVES_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_add_sse3(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_add(prims);
|
||||
|
||||
|
@ -28,15 +28,13 @@
|
||||
|
||||
#include "prim_alphaComp.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#include <emmintrin.h>
|
||||
#include <pmmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#include "prim_internal.h"
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#ifdef WITH_SSE2
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <pmmintrin.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
static pstatus_t sse2_alphaComp_argb(const BYTE* WINPR_RESTRICT pSrc1, UINT32 src1Step,
|
||||
@ -211,7 +209,7 @@ static pstatus_t sse2_alphaComp_argb(const BYTE* WINPR_RESTRICT pSrc1, UINT32 sr
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_alphaComp_sse3(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_alphaComp(prims);
|
||||
|
||||
|
@ -21,27 +21,26 @@
|
||||
|
||||
#include "prim_andor.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#include <emmintrin.h>
|
||||
#include <pmmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <pmmintrin.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
SSE3_SCD_PRE_ROUTINE(sse3_andC_32u, UINT32, generic->andC_32u, _mm_and_si128,
|
||||
*dptr++ = *sptr++ & val)
|
||||
SSE3_SCD_PRE_ROUTINE(sse3_orC_32u, UINT32, generic->orC_32u, _mm_or_si128, *dptr++ = *sptr++ | val)
|
||||
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_andor_sse3(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_andor(prims);
|
||||
|
||||
|
@ -25,14 +25,12 @@
|
||||
|
||||
#include "prim_colors.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#include <emmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
#ifdef __GNUC__
|
||||
@ -1243,11 +1241,11 @@ sse2_RGBToRGB_16s8u_P3AC4R(const INT16* const WINPR_RESTRICT pSrc[3], /* 16-bit
|
||||
return generic->RGBToRGB_16s8u_P3AC4R(pSrc, srcStep, pDst, dstStep, DstFormat, roi);
|
||||
}
|
||||
}
|
||||
#endif /* WITH_SSE2 */
|
||||
#endif
|
||||
|
||||
void primitives_init_colors_sse2(primitives_t* prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_colors(prims);
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#define TAG FREERDP_TAG("primitives.copy")
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <immintrin.h>
|
||||
|
||||
@ -265,13 +265,12 @@ static pstatus_t avx2_image_copy_no_overlap(BYTE* WINPR_RESTRICT pDstData, DWORD
|
||||
nXSrc, nYSrc, palette, srcVMultiplier, srcVOffset,
|
||||
dstVMultiplier, dstVOffset);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_copy_avx2(primitives_t* prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
if (IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE))
|
||||
{
|
||||
WLog_VRB(PRIM_TAG, "AVX2 optimizations");
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#define TAG FREERDP_TAG("primitives.copy")
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <immintrin.h>
|
||||
|
||||
@ -264,13 +264,12 @@ static pstatus_t sse_image_copy_no_overlap(BYTE* WINPR_RESTRICT pDstData, DWORD
|
||||
nXSrc, nYSrc, palette, srcVMultiplier, srcVOffset,
|
||||
dstVMultiplier, dstVOffset);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_copy_sse41(primitives_t* prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
if (IsProcessorFeaturePresent(PF_SSE4_1_INSTRUCTIONS_AVAILABLE))
|
||||
{
|
||||
WLog_VRB(PRIM_TAG, "SSE4.1 optimizations");
|
||||
|
@ -21,15 +21,13 @@
|
||||
#include <freerdp/primitives.h>
|
||||
#include <winpr/sysinfo.h>
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#include <emmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_set.h"
|
||||
|
||||
/* ========================================================================= */
|
||||
#ifdef WITH_SSE2
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
static pstatus_t sse2_set_8u(BYTE val, BYTE* WINPR_RESTRICT pDst, UINT32 len)
|
||||
@ -113,10 +111,8 @@ static pstatus_t sse2_set_8u(BYTE val, BYTE* WINPR_RESTRICT pDst, UINT32 len)
|
||||
|
||||
return PRIMITIVES_SUCCESS;
|
||||
}
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#ifdef WITH_SSE2
|
||||
static pstatus_t sse2_set_32u(UINT32 val, UINT32* WINPR_RESTRICT pDst, UINT32 len)
|
||||
{
|
||||
const primitives_t* prim = primitives_get_generic();
|
||||
@ -214,12 +210,12 @@ static pstatus_t sse2_set_32s(INT32 val, INT32* WINPR_RESTRICT pDst, UINT32 len)
|
||||
UINT32 uval = *((UINT32*)&val);
|
||||
return sse2_set_32u(uval, (UINT32*)pDst, len);
|
||||
}
|
||||
#endif /* WITH_SSE2 */
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_set_sse2(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_set(prims);
|
||||
/* Pick tuned versions if possible. */
|
||||
|
@ -21,15 +21,13 @@
|
||||
|
||||
#include "prim_shift.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#include <emmintrin.h>
|
||||
#include <pmmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <pmmintrin.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -135,7 +133,6 @@ static pstatus_t sse2_lShiftC_16s_inplace(INT16* WINPR_RESTRICT pSrcDst, UINT32
|
||||
|
||||
return PRIMITIVES_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Note: the IPP version will have to call ippLShiftC_16s or ippRShiftC_16s
|
||||
@ -146,7 +143,7 @@ static pstatus_t sse2_lShiftC_16s_inplace(INT16* WINPR_RESTRICT pSrcDst, UINT32
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_shift_sse3(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_shift(prims);
|
||||
|
||||
|
@ -21,14 +21,12 @@
|
||||
|
||||
#include "prim_sign.h"
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
#include <emmintrin.h>
|
||||
#include <tmmintrin.h>
|
||||
#endif
|
||||
|
||||
#include "prim_internal.h"
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
#include <emmintrin.h>
|
||||
#include <tmmintrin.h>
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -166,12 +164,13 @@ static pstatus_t ssse3_sign_16s(const INT16* WINPR_RESTRICT pSrc, INT16* WINPR_R
|
||||
|
||||
return PRIMITIVES_SUCCESS;
|
||||
}
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#endif /* SSE2_ENABLED */
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_sign_ssse3(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
#if defined(WITH_SSE2)
|
||||
#if defined(SSE2_ENABLED)
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_sign(prims);
|
||||
/* Pick tuned versions if possible. */
|
||||
|
@ -143,17 +143,17 @@ if [ ! -d $SRC ];
|
||||
then
|
||||
mkdir -p $SRC
|
||||
cd $SRC
|
||||
git clone -b openssl-3.2.0 https://github.com/openssl/openssl.git
|
||||
git clone --depth 1 -b v1.3 https://github.com/madler/zlib.git
|
||||
git clone --depth 1 -b uriparser-0.9.7 https://github.com/uriparser/uriparser.git
|
||||
git clone --depth 1 -b v1.7.16 https://github.com/DaveGamble/cJSON.git
|
||||
git clone --depth 1 -b release-2.28.1 https://github.com/libsdl-org/SDL.git
|
||||
git clone --depth 1 --shallow-submodules --recurse-submodules -b release-2.20.2 https://github.com/libsdl-org/SDL_ttf.git
|
||||
git clone --depth 1 --shallow-submodules --recurse-submodules -b release-2.8.1 https://github.com/libsdl-org/SDL_image.git
|
||||
git clone --depth 1 --shallow-submodules --recurse-submodules -b v1.0.26 https://github.com/libusb/libusb-cmake.git
|
||||
git clone --depth 1 -b n6.0 https://github.com/FFmpeg/FFmpeg.git
|
||||
git clone --depth 1 -b v2.4.0 https://github.com/cisco/openh264.git
|
||||
git clone --depth 1 -b v1.4 https://gitlab.xiph.org/xiph/opus.git
|
||||
git clone --depth 1 -b openssl-3.3.1 https://github.com/openssl/openssl.git
|
||||
git clone --depth 1 -b v1.3.1 https://github.com/madler/zlib.git
|
||||
git clone --depth 1 -b uriparser-0.9.8 https://github.com/uriparser/uriparser.git
|
||||
git clone --depth 1 -b v1.7.18 https://github.com/DaveGamble/cJSON.git
|
||||
git clone --depth 1 -b release-2.30.4 https://github.com/libsdl-org/SDL.git
|
||||
git clone --depth 1 --shallow-submodules --recurse-submodules -b release-2.22.0 https://github.com/libsdl-org/SDL_ttf.git
|
||||
git clone --depth 1 --shallow-submodules --recurse-submodules -b release-2.8.2 https://github.com/libsdl-org/SDL_image.git
|
||||
git clone --depth 1 --shallow-submodules --recurse-submodules -b v1.0.27-1 https://github.com/libusb/libusb-cmake.git
|
||||
git clone --depth 1 -b n7.0.1 https://github.com/FFmpeg/FFmpeg.git
|
||||
git clone --depth 1 -b v2.4.1 https://github.com/cisco/openh264.git
|
||||
git clone --depth 1 -b v1.5.2 https://gitlab.xiph.org/xiph/opus.git
|
||||
git clone --depth 1 -b 2.11.1 https://github.com/knik0/faad2.git
|
||||
git clone --depth 1 -b 1.18.0 https://gitlab.freedesktop.org/cairo/cairo.git
|
||||
git clone --depth 1 -b 1_30 https://github.com/knik0/faac.git
|
||||
@ -268,8 +268,8 @@ cd $BUILD
|
||||
cmake -GNinja -Bfreerdp -S"$SCRIPT_PATH/.." \
|
||||
$CMAKE_ARGS \
|
||||
-DWITH_PLATFORM_SERVER=OFF \
|
||||
-DWITH_NEON=OFF \
|
||||
-DWITH_SSE=OFF \
|
||||
-DWITH_NEON=ON \
|
||||
-DWITH_SSE=ON \
|
||||
-DWITH_FFMPEG=OFF \
|
||||
-DWITH_SWSCALE=ON \
|
||||
-DWITH_OPUS=ON \
|
||||
|
@ -96,7 +96,8 @@ WINPR_PRAGMA_DIAG_IGNORED_RESERVED_ID_MACRO
|
||||
|
||||
#if defined(i386) || defined(__i386) || defined(__i386__) || defined(__i486__) || \
|
||||
defined(__i586__) || defined(__i686__) || defined(__X86__) || defined(_X86_) || \
|
||||
defined(__I86__) || defined(__IA32__) || defined(__THW_INTEL__) || defined(__INTEL__)
|
||||
defined(__I86__) || defined(__IA32__) || defined(__THW_INTEL__) || defined(__INTEL__) || \
|
||||
defined(_M_IX86)
|
||||
#ifndef _M_IX86
|
||||
#define _M_IX86 1
|
||||
#endif
|
||||
@ -111,6 +112,13 @@ WINPR_PRAGMA_DIAG_IGNORED_RESERVED_ID_MACRO
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Intel ia64 */
|
||||
#if defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
|
||||
#ifndef _M_IA64
|
||||
#define _M_IA64 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Intel x86 or AMD64 (_M_IX86_AMD64) */
|
||||
|
||||
#if defined(_M_IX86) || defined(_M_AMD64)
|
||||
|
Loading…
Reference in New Issue
Block a user