summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-12-04 12:59:37 +0000
committerNils Wallménius <nils@rockbox.org>2010-12-04 12:59:37 +0000
commit911f2a7dac59cab16f6c47420e2d1e12e8b60b70 (patch)
treee48f2190ad02fb72228eb2de90b45c65fc1d7897
parent6367b19c7bcaae0da3c080be42b1d9a19727da00 (diff)
downloadrockbox-911f2a7dac59cab16f6c47420e2d1e12e8b60b70.tar.gz
rockbox-911f2a7dac59cab16f6c47420e2d1e12e8b60b70.zip
libtremor: merge upstream revision 17374 and some inline/icode tweaks to maintain speed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28732 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libtremor/ivorbiscodec.h3
-rw-r--r--apps/codecs/libtremor/synthesis.c14
-rw-r--r--apps/codecs/libtremor/vorbisfile.c20
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
172extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); 172extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
173extern int vorbis_synthesis_restart(vorbis_dsp_state *v); 173extern int vorbis_synthesis_restart(vorbis_dsp_state *v);
174extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep); 174extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
175extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
175extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); 176extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
176extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm); 177extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm);
177extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); 178extern 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
28static ogg_int32_t *ipcm_vect[CHANNELS] IBSS_ATTR; 28static ogg_int32_t *ipcm_vect[CHANNELS] IBSS_ATTR;
29 29
30int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep) 30static inline int _vorbis_synthesis1(vorbis_block *vb,ogg_packet *op,int decodep){
31 ICODE_ATTR_TREMOR_NOT_MDCT;
32int 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
99int vorbis_synthesis(vorbis_block *vb,ogg_packet *op)
100 ICODE_ATTR_TREMOR_NOT_MDCT;
101int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
102 return _vorbis_synthesis1(vb,op,1);
103}
104
105int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op){
106 return _vorbis_synthesis1(vb,op,0);
107}
108
101long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){ 109long 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