summaryrefslogtreecommitdiffstats
path: root/tremor
diff options
context:
space:
mode:
authorbircoph <bircoph@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-13 15:22:13 +0000
committerbircoph <bircoph@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-13 15:22:13 +0000
commit6e695dc64f0310745a32e2399a955fbf1368cd1a (patch)
treeb2b839f1541449a8a441ae918473ac64c0ae5293 /tremor
parent6e9cbdc10448203e7c8b2de41447442fcc9f7bae (diff)
downloadmpv-6e695dc64f0310745a32e2399a955fbf1368cd1a.tar.bz2
mpv-6e695dc64f0310745a32e2399a955fbf1368cd1a.tar.xz
Remove all kind of trailing whitespaces from all MPlayer's files.
This affects all kind of spaces (' ',^I,^M,^L,...): actually [:space:] regex character set. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29306 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'tremor')
-rw-r--r--tremor/asm_arm.h26
-rw-r--r--tremor/backends.h6
-rw-r--r--tremor/bitwise.c66
-rw-r--r--tremor/block.c56
-rw-r--r--tremor/codebook.c34
-rw-r--r--tremor/codebook.h14
-rw-r--r--tremor/codec_internal.h2
-rw-r--r--tremor/floor0.c62
-rw-r--r--tremor/floor1.c40
-rw-r--r--tremor/framing.c104
-rw-r--r--tremor/info.c22
-rw-r--r--tremor/ivorbiscodec.h22
-rw-r--r--tremor/mapping0.c34
-rw-r--r--tremor/mdct.c8
-rw-r--r--tremor/mdct_lookup.h6
-rw-r--r--tremor/misc.h10
-rw-r--r--tremor/ogg.h2
-rw-r--r--tremor/os.h2
-rw-r--r--tremor/os_types.h2
-rw-r--r--tremor/res012.c20
-rw-r--r--tremor/sharedbook.c42
-rw-r--r--tremor/synthesis.c8
-rw-r--r--tremor/tremor.diff40
-rw-r--r--tremor/window.c4
24 files changed, 316 insertions, 316 deletions
diff --git a/tremor/asm_arm.h b/tremor/asm_arm.h
index 3a3716df1f..f4b1f4f8cf 100644
--- a/tremor/asm_arm.h
+++ b/tremor/asm_arm.h
@@ -127,7 +127,7 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
ogg_int32_t *qexpp,
ogg_int32_t *ilsp,ogg_int32_t wi,
ogg_int32_t m){
-
+
ogg_uint32_t qi=*qip,pi=*pip;
ogg_int32_t qexp=*qexpp;
@@ -135,16 +135,16 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
"mov r1,%5,asr#1;"
"add r0,r0,r1,lsl#3;"
"1:"
-
+
"ldmdb r0!,{r1,r3};"
"subs r1,r1,%4;" //ilsp[j]-wi
"rsbmi r1,r1,#0;" //labs(ilsp[j]-wi)
"umull %0,r2,r1,%0;" //qi*=labs(ilsp[j]-wi)
-
+
"subs r1,r3,%4;" //ilsp[j+1]-wi
"rsbmi r1,r1,#0;" //labs(ilsp[j+1]-wi)
"umull %1,r3,r1,%1;" //pi*=labs(ilsp[j+1]-wi)
-
+
"cmn r2,r3;" // shift down 16?
"beq 0f;"
"add %2,%2,#16;"
@@ -155,20 +155,20 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
"0:"
"cmp r0,%3;\n"
"bhi 1b;\n"
-
+
// odd filter assymetry
"ands r0,%5,#1;\n"
"beq 2f;\n"
"add r0,%3,%5,lsl#2;\n"
-
+
"ldr r1,[r0,#-4];\n"
"mov r0,#0x4000;\n"
-
+
"subs r1,r1,%4;\n" //ilsp[j]-wi
"rsbmi r1,r1,#0;\n" //labs(ilsp[j]-wi)
"umull %0,r2,r1,%0;\n" //qi*=labs(ilsp[j]-wi)
"umull %1,r3,r0,%1;\n" //pi*=labs(ilsp[j+1]-wi)
-
+
"cmn r2,r3;\n" // shift down 16?
"beq 2f;\n"
"add %2,%2,#16;\n"
@@ -176,13 +176,13 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
"orr %0,%0,r2,lsl #16;\n"
"mov %1,%1,lsr #16;\n"
"orr %1,%1,r3,lsl #16;\n"
-
+
//qi=(pi>>shift)*labs(ilsp[j]-wi);
//pi=(qi>>shift)*labs(ilsp[j+1]-wi);
//qexp+=shift;
-
+
//}
-
+
/* normalize to max 16 sig figs */
"2:"
"mov r2,#0;"
@@ -204,11 +204,11 @@ static inline void lsp_loop_asm(ogg_uint32_t *qip,ogg_uint32_t *pip,
"mov %0,%0,lsr r2;"
"mov %1,%1,lsr r2;"
"add %2,%2,r2;"
-
+
: "+r"(qi),"+r"(pi),"+r"(qexp)
: "r"(ilsp),"r"(wi),"r"(m)
: "r0","r1","r2","r3","cc");
-
+
*qip=qi;
*pip=pi;
*qexpp=qexp;
diff --git a/tremor/backends.h b/tremor/backends.h
index 50c1c45cfd..269d9b812e 100644
--- a/tremor/backends.h
+++ b/tremor/backends.h
@@ -68,8 +68,8 @@ typedef struct{
int class_subbook[VIF_CLASS][8]; /* [VIF_CLASS][subs] */
- int mult; /* 1 2 3 or 4 */
- int postlist[VIF_POSIT+2]; /* first two implicit */
+ int mult; /* 1 2 3 or 4 */
+ int postlist[VIF_POSIT+2]; /* first two implicit */
} vorbis_info_floor1;
@@ -110,7 +110,7 @@ typedef struct{
typedef struct vorbis_info_mapping0{
int submaps; /* <= 16 */
int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */
-
+
int floorsubmap[16]; /* [mux] submap to floors */
int residuesubmap[16]; /* [mux] submap to residue */
diff --git a/tremor/bitwise.c b/tremor/bitwise.c
index c53cc78b95..6bd082b6dc 100644
--- a/tremor/bitwise.c
+++ b/tremor/bitwise.c
@@ -73,11 +73,11 @@ void oggpack_write(oggpack_buffer *b,unsigned long value,int bits){
b->ptr=b->buffer+b->endbyte;
}
- value&=mask[bits];
+ value&=mask[bits];
bits+=b->endbit;
- b->ptr[0]|=value<<b->endbit;
-
+ b->ptr[0]|=value<<b->endbit;
+
if(bits>=8){
b->ptr[1]=(unsigned char)(value>>(8-b->endbit));
if(bits>=16){
@@ -107,11 +107,11 @@ void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits){
b->ptr=b->buffer+b->endbyte;
}
- value=(value&mask[bits])<<(32-bits);
+ value=(value&mask[bits])<<(32-bits);
bits+=b->endbit;
- b->ptr[0]|=value>>(24+b->endbit);
-
+ b->ptr[0]|=value>>(24+b->endbit);
+
if(bits>=8){
b->ptr[1]=(unsigned char)(value>>(16+b->endbit));
if(bits>=16){
@@ -161,7 +161,7 @@ static void oggpack_writecopy_helper(oggpack_buffer *b,
int i;
/* unaligned copy. Do it the hard way. */
for(i=0;i<bytes;i++)
- w(b,(unsigned long)(ptr[i]),8);
+ w(b,(unsigned long)(ptr[i]),8);
}else{
/* aligned block copy */
if(b->endbyte+bytes+1>=b->storage){
@@ -178,9 +178,9 @@ static void oggpack_writecopy_helper(oggpack_buffer *b,
}
if(bits){
if(msb)
- w(b,(unsigned long)(ptr[bytes]>>(8-bits)),bits);
+ w(b,(unsigned long)(ptr[bytes]>>(8-bits)),bits);
else
- w(b,(unsigned long)(ptr[bytes]),bits);
+ w(b,(unsigned long)(ptr[bytes]),bits);
}
}
@@ -232,14 +232,14 @@ long oggpack_look(oggpack_buffer *b,int bits){
/* not the main path */
if(b->endbyte*8+bits>b->storage*8)return(-1);
}
-
+
ret=b->ptr[0]>>b->endbit;
if(bits>8){
- ret|=b->ptr[1]<<(8-b->endbit);
+ ret|=b->ptr[1]<<(8-b->endbit);
if(bits>16){
- ret|=b->ptr[2]<<(16-b->endbit);
+ ret|=b->ptr[2]<<(16-b->endbit);
if(bits>24){
- ret|=b->ptr[3]<<(24-b->endbit);
+ ret|=b->ptr[3]<<(24-b->endbit);
if(bits>32 && b->endbit)
ret|=b->ptr[4]<<(32-b->endbit);
}
@@ -259,14 +259,14 @@ long oggpackB_look(oggpack_buffer *b,int bits){
/* not the main path */
if(b->endbyte*8+bits>b->storage*8)return(-1);
}
-
+
ret=b->ptr[0]<<(24+b->endbit);
if(bits>8){
- ret|=b->ptr[1]<<(16+b->endbit);
+ ret|=b->ptr[1]<<(16+b->endbit);
if(bits>16){
- ret|=b->ptr[2]<<(8+b->endbit);
+ ret|=b->ptr[2]<<(8+b->endbit);
if(bits>24){
- ret|=b->ptr[3]<<(b->endbit);
+ ret|=b->ptr[3]<<(b->endbit);
if(bits>32 && b->endbit)
ret|=b->ptr[4]>>(8-b->endbit);
}
@@ -320,14 +320,14 @@ long oggpack_read(oggpack_buffer *b,int bits){
ret=-1L;
if(b->endbyte*8+bits>b->storage*8)goto overflow;
}
-
+
ret=b->ptr[0]>>b->endbit;
if(bits>8){
- ret|=b->ptr[1]<<(8-b->endbit);
+ ret|=b->ptr[1]<<(8-b->endbit);
if(bits>16){
- ret|=b->ptr[2]<<(16-b->endbit);
+ ret|=b->ptr[2]<<(16-b->endbit);
if(bits>24){
- ret|=b->ptr[3]<<(24-b->endbit);
+ ret|=b->ptr[3]<<(24-b->endbit);
if(bits>32 && b->endbit){
ret|=b->ptr[4]<<(32-b->endbit);
}
@@ -335,7 +335,7 @@ long oggpack_read(oggpack_buffer *b,int bits){
}
}
ret&=m;
-
+
overflow:
b->ptr+=bits/8;
@@ -348,7 +348,7 @@ long oggpack_read(oggpack_buffer *b,int bits){
long oggpackB_read(oggpack_buffer *b,int bits){
long ret;
long m=32-bits;
-
+
bits+=b->endbit;
if(b->endbyte+4>=b->storage){
@@ -356,21 +356,21 @@ long oggpackB_read(oggpack_buffer *b,int bits){
ret=-1L;
if(b->endbyte*8+bits>b->storage*8)goto overflow;
}
-
+
ret=b->ptr[0]<<(24+b->endbit);
if(bits>8){
- ret|=b->ptr[1]<<(16+b->endbit);
+ ret|=b->ptr[1]<<(16+b->endbit);
if(bits>16){
- ret|=b->ptr[2]<<(8+b->endbit);
+ ret|=b->ptr[2]<<(8+b->endbit);
if(bits>24){
- ret|=b->ptr[3]<<(b->endbit);
+ ret|=b->ptr[3]<<(b->endbit);
if(bits>32 && b->endbit)
ret|=b->ptr[4]>>(8-b->endbit);
}
}
}
ret=((ret&0xffffffffUL)>>(m>>1))>>((m+1)>>1);
-
+
overflow:
b->ptr+=bits/8;
@@ -381,7 +381,7 @@ long oggpackB_read(oggpack_buffer *b,int bits){
long oggpack_read1(oggpack_buffer *b){
long ret;
-
+
if(b->endbyte>=b->storage){
/* not the main path */
ret=-1L;
@@ -389,7 +389,7 @@ long oggpack_read1(oggpack_buffer *b){
}
ret=(b->ptr[0]>>b->endbit)&1;
-
+
overflow:
b->endbit++;
@@ -403,7 +403,7 @@ long oggpack_read1(oggpack_buffer *b){
long oggpackB_read1(oggpack_buffer *b){
long ret;
-
+
if(b->endbyte>=b->storage){
/* not the main path */
ret=-1L;
@@ -411,7 +411,7 @@ long oggpackB_read1(oggpack_buffer *b){
}
ret=(b->ptr[0]>>(7-b->endbit))&1;
-
+
overflow:
b->endbit++;
@@ -438,7 +438,7 @@ long oggpackB_bytes(oggpack_buffer *b){
long oggpackB_bits(oggpack_buffer *b){
return oggpack_bits(b);
}
-
+
unsigned char *oggpack_get_buffer(oggpack_buffer *b){
return(b->buffer);
}
diff --git a/tremor/block.c b/tremor/block.c
index 81406e2a1f..e09fea553c 100644
--- a/tremor/block.c
+++ b/tremor/block.c
@@ -46,28 +46,28 @@ static int ilog(unsigned int v){
:.....''' |_____--- '''......| | \_______|
:.................|__________________|_______|__|______|
|<------ Sl ------>| > Sr < |endW
- |beginSl |endSl | |endSr
+ |beginSl |endSl | |endSr
|beginW |endlW |beginSr
- |< lW >|
+ |< lW >|
<--------------- W ---------------->
| | .. ______________ |
| | ' `/ | ---_ |
- |___.'___/`. | ---_____|
+ |___.'___/`. | ---_____|
|_______|__|_______|_________________|
| >|Sl|< |<------ Sr ----->|endW
| | |endSl |beginSr |endSr
- |beginW | |endlW
+ |beginW | |endlW
mult[0] |beginSl mult[n]
<-------------- lW ----------------->
- |<--W-->|
-: .............. ___ | |
-: .''' |`/ \ | |
-:.....''' |/`....\|...|
-:.........................|___|___|___|
- |Sl |Sr |endW
+ |<--W-->|
+: .............. ___ | |
+: .''' |`/ \ | |
+:.....''' |/`....\|...|
+:.........................|___|___|___|
+ |Sl |Sr |endW
| | |endSr
| |beginSr
| |endSl
@@ -86,7 +86,7 @@ int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){
vb->vd=v;
vb->localalloc=0;
vb->localstore=NULL;
-
+
return(0);
}
@@ -226,10 +226,10 @@ void vorbis_dsp_clear(vorbis_dsp_state *v){
}
if(b){
- if(b->mode)_ogg_free(b->mode);
+ if(b->mode)_ogg_free(b->mode);
_ogg_free(b);
}
-
+
memset(v,0,sizeof(*v));
}
}
@@ -253,15 +253,15 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
lose count */
v->sequence=vb->sequence;
-
+
{
int n=ci->blocksizes[v->W]/2;
int n0=ci->blocksizes[0]/2;
int n1=ci->blocksizes[1]/2;
-
+
int thisCenter;
int prevCenter;
-
+
if(v->centerW){
thisCenter=n1;
prevCenter=0;
@@ -269,13 +269,13 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
thisCenter=0;
prevCenter=n1;
}
-
+
/* v->pcm is now used like a two-stage double buffer. We don't want
to have to constantly shift *or* adjust memory usage. Don't
accept a new block until the old is shifted out */
-
+
/* overlap/add PCM */
-
+
for(j=0;j<vi->channels;j++){
/* the overlap/add section */
if(v->lW){
@@ -309,7 +309,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
pcm[i]+=p[i];
}
}
-
+
/* the copy section */
{
ogg_int32_t *pcm=v->pcm[j]+thisCenter;
@@ -318,12 +318,12 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
pcm[i]=p[i];
}
}
-
+
if(v->centerW)
v->centerW=0;
else
v->centerW=n1;
-
+
/* deal with initial packet state; we do this using the explicit
pcm_returned==-1 flag otherwise we're sensitive to first block
being short or long */
@@ -342,7 +342,7 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
making sure our last packet doesn't end with added padding. If
the last packet is partial, the number of samples we'll have to
return will be past the vb->granulepos.
-
+
This is not foolproof! It will be confused if we begin
decoding at the last page after a seek or hole. In that case,
we don't have a starting point to judge where the last frame
@@ -373,20 +373,20 @@ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){
v->pcm_returned+=extra;
if(v->pcm_returned>v->pcm_current)
v->pcm_returned=v->pcm_current;
-
+
}
-
+
}/* else{ Shouldn't happen *unless* the bitstream is out of
spec. Either way, believe the bitstream } */
v->granulepos=vb->granulepos;
}
}
-
+
/* Update, cleanup */
-
+
if(vb->eofflag)v->eofflag=1;
}
-
+
return(0);
}
diff --git a/tremor/codebook.c b/tremor/codebook.c
index 5da8957232..655746c68a 100644
--- a/tremor/codebook.c
+++ b/tremor/codebook.c
@@ -64,7 +64,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
s->lengthlist[i]=num+1;
}
}
-
+
break;
case 1:
/* ordered */
@@ -85,7 +85,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
/* EOF */
return(-1);
}
-
+
/* Do we have a mapping to unpack? */
switch((s->maptype=oggpack_read(opb,4))){
case 0:
@@ -110,12 +110,12 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
quantvals=s->entries*s->dim;
break;
}
-
+
/* quantized values */
s->quantlist=(long *)_ogg_malloc(sizeof(*s->quantlist)*quantvals);
for(i=0;i<quantvals;i++)
s->quantlist[i]=oggpack_read(opb,s->q_quant);
-
+
if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout;
}
break;
@@ -125,11 +125,11 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){
/* all set */
return(0);
-
+
_errout:
_eofout:
vorbis_staticbook_clear(s);
- return(-1);
+ return(-1);
}
/* the 'eliminate the decode tree' optimization actually requires the
@@ -148,12 +148,12 @@ static ogg_uint32_t bitreverse(ogg_uint32_t x){
return((x>> 1)&0x55555555) | ((x<< 1)&0xaaaaaaaa);
}
-static inline long decode_packed_entry_number(codebook *book,
+static inline long decode_packed_entry_number(codebook *book,
oggpack_buffer *b){
int read=book->dec_maxlength;
long lo,hi;
long lok = oggpack_look(b,book->dec_firsttablen);
-
+
if (lok >= 0) {
long entry = book->dec_firsttable[lok];
if(entry&0x80000000UL){
@@ -180,7 +180,7 @@ static inline long decode_packed_entry_number(codebook *book,
while(hi-lo>1){
long p=(hi-lo)>>1;
- long test=book->codelist[lo+p]>testword;
+ long test=book->codelist[lo+p]>testword;
lo+=p&(test-1);
hi-=p&(-test);
}
@@ -190,7 +190,7 @@ static inline long decode_packed_entry_number(codebook *book,
return(lo);
}
}
-
+
oggpack_adv(b, read);
return(-1);
}
@@ -198,13 +198,13 @@ static inline long decode_packed_entry_number(codebook *book,
/* Decode side is specced and easier, because we don't need to find
matches using different criteria; we simply read and map. There are
two things we need to do 'depending':
-
+
We may need to support interleave. We don't really, but it's
convenient to do it here rather than rebuild the vector later.
Cascades may be additive or multiplicitive; this is not inherent in
the codebook, but set in the code using the codebook. Like
- interleaving, it's easiest to do it here.
+ interleaving, it's easiest to do it here.
addmul==0 -> declarative (set the value)
addmul==1 -> additive
addmul==2 -> multiplicitive */
@@ -214,7 +214,7 @@ long vorbis_book_decode(codebook *book, oggpack_buffer *b){
long packed_entry=decode_packed_entry_number(book,b);
if(packed_entry>=0)
return(book->dec_index[packed_entry]);
-
+
/* if there's no dec_index, the codebook unpacking isn't collapsed */
return(packed_entry);
}
@@ -255,7 +255,7 @@ long vorbis_book_decodev_add(codebook *book,ogg_int32_t *a,
int i,j,entry;
ogg_int32_t *t;
int shift=point-book->binarypoint;
-
+
if(shift>=0){
for(i=0;i<n;){
entry = decode_packed_entry_number(book,b);
@@ -281,7 +281,7 @@ long vorbis_book_decodev_set(codebook *book,ogg_int32_t *a,
int i,j,entry;
ogg_int32_t *t;
int shift=point-book->binarypoint;
-
+
if(shift>=0){
for(i=0;i<n;){
@@ -312,9 +312,9 @@ long vorbis_book_decodevv_add(codebook *book,ogg_int32_t **a,\
long i,j,entry;
int chptr=0;
int shift=point-book->binarypoint;
-
+
if(shift>=0){
-
+
for(i=offset;i<offset+n;){
entry = decode_packed_entry_number(book,b);
if(entry==-1)return(-1);
diff --git a/tremor/codebook.h b/tremor/codebook.h
index 14f65382dd..d3d76ceaa1 100644
--- a/tremor/codebook.h
+++ b/tremor/codebook.h
@@ -40,7 +40,7 @@ typedef struct static_codebook{
/* mapping ***************************************************************/
int maptype; /* 0=none
- 1=implicitly populated values from map column
+ 1=implicitly populated values from map column
2=listed arbitrary values */
/* The below does a linear, single monotonic sequence mapping. */
@@ -62,10 +62,10 @@ typedef struct codebook{
/* the below are ordered by bitreversed codeword and only used
entries are populated */
int binarypoint;
- ogg_int32_t *valuelist; /* list of dim*entries actual entry values */
+ ogg_int32_t *valuelist; /* list of dim*entries actual entry values */
ogg_uint32_t *codelist; /* list of bitstream codewords for each entry */
- int *dec_index;
+ int *dec_index;
char *dec_codelengths;
ogg_uint32_t *dec_firsttable;
int dec_firsttablen;
@@ -86,14 +86,14 @@ extern long _book_maptype1_quantvals(const static_codebook *b);
extern int vorbis_staticbook_unpack(oggpack_buffer *b,static_codebook *c);
extern long vorbis_book_decode(codebook *book, oggpack_buffer *b);
-extern long vorbis_book_decodevs_add(codebook *book, ogg_int32_t *a,
+extern long vorbis_book_decodevs_add(codebook *book, ogg_int32_t *a,
oggpack_buffer *b,int n,int point);
-extern long vorbis_book_decodev_set(codebook *book, ogg_int32_t *a,
+extern long vorbis_book_decodev_set(codebook *book, ogg_int32_t *a,
oggpack_buffer *b,int n,int point);
-extern long vorbis_book_decodev_add(codebook *book, ogg_int32_t *a,
+extern long vorbis_book_decodev_add(codebook *book, ogg_int32_t *a,
oggpack_buffer *b,int n,int point);
extern long vorbis_book_decodevv_add(codebook *book, ogg_int32_t **a,
- long off,int ch,
+ long off,int ch,
oggpack_buffer *b,int n,int point);
extern int _ilog(unsigned int v);
diff --git a/tremor/codec_internal.h b/tremor/codec_internal.h
index 1c92ab24c1..c85de439f4 100644
--- a/tremor/codec_internal.h
+++ b/tremor/codec_internal.h
@@ -50,7 +50,7 @@ typedef struct backend_lookup_state {
/* codec_setup_info contains all the setup information specific to the
specific compression/decompression mode in progress (eg,
psychoacoustic settings, channel setup, options, codebook
- etc).
+ etc).
*********************************************************************/
typedef struct codec_setup_info {
diff --git a/tremor/floor0.c b/tremor/floor0.c
index 6d8434e8a0..b9ecf603ef 100644
--- a/tremor/floor0.c
+++ b/tremor/floor0.c
@@ -45,12 +45,12 @@ typedef struct {
#include "lsp_lookup.h"
/* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in
- 16.16 format
+ 16.16 format
returns in m.8 format */
static long ADJUST_SQRT2[2]={8192,5792};
static inline ogg_int32_t vorbis_invsqlook_i(long a,long e){
- long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1);
+ long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1);
long d=a&INVSQ_LOOKUP_I_MASK; /* 0.10 */
long val=INVSQ_LOOKUP_I[i]- /* 1.16 */
((INVSQ_LOOKUP_IDel[i]*d)>>INVSQ_LOOKUP_I_SHIFT); /* result 1.16 */
@@ -65,7 +65,7 @@ static inline ogg_int32_t vorbis_fromdBlook_i(long a){
int i=(-a)>>(12-FROMdB2_SHIFT);
if(i<0) return 0x7fffffff;
if(i>=(FROMdB_LOOKUP_SZ<<FROMdB_SHIFT))return 0;
-
+
return FROMdB_LOOKUP[i>>FROMdB_SHIFT] * FROMdB2_LOOKUP[i&FROMdB2_MASK];
}
@@ -84,14 +84,14 @@ static inline ogg_int32_t vorbis_coslook2_i(long a){
a=a&0x1ffff;
if(a>0x10000)a=0x20000-a;
- {
+ {
int i=a>>COS_LOOKUP_I_SHIFT;
int d=a&COS_LOOKUP_I_MASK;
a=((COS_LOOKUP_I[i]<<COS_LOOKUP_I_SHIFT)-
d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>>
(COS_LOOKUP_I_SHIFT-LSP_FRACBITS+14);
}
-
+
return(a);
}
@@ -105,9 +105,9 @@ static const int barklook[28]={
/* used in init only; interpolate the long way */
static inline ogg_int32_t toBARK(int n){
int i;
- for(i=0;i<27;i++)
+ for(i=0;i<27;i++)
if(n>=barklook[i] && n<barklook[i+1])break;
-
+
if(i==27){
return 27<<15;
}else{
@@ -177,22 +177,22 @@ void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
pi=((pi*pi)>>16);
qi=((qi*qi)>>16);
-
+
if(m&1){
- qexp= qexp*2-28*((m+1)>>1)+m;
+ qexp= qexp*2-28*((m+1)>>1)+m;
pi*=(1<<14)-((wi*wi)>>14);
- qi+=pi>>14;
+ qi+=pi>>14;
}else{
qexp= qexp*2-13*m;
-
+
pi*=(1<<14)-wi;
qi*=(1<<14)+wi;
-
+
qi=(qi+pi)>>14;
}
-
+
if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */
- qi>>=1; qexp++;
+ qi>>=1; qexp++;
}else
lsp_norm_asm(&qi,&qexp);
@@ -225,7 +225,7 @@ void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
if(!(shift=MLOOP_1[(pi|qi)>>25]))
if(!(shift=MLOOP_2[(pi|qi)>>19]))
shift=MLOOP_3[(pi|qi)>>16];
-
+
pi>>=shift;
qi>>=shift;
qexp+=shift-14*((m+1)>>1);
@@ -242,7 +242,7 @@ void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
/* p*=p(1-w), q*=q(1+w), let normalization drift because it isn't
worth tracking step by step */
-
+
pi>>=shift;
qi>>=shift;
qexp+=shift-7*m;
@@ -250,32 +250,32 @@ void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
pi=((pi*pi)>>16);
qi=((qi*qi)>>16);
qexp=qexp*2+m;
-
+
pi*=(1<<14)-wi;
qi*=(1<<14)+wi;
qi=(qi+pi)>>14;
-
+
}
-
+
/* we've let the normalization drift because it wasn't important;
however, for the lookup, things must be normalized again. We
need at most one right shift or a number of left shifts */
if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */
- qi>>=1; qexp++;
+ qi>>=1; qexp++;
}else
while(qi && !(qi&0x8000)){ /* checks for 0.0xxxxxxxxxxxxxxx or less*/
- qi<<=1; qexp--;
+ qi<<=1; qexp--;
}
#endif
amp=vorbis_fromdBlook_i(ampi* /* n.4 */
- vorbis_invsqlook_i(qi,qexp)-
+ vorbis_invsqlook_i(qi,qexp)-
/* m.8, m+n<=8 */
ampoffseti); /* 8.12[0] */
-
+
#ifdef _LOW_ACCURACY_
amp>>=9;
#endif
@@ -316,12 +316,12 @@ static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){
info->ampbits=oggpack_read(opb,6);
info->ampdB=oggpack_read(opb,8);
info->numbooks=oggpack_read(opb,4)+1;
-
+
if(info->order<1)goto err_out;
if(info->rate<1)goto err_out;
if(info->barkmap<1)goto err_out;
if(info->numbooks<1)goto err_out;
-
+
for(j=0;j<info->numbooks;j++){
info->books[j]=oggpack_read(opb,8);
if(info->books[j]<0 || info->books[j]>=ci->books)goto err_out;
@@ -344,7 +344,7 @@ static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){
static vorbis_look_floor *floor0_look (vorbis_dsp_state *vd,vorbis_info_mode *mi,
vorbis_info_floor *i){
int j;
- ogg_int32_t scale;
+ ogg_int32_t scale;
vorbis_info *vi=vd->vi;
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup;
vorbis_info_floor0 *info=(vorbis_info_floor0 *)i;
@@ -382,26 +382,26 @@ static void *floor0_inverse1(vorbis_block *vb,vorbis_look_floor *i){
vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
vorbis_info_floor0 *info=look->vi;
int j,k;
-
+
int ampraw=oggpack_read(&vb->opb,info->ampbits);
if(ampraw>0){ /* also handles the -1 out of data case */
long maxval=(1<<info->ampbits)-1;
int amp=((ampraw*info->ampdB)<<4)/maxval;
int booknum=oggpack_read(&vb->opb,_ilog(info->numbooks));
-
+
if(booknum!=-1 && booknum<info->numbooks){ /* be paranoid */
codec_setup_info *ci=(codec_setup_info *)vb->vd->vi->codec_setup;
codebook *b=ci->fullbooks+info->books[booknum];
ogg_int32_t last=0;
ogg_int32_t *lsp=(ogg_int32_t *)_vorbis_block_alloc(vb,sizeof(*lsp)*(look->m+1));
-
+
for(j=0;j<look->m;j+=b->dim)
if(vorbis_book_decodev_set(b,lsp+j,&vb->opb,b->dim,-24)==-1)goto eop;
for(j=0;j<look->m;){
for(k=0;k<b->dim;k++,j++)lsp[j]+=last;
last=lsp[j-1];
}
-
+
lsp[look->m]=amp;
return(lsp);
}
@@ -414,7 +414,7 @@ static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i,
void *memo,ogg_int32_t *out){
vorbis_look_floor0 *look=(vorbis_look_floor0 *)i;
vorbis_info_floor0 *info=look->vi;
-
+
if(memo){
ogg_int32_t *lsp=(ogg_int32_t *)memo;
ogg_int32_t amp=lsp[look->m];
diff --git a/tremor/floor1.c b/tremor/floor1.c
index 80c6dd2d46..963656d631