Coverage Report

Created: 2025-07-01 06:46

/src/FreeRDP/libfreerdp/codec/sse/rfx_sse2.c
Line
Count
Source (jump to first uncovered line)
1
/**
2
 * FreeRDP: A Remote Desktop Protocol Implementation
3
 * RemoteFX Codec Library - SSE2 Optimizations
4
 *
5
 * Copyright 2011 Stephen Erisman
6
 * Copyright 2011 Norbert Federa <norbert.federa@thincast.com>
7
 *
8
 * Licensed under the Apache License, Version 2.0 (the "License");
9
 * you may not use this file except in compliance with the License.
10
 * You may obtain a copy of the License at
11
 *
12
 *     http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 */
20
21
#include <winpr/assert.h>
22
#include <winpr/cast.h>
23
#include <winpr/platform.h>
24
#include <freerdp/config.h>
25
26
#include "../rfx_types.h"
27
#include "rfx_sse2.h"
28
29
#include "../../core/simd.h"
30
#include "../../primitives/sse/prim_avxsse.h"
31
32
#if defined(SSE_AVX_INTRINSICS_ENABLED)
33
#include <stdio.h>
34
#include <stdlib.h>
35
#include <string.h>
36
#include <winpr/sysinfo.h>
37
38
#include <xmmintrin.h>
39
#include <emmintrin.h>
40
41
#ifdef _MSC_VER
42
#define __attribute__(...)
43
#endif
44
45
0
#define CACHE_LINE_BYTES 64
46
47
#ifndef __clang__
48
#define ATTRIBUTES __gnu_inline__, __always_inline__, __artificial__
49
#else
50
#define ATTRIBUTES __gnu_inline__, __always_inline__
51
#endif
52
53
static __inline void __attribute__((ATTRIBUTES))
54
mm_prefetch_buffer(char* WINPR_RESTRICT buffer, size_t num_bytes)
55
0
{
56
0
  __m128i* buf = (__m128i*)buffer;
57
58
0
  for (size_t i = 0; i < (num_bytes / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i)))
59
0
  {
60
0
    _mm_prefetch((char*)(&buf[i]), _MM_HINT_NTA);
61
0
  }
62
0
}
63
64
/* rfx_decode_ycbcr_to_rgb_sse2 code now resides in the primitives library. */
65
/* rfx_encode_rgb_to_ycbcr_sse2 code now resides in the primitives library. */
66
67
static __inline void __attribute__((ATTRIBUTES))
68
rfx_quantization_decode_block_sse2(INT16* WINPR_RESTRICT buffer, const size_t buffer_size,
69
                                   const UINT32 factor)
70
0
{
71
0
  __m128i* ptr = (__m128i*)buffer;
72
0
  const __m128i* buf_end = (__m128i*)(buffer + buffer_size);
73
74
0
  if (factor == 0)
75
0
    return;
76
77
0
  do
78
0
  {
79
0
    const __m128i la = LOAD_SI128(ptr);
80
0
    const __m128i a = _mm_slli_epi16(la, WINPR_ASSERTING_INT_CAST(int, factor));
81
82
0
    STORE_SI128(ptr, a);
83
0
    ptr++;
84
0
  } while (ptr < buf_end);
85
0
}
86
87
static void rfx_quantization_decode_sse2(INT16* WINPR_RESTRICT buffer,
88
                                         const UINT32* WINPR_RESTRICT quantVals)
