[primitives,ipp] remove remaining IPP defines
This commit is contained in:
parent
f19098da83
commit
cd72043811
@ -31,17 +31,12 @@
|
||||
#include <pmmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#ifdef WITH_IPP
|
||||
#include <ippi.h>
|
||||
#endif /* WITH_IPP */
|
||||
|
||||
#include "prim_internal.h"
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#ifdef WITH_SSE2
|
||||
#if !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS)
|
||||
|
||||
static pstatus_t sse2_alphaComp_argb(const BYTE* WINPR_RESTRICT pSrc1, UINT32 src1Step,
|
||||
const BYTE* WINPR_RESTRICT pSrc2, UINT32 src2Step,
|
||||
@ -210,20 +205,6 @@ static pstatus_t sse2_alphaComp_argb(const BYTE* WINPR_RESTRICT pSrc1, UINT32 sr
|
||||
|
||||
return PRIMITIVES_SUCCESS;
|
||||
}
|
||||
#endif /* !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS) */
|
||||
#endif
|
||||
|
||||
#ifdef WITH_IPP
|
||||
/* ------------------------------------------------------------------------- */
|
||||
static pstatus_t ipp_alphaComp_argb(const BYTE* pSrc1, INT32 src1Step, const BYTE* pSrc2,
|
||||
INT32 src2Step, BYTE* pDst, INT32 dstStep, INT32 width,
|
||||
INT32 height)
|
||||
{
|
||||
IppiSize sz;
|
||||
sz.width = width;
|
||||
sz.height = height;
|
||||
return ippiAlphaComp_8u_AC4R(pSrc1, src1Step, pSrc2, src2Step, pDst, dstStep, sz, ippAlphaOver);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -231,9 +212,7 @@ void primitives_init_alphaComp_opt(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_alphaComp(prims);
|
||||
#ifdef WITH_IPP
|
||||
prims->alphaComp_argb = ipp_alphaComp_argb;
|
||||
#elif defined(WITH_SSE2)
|
||||
#if defined(WITH_SSE2)
|
||||
|
||||
if (IsProcessorFeaturePresent(PF_SSE2_INSTRUCTIONS_AVAILABLE) &&
|
||||
IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE)) /* for LDDQU */
|
||||
|
@ -24,22 +24,16 @@
|
||||
#include <pmmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#ifdef WITH_IPP
|
||||
#include <ipps.h>
|
||||
#endif /* WITH_IPP */
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#if !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS)
|
||||
/* ------------------------------------------------------------------------- */
|
||||
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 /* !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS) */
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -47,10 +41,7 @@ void primitives_init_andor_opt(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_andor(prims);
|
||||
#if defined(WITH_IPP)
|
||||
prims->andC_32u = (__andC_32u_t)ippsAndC_32u;
|
||||
prims->orC_32u = (__orC_32u_t)ippsOrC_32u;
|
||||
#elif defined(WITH_SSE2)
|
||||
#if defined(WITH_SSE2)
|
||||
|
||||
if (IsProcessorFeaturePresent(PF_SSE2_INSTRUCTIONS_AVAILABLE) &&
|
||||
IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE))
|
||||
|
@ -24,9 +24,6 @@
|
||||
#ifdef WITH_SSE2
|
||||
#include <emmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
#ifdef WITH_IPP
|
||||
#include <ipps.h>
|
||||
#endif /* WITH_IPP */
|
||||
|
||||
#include "prim_internal.h"
|
||||
|
||||
@ -34,7 +31,6 @@ static primitives_t* generic = NULL;
|
||||
|
||||
/* ========================================================================= */
|
||||
#ifdef WITH_SSE2
|
||||
#if !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS)
|
||||
static pstatus_t sse2_set_8u(BYTE val, BYTE* WINPR_RESTRICT pDst, UINT32 len)
|
||||
{
|
||||
BYTE byte = 0;
|
||||
@ -116,12 +112,10 @@ static pstatus_t sse2_set_8u(BYTE val, BYTE* WINPR_RESTRICT pDst, UINT32 len)
|
||||
|
||||
return PRIMITIVES_SUCCESS;
|
||||
}
|
||||
#endif /* !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS) */
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#ifdef WITH_SSE2
|
||||
#if !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS)
|
||||
static pstatus_t sse2_set_32u(UINT32 val, UINT32* WINPR_RESTRICT pDst, UINT32 len)
|
||||
{
|
||||
const primitives_t* prim = primitives_get_generic();
|
||||
@ -219,31 +213,16 @@ 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 /* !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS) */
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#ifdef WITH_IPP
|
||||
/* ------------------------------------------------------------------------- */
|
||||
static pstatus_t ipp_wrapper_set_32u(UINT32 val, UINT32* WINPR_RESTRICT pDst, INT32 len)
|
||||
{
|
||||
/* A little type conversion, then use the signed version. */
|
||||
INT32 sval = *((INT32*)&val);
|
||||
return ippsSet_32s(sval, (INT32*)pDst, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
void primitives_init_set_opt(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_set(prims);
|
||||
/* Pick tuned versions if possible. */
|
||||
#ifdef WITH_IPP
|
||||
prims->set_8u = (__set_8u_t)ippsSet_8u;
|
||||
prims->set_32s = (__set_32s_t)ippsSet_32s;
|
||||
prims->set_32u = (__set_32u_t)ipp_wrapper_set_32u;
|
||||
prims->zero = (__zero_t)ippsZero_8u;
|
||||
#elif defined(WITH_SSE2)
|
||||
|
||||
#if defined(WITH_SSE2)
|
||||
|
||||
if (IsProcessorFeaturePresent(PF_SSE2_INSTRUCTIONS_AVAILABLE))
|
||||
{
|
||||
|
@ -24,17 +24,12 @@
|
||||
#include <pmmintrin.h>
|
||||
#endif /* WITH_SSE2 */
|
||||
|
||||
#ifdef WITH_IPP
|
||||
#include <ipps.h>
|
||||
#endif /* WITH_IPP */
|
||||
|
||||
#include "prim_internal.h"
|
||||
#include "prim_templates.h"
|
||||
|
||||
static primitives_t* generic = NULL;
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#if !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS)
|
||||
/* ------------------------------------------------------------------------- */
|
||||
SSE3_SCD_ROUTINE(sse2_lShiftC_16s, INT16, generic->lShiftC_16s, _mm_slli_epi16,
|
||||
*dptr++ = (INT16)((UINT16)*sptr++ << val))
|
||||
@ -47,7 +42,6 @@ SSE3_SCD_ROUTINE(sse2_lShiftC_16u, UINT16, generic->lShiftC_16u, _mm_slli_epi16,
|
||||
/* ------------------------------------------------------------------------- */
|
||||
SSE3_SCD_ROUTINE(sse2_rShiftC_16u, UINT16, generic->rShiftC_16u, _mm_srli_epi16,
|
||||
*dptr++ = *sptr++ >> val)
|
||||
#endif /* !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS) */
|
||||
#endif
|
||||
|
||||
/* Note: the IPP version will have to call ippLShiftC_16s or ippRShiftC_16s
|
||||
@ -60,12 +54,7 @@ void primitives_init_shift_opt(primitives_t* WINPR_RESTRICT prims)
|
||||
{
|
||||
generic = primitives_get_generic();
|
||||
primitives_init_shift(prims);
|
||||
#if defined(WITH_IPP)
|
||||
prims->lShiftC_16s = ippsLShiftC_16s;
|
||||
prims->rShiftC_16s = ippsRShiftC_16s;
|
||||
prims->lShiftC_16u = ippsLShiftC_16u;
|
||||
prims->rShiftC_16u = ippsRShiftC_16u;
|
||||
#elif defined(WITH_SSE2)
|
||||
#if defined(WITH_SSE2)
|
||||
|
||||
if (IsProcessorFeaturePresent(PF_SSE2_INSTRUCTIONS_AVAILABLE) &&
|
||||
IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE))
|
||||
|
@ -32,8 +32,6 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
add_definitions(-DPRIM_STATIC=auto -DALL_PRIMITIVES_VERSIONS)
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
|
||||
|
||||
foreach(test ${${MODULE_PREFIX}_TESTS})
|
||||
|
@ -26,11 +26,6 @@
|
||||
|
||||
#include "measure.h"
|
||||
|
||||
#ifdef WITH_IPP
|
||||
#include <ipps.h>
|
||||
#include <ippi.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define ALIGN(x) x
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user