]> git.pld-linux.org Git - packages/lame.git/blob - lame-sse.patch
- rediffed
[packages/lame.git] / lame-sse.patch
1 diff -urNp -x '*.orig' lame-3.100.org/libmp3lame/fft.c lame-3.100/libmp3lame/fft.c
2 --- lame-3.100.org/libmp3lame/fft.c     2017-09-06 21:33:36.000000000 +0200
3 +++ lame-3.100/libmp3lame/fft.c 2023-12-09 13:09:38.767851762 +0100
4 @@ -318,7 +318,12 @@ init_fft(lame_internal_flags * const gfc
5      for (i = 0; i < BLKSIZE_s / 2; i++)
6          gfc->cd_psy->window_s[i] = 0.5 * (1.0 - cos(2.0 * PI * (i + 0.5) / BLKSIZE_s));
7  
8 -    gfc->fft_fht = fht;
9 +#ifdef HAVE_XMMINTRIN_H
10 +    if (gfc->CPU_features.SSE2) { // TODO: isn't fht_SSE2() just SSE? I don't see anything SSE2 (emmintrin.h) specific inside
11 +        gfc->fft_fht = fht_SSE2;
12 +    }
13 +    else
14 +#endif
15  #ifdef HAVE_NASM
16      if (gfc->CPU_features.AMD_3DNow) {
17          gfc->fft_fht = fht_3DN;
18 @@ -326,14 +331,7 @@ init_fft(lame_internal_flags * const gfc
19      else if (gfc->CPU_features.SSE) {
20          gfc->fft_fht = fht_SSE;
21      }
22 -    else {
23 -        gfc->fft_fht = fht;
24 -    }
25 -#else
26 -#ifdef HAVE_XMMINTRIN_H
27 -#ifdef MIN_ARCH_SSE
28 -    gfc->fft_fht = fht_SSE2;
29 -#endif
30 -#endif
31 +    else
32  #endif
33 +    gfc->fft_fht = fht;
34  }
35 diff -urNp -x '*.orig' lame-3.100.org/libmp3lame/lame.c lame-3.100/libmp3lame/lame.c
36 --- lame-3.100.org/libmp3lame/lame.c    2017-10-10 21:08:39.000000000 +0200
37 +++ lame-3.100/libmp3lame/lame.c        2023-12-09 13:09:38.768851775 +0100
38 @@ -1354,12 +1354,11 @@ lame_print_config(const lame_global_flag
39          else if (gfc->CPU_features.SSE) {
40              fft_asm_used = 2;
41          }
42 -#else
43 -# if defined( HAVE_XMMINTRIN_H ) && defined( MIN_ARCH_SSE )
44 -        {
45 +#endif
46 +#ifdef HAVE_XMMINTRIN_H
47 +        if (gfc->CPU_features.SSE2)  {
48              fft_asm_used = 3;
49          }
50 -# endif
51  #endif
52          if (gfc->CPU_features.MMX) {
53  #ifdef MMX_choose_table
54 diff -urNp -x '*.orig' lame-3.100.org/libmp3lame/vector/Makefile.am lame-3.100/libmp3lame/vector/Makefile.am
55 --- lame-3.100.org/libmp3lame/vector/Makefile.am        2007-01-09 11:15:53.000000000 +0100
56 +++ lame-3.100/libmp3lame/vector/Makefile.am    2023-12-09 13:09:38.767851762 +0100
57 @@ -8,6 +8,7 @@ endif
58  
59  ##liblamecpuroutines_la_LIBADD = 
60  ##liblamecpuroutines_la_LDFLAGS =
61 +liblamevectorroutines_la_CFLAGS = -msse
62  
63  INCLUDES = @INCLUDES@ \
64         -I$(top_srcdir)/libmp3lame \
This page took 0.073179 seconds and 3 git commands to generate.