89
0
{
90
0
  WINPR_ASSERT(buffer);
91
0
  WINPR_ASSERT(quantVals);
92
93
0
  mm_prefetch_buffer((char*)buffer, 4096 * sizeof(INT16));
94
0
  rfx_quantization_decode_block_sse2(&buffer[0], 1024, quantVals[8] - 1);    /* HL1 */
95
0
  rfx_quantization_decode_block_sse2(&buffer[1024], 1024, quantVals[7] - 1); /* LH1 */
96
0
  rfx_quantization_decode_block_sse2(&buffer[2048], 1024, quantVals[9] - 1); /* HH1 */
97
0
  rfx_quantization_decode_block_sse2(&buffer[3072], 256, quantVals[5] - 1);  /* HL2 */
98
0
  rfx_quantization_decode_block_sse2(&buffer[3328], 256, quantVals[4] - 1);  /* LH2 */
99
0
  rfx_quantization_decode_block_sse2(&buffer[3584], 256, quantVals[6] - 1);  /* HH2 */
100
0
  rfx_quantization_decode_block_sse2(&buffer[3840], 64, quantVals[2] - 1);   /* HL3 */
101
0
  rfx_quantization_decode_block_sse2(&buffer[3904], 64, quantVals[1] - 1);   /* LH3 */
102
0
  rfx_quantization_decode_block_sse2(&buffer[3968], 64, quantVals[3] - 1);   /* HH3 */
103
0
  rfx_quantization_decode_block_sse2(&buffer[4032], 64, quantVals[0] - 1);   /* LL3 */
104
0
}
105
106
static __inline void __attribute__((ATTRIBUTES))
107
rfx_quantization_encode_block_sse2(INT16* WINPR_RESTRICT buffer, const unsigned buffer_size,
108
                                   const INT16 factor)
109
0
{
110
0
  __m128i* ptr = (__m128i*)buffer;
111
0
  const __m128i* buf_end = (const __m128i*)(buffer + buffer_size);
112
113
0
  if (factor == 0)
114
0
    return;
115
116
0
  const __m128i half = _mm_set1_epi16(WINPR_ASSERTING_INT_CAST(INT16, 1 << (factor - 1)));
117
118
0
  do
119
0
  {
120
0
    const __m128i la = LOAD_SI128(ptr);
121
0
    __m128i a = _mm_add_epi16(la, half);
122
0
    a = _mm_srai_epi16(a, factor);
123
0
    STORE_SI128(ptr, a);
124
0
    ptr++;
125
0
  } while (ptr < buf_end);
126
0
}
127
128
static void rfx_quantization_encode_sse2(INT16* WINPR_RESTRICT buffer,
129
                                         const UINT32* WINPR_RESTRICT quantization_values)
130
0
{
131
0
  WINPR_ASSERT(buffer);
132
0
  WINPR_ASSERT(quantization_values);
133
0
  for (size_t x = 0; x < 10; x++)
134
0
  {
135
0
    WINPR_ASSERT(quantization_values[x] >= 6);
136
0
    WINPR_ASSERT(quantization_values[x] <= INT16_MAX + 6);
137
0
  }
138
139
0
  mm_prefetch_buffer((char*)buffer, 4096 * sizeof(INT16));
140
0
  rfx_quantization_encode_block_sse2(
141
0
      buffer, 1024, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[8] - 6)); /* HL1 */
142
0
  rfx_quantization_encode_block_sse2(
143
0
      buffer + 1024, 1024, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[7] - 6)); /* LH1 */
144
0
  rfx_quantization_encode_block_sse2(
145
0
      buffer + 2048, 1024, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[9] - 6)); /* HH1 */
146
0
  rfx_quantization_encode_block_sse2(
147
0
      buffer + 3072, 256, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[5] - 6)); /* HL2 */
148
0
  rfx_quantization_encode_block_sse2(
149
0
      buffer + 3328, 256, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[4] - 6)); /* LH2 */
150
0
  rfx_quantization_encode_block_sse2(
151
0
      buffer + 3584, 256, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[6] - 6)); /* HH2 */
152
0
  rfx_quantization_encode_block_sse2(
153
0
      buffer + 3840, 64, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[2] - 6)); /* HL3 */
154
0
  rfx_quantization_encode_block_sse2(
155
0
      buffer + 3904, 64, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[1] - 6)); /* LH3 */
156
0
  rfx_quantization_encode_block_sse2(
157
0
      buffer + 3968, 64, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[3] - 6)); /* HH3 */
158
0
  rfx_quantization_encode_block_sse2(
159
0
      buffer + 4032, 64, WINPR_ASSERTING_INT_CAST(INT16, quantization_values[0] - 6)); /* LL3 */
160
0
  rfx_quantization_encode_block_sse2(buffer, 4096, 5);
161
0
}
162
163
static __inline void __attribute__((ATTRIBUTES))
164
rfx_dwt_2d_decode_block_horiz_sse2(INT16* WINPR_RESTRICT l, INT16* WINPR_RESTRICT h,
165
                                   INT16* WINPR_RESTRICT dst, size_t subband_width)
