diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-08-08 02:04:43 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-08-08 02:13:09 +0300 |
commit | 17d3e4b36d18f4a653f7c5f6ea2f15fcd3a2f069 (patch) | |
tree | 5d1910a2ab6381f6b4fb0ffc2834f55f7fef7129 /libmpcodecs/ad_libvorbis.c | |
parent | 2ba9df3df3d61a7cc1bde9f897bc77eaaf14b383 (diff) | |
parent | af76be6e197382af491fadef3fcf821a721c99f5 (diff) | |
download | mpv-17d3e4b36d18f4a653f7c5f6ea2f15fcd3a2f069.tar.bz2 mpv-17d3e4b36d18f4a653f7c5f6ea2f15fcd3a2f069.tar.xz |
Merge svn changes up to r27441
Conflicts:
cfg-common-opts.h
command.c
configure
input/input.c
libmpcodecs/dec_video.c
libmpcodecs/vd.c
libmpdemux/stheader.h
libvo/sub.c
libvo/video_out.c
libvo/vo_xv.c
libvo/vosub_vidix.c
libvo/x11_common.c
libvo/x11_common.h
mp_core.h
mplayer.c
stream/stream.h
Diffstat (limited to 'libmpcodecs/ad_libvorbis.c')
-rw-r--r-- | libmpcodecs/ad_libvorbis.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libmpcodecs/ad_libvorbis.c b/libmpcodecs/ad_libvorbis.c index eebcd298fe..6f37e27710 100644 --- a/libmpcodecs/ad_libvorbis.c +++ b/libmpcodecs/ad_libvorbis.c @@ -20,7 +20,7 @@ static const ad_info_t info = LIBAD_EXTERN(libvorbis) -#ifdef TREMOR +#ifdef CONFIG_TREMOR #include <tremor/ivorbiscodec.h> #else #include <vorbis/codec.h> @@ -34,7 +34,7 @@ typedef struct ov_struct_st { vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ vorbis_block vb; /* local working space for packet->PCM decode */ float rg_scale; /* replaygain scale */ -#ifdef TREMOR +#ifdef CONFIG_TREMOR int rg_scale_int; #endif } ov_struct_t; @@ -160,7 +160,7 @@ static int init(sh_audio_t *sh) /* replaygain: security */ if(ov->rg_scale > 15.) ov->rg_scale = 15.; -#ifdef TREMOR +#ifdef CONFIG_TREMOR ov->rg_scale_int = (int)(ov->rg_scale*64.f); #endif mp_msg(MSGT_DECAUDIO,MSGL_V,"OggVorbis: Bitstream is %d channel%s, %dHz, %dbit/s %cBR\n",(int)ov->vi.channels,ov->vi.channels>1?"s":"",(int)ov->vi.rate,(int)ov->vi.bitrate_nominal, @@ -218,7 +218,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) { int len = 0; int samples; -#ifdef TREMOR +#ifdef CONFIG_TREMOR ogg_int32_t **pcm; #else float scale; @@ -250,7 +250,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) /* convert floats to 16 bit signed ints (host order) and interleave */ -#ifdef TREMOR +#ifdef CONFIG_TREMOR if (ov->rg_scale_int == 64) { for(i=0;i<ov->vi.channels;i++){ ogg_int16_t *convbuffer=(ogg_int16_t *)(&buf[len]); @@ -272,15 +272,15 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) } } } else -#endif /* TREMOR */ +#endif /* CONFIG_TREMOR */ { -#ifndef TREMOR +#ifndef CONFIG_TREMOR scale = 32767.f * ov->rg_scale; #endif for(i=0;i<ov->vi.channels;i++){ ogg_int16_t *convbuffer=(ogg_int16_t *)(&buf[len]); ogg_int16_t *ptr=convbuffer+i; -#ifdef TREMOR +#ifdef CONFIG_TREMOR ogg_int32_t *mono=pcm[i]; for(j=0;j<bout;j++){ int val=(mono[j]*ov->rg_scale_int)>>(9+6); @@ -297,7 +297,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) val=-32768; clipflag=1; } -#endif /* TREMOR */ +#endif /* CONFIG_TREMOR */ *ptr=val; ptr+=ov->vi.channels; } |