summaryrefslogtreecommitdiffstats
path: root/apps
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 /apps
parent6367b19c7bcaae0da3c080be42b1d9a19727da00 (diff)
downloadrockbox-911f2a7dac59cab16f6c47420e2d1e12e8b60b70.tar.gz
rockbox-911f2a7dac59cab16f6c47420e2d1e12e8b60b70.tar.bz2
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
Diffstat (limited to 'apps')
-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,
extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
extern int vorbis_synthesis_restart(vorbis_dsp_state *v);
-extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep);
+extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
+extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm);
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 @@
static ogg_int32_t *ipcm_vect[CHANNELS] IBSS_ATTR;
-int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep)
- ICODE_ATTR_TREMOR_NOT_MDCT;
-int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep){
+static inline int _vorbis_synthesis1(vorbis_block *vb,ogg_packet *op,int decodep){
vorbis_dsp_state *vd=vb->vd;
private_state *b=(private_state *)vd->backend_state;
vorbis_info *vi=vd->vi;
@@ -98,6 +96,16 @@ int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep){
}
}
+int vorbis_synthesis(vorbis_block *vb,ogg_packet *op)
+ ICODE_ATTR_TREMOR_NOT_MDCT;
+int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
+ return _vorbis_synthesis1(vb,op,1);
+}
+
+int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op){
+ return _vorbis_synthesis1(vb,op,0);
+}
+
long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
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,
if(result>0){
/* got a packet. process it */
granulepos=op.granulepos;
- if(!vorbis_synthesis(&vf->vb,&op,1)){ /* lazy check for lazy
- header handling. The
- header packets aren't
- audio, so if/when we
- submit them,
- vorbis_synthesis will
- reject them */
+ if(!vorbis_synthesis(&vf->vb,&op)){ /* lazy check for lazy
+ header handling. The
+ header packets aren't
+ audio, so if/when we
+ submit them,
+ vorbis_synthesis will
+ reject them */
/* suck in the synthesis data and track bitrate */
{
@@ -1444,9 +1444,9 @@ int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){
/* remove the packet from packet queue and track its granulepos */
ogg_stream_packetout(vf->os,NULL);
- vorbis_synthesis(&vf->vb,&op,0); /* set up a vb with
- only tracking, no
- pcm_decode */
+ vorbis_synthesis_trackonly(&vf->vb,&op); /* set up a vb with
+ only tracking, no
+ pcm_decode */
vorbis_synthesis_blockin(&vf->vd,&vf->vb);
/* end of logical stream case is hard, especially with exact