166
0
{
167
0
  INT16* l_ptr = l;
168
0
  INT16* h_ptr = h;
169
0
  INT16* dst_ptr = dst;
170
0
  int first = 0;
171
0
  int last = 0;
172
0
  __m128i dst1;
173
0
  __m128i dst2;
174
175
0
  for (size_t y = 0; y < subband_width; y++)
176
0
  {
177
    /* Even coefficients */
178
0
    for (size_t n = 0; n < subband_width; n += 8)
179
0
    {
180
      /* dst[2n] = l[n] - ((h[n-1] + h[n] + 1) >> 1); */
181
0
      __m128i l_n = LOAD_SI128(l_ptr);
182
0
      __m128i h_n = LOAD_SI128(h_ptr);
183
0
      __m128i h_n_m = LOAD_SI128(h_ptr - 1);
184
185
0
      if (n == 0)
186
0
      {
187
0
        first = _mm_extract_epi16(h_n_m, 1);
188
0
        h_n_m = _mm_insert_epi16(h_n_m, first, 0);
189
0
      }
190
191
0
      __m128i tmp_n = _mm_add_epi16(h_n, h_n_m);
192
0
      tmp_n = _mm_add_epi16(tmp_n, _mm_set1_epi16(1));
193
0
      tmp_n = _mm_srai_epi16(tmp_n, 1);
194
0
      const __m128i dst_n = _mm_sub_epi16(l_n, tmp_n);
195
0
      STORE_SI128(l_ptr, dst_n);
196
0
      l_ptr += 8;
197
0
      h_ptr += 8;
198
0
    }
199
200
0
    l_ptr -= subband_width;
201
0
    h_ptr -= subband_width;
202
203
    /* Odd coefficients */
204
0
    for (size_t n = 0; n < subband_width; n += 8)
205
0
    {
206
      /* dst[2n + 1] = (h[n] << 1) + ((dst[2n] + dst[2n + 2]) >> 1); */
207
0
      __m128i h_n = LOAD_SI128(h_ptr);
208
0
      h_n = _mm_slli_epi16(h_n, 1);
209
0
      __m128i dst_n = LOAD_SI128(l_ptr);
210
0
      __m128i dst_n_p = LOAD_SI128(l_ptr + 1);
211
212
0
      if (n == subband_width - 8)
213
0
      {
214
0
        last = _mm_extract_epi16(dst_n_p, 6);
215
0
        dst_n_p = _mm_insert_epi16(dst_n_p, last, 7);
216
0
      }
217
218
0
      __m128i tmp_n = _mm_add_epi16(dst_n_p, dst_n);
219
0
      tmp_n = _mm_srai_epi16(tmp_n, 1);
220
0
      tmp_n = _mm_add_epi16(tmp_n, h_n);
221
0
      dst1 = _mm_unpacklo_epi16(dst_n, tmp_n);
222
0
      dst2 = _mm_unpackhi_epi16(dst_n, tmp_n);
223
0
      STORE_SI128(dst_ptr, dst1);
224
0
      STORE_SI128(dst_ptr + 8, dst2);
225
0
      l_ptr += 8;
226
0
      h_ptr += 8;
227
0
      dst_ptr += 16;
228
0
    }
229
0
  }
230
0
}
231
232
static __inline void __attribute__((ATTRIBUTES))
233
rfx_dwt_2d_decode_block_vert_sse2(INT16* WINPR_RESTRICT l, INT16* WINPR_RESTRICT h,
234
                                  INT16* WINPR_RESTRICT dst, size_t subband_width)
