[codec] log primitives used

This commit is contained in:
akallabeth
2025-06-13 13:38:22 +02:00
parent 1cc286e702
commit e049be9837
8 changed files with 61 additions and 54 deletions

View File

@@ -21,6 +21,7 @@
#include <winpr/platform.h>
#include <winpr/sysinfo.h>
#include <freerdp/config.h>
#include <freerdp/codec/nsc.h>
#include <freerdp/log.h>
#include "../nsc_types.h"
@@ -36,5 +37,7 @@ void nsc_init_neon_int(WINPR_ATTR_UNUSED NSC_CONTEXT* WINPR_RESTRICT context)
{
#if defined(NEON_INTRINSICS_ENABLED)
WLog_WARN(TAG, "TODO: Implement neon optimized version of this function");
#else
WLog_VRB(PRIM_TAG, "undefined WITH_SIMD or NEON intrinsics not available");
#endif
}

View File

@@ -526,7 +526,7 @@ static void rfx_dwt_2d_extrapolate_decode_neon(INT16* buffer, INT16* temp)
void rfx_init_neon_int(RFX_CONTEXT* WINPR_RESTRICT context)
{
#if defined(NEON_INTRINSICS_ENABLED)
DEBUG_RFX("Using NEON optimizations");
WLog_VRB(PRIM_TAG, "NEON optimizations");
PROFILER_RENAME(context->priv->prof_rfx_ycbcr_to_rgb, "rfx_decode_YCbCr_to_RGB_NEON");
PROFILER_RENAME(context->priv->prof_rfx_quantization_decode, "rfx_quantization_decode_NEON");
PROFILER_RENAME(context->priv->prof_rfx_dwt_2d_decode, "rfx_dwt_2d_decode_NEON");
@@ -534,6 +534,7 @@ void rfx_init_neon_int(RFX_CONTEXT* WINPR_RESTRICT context)
context->dwt_2d_decode = rfx_dwt_2d_decode_NEON;
context->dwt_2d_extrapolate_decode = rfx_dwt_2d_extrapolate_decode_neon;
#else
WLog_VRB(PRIM_TAG, "undefined WITH_SIMD or NEON intrinsics not available");
WINPR_UNUSED(context);
#endif
}

View File

@@ -393,9 +393,11 @@ static BOOL nsc_encode_sse2(NSC_CONTEXT* WINPR_RESTRICT context, const BYTE* WIN
void nsc_init_sse2_int(NSC_CONTEXT* WINPR_RESTRICT context)
{
#if defined(SSE_AVX_INTRINSICS_ENABLED)
WLog_VRB(PRIM_TAG, "SSE2/SSE3 optimizations");
PROFILER_RENAME(context->priv->prof_nsc_encode, "nsc_encode_sse2")
context->encode = nsc_encode_sse2;
#else
WLog_VRB(PRIM_TAG, "undefined WITH_SIMD or SSE2 intrinsics not available");
WINPR_UNUSED(context);
#endif
}

View File

@@ -454,6 +454,7 @@ static void rfx_dwt_2d_encode_sse2(INT16* WINPR_RESTRICT buffer, INT16* WINPR_RE
void rfx_init_sse2_int(RFX_CONTEXT* WINPR_RESTRICT context)
{
#if defined(SSE_AVX_INTRINSICS_ENABLED)
WLog_VRB(PRIM_TAG, "SSE2/SSE3 optimizations");
PROFILER_RENAME(context->priv->prof_rfx_quantization_decode, "rfx_quantization_decode_sse2")
PROFILER_RENAME(context->priv->prof_rfx_quantization_encode, "rfx_quantization_encode_sse2")
PROFILER_RENAME(context->priv->prof_rfx_dwt_2d_decode, "rfx_dwt_2d_decode_sse2")
@@ -464,5 +465,6 @@ void rfx_init_sse2_int(RFX_CONTEXT* WINPR_RESTRICT context)
context->dwt_2d_encode = rfx_dwt_2d_encode_sse2;
#else
WINPR_UNUSED(context);
WLog_VRB(PRIM_TAG, "undefined WITH_SIMD or SSE2 intrinsics not available");
#endif
}

View File

@@ -21,6 +21,9 @@
#pragma once
#include <freerdp/config.h>
#include <freerdp/log.h>
#define PRIM_TAG FREERDP_TAG("primitives")
/* https://sourceforge.net/p/predef/wiki/Architectures/
*

View File

@@ -23,12 +23,8 @@
#include <freerdp/primitives.h>
#include <freerdp/api.h>
#include <freerdp/log.h>
#include "../core/simd.h"
#define PRIM_TAG FREERDP_TAG("primitives")
#ifdef __GNUC__
#define PRIM_ALIGN_128 __attribute__((aligned(16)))
#else

View File

@@ -1044,7 +1044,7 @@ void primitives_init_colors_sse2_int(primitives_t* WINPR_RESTRICT prims)
#if defined(SSE_AVX_INTRINSICS_ENABLED)
generic = primitives_get_generic();
WLog_VRB(PRIM_TAG, "SSE2 optimizations");
WLog_VRB(PRIM_TAG, "SSE2/SSE3 optimizations");
prims->RGBToRGB_16s8u_P3AC4R = sse2_RGBToRGB_16s8u_P3AC4R;
prims->yCbCrToRGB_16s8u_P3AC4R = sse2_yCbCrToRGB_16s8u_P3AC4R;
prims->RGBToYCbCr_16s16s_P3P3 = sse2_RGBToYCbCr_16s16s_P3P3;

View File

@@ -223,7 +223,7 @@ void primitives_init_set_sse2_int(primitives_t* WINPR_RESTRICT prims)
/* Pick tuned versions if possible. */
WLog_VRB(PRIM_TAG, "SSE2 optimizations");
WLog_VRB(PRIM_TAG, "SSE2/SSE3 optimizations");
prims->set_8u = sse2_set_8u;
prims->set_32s = sse2_set_32s;
prims->set_32u = sse2_set_32u;