codec: got rid of nsc_context_set_cpu_opt
This commit is contained in:
parent
7d58aac24f
commit
8c2d60f62c
@ -335,7 +335,6 @@ void test_nsc_decode(void)
|
||||
NSC_CONTEXT* context;
|
||||
|
||||
context = nsc_context_new();
|
||||
nsc_context_set_cpu_opt(context, CPU_SSE2);
|
||||
nsc_process_message(context, 32, 15, 10, (BYTE*) nsc_data, sizeof(nsc_data));
|
||||
/*winpr_HexDump(context->bmpdata, 15 * 10 * 4);*/
|
||||
for (i = 0; i < 30000; i++)
|
||||
@ -357,7 +356,6 @@ void test_nsc_encode(void)
|
||||
memcpy(rgb_data + i * 64 * 3, rgb_scanline_data, 64 * 3);
|
||||
|
||||
context = nsc_context_new();
|
||||
nsc_context_set_cpu_opt(context, CPU_SSE2);
|
||||
nsc_context_set_pixel_format(context, RDP_PIXEL_FORMAT_R8G8B8);
|
||||
|
||||
enc_stream = stream_new(65536);
|
||||
|
@ -65,7 +65,6 @@ struct _NSC_CONTEXT
|
||||
};
|
||||
|
||||
FREERDP_API NSC_CONTEXT* nsc_context_new(void);
|
||||
FREERDP_API void nsc_context_set_cpu_opt(NSC_CONTEXT* context, UINT32 cpu_opt);
|
||||
FREERDP_API void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format);
|
||||
FREERDP_API void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
|
||||
UINT16 width, UINT16 height, BYTE* data, UINT32 length);
|
||||
|
@ -37,9 +37,7 @@
|
||||
#include "nsc_types.h"
|
||||
#include "nsc_encode.h"
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#include "nsc_sse2.h"
|
||||
#endif
|
||||
|
||||
#ifndef NSC_INIT_SIMD
|
||||
#define NSC_INIT_SIMD(_nsc_context) do { } while (0)
|
||||
@ -291,13 +289,10 @@ NSC_CONTEXT* nsc_context_new(void)
|
||||
nsc_context->nsc_stream.ColorLossLevel = 3;
|
||||
nsc_context->nsc_stream.ChromaSubSamplingLevel = 1;
|
||||
|
||||
return nsc_context;
|
||||
}
|
||||
/* init optimized methods */
|
||||
NSC_INIT_SIMD(context);
|
||||
|
||||
void nsc_context_set_cpu_opt(NSC_CONTEXT* context, UINT32 cpu_opt)
|
||||
{
|
||||
if (cpu_opt)
|
||||
NSC_INIT_SIMD(context);
|
||||
return nsc_context;
|
||||
}
|
||||
|
||||
void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format)
|
||||
|
@ -24,8 +24,10 @@
|
||||
|
||||
void nsc_init_sse2(NSC_CONTEXT* context);
|
||||
|
||||
#ifndef NSC_INIT_SIMD
|
||||
#define NSC_INIT_SIMD(_context) nsc_init_sse2(_context)
|
||||
#ifdef WITH_SSE2
|
||||
#ifndef NSC_INIT_SIMD
|
||||
#define NSC_INIT_SIMD(_context) nsc_init_sse2(_context)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __NSC_SSE2_H */
|
||||
|
Loading…
Reference in New Issue
Block a user