235
0
{
236
0
  INT16* l_ptr = l;
237
0
  INT16* h_ptr = h;
238
0
  INT16* dst_ptr = dst;
239
0
  const size_t total_width = subband_width + subband_width;
240
241
  /* Even coefficients */
242
0
  for (size_t n = 0; n < subband_width; n++)
243
0
  {
244
0
    for (size_t x = 0; x < total_width; x += 8)
245
0
    {
246
      /* dst[2n] = l[n] - ((h[n-1] + h[n] + 1) >> 1); */
247
0
      const __m128i l_n = LOAD_SI128(l_ptr);
248
0
      const __m128i h_n = LOAD_SI128(h_ptr);
249
0
      __m128i tmp_n = _mm_add_epi16(h_n, _mm_set1_epi16(1));
250
251
0
      if (n == 0)
252
0
        tmp_n = _mm_add_epi16(tmp_n, h_n);
253
0
      else
254
0
      {
255
0
        const __m128i h_n_m = LOAD_SI128(h_ptr - total_width);
256
0
        tmp_n = _mm_add_epi16(tmp_n, h_n_m);
257
0
      }
258
259
0
      tmp_n = _mm_srai_epi16(tmp_n, 1);
260
0
      const __m128i dst_n = _mm_sub_epi16(l_n, tmp_n);
261
0
      STORE_SI128(dst_ptr, dst_n);
262
0
      l_ptr += 8;
263
0
      h_ptr += 8;
264
0
      dst_ptr += 8;
265
0
    }
266
267
0
    dst_ptr += total_width;
268
0
  }
269
270
0
  h_ptr = h;
271
0
  dst_ptr = dst + total_width;
272
273
  /* Odd coefficients */
274
0
  for (size_t n = 0; n < subband_width; n++)
275
0
  {
276
0
    for (size_t x = 0; x < total_width; x += 8)
277
0
    {
278
      /* dst[2n + 1] = (h[n] << 1) + ((dst[2n] + dst[2n + 2]) >> 1); */
279
0
      __m128i h_n = LOAD_SI128(h_ptr);
280
0
      __m128i dst_n_m = LOAD_SI128(dst_ptr - total_width);
281
0
      h_n = _mm_slli_epi16(h_n, 1);
282
0
      __m128i tmp_n = dst_n_m;
283
284
0
      if (n == subband_width - 1)
285
0
        tmp_n = _mm_add_epi16(tmp_n, dst_n_m);
286
0
      else
287
0
      {
288
0
        const __m128i dst_n_p = LOAD_SI128(dst_ptr + total_width);
289
0
        tmp_n = _mm_add_epi16(tmp_n, dst_n_p);
290
0
      }
291
292
0
      tmp_n = _mm_srai_epi16(tmp_n, 1);
293
0
      const __m128i dst_n = _mm_add_epi16(tmp_n, h_n);
294
0
      STORE_SI128(dst_ptr, dst_n);
295
0
      h_ptr += 8;
296
0
      dst_ptr += 8;
297
0
    }
298
299
0
    dst_ptr += total_width;
300
0
  }
301
0
}
302
303
static __inline void __attribute__((ATTRIBUTES))
304
rfx_dwt_2d_decode_block_sse2(INT16* WINPR_RESTRICT buffer, INT16* WINPR_RESTRICT idwt,
305
                             size_t subband_width)
306
0
{
307
0
  mm_prefetch_buffer((char*)idwt, 4ULL * subband_width * sizeof(INT16));
308
  /* Inverse DWT in horizontal direction, results in 2 sub-bands in L, H order in tmp buffer idwt.
309
   */
310
  /* The 4 sub-bands are stored in HL(0), LH(1), HH(2), LL(3) order. */
311
  /* The lower part L uses LL(3) and HL(0). */
312
  /* The higher part H uses LH(1) and HH(2). */
313
0
  INT16* ll = buffer + 3ULL * subband_width * subband_width;
314
0
  INT16* hl = buffer;
315
0
  INT16* l_dst = idwt;
316
0
  rfx_dwt_2d_decode_block_horiz_sse2(ll, hl, l_dst, subband_width);
317
0
  INT16* lh = buffer + 1ULL * subband_width * subband_width;
318
0
  INT16* hh = buffer + 2ULL * subband_width * subband_width;
319
0
  INT16* h_dst = idwt + 2ULL * subband_width * subband_width;
320
0
  rfx_dwt_2d_decode_block_horiz_sse2(lh, hh, h_dst, subband_width);
321
  /* Inverse DWT in vertical direction, results are stored in original buffer. */
322
0
  rfx_dwt_2d_decode_block_vert_sse2(l_dst, h_dst, buffer, subband_width);
323
0
}
324
325
static void rfx_dwt_2d_decode_sse2(INT16* WINPR_RESTRICT buffer, INT16* WINPR_RESTRICT dwt_buffer)
326
0
{
327
0
  WINPR_ASSERT(buffer);
328
0
  WINPR_ASSERT(dwt_buffer);
329
330
0
  mm_prefetch_buffer((char*)buffer, 4096 * sizeof(INT16));
331
0
  rfx_dwt_2d_decode_block_sse2(&buffer[3840], dwt_buffer, 8);
332
0
  rfx_dwt_2d_decode_block_sse2(&buffer[3072], dwt_buffer, 16);
333
0
  rfx_dwt_2d_decode_block_sse2(&buffer[0], dwt_buffer, 32);
334
0
}
335
336
static __inline void __attribute__((ATTRIBUTES))
337
rfx_dwt_2d_encode_block_vert_sse2(INT16* WINPR_RESTRICT src, INT16* WINPR_RESTRICT l,
338
                                  INT16* WINPR_RESTRICT h, size_t subband_width)
