diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libffmpeg/libavcodec/Makefile.am | 5 | ||||
-rw-r--r-- | src/libmpg123/layer3.c | 49 | ||||
-rw-r--r-- | src/libmpg123/mpglib.h | 6 | ||||
-rw-r--r-- | src/libmpg123/xine_decoder.c | 10 |
4 files changed, 50 insertions, 20 deletions
diff --git a/src/libffmpeg/libavcodec/Makefile.am b/src/libffmpeg/libavcodec/Makefile.am index 2f5ddff1e..046974ac8 100644 --- a/src/libffmpeg/libavcodec/Makefile.am +++ b/src/libffmpeg/libavcodec/Makefile.am @@ -9,7 +9,8 @@ LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic noinst_LTLIBRARIES = libavcodec.la if HAVE_FFMMX -mmx_modules = mpegvideo_mmx.c sad_mmx.s dsputil_mmx.c +#mmx_modules = mpegvideo_mmx.c sad_mmx.s dsputil_mmx.c +mmx_modules = mpegvideo_mmx.c sad_mmx.s endif libavcodec_la_SOURCES = dsputil.c fdctref.c jfdctfst.c mpeg12.c \ @@ -24,7 +25,7 @@ noinst_HEADERS = avcodec.h dsputil.h mpegvideo.h dsputil_mmx_avg.h\ mpeg12data.h debug: - $(MAKE) CFLAGS="-Wall -DDEBUG -g -DXINE_COMPILE" + $(MAKE) CFLAGS="-Wall -DDEBUG -O -finline-functions -g -DXINE_COMPILE" install-debug: debug @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am diff --git a/src/libmpg123/layer3.c b/src/libmpg123/layer3.c index 88318370f..08e444d69 100644 --- a/src/libmpg123/layer3.c +++ b/src/libmpg123/layer3.c @@ -1205,7 +1205,23 @@ static void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf) 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); + { + real sum0,sum1; + sum0 = tmp1a + tmp2a; + sum1 = (tmp1b + tmp2b) * tfcos36[(0)]; + { + real tmp; + out2[9+(0)] = (tmp = sum0 + sum1) * w[27+(0)]; + out2[8-(0)] = tmp * w[26-(0)]; + } + sum0 -= sum1; + ts[SBLIMIT*(8-(0))] = 0; + ts[SBLIMIT*(9+(0))] = 0; + ts[SBLIMIT*(8-(0))] = out1[8-(0)] + sum0 * w[8-(0)]; + ts[SBLIMIT*(9+(0))] = out1[9+(0)] + sum0 * w[9+(0)]; + } + + //MACRO1(0); MACRO2(8); } @@ -1503,9 +1519,10 @@ void do_layer3(mpgaudio_t *mp) for (gr=0;gr<granules;gr++) { + /* real hybridIn[2][SBLIMIT][SSLIMIT]; real hybridOut[2][SSLIMIT][SBLIMIT]; - + */ { struct gr_info_s *gr_info = &(sideinfo.ch[0].gr[gr]); long part2bits; @@ -1518,7 +1535,7 @@ void do_layer3(mpgaudio_t *mp) fprintf(stderr,"Not supported\n"); #endif } - if(III_dequantize_sample(hybridIn[0], scalefacs[0],gr_info,sfreq,part2bits)) { + if(III_dequantize_sample(mp->hybridIn[0], scalefacs[0],gr_info,sfreq,part2bits)) { printf ("III_dequantize_sample failed.\n"); return; } @@ -1536,7 +1553,7 @@ void do_layer3(mpgaudio_t *mp) #endif } - if(III_dequantize_sample(hybridIn[1],scalefacs[1],gr_info,sfreq,part2bits)) { + if(III_dequantize_sample(mp->hybridIn[1],scalefacs[1],gr_info,sfreq,part2bits)) { printf ("III_dequantize_sample failed.\n"); return; } @@ -1545,15 +1562,15 @@ void do_layer3(mpgaudio_t *mp) int i; for(i=0;i<SBLIMIT*SSLIMIT;i++) { real tmp0,tmp1; - tmp0 = ((real *) hybridIn[0])[i]; - tmp1 = ((real *) hybridIn[1])[i]; - ((real *) hybridIn[0])[i] = tmp0 + tmp1; - ((real *) hybridIn[1])[i] = tmp0 - tmp1; + tmp0 = ((real *) mp->hybridIn[0])[i]; + tmp1 = ((real *) mp->hybridIn[1])[i]; + ((real *) mp->hybridIn[0])[i] = tmp0 + tmp1; + ((real *) mp->hybridIn[1])[i] = tmp0 - tmp1; } } if(i_stereo) - III_i_stereo(hybridIn,scalefacs[1],gr_info,sfreq,ms_stereo,fr->lsf); + III_i_stereo(mp->hybridIn,scalefacs[1],gr_info,sfreq,ms_stereo,fr->lsf); if(ms_stereo || i_stereo || (single == 3) ) { if(gr_info->maxb > sideinfo.ch[0].gr[gr].maxb) @@ -1566,7 +1583,7 @@ void do_layer3(mpgaudio_t *mp) case 3: { register int i; - register real *in0 = (real *) hybridIn[0],*in1 = (real *) hybridIn[1]; + register real *in0 = (real *) mp->hybridIn[0],*in1 = (real *) mp->hybridIn[1]; for(i=0;i<SSLIMIT*gr_info->maxb;i++,in0++) *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */ } @@ -1574,7 +1591,7 @@ void do_layer3(mpgaudio_t *mp) case 1: { register int i; - register real *in0 = (real *) hybridIn[0],*in1 = (real *) hybridIn[1]; + register real *in0 = (real *) mp->hybridIn[0],*in1 = (real *) mp->hybridIn[1]; for(i=0;i<SSLIMIT*gr_info->maxb;i++) *in0++ = *in1++; } @@ -1584,18 +1601,18 @@ void do_layer3(mpgaudio_t *mp) for(ch=0;ch<stereo1;ch++) { struct gr_info_s *gr_info = &(sideinfo.ch[ch].gr[gr]); - III_antialias(hybridIn[ch],gr_info); - III_hybrid(mp, hybridIn[ch], hybridOut[ch], ch,gr_info); + III_antialias(mp->hybridIn[ch],gr_info); + III_hybrid(mp, mp->hybridIn[ch], mp->hybridOut[ch], ch,gr_info); } for(ss=0;ss<SSLIMIT;ss++) { if(single >= 0) { - clip += synth_1to1_mono(mp, hybridOut[0][ss],mp->osspace,&num_bytes); + clip += synth_1to1_mono(mp, mp->hybridOut[0][ss],mp->osspace,&num_bytes); } else { int p1 = num_bytes; - clip += synth_1to1(mp, hybridOut[0][ss],0,mp->osspace,&p1); - clip += synth_1to1(mp, hybridOut[1][ss],1,mp->osspace,&num_bytes); + clip += synth_1to1(mp, mp->hybridOut[0][ss],0,mp->osspace,&p1); + clip += synth_1to1(mp, mp->hybridOut[1][ss],1,mp->osspace,&num_bytes); } } } diff --git a/src/libmpg123/mpglib.h b/src/libmpg123/mpglib.h index 94d412893..0b06eee60 100644 --- a/src/libmpg123/mpglib.h +++ b/src/libmpg123/mpglib.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mpglib.h,v 1.4 2001/05/27 23:48:12 guenter Exp $ + * $Id: mpglib.h,v 1.5 2001/08/07 14:15:04 guenter Exp $ */ #ifndef HAVE_MPGLIB_H @@ -42,6 +42,10 @@ typedef struct mpstr { real synth_buffs[2][2][0x110]; int synth_bo; + real hybridIn[2][SBLIMIT][SSLIMIT]; + real hybridOut[2][SSLIMIT][SBLIMIT]; + + int is_output_initialized; int sample_rate_device; ao_functions_t *ao_output; diff --git a/src/libmpg123/xine_decoder.c b/src/libmpg123/xine_decoder.c index 1e3e9e7a3..61c5c7d0d 100644 --- a/src/libmpg123/xine_decoder.c +++ b/src/libmpg123/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.3 2001/07/30 19:21:28 guenter Exp $ + * $Id: xine_decoder.c,v 1.4 2001/08/07 14:15:04 guenter Exp $ * * stuff needed to turn libmpg123 into a xine decoder plugin */ @@ -67,7 +67,15 @@ void mpgdec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { mpgdec_decoder_t *this = (mpgdec_decoder_t *) this_gen; + /* + printf ("libmpg123: decode data\n"); + fflush (stdout); + */ if (buf->decoder_info[0] >0) { + /* + printf ("libmpg123: decode data - doing it\n"); + fflush (stdout); + */ mpg_audio_decode_data (this->mpg, buf->content, buf->content + buf->size, buf->PTS); } |