diff --git a/scripts/intsym.pl b/scripts/intsym.pl new file mode 100644 index 00000000..9a563fd3 --- /dev/null +++ b/scripts/intsym.pl @@ -0,0 +1,62 @@ +#!/usr/bin/perl + +my $dir = 'src/libmpg123'; +my @headers = qw(compat decode dither frame getbits getcpuflags huffman icy2utf8 icy id3 index mpg123lib_intern optimize parse reader); +my $prefix = 'INT123_'; + +my %ident; + +# Extra symbols. +my @symbols = qw(COS9); + +foreach my $header (@headers) +{ + print STDERR "==== working on header $header\n"; + open(DAT, '<', $dir.'/'.$header.'.h') or die "Cannot open $header.\n"; + while() + { + if(/^([^\s\(#][^\(]*)\s([a-z][a-z_0-9]+)\s*\(/) + { + # Skip preprocessing/comment stuff and official API. + unless($1 =~ '^#' or $1 =~ '/\*' or $2 =~ /^mpg123_/) + { + push(@symbols, $2); + } + } + } + close(DAT); +} + +print STDERR join("\n", glob("$dir/*.S"))."\n"; +foreach my $asm (glob("$dir/*.S")) +{ + print STDERR "==== working on asm file $asm\n"; + open(DAT, '<', $asm) or die "Cannot open $header.\n"; + while() + { + if(/^\s*\.globl\s+ASM_NAME\((\S+)\)$/) + { + print STDERR; + push(@symbols, $1) unless grep {$_ eq $1} @symbols; + } + } + close(DAT); +} + +print "#ifndef MPG123_INTMAP_H\n"; +print "#define MPG123_INTMAP_H\n"; +print "/* Mapping of internal mpg123 symbols to something that is less likely to conflict in case of static linking. */\n"; + +foreach my $sym (@symbols) +{ + my $name = $prefix.$sym; + my $signi = substr($name,0,31); + #print STDERR "$name / $signi\n"; + if(++$ident{$signi} > 1) + { + die "That symbol is not unique in 31 chars: $name\n"; + } + print "#define $sym $name\n"; +} + +print "#endif\n"; diff --git a/src/libmpg123/Makefile.am b/src/libmpg123/Makefile.am index 03d8ffcd..9959dd81 100644 --- a/src/libmpg123/Makefile.am +++ b/src/libmpg123/Makefile.am @@ -29,6 +29,7 @@ libmpg123_la_LIBADD = @DECODER_LOBJ@ @LFS_LOBJ@ libmpg123_la_DEPENDENCIES = @DECODER_LOBJ@ @LFS_LOBJ@ libmpg123_la_SOURCES = \ + intsym.h \ compat.c \ compat.h \ parse.c \ diff --git a/src/libmpg123/compat.h b/src/libmpg123/compat.h index 28520d58..d04e9aeb 100644 --- a/src/libmpg123/compat.h +++ b/src/libmpg123/compat.h @@ -15,6 +15,7 @@ #define MPG123_COMPAT_H #include "config.h" +#include "intsym.h" #ifdef HAVE_STDLIB_H /* realloc, size_t */ diff --git a/src/libmpg123/intsym.h b/src/libmpg123/intsym.h new file mode 100644 index 00000000..3c0ad80f --- /dev/null +++ b/src/libmpg123/intsym.h @@ -0,0 +1,236 @@ +#ifndef MPG123_INTMAP_H +#define MPG123_INTMAP_H +/* Mapping of internal mpg123 symbols to something that is less likely to conflict in case of static linking. */ +#define COS9 INT123_COS9 +#define compat_open INT123_compat_open +#define compat_close INT123_compat_close +#define win32_wide_utf8 INT123_win32_wide_utf8 +#define win32_utf8_wide INT123_win32_utf8_wide +#define ntom_set_ntom INT123_ntom_set_ntom +#define synth_1to1 INT123_synth_1to1 +#define synth_1to1_dither INT123_synth_1to1_dither +#define synth_1to1_i386 INT123_synth_1to1_i386 +#define synth_1to1_i586 INT123_synth_1to1_i586 +#define synth_1to1_i586_dither INT123_synth_1to1_i586_dither +#define synth_1to1_mmx INT123_synth_1to1_mmx +#define synth_1to1_3dnow INT123_synth_1to1_3dnow +#define synth_1to1_sse INT123_synth_1to1_sse +#define synth_1to1_stereo_sse INT123_synth_1to1_stereo_sse +#define synth_1to1_3dnowext INT123_synth_1to1_3dnowext +#define synth_1to1_altivec INT123_synth_1to1_altivec +#define synth_1to1_stereo_altivec INT123_synth_1to1_stereo_altivec +#define synth_1to1_x86_64 INT123_synth_1to1_x86_64 +#define synth_1to1_stereo_x86_64 INT123_synth_1to1_stereo_x86_64 +#define synth_1to1_arm INT123_synth_1to1_arm +#define absynth_1to1_i486 INT123_absynth_1to1_i486 +#define synth_1to1_mono INT123_synth_1to1_mono +#define synth_1to1_m2s INT123_synth_1to1_m2s +#define synth_2to1 INT123_synth_2to1 +#define synth_2to1_dither INT123_synth_2to1_dither +#define synth_2to1_i386 INT123_synth_2to1_i386 +#define synth_2to1_mono INT123_synth_2to1_mono +#define synth_2to1_m2s INT123_synth_2to1_m2s +#define synth_4to1 INT123_synth_4to1 +#define synth_4to1_dither INT123_synth_4to1_dither +#define synth_4to1_i386 INT123_synth_4to1_i386 +#define synth_4to1_mono INT123_synth_4to1_mono +#define synth_4to1_m2s INT123_synth_4to1_m2s +#define synth_ntom INT123_synth_ntom +#define synth_ntom_mono INT123_synth_ntom_mono +#define synth_ntom_m2s INT123_synth_ntom_m2s +#define synth_1to1_8bit INT123_synth_1to1_8bit +#define synth_1to1_8bit_i386 INT123_synth_1to1_8bit_i386 +#define synth_1to1_8bit_wrap INT123_synth_1to1_8bit_wrap +#define synth_1to1_8bit_mono INT123_synth_1to1_8bit_mono +#define synth_1to1_8bit_m2s INT123_synth_1to1_8bit_m2s +#define synth_1to1_8bit_wrap_mono INT123_synth_1to1_8bit_wrap_mono +#define synth_1to1_8bit_wrap_m2s INT123_synth_1to1_8bit_wrap_m2s +#define synth_2to1_8bit INT123_synth_2to1_8bit +#define synth_2to1_8bit_i386 INT123_synth_2to1_8bit_i386 +#define synth_2to1_8bit_mono INT123_synth_2to1_8bit_mono +#define synth_2to1_8bit_m2s INT123_synth_2to1_8bit_m2s +#define synth_4to1_8bit INT123_synth_4to1_8bit +#define synth_4to1_8bit_i386 INT123_synth_4to1_8bit_i386 +#define synth_4to1_8bit_mono INT123_synth_4to1_8bit_mono +#define synth_4to1_8bit_m2s INT123_synth_4to1_8bit_m2s +#define synth_ntom_8bit INT123_synth_ntom_8bit +#define synth_ntom_8bit_mono INT123_synth_ntom_8bit_mono +#define synth_ntom_8bit_m2s INT123_synth_ntom_8bit_m2s +#define synth_1to1_real INT123_synth_1to1_real +#define synth_1to1_real_i386 INT123_synth_1to1_real_i386 +#define synth_1to1_real_sse INT123_synth_1to1_real_sse +#define synth_1to1_real_stereo_sse INT123_synth_1to1_real_stereo_sse +#define synth_1to1_real_x86_64 INT123_synth_1to1_real_x86_64 +#define synth_1to1_real_stereo_x86_64 INT123_synth_1to1_real_stereo_x86_64 +#define synth_1to1_real_altivec INT123_synth_1to1_real_altivec +#define synth_1to1_real_stereo_altivec INT123_synth_1to1_real_stereo_altivec +#define synth_1to1_real_mono INT123_synth_1to1_real_mono +#define synth_1to1_real_m2s INT123_synth_1to1_real_m2s +#define synth_2to1_real INT123_synth_2to1_real +#define synth_2to1_real_i386 INT123_synth_2to1_real_i386 +#define synth_2to1_real_mono INT123_synth_2to1_real_mono +#define synth_2to1_real_m2s INT123_synth_2to1_real_m2s +#define synth_4to1_real INT123_synth_4to1_real +#define synth_4to1_real_i386 INT123_synth_4to1_real_i386 +#define synth_4to1_real_mono INT123_synth_4to1_real_mono +#define synth_4to1_real_m2s INT123_synth_4to1_real_m2s +#define synth_ntom_real INT123_synth_ntom_real +#define synth_ntom_real_mono INT123_synth_ntom_real_mono +#define synth_ntom_real_m2s INT123_synth_ntom_real_m2s +#define synth_1to1_s32 INT123_synth_1to1_s32 +#define synth_1to1_s32_i386 INT123_synth_1to1_s32_i386 +#define synth_1to1_s32_sse INT123_synth_1to1_s32_sse +#define synth_1to1_s32_stereo_sse INT123_synth_1to1_s32_stereo_sse +#define synth_1to1_s32_x86_64 INT123_synth_1to1_s32_x86_64 +#define synth_1to1_s32_stereo_x86_64 INT123_synth_1to1_s32_stereo_x86_64 +#define synth_1to1_s32_altivec INT123_synth_1to1_s32_altivec +#define synth_1to1_s32_stereo_altivec INT123_synth_1to1_s32_stereo_altivec +#define synth_1to1_s32_mono INT123_synth_1to1_s32_mono +#define synth_1to1_s32_m2s INT123_synth_1to1_s32_m2s +#define synth_2to1_s32 INT123_synth_2to1_s32 +#define synth_2to1_s32_i386 INT123_synth_2to1_s32_i386 +#define synth_2to1_s32_mono INT123_synth_2to1_s32_mono +#define synth_2to1_s32_m2s INT123_synth_2to1_s32_m2s +#define synth_4to1_s32 INT123_synth_4to1_s32 +#define synth_4to1_s32_i386 INT123_synth_4to1_s32_i386 +#define synth_4to1_s32_mono INT123_synth_4to1_s32_mono +#define synth_4to1_s32_m2s INT123_synth_4to1_s32_m2s +#define synth_ntom_s32 INT123_synth_ntom_s32 +#define synth_ntom_s32_mono INT123_synth_ntom_s32_mono +#define synth_ntom_s32_m2s INT123_synth_ntom_s32_m2s +#define dct64 INT123_dct64 +#define dct64_i386 INT123_dct64_i386 +#define dct64_altivec INT123_dct64_altivec +#define dct64_i486 INT123_dct64_i486 +#define dct36 INT123_dct36 +#define dct36_3dnow INT123_dct36_3dnow +#define dct36_3dnowext INT123_dct36_3dnowext +#define synth_ntom_set_step INT123_synth_ntom_set_step +#define ntom_val INT123_ntom_val +#define ntom_frame_outsamples INT123_ntom_frame_outsamples +#define ntom_frmouts INT123_ntom_frmouts +#define ntom_ins2outs INT123_ntom_ins2outs +#define ntom_frameoff INT123_ntom_frameoff +#define init_layer3 INT123_init_layer3 +#define init_layer3_gainpow2 INT123_init_layer3_gainpow2 +#define init_layer3_stuff INT123_init_layer3_stuff +#define init_layer12 INT123_init_layer12 +#define init_layer12_table INT123_init_layer12_table +#define init_layer12_stuff INT123_init_layer12_stuff +#define prepare_decode_tables INT123_prepare_decode_tables +#define make_decode_tables INT123_make_decode_tables +#define make_decode_tables_mmx INT123_make_decode_tables_mmx +#define init_layer3_gainpow2_mmx INT123_init_layer3_gainpow2_mmx +#define init_layer12_table_mmx INT123_init_layer12_table_mmx +#define make_conv16to8_table INT123_make_conv16to8_table +#define do_layer3 INT123_do_layer3 +#define do_layer2 INT123_do_layer2 +#define do_layer1 INT123_do_layer1 +#define do_equalizer INT123_do_equalizer +#define dither_table_init INT123_dither_table_init +#define frame_dither_init INT123_frame_dither_init +#define invalidate_format INT123_invalidate_format +#define frame_init INT123_frame_init +#define frame_init_par INT123_frame_init_par +#define frame_outbuffer INT123_frame_outbuffer +#define frame_output_format INT123_frame_output_format +#define frame_buffers INT123_frame_buffers +#define frame_reset INT123_frame_reset +#define frame_buffers_reset INT123_frame_buffers_reset +#define frame_exit INT123_frame_exit +#define frame_index_find INT123_frame_index_find +#define frame_index_setup INT123_frame_index_setup +#define do_volume INT123_do_volume +#define do_rva INT123_do_rva +#define frame_gapless_init INT123_frame_gapless_init +#define frame_gapless_realinit INT123_frame_gapless_realinit +#define frame_gapless_update INT123_frame_gapless_update +#define frame_gapless_bytify INT123_frame_gapless_bytify +#define frame_gapless_ignore INT123_frame_gapless_ignore +#define frame_expect_outsamples INT123_frame_expect_outsamples +#define frame_skip INT123_frame_skip +#define frame_ins2outs INT123_frame_ins2outs +#define frame_outs INT123_frame_outs +#define frame_expect_outsampels INT123_frame_expect_outsampels +#define frame_offset INT123_frame_offset +#define frame_set_frameseek INT123_frame_set_frameseek +#define frame_set_seek INT123_frame_set_seek +#define frame_tell_seek INT123_frame_tell_seek +#define frame_fill_toc INT123_frame_fill_toc +#define getbits INT123_getbits +#define getcpuflags INT123_getcpuflags +#define init_icy INT123_init_icy +#define clear_icy INT123_clear_icy +#define reset_icy INT123_reset_icy +#define init_id3 INT123_init_id3 +#define exit_id3 INT123_exit_id3 +#define reset_id3 INT123_reset_id3 +#define id3_link INT123_id3_link +#define parse_new_id3 INT123_parse_new_id3 +#define id3_to_utf8 INT123_id3_to_utf8 +#define fi_init INT123_fi_init +#define fi_exit INT123_fi_exit +#define fi_resize INT123_fi_resize +#define fi_add INT123_fi_add +#define fi_set INT123_fi_set +#define fi_reset INT123_fi_reset +#define double_to_long_rounded INT123_double_to_long_rounded +#define scale_rounded INT123_scale_rounded +#define decode_update INT123_decode_update +#define samples_to_bytes INT123_samples_to_bytes +#define bytes_to_samples INT123_bytes_to_samples +#define frame_cpu_opt INT123_frame_cpu_opt +#define set_synth_functions INT123_set_synth_functions +#define dectype INT123_dectype +#define defdec INT123_defdec +#define decclass INT123_decclass +#define check_decoders INT123_check_decoders +#define read_frame_init INT123_read_frame_init +#define frame_bitrate INT123_frame_bitrate +#define frame_freq INT123_frame_freq +#define read_frame_recover INT123_read_frame_recover +#define read_frame INT123_read_frame +#define set_pointer INT123_set_pointer +#define position_info INT123_position_info +#define compute_bpf INT123_compute_bpf +#define time_to_frame INT123_time_to_frame +#define get_songlen INT123_get_songlen +#define open_stream INT123_open_stream +#define open_stream_handle INT123_open_stream_handle +#define open_feed INT123_open_feed +#define feed_more INT123_feed_more +#define feed_forget INT123_feed_forget +#define feed_set_pos INT123_feed_set_pos +#define open_bad INT123_open_bad +#define dct64_3dnow INT123_dct64_3dnow +#define dct64_3dnowext INT123_dct64_3dnowext +#define dct64_mmx INT123_dct64_mmx +#define dct64_MMX INT123_dct64_MMX +#define dct64_sse INT123_dct64_sse +#define dct64_real_sse INT123_dct64_real_sse +#define dct64_x86_64 INT123_dct64_x86_64 +#define dct64_real_x86_64 INT123_dct64_real_x86_64 +#define do_equalizer_3dnow INT123_do_equalizer_3dnow +#define synth_1to1_3dnow_asm INT123_synth_1to1_3dnow_asm +#define synth_1to1_arm_asm INT123_synth_1to1_arm_asm +#define synth_1to1_arm_accurate_asm INT123_synth_1to1_arm_accurate_asm +#define synth_1to1_i586_asm INT123_synth_1to1_i586_asm +#define synth_1to1_i586_asm_dither INT123_synth_1to1_i586_asm_dither +#define synth_1to1_MMX INT123_synth_1to1_MMX +#define synth_1to1_sse_accurate_asm INT123_synth_1to1_sse_accurate_asm +#define synth_1to1_real_sse_asm INT123_synth_1to1_real_sse_asm +#define synth_1to1_s32_sse_asm INT123_synth_1to1_s32_sse_asm +#define synth_1to1_s_sse_accurate_asm INT123_synth_1to1_s_sse_accurate_asm +#define synth_1to1_real_s_sse_asm INT123_synth_1to1_real_s_sse_asm +#define synth_1to1_s32_s_sse_asm INT123_synth_1to1_s32_s_sse_asm +#define synth_1to1_s_x86_64_asm INT123_synth_1to1_s_x86_64_asm +#define synth_1to1_s_x86_64_accurate_asm INT123_synth_1to1_s_x86_64_accurate_asm +#define synth_1to1_real_s_x86_64_asm INT123_synth_1to1_real_s_x86_64_asm +#define synth_1to1_s32_s_x86_64_asm INT123_synth_1to1_s32_s_x86_64_asm +#define synth_1to1_x86_64_asm INT123_synth_1to1_x86_64_asm +#define synth_1to1_x86_64_accurate_asm INT123_synth_1to1_x86_64_accurate_asm +#define synth_1to1_real_x86_64_asm INT123_synth_1to1_real_x86_64_asm +#define synth_1to1_s32_x86_64_asm INT123_synth_1to1_s32_x86_64_asm +#define costab_mmxsse INT123_costab_mmxsse +#define make_decode_tables_mmx_asm INT123_make_decode_tables_mmx_asm +#endif diff --git a/src/libmpg123/mangle.h b/src/libmpg123/mangle.h index e4ae5862..c7a5e72c 100644 --- a/src/libmpg123/mangle.h +++ b/src/libmpg123/mangle.h @@ -11,6 +11,7 @@ #define __MANGLE_H #include "config.h" +#include "intsym.h" #ifdef CCALIGN #define MOVUAPS movaps diff --git a/src/libmpg123/mpg123lib_intern.h b/src/libmpg123/mpg123lib_intern.h index 502485c5..e2f482cd 100644 --- a/src/libmpg123/mpg123lib_intern.h +++ b/src/libmpg123/mpg123lib_intern.h @@ -14,6 +14,7 @@ #define MPG123_ENCODINGS 10 #include "config.h" /* Load this before _anything_ */ +#include "intsym.h" /* Prefixing of internal symbols that still are public in a static lib. */ /* ABI conformance for other compilers. mpg123 needs 16byte-aligned stack for SSE and friends. diff --git a/src/libmpg123/synth.c b/src/libmpg123/synth.c index e9b626f9..836f5d1b 100644 --- a/src/libmpg123/synth.c +++ b/src/libmpg123/synth.c @@ -143,7 +143,7 @@ int synth_1to1_mmx(real *bandPtr, int channel, mpg123_handle *fr, int final) #ifdef ACCURATE_ROUNDING /* This is defined in assembler. */ int synth_1to1_sse_accurate_asm(real *window, real *b0, short *samples, int bo1); -int synth_1to1_stereo_sse_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); +int synth_1to1_s_sse_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); void dct64_real_sse(real *out0, real *out1, real *samples); /* This is just a hull to use the mpg123 handle. */ int synth_1to1_sse(real *bandPtr,int channel, mpg123_handle *fr, int final) @@ -223,7 +223,7 @@ int synth_1to1_stereo_sse(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr) dct64_real_sse(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); } - clip = synth_1to1_stereo_sse_accurate_asm(fr->decwin, b0l, b0r, samples, bo1); + clip = synth_1to1_s_sse_accurate_asm(fr->decwin, b0l, b0r, samples, bo1); fr->buffer.fill += 128; @@ -262,7 +262,7 @@ int synth_1to1_3dnowext(real *bandPtr, int channel, mpg123_handle *fr, int final #ifdef ACCURATE_ROUNDING /* Assembler routines. */ int synth_1to1_x86_64_accurate_asm(real *window, real *b0, short *samples, int bo1); -int synth_1to1_stereo_x86_64_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); +int synth_1to1_s_x86_64_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); void dct64_real_x86_64(real *out0, real *out1, real *samples); /* Hull for C mpg123 API */ int synth_1to1_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int final) @@ -343,7 +343,7 @@ int synth_1to1_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr dct64_real_x86_64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); } - clip = synth_1to1_stereo_x86_64_accurate_asm(fr->decwin, b0l, b0r, samples, bo1); + clip = synth_1to1_s_x86_64_accurate_asm(fr->decwin, b0l, b0r, samples, bo1); fr->buffer.fill += 128; @@ -352,7 +352,7 @@ int synth_1to1_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr #else /* This is defined in assembler. */ int synth_1to1_x86_64_asm(short *window, short *b0, short *samples, int bo1); -int synth_1to1_stereo_x86_64_asm(short *window, short *b0l, short *b0r, short *samples, int bo1); +int synth_1to1_s_x86_64_asm(short *window, short *b0l, short *b0r, short *samples, int bo1); void dct64_x86_64(short *out0, short *out1, real *samples); /* This is just a hull to use the mpg123 handle. */ int synth_1to1_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int final) @@ -431,7 +431,7 @@ int synth_1to1_stereo_x86_64(real *bandPtr_l,real *bandPtr_r, mpg123_handle *fr) dct64_x86_64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); } - clip = synth_1to1_stereo_x86_64_asm((short *)fr->decwins, b0l, b0r, samples, bo1); + clip = synth_1to1_s_x86_64_asm((short *)fr->decwins, b0l, b0r, samples, bo1); fr->buffer.fill += 128; diff --git a/src/libmpg123/synth_real.c b/src/libmpg123/synth_real.c index 649a62ff..e519656e 100644 --- a/src/libmpg123/synth_real.c +++ b/src/libmpg123/synth_real.c @@ -53,7 +53,7 @@ #ifdef OPT_X86_64 /* Assembler routines. */ int synth_1to1_real_x86_64_asm(real *window, real *b0, real *samples, int bo1); -int synth_1to1_real_stereo_x86_64_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); +int synth_1to1_real_s_x86_64_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); void dct64_real_x86_64(real *out0, real *out1, real *samples); /* Hull for C mpg123 API */ int synth_1to1_real_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int final) @@ -132,7 +132,7 @@ int synth_1to1_real_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handl dct64_real_x86_64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); } - synth_1to1_real_stereo_x86_64_asm(fr->decwin, b0l, b0r, samples, bo1); + synth_1to1_real_s_x86_64_asm(fr->decwin, b0l, b0r, samples, bo1); fr->buffer.fill += 256; @@ -143,7 +143,7 @@ int synth_1to1_real_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handl #ifdef OPT_SSE /* Assembler routines. */ int synth_1to1_real_sse_asm(real *window, real *b0, real *samples, int bo1); -int synth_1to1_real_stereo_sse_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); +int synth_1to1_real_s_sse_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); void dct64_real_sse(real *out0, real *out1, real *samples); /* Hull for C mpg123 API */ int synth_1to1_real_sse(real *bandPtr,int channel, mpg123_handle *fr, int final) @@ -222,7 +222,7 @@ int synth_1to1_real_stereo_sse(real *bandPtr_l, real *bandPtr_r, mpg123_handle * dct64_real_sse(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); } - synth_1to1_real_stereo_sse_asm(fr->decwin, b0l, b0r, samples, bo1); + synth_1to1_real_s_sse_asm(fr->decwin, b0l, b0r, samples, bo1); fr->buffer.fill += 256; diff --git a/src/libmpg123/synth_s32.c b/src/libmpg123/synth_s32.c index 1513d885..bf007371 100644 --- a/src/libmpg123/synth_s32.c +++ b/src/libmpg123/synth_s32.c @@ -49,7 +49,7 @@ #ifdef OPT_X86_64 /* Assembler routines. */ int synth_1to1_s32_x86_64_asm(real *window, real *b0, int32_t *samples, int bo1); -int synth_1to1_s32_stereo_x86_64_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); +int synth_1to1_s32_s_x86_64_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); void dct64_real_x86_64(real *out0, real *out1, real *samples); /* Hull for C mpg123 API */ int synth_1to1_s32_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int final) @@ -131,7 +131,7 @@ int synth_1to1_s32_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handle dct64_real_x86_64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); } - clip = synth_1to1_s32_stereo_x86_64_asm(fr->decwin, b0l, b0r, samples, bo1); + clip = synth_1to1_s32_s_x86_64_asm(fr->decwin, b0l, b0r, samples, bo1); fr->buffer.fill += 256; @@ -142,7 +142,7 @@ int synth_1to1_s32_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handle #ifdef OPT_SSE /* Assembler routines. */ int synth_1to1_s32_sse_asm(real *window, real *b0, int32_t *samples, int bo1); -int synth_1to1_s32_stereo_sse_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); +int synth_1to1_s32_s_sse_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); void dct64_real_sse(real *out0, real *out1, real *samples); /* Hull for C mpg123 API */ int synth_1to1_s32_sse(real *bandPtr,int channel, mpg123_handle *fr, int final) @@ -224,7 +224,7 @@ int synth_1to1_s32_stereo_sse(real *bandPtr_l, real *bandPtr_r, mpg123_handle *f dct64_real_sse(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r); } - clip = synth_1to1_s32_stereo_sse_asm(fr->decwin, b0l, b0r, samples, bo1); + clip = synth_1to1_s32_s_sse_asm(fr->decwin, b0l, b0r, samples, bo1); fr->buffer.fill += 256; diff --git a/src/libmpg123/synth_stereo_sse_accurate.S b/src/libmpg123/synth_stereo_sse_accurate.S index a135e190..d73a2ccf 100644 --- a/src/libmpg123/synth_stereo_sse_accurate.S +++ b/src/libmpg123/synth_stereo_sse_accurate.S @@ -21,7 +21,7 @@ #define MMREG_CLIP %mm7 /* - int synth_1to1_stereo_sse_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); + int synth_1to1_s_sse_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); return value: number of clipped samples */ @@ -42,8 +42,8 @@ ASM_NAME(maxmin_s16): .long -956301312 .text ALIGN16 -.globl ASM_NAME(synth_1to1_stereo_sse_accurate_asm) -ASM_NAME(synth_1to1_stereo_sse_accurate_asm): +.globl ASM_NAME(synth_1to1_s_sse_accurate_asm) +ASM_NAME(synth_1to1_s_sse_accurate_asm): pushl %ebp movl %esp, %ebp andl $-16, %esp diff --git a/src/libmpg123/synth_stereo_sse_float.S b/src/libmpg123/synth_stereo_sse_float.S index 0358fe81..c10076bc 100644 --- a/src/libmpg123/synth_stereo_sse_float.S +++ b/src/libmpg123/synth_stereo_sse_float.S @@ -20,7 +20,7 @@ #define TEMP(n) (12+16*n)(%esp) /* - int synth_1to1_real_stereo_sse_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); + int synth_1to1_real_s_sse_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); return value: number of clipped samples (0) */ @@ -37,8 +37,8 @@ ASM_NAME(scale_sse): .long 939524096 .text ALIGN16 -.globl ASM_NAME(synth_1to1_real_stereo_sse_asm) -ASM_NAME(synth_1to1_real_stereo_sse_asm): +.globl ASM_NAME(synth_1to1_real_s_sse_asm) +ASM_NAME(synth_1to1_real_s_sse_asm): pushl %ebp movl %esp, %ebp andl $-16, %esp diff --git a/src/libmpg123/synth_stereo_sse_s32.S b/src/libmpg123/synth_stereo_sse_s32.S index 8d9d83e2..25a70639 100644 --- a/src/libmpg123/synth_stereo_sse_s32.S +++ b/src/libmpg123/synth_stereo_sse_s32.S @@ -21,7 +21,7 @@ #define MMREG_CLIP %mm7 /* - int synth_1to1_s32_stereo_sse_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); + int synth_1to1_s32_s_sse_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); return value: number of clipped samples */ @@ -48,8 +48,8 @@ ASM_NAME(maxmin_s32): .long -956301312 .text ALIGN16 -.globl ASM_NAME(synth_1to1_s32_stereo_sse_asm) -ASM_NAME(synth_1to1_s32_stereo_sse_asm): +.globl ASM_NAME(synth_1to1_s32_s_sse_asm) +ASM_NAME(synth_1to1_s32_s_sse_asm): pushl %ebp movl %esp, %ebp andl $-16, %esp diff --git a/src/libmpg123/synth_stereo_x86_64.S b/src/libmpg123/synth_stereo_x86_64.S index 9a5b3412..7f8f91b4 100644 --- a/src/libmpg123/synth_stereo_x86_64.S +++ b/src/libmpg123/synth_stereo_x86_64.S @@ -34,7 +34,7 @@ #define XMMREG_FULL %xmm12 /* {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF} */ /* - int synth_1to1_stereo_x86_64_asm(short *window, short *b0l, short *b0r, short *samples, int bo1); + int synth_1to1_s_x86_64_asm(short *window, short *b0l, short *b0r, short *samples, int bo1); return value: number of clipped samples */ @@ -55,8 +55,8 @@ ASM_NAME(maxmin_x86_64): .long -32769 .text ALIGN16 -.globl ASM_NAME(synth_1to1_stereo_x86_64_asm) -ASM_NAME(synth_1to1_stereo_x86_64_asm): +.globl ASM_NAME(synth_1to1_s_x86_64_asm) +ASM_NAME(synth_1to1_s_x86_64_asm): #ifdef _WIN64 /* should save xmm6-15 */ movl 40(%rsp), %eax /* 5th argument; placed after 32-byte shadow space */ subq $168, %rsp /* stack alignment + 10 xmm registers */ diff --git a/src/libmpg123/synth_stereo_x86_64_accurate.S b/src/libmpg123/synth_stereo_x86_64_accurate.S index 09c682cb..c3e575ab 100644 --- a/src/libmpg123/synth_stereo_x86_64_accurate.S +++ b/src/libmpg123/synth_stereo_x86_64_accurate.S @@ -33,7 +33,7 @@ #define TEMP_CLIP (%rsp) /* - int synth_1to1_stereo_x86_64_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); + int synth_1to1_s_x86_64_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1); return value: number of clipped samples */ @@ -54,8 +54,8 @@ ASM_NAME(maxmin_s16): .long -956301312 .text ALIGN16 -.globl ASM_NAME(synth_1to1_stereo_x86_64_accurate_asm) -ASM_NAME(synth_1to1_stereo_x86_64_accurate_asm): +.globl ASM_NAME(synth_1to1_s_x86_64_accurate_asm) +ASM_NAME(synth_1to1_s_x86_64_accurate_asm): #ifdef _WIN64 /* should save xmm6-15 */ movl 40(%rsp), %eax /* 5th argument; placed after 32-byte shadow space */ pushq %rsi diff --git a/src/libmpg123/synth_stereo_x86_64_float.S b/src/libmpg123/synth_stereo_x86_64_float.S index 12c99535..849ca10f 100644 --- a/src/libmpg123/synth_stereo_x86_64_float.S +++ b/src/libmpg123/synth_stereo_x86_64_float.S @@ -31,7 +31,7 @@ #define XMMREG_SCALE (%r11) /* {1/32768.0, 1/32768.0, 1/32768.0, 1/32768.0} */ /* - int synth_1to1_real_stereo_x86_64_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); + int synth_1to1_real_s_x86_64_asm(real *window, real *b0l, real *b0r, real *samples, int bo1); return value: number of clipped samples (0) */ @@ -48,8 +48,8 @@ ASM_NAME(scale_x86_64): .long 939524096 .text ALIGN16 -.globl ASM_NAME(synth_1to1_real_stereo_x86_64_asm) -ASM_NAME(synth_1to1_real_stereo_x86_64_asm): +.globl ASM_NAME(synth_1to1_real_s_x86_64_asm) +ASM_NAME(synth_1to1_real_s_x86_64_asm): #ifdef _WIN64 /* should save xmm6-15 */ movl 40(%rsp), %eax /* 5th argument; placed after 32-byte shadow space */ subq $168, %rsp /* stack alignment + 10 xmm registers */ diff --git a/src/libmpg123/synth_stereo_x86_64_s32.S b/src/libmpg123/synth_stereo_x86_64_s32.S index 296140ec..d2849bea 100644 --- a/src/libmpg123/synth_stereo_x86_64_s32.S +++ b/src/libmpg123/synth_stereo_x86_64_s32.S @@ -34,7 +34,7 @@ #define TEMP_CLIP (%rsp) /* - int synth_1to1_s32_stereo_x86_64_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); + int synth_1to1_s32_s_x86_64_asm(real *window, real *b0l, real *b0r, int32_t *samples, int bo1); return value: number of clipped samples */ @@ -61,8 +61,8 @@ ASM_NAME(maxmin_s32): .long -956301312 .text ALIGN16 -.globl ASM_NAME(synth_1to1_s32_stereo_x86_64_asm) -ASM_NAME(synth_1to1_s32_stereo_x86_64_asm): +.globl ASM_NAME(synth_1to1_s32_s_x86_64_asm) +ASM_NAME(synth_1to1_s32_s_x86_64_asm): #ifdef _WIN64 /* should save xmm6-15 */ movl 40(%rsp), %eax /* 5th argument; placed after 32-byte shadow space */ pushq %rsi