339
0
{
340
0
  const size_t total_width = subband_width << 1;
341
342
0
  for (size_t n = 0; n < subband_width; n++)
343
0
  {
344
0
    for (size_t x = 0; x < total_width; x += 8)
345
0
    {
346
0
      __m128i src_2n = LOAD_SI128(src);
347
0
      __m128i src_2n_1 = LOAD_SI128(src + total_width);
348
0
      __m128i src_2n_2 = src_2n;
349
350
0
      if (n < subband_width - 1)
351
0
        src_2n_2 = LOAD_SI128(src + 2ULL * total_width);
352
353
      /* h[n] = (src[2n + 1] - ((src[2n] + src[2n + 2]) >> 1)) >> 1 */
354
0
      __m128i h_n = _mm_add_epi16(src_2n, src_2n_2);
355
0
      h_n = _mm_srai_epi16(h_n, 1);
356
0
      h_n = _mm_sub_epi16(src_2n_1, h_n);
357
0
      h_n = _mm_srai_epi16(h_n, 1);
358
0
      STORE_SI128(h, h_n);
359
360
0
      __m128i h_n_m = h_n;
361
0
      if (n != 0)
362
0
        h_n_m = LOAD_SI128(h - total_width);
363
364
      /* l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1) */
365
0
      __m128i l_n = _mm_add_epi16(h_n_m, h_n);
366
0
      l_n = _mm_srai_epi16(l_n, 1);
367
0
      l_n = _mm_add_epi16(l_n, src_2n);
368
0
      STORE_SI128(l, l_n);
369
0
      src += 8;
370
0
      l += 8;
371
0
      h += 8;
372
0
    }
373
374
0
    src += total_width;
375
0
  }
376
0
}
377
378
static __inline void __attribute__((ATTRIBUTES))
379
rfx_dwt_2d_encode_block_horiz_sse2(INT16* WINPR_RESTRICT src, INT16* WINPR_RESTRICT l,
380
                                   INT16* WINPR_RESTRICT h, size_t subband_width)
381
0
{
382
0
  for (size_t y = 0; y < subband_width; y++)
383
0
  {
384
0
    for (size_t n = 0; n < subband_width; n += 8)
385
0
    {
386
      /* The following 3 Set operations consumes more than half of the total DWT processing
387
       * time! */
388
0
      const INT16 src16 = (INT16)(((n + 8) == subband_width) ? src[14] : src[16]);
389
0
      __m128i src_2n =
390
0
          _mm_set_epi16(src[14], src[12], src[10], src[8], src[6], src[4], src[2], src[0]);
391
0
      __m128i src_2n_1 =
392
0
          _mm_set_epi16(src[15], src[13], src[11], src[9], src[7], src[5], src[3], src[1]);
393
0
      __m128i src_2n_2 =
394
0
          _mm_set_epi16(src16, src[14], src[12], src[10], src[8], src[6], src[4], src[2]);
395
      /* h[n] = (src[2n + 1] - ((src[2n] + src[2n + 2]) >> 1)) >> 1 */
396
0
      __m128i h_n = _mm_add_epi16(src_2n, src_2n_2);
397
0
      h_n = _mm_srai_epi16(h_n, 1);
398
0
      h_n = _mm_sub_epi16(src_2n_1, h_n);
399
0
      h_n = _mm_srai_epi16(h_n, 1);
400
0
      STORE_SI128(h, h_n);
401
0
      __m128i h_n_m = LOAD_SI128(h - 1);
402
403
0
      if (n == 0)
404
0
      {
405
0
        int first = _mm_extract_epi16(h_n_m, 1);
406
0
        h_n_m = _mm_insert_epi16(h_n_m, first, 0);
407
0
      }
408
409
      /* l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1) */
410
0
      __m128i l_n = _mm_add_epi16(h_n_m, h_n);
411
0
      l_n = _mm_srai_epi16(l_n, 1);
412
0
      l_n = _mm_add_epi16(l_n, src_2n);
413
0
      STORE_SI128(l, l_n);
414
0
      src += 16;
415
0
      l += 8;
416
0
      h += 8;
417
0
    }
418
0
  }
419
0
}
420
421
static __inline void __attribute__((ATTRIBUTES))
422
rfx_dwt_2d_encode_block_sse2(INT16* WINPR_RESTRICT buffer, INT16* WINPR_RESTRICT dwt,
423
                             size_t subband_width)
