changeset 177:f394090439df trunk

[svn] Remove stale USE_SIMD stuff.
author nenolod
date Sun, 13 Nov 2005 12:59:10 -0800
parents 87c5d621f8d2
children d71f938ff725
files Plugins/Input/mpg123/configure.c Plugins/Input/mpg123/layer2.c Plugins/Input/mpg123/layer3.c Plugins/Input/mpg123/mpg123.c Plugins/Input/mpg123/mpg123.h Plugins/Input/mpg123/tabinit.c
diffstat 6 files changed, 1 insertions(+), 198 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/mpg123/configure.c	Sun Nov 13 12:55:07 2005 -0800
+++ b/Plugins/Input/mpg123/configure.c	Sun Nov 13 12:59:10 2005 -0800
@@ -24,11 +24,6 @@
     *decode_freq_1to2, *decode_freq_1to4;
 static GtkWidget *option_frame, *option_vbox, *detect_by_content,
     *detect_by_extension, *detect_by_both;
-#ifdef USE_SIMD
-static GtkWidget *auto_select, *decoder_3dnow, *decoder_mmx, *decoder_fpu;
-
-static void auto_select_cb(GtkWidget * w, gpointer data);
-#endif
 
 static GtkObject *streaming_size_adj, *streaming_pre_adj;
 static GtkWidget *streaming_proxy_use, *streaming_proxy_host_entry;
@@ -82,17 +77,6 @@
     else
         mpg123_cfg.detect_by = DETECT_EXTENSION;
 
-#ifdef USE_SIMD
-    if (GTK_TOGGLE_BUTTON(auto_select)->active)
-        mpg123_cfg.default_synth = SYNTH_AUTO;
-    else if (GTK_TOGGLE_BUTTON(decoder_fpu)->active)
-        mpg123_cfg.default_synth = SYNTH_FPU;
-    else if (GTK_TOGGLE_BUTTON(decoder_mmx)->active)
-        mpg123_cfg.default_synth = SYNTH_MMX;
-    else
-        mpg123_cfg.default_synth = SYNTH_3DNOW;
-
-#endif
     mpg123_cfg.http_buffer_size =
         (gint) GTK_ADJUSTMENT(streaming_size_adj)->value;
     mpg123_cfg.http_prebuffer =
@@ -186,10 +170,6 @@
                         mpg123_cfg.disable_id3v2);
     bmp_cfg_db_set_string(db, "MPG123", "id3_format", mpg123_cfg.id3_format);
     bmp_cfg_db_set_int(db, "MPG123", "detect_by", mpg123_cfg.detect_by);
-#ifdef USE_SIMD
-    bmp_cfg_db_set_int(db, "MPG123", "default_synth",
-                       mpg123_cfg.default_synth);
-#endif
 
 /* Encoding patch */
     bmp_cfg_db_set_bool(db, "MPG123", "title_encoding_enabled", mpg123_cfg.title_encoding_enabled);
@@ -200,19 +180,6 @@
     gtk_widget_destroy(mpg123_configurewin);
 }
 
