diff options
-rw-r--r-- | apps/codecs/libtremor/ivorbiscodec.h | 3 | ||||
-rw-r--r-- | apps/codecs/libtremor/synthesis.c | 14 | ||||
-rw-r--r-- | apps/codecs/libtremor/vorbisfile.c | 20 |
3 files changed, 23 insertions, 14 deletions
diff --git a/apps/codecs/libtremor/ivorbiscodec.h b/apps/codecs/libtremor/ivorbiscodec.h index 561c5d8732..5bc33aaea5 100644 --- a/apps/codecs/libtremor/ivorbiscodec.h +++ b/apps/codecs/libtremor/ivorbiscodec.h | |||
@@ -171,7 +171,8 @@ extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc, | |||
171 | 171 | ||
172 | extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); | 172 | extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); |
173 | extern int vorbis_synthesis_restart(vorbis_dsp_state *v); | 173 | extern int vorbis_synthesis_restart(vorbis_dsp_state *v); |
174 | extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep); | 174 | extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op); |
175 | extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op); | ||
175 | extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); | 176 | extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); |
176 | extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm); | 177 | extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm); |
177 | extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); | 178 | extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); |
diff --git a/apps/codecs/libtremor/synthesis.c b/apps/codecs/libtremor/synthesis.c index 35d080180b..69180b7acf 100644 --- a/apps/codecs/libtremor/synthesis.c +++ b/apps/codecs/libtremor/synthesis.c | |||
@@ -27,9 +27,7 @@ | |||
27 | 27 | ||
28 | static ogg_int32_t *ipcm_vect[CHANNELS] IBSS_ATTR; | 28 | static ogg_int32_t *ipcm_vect[CHANNELS] IBSS_ATTR; |
29 | 29 | ||
30 | int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep) | 30 | static inline int _vorbis_synthesis1(vorbis_block *vb,ogg_packet *op,int decodep){ |
31 | ICODE_ATTR_TREMOR_NOT_MDCT; | ||
32 | int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep){ | ||
33 | vorbis_dsp_state *vd=vb->vd; | 31 | vorbis_dsp_state *vd=vb->vd; |
34 | private_state *b=(private_state *)vd->backend_state; | 32 | private_state *b=(private_state *)vd->backend_state; |
35 | vorbis_info *vi=vd->vi; | 33 | vorbis_info *vi=vd->vi; |
@@ -98,6 +96,16 @@ int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep){ | |||
98 | } | 96 | } |
99 | } | 97 | } |
100 | 98 | ||
99 | int vorbis_synthesis(vorbis_block *vb,ogg_packet *op) | ||
100 | ICODE_ATTR_TREMOR_NOT_MDCT; | ||
101 | int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){ | ||
102 | return _vorbis_synthesis1(vb,op,1); | ||
103 | } | ||
104 | |||
105 | int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op){ | ||
106 | return _vorbis_synthesis1(vb,op,0); | ||
107 | } | ||
108 | |||
101 | long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){ | 109 | long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){ |
102 | codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; | 110 | codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; |
103 | oggpack_buffer opb; | 111 | oggpack_buffer opb; |
diff --git a/apps/codecs/libtremor/vorbisfile.c b/apps/codecs/libtremor/vorbisfile.c index 1e0336603c..50a57affbd 100644 --- a/apps/codecs/libtremor/vorbisfile.c +++ b/apps/codecs/libtremor/vorbisfile.c | |||
@@ -717,13 +717,13 @@ STATICIRAM_NOT_MDCT int _fetch_and_process_packet(OggVorbis_File *vf, | |||
717 | if(result>0){ | 717 | if(result>0){ |
718 | /* got a packet. process it */ | 718 | /* got a packet. process it */ |
719 | granulepos=op.granulepos; | 719 | granulepos=op.granulepos; |
720 | if(!vorbis_synthesis(&vf->vb,&op,1)){ /* lazy check for lazy | 720 | if(!vorbis_synthesis(&vf->vb,&op)){ /* lazy check for lazy |
721 | header handling. The | 721 | header handling. The |
722 | header packets aren't | 722 | header packets aren't |
723 | audio, so if/when we | 723 | audio, so if/when we |
724 | submit them, | 724 | submit them, |
725 | vorbis_synthesis will | 725 | vorbis_synthesis will |
726 | reject them */ | 726 | reject them */ |
727 | 727 | ||
728 | /* suck in the synthesis data and track bitrate */ | 728 | /* suck in the synthesis data and track bitrate */ |
729 | { | 729 | { |
@@ -1444,9 +1444,9 @@ int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ | |||
1444 | 1444 | ||
1445 | /* remove the packet from packet queue and track its granulepos */ | 1445 | /* remove the packet from packet queue and track its granulepos */ |
1446 | ogg_stream_packetout(vf->os,NULL); | 1446 | ogg_stream_packetout(vf->os,NULL); |
1447 | vorbis_synthesis(&vf->vb,&op,0); /* set up a vb with | 1447 | vorbis_synthesis_trackonly(&vf->vb,&op); /* set up a vb with |
1448 | only tracking, no | 1448 | only tracking, no |
1449 | pcm_decode */ | 1449 | pcm_decode */ |
1450 | vorbis_synthesis_blockin(&vf->vd,&vf->vb); | 1450 | vorbis_synthesis_blockin(&vf->vd,&vf->vb); |
1451 | 1451 | ||
1452 | /* end of logical stream case is hard, especially with exact | 1452 | /* end of logical stream case is hard, especially with exact |