424
0
{
425
0
  mm_prefetch_buffer((char*)dwt, 4ULL * subband_width * sizeof(INT16));
426
  /* DWT in vertical direction, results in 2 sub-bands in L, H order in tmp buffer dwt. */
427
0
  INT16* l_src = dwt;
428
0
  INT16* h_src = dwt + 2ULL * subband_width * subband_width;
429
0
  rfx_dwt_2d_encode_block_vert_sse2(buffer, l_src, h_src, subband_width);
430
  /* DWT in horizontal direction, results in 4 sub-bands in HL(0), LH(1), HH(2), LL(3) order,
431
   * stored in original buffer. */
432
  /* The lower part L generates LL(3) and HL(0). */
433
  /* The higher part H generates LH(1) and HH(2). */
434
0
  INT16* ll = buffer + 3ULL * subband_width * subband_width;
435
0
  INT16* hl = buffer;
436
0
  INT16* lh = buffer + 1ULL * subband_width * subband_width;
437
0
  INT16* hh = buffer + 2ULL * subband_width * subband_width;
438
0
  rfx_dwt_2d_encode_block_horiz_sse2(l_src, ll, hl, subband_width);
439
0
  rfx_dwt_2d_encode_block_horiz_sse2(h_src, lh, hh, subband_width);
440
0
}
441
442
static void rfx_dwt_2d_encode_sse2(INT16* WINPR_RESTRICT buffer, INT16* WINPR_RESTRICT dwt_buffer)
443
0
{
444
0
  WINPR_ASSERT(buffer);
445
0
  WINPR_ASSERT(dwt_buffer);
446
447
0
  mm_prefetch_buffer((char*)buffer, 4096 * sizeof(INT16));
448
0
  rfx_dwt_2d_encode_block_sse2(buffer, dwt_buffer, 32);
449
0
  rfx_dwt_2d_encode_block_sse2(buffer + 3072, dwt_buffer, 16);
450
0
  rfx_dwt_2d_encode_block_sse2(buffer + 3840, dwt_buffer, 8);
451
0
}
452
#endif
453
454
void rfx_init_sse2_int(RFX_CONTEXT* WINPR_RESTRICT context)
455
0
{
456
0
#if defined(SSE_AVX_INTRINSICS_ENABLED)
457
0
  WLog_VRB(PRIM_TAG, "SSE2/SSE3 optimizations");
458
0
  PROFILER_RENAME(context->priv->prof_rfx_quantization_decode, "rfx_quantization_decode_sse2")
459
0
  PROFILER_RENAME(context->priv->prof_rfx_quantization_encode, "rfx_quantization_encode_sse2")
460
0
  PROFILER_RENAME(context->priv->prof_rfx_dwt_2d_decode, "rfx_dwt_2d_decode_sse2")
461
0
  PROFILER_RENAME(context->priv->prof_rfx_dwt_2d_encode, "rfx_dwt_2d_encode_sse2")
462
0
  context->quantization_decode = rfx_quantization_decode_sse2;
463
0
  context->quantization_encode = rfx_quantization_encode_sse2;
464
0
  context->dwt_2d_decode = rfx_dwt_2d_decode_sse2;
465
0
  context->dwt_2d_encode = rfx_dwt_2d_encode_sse2;
466
#else
467
  WINPR_UNUSED(context);
468
  WLog_VRB(PRIM_TAG, "undefined WITH_SIMD or SSE2 intrinsics not available");
469
#endif
470
0
}