-#ifdef USE_SIMD
-static void
-auto_select_cb(GtkWidget * w, gpointer data)
-{
-    gboolean autom = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w));
-
-    gtk_widget_set_sensitive(decoder_fpu, !autom);
-    gtk_widget_set_sensitive(decoder_mmx, !autom);
-    gtk_widget_set_sensitive(decoder_3dnow, !autom);
-}
-
-#endif
-
 static void
 proxy_use_cb(GtkWidget * w, gpointer data)
 {
@@ -447,69 +414,6 @@
     gtk_box_pack_start(GTK_BOX(decode_freq_vbox), decode_freq_1to4, FALSE,
                        FALSE, 0);
 
-
-#ifdef USE_SIMD
-    {
-        GtkWidget *decoder_frame, *decoder_vbox;
-
-        decoder_frame = gtk_frame_new(_("Decoder:"));
-        gtk_box_pack_start(GTK_BOX(decode_vbox), decoder_frame, FALSE,
-                           FALSE, 0);
-
-        decoder_vbox = gtk_vbox_new(FALSE, 5);
-        gtk_container_set_border_width(GTK_CONTAINER(decoder_vbox), 5);
-        gtk_container_add(GTK_CONTAINER(decoder_frame), decoder_vbox);
-
-        auto_select =
-            gtk_check_button_new_with_label(_("Automatic detection"));
-        gtk_box_pack_start(GTK_BOX(decoder_vbox), auto_select, FALSE,
-                           FALSE, 0);
-        g_signal_connect(G_OBJECT(auto_select), "clicked",
-                         G_CALLBACK(auto_select_cb), NULL);
-
-        decoder_3dnow =
-            gtk_radio_button_new_with_label(NULL,
-                                            _("3DNow! optimized decoder"));
-        gtk_box_pack_start(GTK_BOX(decoder_vbox), decoder_3dnow, FALSE,
-                           FALSE, 0);
-
-        decoder_mmx =
-            gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON
-                                                        (decoder_3dnow),
-                                                        _
-                                                        ("MMX optimized decoder"));
-        gtk_box_pack_start(GTK_BOX(decoder_vbox), decoder_mmx, FALSE,
-                           FALSE, 0);
-
-        decoder_fpu =
-            gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON
-                                                        (decoder_3dnow),
-                                                        _("FPU decoder"));
-        gtk_box_pack_start(GTK_BOX(decoder_vbox), decoder_fpu, FALSE,
-                           FALSE, 0);
-
-        switch (mpg123_cfg.default_synth) {
-        case SYNTH_3DNOW:
-            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decoder_3dnow),
-                                         TRUE);
-            break;
-        case SYNTH_MMX:
-            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decoder_mmx),
-                                         TRUE);
-            break;
-        case SYNTH_FPU:
-            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decoder_fpu),
-                                         TRUE);
-            break;
-        default:
-            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(decoder_fpu),
-                                         TRUE);
-            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(auto_select),
-                                         TRUE);
-            break;
-        }
-    }
-#endif
     option_frame = gtk_frame_new(_("Options"));
     gtk_box_pack_start(GTK_BOX(decode_vbox), option_frame, FALSE, FALSE, 0);
 
--- a/Plugins/Input/mpg123/layer2.c	Sun Nov 13 12:55:07 2005 -0800
+++ b/Plugins/Input/mpg123/layer2.c	Sun Nov 13 12:59:10 2005 -0800
@@ -57,12 +57,6 @@
     double m=mulmul[k];
 
     table = mpg123_muls[k];
-#ifdef USE_SIMD
-    if(mmx) 
-        for(j=3,i=0;i<63;i++,j--)
-	  *table++ = 16384 * m * pow(2.0,(double) j / 3.0);
-    else
-#endif
     for(j=3,i=0;i<63;i++,j--)
        *table  = m * pow(2.0, (double) j / 3.0);
     *table++ = 0.0;
--- a/Plugins/Input/mpg123/layer3.c	Sun Nov 13 12:55:07 2005 -0800
+++ b/Plugins/Input/mpg123/layer3.c	Sun Nov 13 12:59:10 2005 -0800
@@ -1848,18 +1848,6 @@
         }
 #endif
         
-#ifdef USE_SIMD
-        if (fr->synth_type == SYNTH_MMX && single < 0) {
-            int i, sb;
-
-            for (sb = 0, i = 0; sb < SBLIMIT; sb++) {
-                for (ss = 0; ss < SSLIMIT; ss++) {
-                    hybridIn[0][sb][ss] *= 16384.0;
-                    hybridIn[1][sb][ss] *= 16384.0;
-                }
-            }
-        }
-#endif
         for (ch = 0; ch < stereo1; ch++) {
             struct gr_info_s *gr_info = &(sideinfo.ch[ch].gr[gr]);
 
--- a/Plugins/Input/mpg123/mpg123.c	Sun Nov 13 12:55:07 2005 -0800
+++ b/Plugins/Input/mpg123/mpg123.c	Sun Nov 13 12:59:10 2005 -0800
@@ -13,11 +13,6 @@
 
 #include "audacious/util.h"
 
-
-#define CPU_HAS_MMX() (cpu_fflags & 0x800000)
-#define CPU_HAS_3DNOW() (cpu_efflags & 0x80000000)
-
-
 static const long outscale = 32768;
 
 static struct frame fr, temp_fr;
@@ -110,14 +105,6 @@
         {mpg123_synth_1to1_8bit,
          mpg123_synth_2to1_8bit,
          mpg123_synth_4to1_8bit},
-#ifdef USE_SIMD
-        {mpg123_synth_1to1_mmx,
-         mpg123_synth_2to1,
-         mpg123_synth_4to1},
-        {mpg123_synth_1to1_3dnow,
-         mpg123_synth_2to1,
-         mpg123_synth_4to1}
-#endif
     };
 
     static func_mono funcs_mono[2][4] = {
@@ -129,33 +116,12 @@
          mpg123_synth_4to1_8bit_mono}
     };
 
