summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Copyright10
-rw-r--r--Makefile22
-rwxr-xr-xconfigure19
-rw-r--r--etc/codecs.conf17
-rw-r--r--libmpcodecs/ad.c4
-rw-r--r--libmpcodecs/ad_mp3lib.c100
-rw-r--r--libmpcodecs/ad_mp3lib.h24
-rw-r--r--mp3lib/dct12.c139
-rw-r--r--mp3lib/dct36.c269
-rw-r--r--mp3lib/dct36_3dnow.c502
-rw-r--r--mp3lib/dct36_k7.c34
-rw-r--r--mp3lib/dct64.c323
-rw-r--r--mp3lib/dct64_3dnow.c929
-rw-r--r--mp3lib/dct64_altivec.c524
-rw-r--r--mp3lib/dct64_i386.c319
-rw-r--r--mp3lib/dct64_k7.c767
-rw-r--r--mp3lib/dct64_mmx.c987
-rw-r--r--mp3lib/dct64_sse.c423
-rw-r--r--mp3lib/decod386.c253
-rw-r--r--mp3lib/decode_i586.c318
-rw-r--r--mp3lib/decode_mmx.c369
-rw-r--r--mp3lib/equalizer.c78
-rw-r--r--mp3lib/huffman.h335
-rw-r--r--mp3lib/l2tables.h166
-rw-r--r--mp3lib/layer1.c165
-rw-r--r--mp3lib/layer2.c322
-rw-r--r--mp3lib/layer3.c1349
-rw-r--r--mp3lib/mp3.h39
-rw-r--r--mp3lib/mpg123.h144
-rw-r--r--mp3lib/sr1.c605
-rw-r--r--mp3lib/tabinit.c75
-rw-r--r--mp3lib/test.c89
-rw-r--r--mp3lib/test2.c87
33 files changed, 1 insertions, 9805 deletions
diff --git a/Copyright b/Copyright
index def4bf611c..491ddea6c2 100644
--- a/Copyright
+++ b/Copyright
@@ -21,16 +21,6 @@ Copyright: Many, see individual files for copyright notices.
License: GNU Lesser General Public License
-Name: mpg123
-Version: 0.59s + significant changes
-URL: http://www.mpg123.de/
-Directory: mp3lib
-Copyright: 1995-1999 by Michael Hipp
- 2004 Romain Dolbeau <romain@dolbeau.org>
- 2006 Zuxy Meng <zuxy.meng@gmail.com
-License: GNU General Public License
-
-
Name: avifile DLL loader
Version: 0.47 + patches + CVS updates
URL: http://avifile.sourceforge.net/
diff --git a/Makefile b/Makefile
index b38590c9ea..f362a814ee 100644
--- a/Makefile
+++ b/Makefile
@@ -122,21 +122,6 @@ SRCS_COMMON-$(MACOSX_FINDER) += osdep/macosx_finder_args.c
SRCS_COMMON-$(MNG) += libmpdemux/demux_mng.c
SRCS_COMMON-$(MPG123) += libmpcodecs/ad_mpg123.c
-SRCS_MP3LIB-X86-$(HAVE_AMD3DNOW) += mp3lib/dct36_3dnow.c \
- mp3lib/dct64_3dnow.c
-SRCS_MP3LIB-X86-$(HAVE_AMD3DNOWEXT) += mp3lib/dct36_k7.c \
- mp3lib/dct64_k7.c
-SRCS_MP3LIB-X86-$(HAVE_MMX) += mp3lib/dct64_mmx.c
-SRCS_MP3LIB-$(ARCH_X86_32) += mp3lib/decode_i586.c \
- $(SRCS_MP3LIB-X86-yes)
-SRCS_MP3LIB-$(HAVE_ALTIVEC) += mp3lib/dct64_altivec.c
-SRCS_MP3LIB-$(HAVE_MMX) += mp3lib/decode_mmx.c
-SRCS_MP3LIB-$(HAVE_SSE) += mp3lib/dct64_sse.c
-SRCS_MP3LIB += mp3lib/sr1.c \
- $(SRCS_MP3LIB-yes)
-SRCS_COMMON-$(MP3LIB) += libmpcodecs/ad_mp3lib.c \
- $(SRCS_MP3LIB)
-
SRCS_COMMON-$(MUSEPACK) += libmpcodecs/ad_mpc.c \
libmpdemux/demux_mpc.c
SRCS_COMMON-$(NATIVE_RTSP) += stream/stream_rtsp.c \
@@ -578,7 +563,6 @@ DIRS = . \
loader/dshow \
loader/dmo \
loader/wine \
- mp3lib \
osdep \
stream \
stream/freesdp \
@@ -675,8 +659,6 @@ loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
#loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)
-mp3lib/decode_i586%: CFLAGS += -fomit-frame-pointer
-
stream/stream_dvdnav%: CFLAGS := $(CFLAGS_LIBDVDNAV) $(CFLAGS)
@@ -767,9 +749,7 @@ LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) lib
loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
-mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF): $(SRCS_MP3LIB:.c=.o) libvo/aclib.o cpudetect.o $(TEST_OBJS)
-
-TESTS = codecs2html codec-cfg-test libvo/aspecttest mp3lib/test mp3lib/test2
+TESTS = codecs2html codec-cfg-test libvo/aspecttest
ifdef ARCH_X86
TESTS += loader/qtx/list loader/qtx/qtxload
diff --git a/configure b/configure
index 4a0f88712e..914518ad06 100755
--- a/configure
+++ b/configure
@@ -376,7 +376,6 @@ Codecs:
--disable-mad disable libmad (MPEG audio) support [autodetect]
--enable-xmms enable XMMS input plugin support [disabled]
--enable-libdca enable libdca support [autodetect]
- --disable-mp3lib disable builtin mp3lib [autodetect]
--disable-liba52 disable liba52 [autodetect]
--enable-musepack enable libmpcdec support (deprecated, libavcodec
Musepack decoder is preferred) [disabled]
@@ -610,7 +609,6 @@ _libvorbis=auto
_speex=auto
_theora=auto
_mpg123=auto
-_mp3lib=auto
_liba52=auto
_libdca=auto
_faad=auto
@@ -965,8 +963,6 @@ for ac_option do
--disable-theora) _theora=no ;;
--enable-mpg123) _mpg123=yes ;;
--disable-mpg123) _mpg123=no ;;
- --enable-mp3lib) _mp3lib=yes ;;
- --disable-mp3lib) _mp3lib=no ;;
--enable-liba52) _liba52=yes ;;
--disable-liba52) _liba52=no ;;
--enable-libdca) _libdca=yes ;;
@@ -5742,19 +5738,6 @@ else
fi
echores "$_theora"
-echocheck "mp3lib support"
-if test "$_mp3lib" = auto ; then
- test "$cc_vendor" = intel && test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib=no || _mp3lib=yes
-fi
-if test "$_mp3lib" = yes ; then
- def_mp3lib='#define CONFIG_MP3LIB 1'
- codecmodules="mp3lib(internal) $codecmodules"
-else
- def_mp3lib='#undef CONFIG_MP3LIB'
- nocodecmodules="mp3lib(internal) $nocodecmodules"
-fi
-echores "$_mp3lib"
-
# Any version of libmpg123 shall be fine.
echocheck "mpg123 support"
def_mpg123='#undef CONFIG_MPG123'
@@ -6834,7 +6817,6 @@ MACOSX_FINDER = $_macosx_finder
MD5SUM = $_md5sum
MGA = $_mga
MNG = $_mng
-MP3LIB = $_mp3lib
MPG123 = $_mpg123
MUSEPACK = $_musepack
NAS = $_nas
@@ -7095,7 +7077,6 @@ $def_liba52
$def_libdca
$def_libdv
$def_mad
-$def_mp3lib
$def_mpg123
$def_musepack
$def_speex
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 5226c37197..3f624e51ee 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -4220,23 +4220,6 @@ audiocodec ffsonic
driver ffmpeg
dll "sonic"
-audiocodec mp3
- ; this is preferred over ffmp2/ffmp3 since it is faster due to using
- ; floating point and there are even broken mkv files where the audio
- ; needs to be parsed, making this codec work more reliably
- info "mp3lib MPEG layer-2, layer-3"
- status working
- comment "Optimized to MMX/SSE/3Dnow!"
- format 0x50 ; layer-1 && layer-2
- format 0x55 ; layer-3
- format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files)
- format 0x5000736d ; "ms\0\x50" older mp2 fcc (MOV files)
- format 0x55005354 ; broken file
- fourcc ".mp3" ; CBR/VBR MP3 (MOV files)
- fourcc "MP3 " ; used in .nsv files
- fourcc "LAME" ; used in mythtv .nuv files
- driver mp3lib
-
audiocodec mpg123
; this is preferred over ffmp2/ffmp3 since it is faster, generally
info "MPEG 1.0/2.0/2.5 layers I, II, III"
diff --git a/libmpcodecs/ad.c b/libmpcodecs/ad.c
index 2e431e6c48..68d2c44708 100644
--- a/libmpcodecs/ad.c
+++ b/libmpcodecs/ad.c
@@ -32,7 +32,6 @@
/* Missed vorbis, mad, dshow */
extern const ad_functions_t mpcodecs_ad_mpg123;
-extern const ad_functions_t mpcodecs_ad_mp3lib;
extern const ad_functions_t mpcodecs_ad_ffmpeg;
extern const ad_functions_t mpcodecs_ad_liba52;
extern const ad_functions_t mpcodecs_ad_hwac3;
@@ -63,9 +62,6 @@ const ad_functions_t * const mpcodecs_ad_drivers[] =
#ifdef CONFIG_MPG123
&mpcodecs_ad_mpg123,
#endif
-#ifdef CONFIG_MP3LIB
- &mpcodecs_ad_mp3lib,
-#endif
#ifdef CONFIG_LIBA52
&mpcodecs_ad_liba52,
#endif
diff --git a/libmpcodecs/ad_mp3lib.c b/libmpcodecs/ad_mp3lib.c
deleted file mode 100644
index f262757526..0000000000
--- a/libmpcodecs/ad_mp3lib.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "config.h"
-
-#include "ad_internal.h"
-#include "ad_mp3lib.h"
-
-static const ad_info_t info =
-{
- "MPEG layer-2, layer-3",
- "mp3lib",
- "Nick Kurshev",
- "mpg123",
- "Optimized to MMX/SSE/3Dnow!"
-};
-
-LIBAD_EXTERN(mp3lib)
-
-#include "mp3lib/mp3.h"
-
-extern int fakemono;
-
-static sh_audio_t* dec_audio_sh=NULL;
-
-// MP3 decoder buffer callback:
-int mplayer_audio_read(char *buf,int size){
- return demux_read_data(dec_audio_sh->ds,buf,size);
-}
-
-static int preinit(sh_audio_t *sh)
-{
- sh->audio_out_minsize=32*36*2*2; //4608;
- return 1;
-}
-
-static int init(sh_audio_t *sh)
-{
- // MPEG Audio:
- dec_audio_sh=sh; // save sh_audio for the callback:
-// MP3_Init(fakemono,mplayer_accel,&mplayer_audio_read); // TODO!!!
-#ifdef CONFIG_FAKE_MONO
- MP3_Init(fakemono);
-#else
- MP3_Init();
-#endif
- MP3_samplerate=MP3_channels=0;
- sh->a_buffer_len=MP3_DecodeFrame(sh->a_buffer,-1);
- if(!sh->a_buffer_len) return 0; // unsupported layer/format
- sh->channels=2; // hack
- sh->samplesize=2;
- sh->samplerate=MP3_samplerate;
- sh->i_bps=MP3_bitrate*(1000/8);
- MP3_PrintHeader();
- return 1;
-}
-
-static void uninit(sh_audio_t *sh)
-{
-}
-
-static int control(sh_audio_t *sh,int cmd,void* arg, ...)
-{
- switch(cmd)
- {
- case ADCTRL_RESYNC_STREAM:
- MP3_DecodeFrame(NULL,-2); // resync
- MP3_DecodeFrame(NULL,-2); // resync
- MP3_DecodeFrame(NULL,-2); // resync
- return CONTROL_TRUE;
- case ADCTRL_SKIP_FRAME:
- MP3_DecodeFrame(NULL,-2); // skip MPEG frame
- return CONTROL_TRUE;
- }
- return CONTROL_UNKNOWN;
-}
-
-static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
-{
- return MP3_DecodeFrame(buf,-1);
-}
diff --git a/libmpcodecs/ad_mp3lib.h b/libmpcodecs/ad_mp3lib.h
deleted file mode 100644
index aeb78b4ed8..0000000000
--- a/libmpcodecs/ad_mp3lib.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef MPLAYER_AD_MP3LIB_H
-#define MPLAYER_AD_MP3LIB_H
-
-int mplayer_audio_read(char *buf, int size);
-
-#endif /* MPLAYER_AD_MP3LIB_H */
diff --git a/mp3lib/dct12.c b/mp3lib/dct12.c
deleted file mode 100644
index 5ba45af389..0000000000
--- a/mp3lib/dct12.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * new DCT12
- */
-static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,register real *ts)
-{
-#define DCT12_PART1 \
- in5 = in[5*3]; \
- in5 += (in4 = in[4*3]); \
- in4 += (in3 = in[3*3]); \
- in3 += (in2 = in[2*3]); \
- in2 += (in1 = in[1*3]); \
- in1 += (in0 = in[0*3]); \
- \
- in5 += in3; in3 += in1; \
- \
- in2 *= COS6_1; \
- in3 *= COS6_1; \
-
-#define DCT12_PART2 \
- in0 += in4 * COS6_2; \
- \
- in4 = in0 + in2; \
- in0 -= in2; \
- \
- in1 += in5 * COS6_2; \
- \
- in5 = (in1 + in3) * tfcos12[0]; \
- in1 = (in1 - in3) * tfcos12[2]; \
- \
- in3 = in4 + in5; \
- in4 -= in5; \
- \
- in2 = in0 + in1; \
- in0 -= in1;
-
-
- {
- real in0,in1,in2,in3,in4,in5;
- register real *out1 = rawout1;
- ts[SBLIMIT*0] = out1[0]; ts[SBLIMIT*1] = out1[1]; ts[SBLIMIT*2] = out1[2];
- ts[SBLIMIT*3] = out1[3]; ts[SBLIMIT*4] = out1[4]; ts[SBLIMIT*5] = out1[5];
-
- DCT12_PART1
-
- {
- real tmp0,tmp1 = (in0 - in4);
- {
- real tmp2 = (in1 - in5) * tfcos12[1];
- tmp0 = tmp1 + tmp2;
- tmp1 -= tmp2;
- }
- ts[(17-1)*SBLIMIT] = out1[17-1] + tmp0 * wi[11-1];
- ts[(12+1)*SBLIMIT] = out1[12+1] + tmp0 * wi[6+1];
- ts[(6 +1)*SBLIMIT] = out1[6 +1] + tmp1 * wi[1];
- ts[(11-1)*SBLIMIT] = out1[11-1] + tmp1 * wi[5-1];
- }
-
- DCT12_PART2
-
- ts[(17-0)*SBLIMIT] = out1[17-0] + in2 * wi[11-0];
- ts[(12+0)*SBLIMIT] = out1[12+0] + in2 * wi[6+0];
- ts[(12+2)*SBLIMIT] = out1[12+2] + in3 * wi[6+2];
- ts[(17-2)*SBLIMIT] = out1[17-2] + in3 * wi[11-2];
-
- ts[(6+0)*SBLIMIT] = out1[6+0] + in0 * wi[0];
- ts[(11-0)*SBLIMIT] = out1[11-0] + in0 * wi[5-0];
- ts[(6+2)*SBLIMIT] = out1[6+2] + in4 * wi[2];
- ts[(11-2)*SBLIMIT] = out1[11-2] + in4 * wi[5-2];
- }
-
- in++;
-
- {
- real in0,in1,in2,in3,in4,in5;
- register real *out2 = rawout2;
-
- DCT12_PART1
-
- {
- real tmp0,tmp1 = (in0 - in4);
- {
- real tmp2 = (in1 - in5) * tfcos12[1];
- tmp0 = tmp1 + tmp2;
- tmp1 -= tmp2;
- }
- out2[5-1] = tmp0 * wi[11-1];
- out2[0+1] = tmp0 * wi[6+1];
- ts[(12+1)*SBLIMIT] += tmp1 * wi[1];
- ts[(17-1)*SBLIMIT] += tmp1 * wi[5-1];
- }
-
- DCT12_PART2
-
- out2[5-0] = in2 * wi[11-0];
- out2[0+0] = in2 * wi[6+0];
- out2[0+2] = in3 * wi[6+2];
- out2[5-2] = in3 * wi[11-2];
-
- ts[(12+0)*SBLIMIT] += in0 * wi[0];
- ts[(17-0)*SBLIMIT] += in0 * wi[5-0];
- ts[(12+2)*SBLIMIT] += in4 * wi[2];
- ts[(17-2)*SBLIMIT] += in4 * wi[5-2];
- }
-
- in++;
-
- {
- real in0,in1,in2,in3,in4,in5;
- register real *out2 = rawout2;
- out2[12]=out2[13]=out2[14]=out2[15]=out2[16]=out2[17]=0.0;
-
- DCT12_PART1
-
- {
- real tmp0,tmp1 = (in0 - in4);
- {
- real tmp2 = (in1 - in5) * tfcos12[1];
- tmp0 = tmp1 + tmp2;
- tmp1 -= tmp2;
- }
- out2[11-1] = tmp0 * wi[11-1];
- out2[6 +1] = tmp0 * wi[6+1];
- out2[0+1] += tmp1 * wi[1];
- out2[5-1] += tmp1 * wi[5-1];
- }
-
- DCT12_PART2
-
- out2[11-0] = in2 * wi[11-0];
- out2[6 +0] = in2 * wi[6+0];
- out2[6 +2] = in3 * wi[6+2];
- out2[11-2] = in3 * wi[11-2];
-
- out2[0+0] += in0 * wi[0];
- out2[5-0] += in0 * wi[5-0];
- out2[0+2] += in4 * wi[2];
- out2[5-2] += in4 * wi[5-2];
- }
-}
diff --git a/mp3lib/dct36.c b/mp3lib/dct36.c
deleted file mode 100644
index 22ec273277..0000000000
--- a/mp3lib/dct36.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Modified for use with MPlayer, for details see the changelog at
- * http://svn.mplayerhq.hu/mplayer/trunk/
- * $Id$
- */
-
-/*
-// This is an optimized DCT from Jeff Tsay's maplay 1.2+ package.
-// Saved one multiplication by doing the 'twiddle factor' stuff
-// together with the window mul. (MH)
-//
-// This uses Byeong Gi Lee's Fast Cosine Transform algorithm, but the
-// 9 point IDCT needs to be reduced further. Unfortunately, I don't
-// know how to do that, because 9 is not an even number. - Jeff.
-//
-//////////////////////////////////////////////////////////////////
-//
-// 9 Point Inverse Discrete Cosine Transform
-//
-// This piece of code is Copyright 1997 Mikko Tommila and is freely usable
-// by anybody. The algorithm itself is of course in the public domain.
-//
-// Again derived heuristically from the 9-point WFTA.
-//
-// The algorithm is optimized (?) for speed, not for small rounding errors or
-// good readability.
-//
-// 36 additions, 11 multiplications
-//
-// Again this is very likely sub-optimal.
-//
-// The code is optimized to use a minimum number of temporary variables,
-// so it should compile quite well even on 8-register Intel x86 processors.
-// This makes the code quite obfuscated and very difficult to understand.
-//
-// References:
-// [1] S. Winograd: "On Computing the Discrete Fourier Transform",
-// Mathematics of Computation, Volume 32, Number 141, January 1978,
-// Pages 175-199
-*/
-
-/*------------------------------------------------------------------*/
-/* */
-/* Function: Calculation of the inverse MDCT */
-/* */
-/*------------------------------------------------------------------*/
-
-static void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf)
-{
-#ifdef NEW_DCT9
- real tmp[18];
-#endif
-
- {
- register real *in = inbuf;
-
- in[17]+=in[16]; in[16]+=in[15]; in[15]+=in[14];
- in[14]+=in[13]; in[13]+=in[12]; in[12]+=in[11];
- in[11]+=in[10]; in[10]+=in[9]; in[9] +=in[8];
- in[8] +=in[7]; in[7] +=in[6]; in[6] +=in[5];
- in[5] +=in[4]; in[4] +=in[3]; in[3] +=in[2];
- in[2] +=in[1]; in[1] +=in[0];
-
- in[17]+=in[15]; in[15]+=in[13]; in[13]+=in[11]; in[11]+=in[9];
- in[9] +=in[7]; in[7] +=in[5]; in[5] +=in[3]; in[3] +=in[1];
-
-
-#ifdef NEW_DCT9
- {
- real t0, t1, t2, t3, t4, t5, t6, t7;
-
- t1 = COS6_2 * in[12];
- t2 = COS6_2 * (in[8] + in[16] - in[4]);
-
- t3 = in[0] + t1;
- t4 = in[0] - t1 - t1;
- t5 = t4 - t2;
-
- t0 = cos9[0] * (in[4] + in[8]);
- t1 = cos9[1] * (in[8] - in[16]);
-
- tmp[4] = t4 + t2 + t2;
- t2 = cos9[2] * (in[4] + in[16]);
-
- t6 = t3 - t0 - t2;
- t0 += t3 + t1;
- t3 += t2 - t1;
-
- t2 = cos18[0] * (in[2] + in[10]);
- t4 = cos18[1] * (in[10] - in[14]);
- t7 = COS6_1 * in[6];
-
- t1 = t2 + t4 + t7;
- tmp[0] = t0 + t1;
- tmp[8] = t0 - t1;
- t1 = cos18[2] * (in[2] + in[14]);
- t2 += t1 - t7;
-
- tmp[3] = t3 + t2;
- t0 = COS6_1 * (in[10] + in[14] - in[2]);
- tmp[5] = t3 - t2;
-
- t4 -= t1 + t7;
-
- tmp[1] = t5 - t0;
- tmp[7] = t5 + t0;
- tmp[2] = t6 + t4;
- tmp[6] = t6 - t4;
- }
-
- {
- real t0, t1, t2, t3, t4, t5, t6, t7;
-
- t1 = COS6_2 * in[13];
- t2 = COS6_2 * (in[9] + in[17] - in[5]);
-
- t3 = in[1] + t1;
- t4 = in[1] - t1 - t1;
- t5 = t4 - t2;
-
- t0 = cos9[0] * (in[5] + in[9]);
- t1 = cos9[1] * (in[9] - in[17]);
-
- tmp[13] = (t4 + t2 + t2) * tfcos36[17-13];
- t2 = cos9[2] * (in[5] + in[17]);
-
- t6 = t3 - t0 - t2;
- t0 += t3 + t1;
- t3 += t2 - t1;
-
- t2 = cos18[0] * (in[3] + in[11]);
- t4 = cos18[1] * (in[11] - in[15]);
- t7 = COS6_1 * in[7];
-
- t1 = t2 + t4 + t7;
- tmp[17] = (t0 + t1) * tfcos36[17-17];
- tmp[9] = (t0 - t1) * tfcos36[17-9];
- t1 = cos18[2] * (in[3] + in[15]);
- t2 += t1 - t7;
-
- tmp[14] = (t3 + t2) * tfcos36[17-14];
- t0 = COS6_1 * (in[11] + in[15] - in[3]);
- tmp[12] = (t3 - t2) * tfcos36[17-12];
-
- t4 -= t1 + t7;
-
- tmp[16] = (t5 - t0) * tfcos36[17-16];
- tmp[10] = (t5 + t0) * tfcos36[17-10];
- tmp[15] = (t6 + t4) * tfcos36[17-15];
- tmp[11] = (t6 - t4) * tfcos36[17-11];
- }
-
-#define MACRO(v) { \
- real tmpval; \
- real sum0 = tmp[(v)]; \
- real sum1 = tmp[17-(v)]; \
- out2[9+(v)] = (tmpval = sum0 + sum1) * w[27+(v)]; \
- out2[8-(v)] = tmpval * w[26-(v)]; \
- sum0 -= sum1; \
- ts[SBLIMIT*(8-(v))] = out1[8-(v)] + sum0 * w[8-(v)]; \
- ts[SBLIMIT*(9+(v))] = out1[9+(v)] + sum0 * w[9+(v)]; }
-
-{
- register real *out2 = o2;
- register real *w = wintab;
- register real *out1 = o1;
- register real *ts = tsbuf;
-
- MACRO(0);
- MACRO(1);
- MACRO(2);
- MACRO(3);
- MACRO(4);
- MACRO(5);
- MACRO(6);
- MACRO(7);
- MACRO(8);
-}
-
-#else
-
- {
-
-#define MACRO0(v) { \
- real tmp; \
- out2[9+(v)] = (tmp = sum0 + sum1) * w[27+(v)]; \
- out2[8-(v)] = tmp * w[26-(v)]; } \
- sum0 -= sum1; \
- ts[SBLIMIT*(8-(v))] = out1[8-(v)] + sum0 * w[8-(v)]; \
- ts[SBLIMIT*(9+(v))] = out1[9+(v)] + sum0 * w[9+(v)];
-#define MACRO1(v) { \
- real sum0, sum1; \
- sum0 = tmp1a + tmp2a; \
- sum1 = (tmp1b + tmp2b) * tfcos36[(v)]; \
- MACRO0(v); }
-#define MACRO2(v) { \
- real sum0, sum1; \
- sum0 = tmp2a - tmp1a; \
- sum1 = (tmp2b - tmp1b) * tfcos36[(v)]; \
- MACRO0(v); }
-
- register const real *c = COS9;
- register real *out2 = o2;
- register real *w = wintab;
- register real *out1 = o1;
- register real *ts = tsbuf;
-
- real ta33,ta66,tb33,tb66;
-
- ta33 = in[2*3+0] * c[3];
- ta66 = in[2*6+0] * c[6];
- tb33 = in[2*3+1] * c[3];
- tb66 = in[2*6+1] * c[6];
-
- {
- real tmp1a,tmp2a,tmp1b,tmp2b;
- tmp1a = in[2*1+0] * c[1] + ta33 + in[2*5+0] * c[5] + in[2*7+0] * c[7];
- tmp1b = in[2*1+1] * c[1] + tb33 + in[2*5+1] * c[5] + in[2*7+1] * c[7];
- tmp2a = in[2*0+0] + in[2*2+0] * c[2] + in[2*4+0] * c[4] + ta66 + in[2*8+0] * c[8];
- tmp2b = in[2*0+1] + in[2*2+1] * c[2] + in[2*4+1] * c[4] + tb66 + in[2*8+1] * c[8];
-
- MACRO1(0);
- MACRO2(8);
- }
-
- {
- real tmp1a,tmp2a,tmp1b,tmp2b;
- tmp1a = ( in[2*1+0] - in[2*5+0] - in[2*7+0] ) * c[3];
- tmp1b = ( in[2*1+1] - in[2*5+1] - in[2*7+1] ) * c[3];
- tmp2a = ( in[2*2+0] - in[2*4+0] - in[2*8+0] ) * c[6] - in[2*6+0] + in[2*0+0];
- tmp2b = ( in[2*2+1] - in[2*4+1] - in[2*8+1] ) * c[6] - in[2*6+1] + in[2*0+1];
-
- MACRO1(1);
- MACRO2(7);
- }
-
- {
- real tmp1a,tmp2a,tmp1b,tmp2b;
- tmp1a = in[2*1+0] * c[5] - ta33 - in[2*5+0] * c[7] + in[2*7+0] * c[1];
- tmp1b = in[2*1+1] * c[5] - tb33 - in[2*5+1] * c[7] + in[2*7+1] * c[1];
- tmp2a = in[2*0+0] - in[2*2+0] * c[8] - in[2*4+0] * c[2] + ta66 + in[2*8+0] * c[4];
- tmp2b = in[2*0+1] - in[2*2+1] * c[8] - in[2*4+1] * c[2] + tb66 + in[2*8+1] * c[4];
-
- MACRO1(2);
- MACRO2(6);
- }
-
- {
- real tmp1a,tmp2a,tmp1b,tmp2b;
- tmp1a = in[2*1+0] * c[7] - ta33 + in[2*5+0] * c[1] - in[2*7+0] * c[5];
- tmp1b = in[2*1+1] * c[7] - tb33 + in[2*5+1] * c[1] - in[2*7+1] * c[5];
- tmp2a = in[2*0+0] - in[2*2+0] * c[4] + in[2*4+0] * c[8] + ta66 - in[2*8+0] * c[2];
- tmp2b = in[2*0+1] - in[2*2+1] * c[4] + in[2*4+1] * c[8] + tb66 - in[2*8+1] * c[2];
-
- MACRO1(3);
- MACRO2(5);
- }
-
- {
- real sum0,sum1;
- sum0 = in[2*0+0] - in[2*2+0] + in[2*4+0] - in[2*6+0] + in[2*8+0];
- sum1 = (in[2*0+1] - in[2*2+1] + in[2*4+1] - in[2*6+1] + in[2*8+1] ) * tfcos36[4];
- MACRO0(4);
- }
- }
-#endif
-
- }
-}
diff --git a/mp3lib/dct36_3dnow.c b/mp3lib/dct36_3dnow.c
deleted file mode 100644
index 4362d0582b..0000000000
--- a/mp3lib/dct36_3dnow.c
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
- * dct36_3dnow.c - 3DNow! optimized dct36()
- *
- * This code based 'dct36_3dnow.s' by Syuuhei Kashiyama
- * <squash@mb.kcom.ne.jp>, only two types of changes have been made:
- *
- * - removed PREFETCH instruction for speedup
- * - changed function name for support 3DNow! automatic detection
- *
- * You can find Kashiyama's original 3dnow! support patch
- * (for mpg123-0.59o) at
- * http://user.ecc.u-tokyo.ac.jp/~g810370/linux-simd/ (Japanese).
- *
- * by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1999
- * <kim@comtec.co.jp> - after 1.Apr.1999
- *
- * Modified for use with MPlayer, for details see the changelog at
- * http://svn.mplayerhq.hu/mplayer/trunk/
- * $Id$
- *
- * Original disclaimer:
- * The author of this program disclaim whole expressed or implied
- * warranties with regard to this program, and in no event shall the
- * author of this program liable to whatever resulted from the use of
- * this program. Use it at your own risk.
- *
- * 2003/06/21: Moved to GCC inline assembly - Alex Beregszaszi
- */
-
-#include "config.h"
-#include "mangle.h"
-#include "mpg123.h"
-#include "ffmpeg_files/x86_cpu.h"
-
-#ifdef DCT36_OPTIMIZE_FOR_K7
-void dct36_3dnowex(real *inbuf, real *o1,
- real *o2, real *wintab, real *tsbuf)
-#else
-void dct36_3dnow(real *inbuf, real *o1,
- real *o2, real *wintab, real *tsbuf)
-#endif
-{
- __asm__ volatile(
- "movq (%%"REG_a"),%%mm0\n\t"
- "movq 4(%%"REG_a"),%%mm1\n\t"
- "pfadd %%mm1,%%mm0\n\t"
- "movq %%mm0,4(%%"REG_a")\n\t"
- "psrlq $32,%%mm1\n\t"
- "movq 12(%%"REG_a"),%%mm2\n\t"
- "punpckldq %%mm2,%%mm1\n\t"
- "pfadd %%mm2,%%mm1\n\t"
- "movq %%mm1,12(%%"REG_a")\n\t"
- "psrlq $32,%%mm2\n\t"
- "movq 20(%%"REG_a"),%%mm3\n\t"
- "punpckldq %%mm3,%%mm2\n\t"
- "pfadd %%mm3,%%mm2\n\t"
- "movq %%mm2,20(%%"REG_a")\n\t"
- "psrlq $32,%%mm3\n\t"
- "movq 28(%%"REG_a"),%%mm4\n\t"
- "punpckldq %%mm4,%%mm3\n\t"
- "pfadd %%mm4,%%mm3\n\t"
- "movq %%mm3,28(%%"REG_a")\n\t"
- "psrlq $32,%%mm4\n\t"
- "movq 36(%%"REG_a"),%%mm5\n\t"
- "punpckldq %%mm5,%%mm4\n\t"
- "pfadd %%mm5,%%mm4\n\t"
- "movq %%mm4,36(%%"REG_a")\n\t"
- "psrlq $32,%%mm5\n\t"
- "movq 44(%%"REG_a"),%%mm6\n\t"
- "punpckldq %%mm6,%%mm5\n\t"
- "pfadd %%mm6,%%mm5\n\t"
- "movq %%mm5,44(%%"REG_a")\n\t"
- "psrlq $32,%%mm6\n\t"
- "movq 52(%%"REG_a"),%%mm7\n\t"
- "punpckldq %%mm7,%%mm6\n\t"
- "pfadd %%mm7,%%mm6\n\t"
- "movq %%mm6,52(%%"REG_a")\n\t"
- "psrlq $32,%%mm7\n\t"
- "movq 60(%%"REG_a"),%%mm0\n\t"
- "punpckldq %%mm0,%%mm7\n\t"
- "pfadd %%mm0,%%mm7\n\t"
- "movq %%mm7,60(%%"REG_a")\n\t"
- "psrlq $32,%%mm0\n\t"
- "movd 68(%%"REG_a"),%%mm1\n\t"
- "pfadd %%mm1,%%mm0\n\t"
- "movd %%mm0,68(%%"REG_a")\n\t"
- "movd 4(%%"REG_a"),%%mm0\n\t"
- "movd 12(%%"REG_a"),%%mm1\n\t"
- "punpckldq %%mm1,%%mm0\n\t"
- "punpckldq 20(%%"REG_a"),%%mm1\n\t"
- "pfadd %%mm1,%%mm0\n\t"
- "movd %%mm0,12(%%"REG_a")\n\t"
- "psrlq $32,%%mm0\n\t"
- "movd %%mm0,20(%%"REG_a")\n\t"
- "psrlq $32,%%mm1\n\t"
- "movd 28(%%"REG_a"),%%mm2\n\t"
- "punpckldq %%mm2,%%mm1\n\t"
- "punpckldq 36(%%"REG_a"),%%mm2\n\t"
- "pfadd %%mm2,%%mm1\n\t"
- "movd %%mm1,28(%%"REG_a")\n\t"
- "psrlq $32,%%mm1\n\t"
- "movd %%mm1,36(%%"REG_a")\n\t"
- "psrlq $32,%%mm2\n\t"
- "movd 44(%%"REG_a"),%%mm3\n\t"
- "punpckldq %%mm3,%%mm2\n\t"
- "punpckldq 52(%%"REG_a"),%%mm3\n\t"
- "pfadd %%mm3,%%mm2\n\t"
- "movd %%mm2,44(%%"REG_a")\n\t"
- "psrlq $32,%%mm2\n\t"
- "movd %%mm2,52(%%"REG_a")\n\t"
- "psrlq $32,%%mm3\n\t"
- "movd 60(%%"REG_a"),%%mm4\n\t"
- "punpckldq %%mm4,%%mm3\n\t"
- "punpckldq 68(%%"REG_a"),%%mm4\n\t"
- "pfadd %%mm4,%%mm3\n\t"
- "movd %%mm3,60(%%"REG_a