summaryrefslogtreecommitdiff
path: root/apps/codecs/libtremor
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libtremor')
-rw-r--r--apps/codecs/libtremor/config-tremor.h14
-rw-r--r--apps/codecs/libtremor/framing.c17
-rw-r--r--apps/codecs/libtremor/vorbisfile.c4
3 files changed, 27 insertions, 8 deletions
diff --git a/apps/codecs/libtremor/config-tremor.h b/apps/codecs/libtremor/config-tremor.h
index d360b5fd73..403fdfd88b 100644
--- a/apps/codecs/libtremor/config-tremor.h
+++ b/apps/codecs/libtremor/config-tremor.h
@@ -1,4 +1,8 @@
1#ifndef _CONFIG_TREMOR_H
2#define _CONFIG_TREMOR_H
3
1#include "codeclib.h" 4#include "codeclib.h"
5
2#ifdef CPU_ARM 6#ifdef CPU_ARM
3#define _ARM_ASSEM_ 7#define _ARM_ASSEM_
4#endif 8#endif
@@ -17,6 +21,14 @@
17#define ICODE_ATTR_TREMOR_MDCT ICODE_ATTR 21#define ICODE_ATTR_TREMOR_MDCT ICODE_ATTR
18#endif 22#endif
19 23
24/* Workaround for gcc bug where all static functions are called with short
25 calls */
26#if !defined(ICODE_ATTR_TREMOR_NOT_MDCT) && (CONFIG_CPU==S5L8701)
27#define STATICIRAM_NOT_MDCT
28#else
29#define STATICIRAM_NOT_MDCT static
30#endif
31
20#ifndef ICODE_ATTR_TREMOR_NOT_MDCT 32#ifndef ICODE_ATTR_TREMOR_NOT_MDCT
21#define ICODE_ATTR_TREMOR_NOT_MDCT ICODE_ATTR 33#define ICODE_ATTR_TREMOR_NOT_MDCT ICODE_ATTR
22#endif 34#endif
@@ -47,3 +59,5 @@
47#define CHANNELS 2 59#define CHANNELS 2
48 60
49// #define _LOW_ACCURACY_ 61// #define _LOW_ACCURACY_
62
63#endif /* _CONFIG_TREMOR_H */
diff --git a/apps/codecs/libtremor/framing.c b/apps/codecs/libtremor/framing.c
index fb26b02709..ec1e4c34c2 100644
--- a/apps/codecs/libtremor/framing.c
+++ b/apps/codecs/libtremor/framing.c
@@ -104,9 +104,9 @@ static ogg_buffer *_fetch_buffer(ogg_buffer_state *bs,long bytes){
104 return ob; 104 return ob;
105} 105}
106 106
107static ogg_reference *_fetch_ref(ogg_buffer_state *bs) 107STATICIRAM_NOT_MDCT ogg_reference *_fetch_ref(ogg_buffer_state *bs)
108 ICODE_ATTR_TREMOR_NOT_MDCT; 108 ICODE_ATTR_TREMOR_NOT_MDCT;
109static ogg_reference *_fetch_ref(ogg_buffer_state *bs){ 109STATICIRAM_NOT_MDCT ogg_reference *_fetch_ref(ogg_buffer_state *bs){
110 ogg_reference *or; 110 ogg_reference *or;
111 bs->outstanding++; 111 bs->outstanding++;
112 112
@@ -789,8 +789,9 @@ static void _next_lace(oggbyte_buffer *ob,ogg_stream_state *os){
789 } 789 }
790} 790}
791 791
792static void _span_queued_page(ogg_stream_state *os) ICODE_ATTR_TREMOR_NOT_MDCT; 792STATICIRAM_NOT_MDCT void _span_queued_page(ogg_stream_state *os)
793static void _span_queued_page(ogg_stream_state *os){ 793 ICODE_ATTR_TREMOR_NOT_MDCT;
794STATICIRAM_NOT_MDCT void _span_queued_page(ogg_stream_state *os){
794 while( !(os->body_fill&FINFLAG) ){ 795 while( !(os->body_fill&FINFLAG) ){
795 796
796 if(!os->header_tail)break; 797 if(!os->header_tail)break;
@@ -948,9 +949,9 @@ int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){
948 return OGG_SUCCESS; 949 return OGG_SUCCESS;
949} 950}
950 951
951static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv) 952STATICIRAM_NOT_MDCT int _packetout(ogg_stream_state *os,ogg_packet *op,int adv)
952 ICODE_ATTR_TREMOR_NOT_MDCT; 953 ICODE_ATTR_TREMOR_NOT_MDCT;
953static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){ 954STATICIRAM_NOT_MDCT int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){
954 955
955 ogg_packet_release(op); 956 ogg_packet_release(op);
956 _span_queued_page(os); 957 _span_queued_page(os);
@@ -1028,10 +1029,14 @@ static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){
1028 return 1; 1029 return 1;
1029} 1030}
1030 1031
1032int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op)
1033 ICODE_ATTR_TREMOR_NOT_MDCT;
1031int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){ 1034int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){
1032 return _packetout(os,op,1); 1035 return _packetout(os,op,1);
1033} 1036}
1034 1037
1038int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op)
1039 ICODE_ATTR_TREMOR_NOT_MDCT;
1035int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){ 1040int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){
1036 return _packetout(os,op,0); 1041 return _packetout(os,op,0);
1037} 1042}
diff --git a/apps/codecs/libtremor/vorbisfile.c b/apps/codecs/libtremor/vorbisfile.c
index 8c81c63b7d..1e0336603c 100644
--- a/apps/codecs/libtremor/vorbisfile.c
+++ b/apps/codecs/libtremor/vorbisfile.c
@@ -684,10 +684,10 @@ static void _decode_clear(OggVorbis_File *vf){
684 1) got a packet 684 1) got a packet
685*/ 685*/
686 686
687static int _fetch_and_process_packet(OggVorbis_File *vf, 687STATICIRAM_NOT_MDCT int _fetch_and_process_packet(OggVorbis_File *vf,
688 int readp, 688 int readp,
689 int spanp) ICODE_ATTR_TREMOR_NOT_MDCT; 689 int spanp) ICODE_ATTR_TREMOR_NOT_MDCT;
690static int _fetch_and_process_packet(OggVorbis_File *vf, 690STATICIRAM_NOT_MDCT int _fetch_and_process_packet(OggVorbis_File *vf,
691 int readp, 691 int readp,
692 int spanp){ 692 int spanp){
693 ogg_page og={0,0,0,0}; 693 ogg_page og={0,0,0,0};