-#ifdef USE_SIMD
-    static func_dct36 funcs_dct36[2] = { dct36, dct36_3dnow };
-#endif
-
     if (mpg123_cfg.resolution == 8)
         p8 = 1;
     fr->synth = funcs[p8][ds];
     fr->synth_mono = funcs_mono[p8][ds];
     fr->synth_type = SYNTH_FPU;
 
-#ifdef USE_SIMD
-    fr->dct36 = funcs_dct36[0];
-
-    if (CPU_HAS_3DNOW() && !p8 &&
-        (mpg123_cfg.default_synth == SYNTH_3DNOW ||
-         mpg123_cfg.default_synth == SYNTH_AUTO)) {
-        fr->synth = funcs[3][ds];   /* 3DNow! optimized synth_1to1() */
-        fr->dct36 = funcs_dct36[1]; /* 3DNow! optimized dct36() */
-        fr->synth_type = SYNTH_3DNOW;
-    }
-    else if (CPU_HAS_MMX() && !p8 &&
-             (mpg123_cfg.default_synth == SYNTH_MMX ||
-              mpg123_cfg.default_synth == SYNTH_AUTO)) {
-        fr->synth = funcs[2][ds];   /* MMX optimized synth_1to1() */
-        fr->synth_type = SYNTH_MMX;
-    }
-#endif
     if (p8) {
         mpg123_make_conv16to8_table();
     }
--- a/Plugins/Input/mpg123/mpg123.h	Sun Nov 13 12:55:07 2005 -0800
+++ b/Plugins/Input/mpg123/mpg123.h	Sun Nov 13 12:59:10 2005 -0800
@@ -110,9 +110,6 @@
     struct al_table *alloc;
     int (*synth) (real *, int, unsigned char *, int *);
     int (*synth_mono) (real *, unsigned char *, int *);
-#ifdef USE_SIMD
-    void (*dct36) (real *, real *, real *, real *, real *);
-#endif
     int stereo;
     int jsbound;
     int single;
@@ -289,22 +286,11 @@
 extern void mpg123_huffman_count1(int, int *);
 extern int mpg123_get_songlen(struct frame *fr, int no);
 
-#ifdef USE_SIMD
-void mpg123_dct64_mmx(real *, real *, real *);
-int mpg123_synth_1to1_mmx(real *, int, unsigned char *, int *);
-
-void dct36(real *, real *, real *, real *, real *);
-void dct36_3dnow(real *, real *, real *, real *, real *);
-int mpg123_synth_1to1_3dnow(real *, int, unsigned char *, int *);
-
-int mpg123_getcpuflags(guint32 * fflags, guint32 * efflags);
-#else
 #define mpg123_getcpuflags(a, b)		\
 do {						\
 	*(a) = 0;				\
 	*(b) = 0;				\
 } while (0)
-#endif
 
 void mpg123_init_layer3(int);
 void mpg123_init_layer2(gboolean);
--- a/Plugins/Input/mpg123/tabinit.c	Sun Nov 13 12:55:07 2005 -0800
+++ b/Plugins/Input/mpg123/tabinit.c	Sun Nov 13 12:59:10 2005 -0800
@@ -82,47 +82,12 @@
     }
 }
 
-#ifdef USE_SIMD
-
-gint16 mpg123_decwins[(512 + 32) * 2];
-
 void
 mpg123_make_decode_tables_mmx(long scaleval)
 {
-    int i, j, p, a;
-
-    scaleval = -scaleval;
-    a = 1;
-    for (i = 0, j = 0, p = 0; i < 512; i++, j += a, p += 32) {
-        if (p < 512 + 16) {
-            int val = ((gint64) intwinbase[j] * scaleval) >> 17;
-            val = CLAMP(val, -32767, 32767);
-            if (p < 512) {
-                int n = 1055 - p;
-                mpg123_decwins[n - 16] = val;
-                mpg123_decwins[n] = val;
-            }
-            if (!(p & 1))
-                val = -val;
-            mpg123_decwins[p + 16] = val;
-            mpg123_decwins[p] = val;
-        }
-        if (i % 32 == 31)
-            p -= 1023;
-        if (i % 64 == 63)
-            scaleval = -scaleval;
-        if (i == 256)
-            a = -1;
-    }
+    mpg123_make_decode_tables(scaleval);
 }
 
-#else
-void
-mpg123_make_decode_tables_mmx(long scaleval)
-{
-}
-#endif
-
 void
 mpg123_make_decode_tables(long scaleval)
 {