commit
19f60e33c4
@ -1,50 +1,43 @@ |
|||||||
AUTOMAKE_OPTIONS = foreign
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
INCLUDES = -I./ @OGG_CFLAGS@
|
INCLUDES = -I./
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = vorbisidec.pc
|
pkgconfig_DATA = vorbisidec.pc
|
||||||
|
|
||||||
lib_LTLIBRARIES = libvorbisidec.la
|
lib_LTLIBRARIES = libvorbisidec.la
|
||||||
|
|
||||||
libvorbisidec_la_SOURCES = mdct.c block.c window.c \
|
libvorbisidec_la_SOURCES = mdct.c dsp.c info.c misc.c \
|
||||||
synthesis.c info.c \
|
|
||||||
floor1.c floor0.c vorbisfile.c \
|
floor1.c floor0.c vorbisfile.c \
|
||||||
res012.c mapping0.c registry.c codebook.c \
|
res012.c mapping0.c codebook.c \
|
||||||
sharedbook.c \
|
framing.c bitwise.c \
|
||||||
codebook.h misc.h mdct_lookup.h\
|
codebook.h misc.h mdct_lookup.h\
|
||||||
os.h mdct.h block.h ivorbisfile.h lsp_lookup.h\
|
os.h mdct.h ivorbisfile.h lsp_lookup.h\
|
||||||
registry.h window.h window_lookup.h\
|
window_lookup.h floor_lookup.c \
|
||||||
codec_internal.h backends.h \
|
codec_internal.h ogg.h \
|
||||||
asm_arm.h ivorbiscodec.h
|
asm_arm.h ivorbiscodec.h
|
||||||
libvorbisidec_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@
|
libvorbisidec_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@
|
||||||
libvorbisidec_la_LIBADD = @OGG_LIBS@
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS = ivorbisfile_example iseeking_example
|
EXTRA_PROGRAMS = ivorbisfile_example
|
||||||
CLEANFILES = $(EXTRA_PROGRAMS) $(lib_LTLIBRARIES)
|
CLEANFILES = $(EXTRA_PROGRAMS) $(lib_LTLIBRARIES)
|
||||||
|
|
||||||
ivorbisfile_example_SOURCES = ivorbisfile_example.c
|
ivorbisfile_example_SOURCES = ivorbisfile_example.c
|
||||||
ivorbisfile_example_LDFLAGS = -static
|
ivorbisfile_example_LDFLAGS = -static
|
||||||
ivorbisfile_example_LDADD = libvorbisidec.la @OGG_LIBS@
|
ivorbisfile_example_LDADD = libvorbisidec.la
|
||||||
|
|
||||||
iseeking_example_SOURCES = iseeking_example.c
|
|
||||||
iseeking_example_LDFLAGS = -static
|
|
||||||
iseeking_example_LDADD = libvorbisidec.la @OGG_LIBS@
|
|
||||||
|
|
||||||
includedir = $(prefix)/include/tremor
|
includedir = $(prefix)/include/tremor
|
||||||
|
|
||||||
include_HEADERS = ivorbiscodec.h ivorbisfile.h config_types.h
|
include_HEADERS = ivorbiscodec.h ivorbisfile.h ogg.h os_types.h config_types.h
|
||||||
|
|
||||||
EXTRA_DIST = vorbisidec.pc.in \
|
EXTRA_DIST = vorbisidec.pc.in \
|
||||||
$(srcdir)/doc/*.html $(srcdir)/win32/VS*/libtremor/*.vcproj
|
$(srcdir)/doc/*.html
|
||||||
|
|
||||||
example: |
example: |
||||||
-ln -fs . vorbis
|
-ln -fs . vorbis
|
||||||
$(MAKE) ivorbisfile_example
|
$(MAKE) ivorbisfile_example
|
||||||
$(MAKE) iseeking_example
|
|
||||||
|
|
||||||
debug: |
debug: |
||||||
$(MAKE) all CFLAGS="@DEBUG@"
|
$(MAKE) all CFLAGS="@DEBUG@"
|
||||||
|
|
||||||
profile: |
profile: |
||||||
$(MAKE) all CFLAGS="@PROFILE@"
|
$(MAKE) all CFLAGS="@PROFILE@"
|
||||||
|
@ -0,0 +1,2 @@ |
|||||||
|
Add explicit 64 bit integer support rather than relying on compiler |
||||||
|
Roll in optional use of bounded heap memory manager |
@ -1,131 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: backend and mapping structures |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
/* this is exposed up here because we need it for static modes.
|
|
||||||
Lookups for each backend aren't exposed because there's no reason |
|
||||||
to do so */ |
|
||||||
|
|
||||||
#ifndef _vorbis_backend_h_ |
|
||||||
#define _vorbis_backend_h_ |
|
||||||
|
|
||||||
#include "codec_internal.h" |
|
||||||
|
|
||||||
/* this would all be simpler/shorter with templates, but.... */ |
|
||||||
/* Transform backend generic *************************************/ |
|
||||||
|
|
||||||
/* only mdct right now. Flesh it out more if we ever transcend mdct
|
|
||||||
in the transform domain */ |
|
||||||
|
|
||||||
/* Floor backend generic *****************************************/ |
|
||||||
typedef struct{ |
|
||||||
vorbis_info_floor *(*unpack)(vorbis_info *,oggpack_buffer *); |
|
||||||
vorbis_look_floor *(*look) (vorbis_dsp_state *,vorbis_info_mode *, |
|
||||||
vorbis_info_floor *); |
|
||||||
void (*free_info) (vorbis_info_floor *); |
|
||||||
void (*free_look) (vorbis_look_floor *); |
|
||||||
void *(*inverse1) (struct vorbis_block *,vorbis_look_floor *); |
|
||||||
int (*inverse2) (struct vorbis_block *,vorbis_look_floor *, |
|
||||||
void *buffer,ogg_int32_t *); |
|
||||||
} vorbis_func_floor; |
|
||||||
|
|
||||||
typedef struct{ |
|
||||||
int order; |
|
||||||
long rate; |
|
||||||
long barkmap; |
|
||||||
|
|
||||||
int ampbits; |
|
||||||
int ampdB; |
|
||||||
|
|
||||||
int numbooks; /* <= 16 */ |
|
||||||
int books[16]; |
|
||||||
|
|
||||||
} vorbis_info_floor0; |
|
||||||
|
|
||||||
#define VIF_POSIT 63 |
|
||||||
#define VIF_CLASS 16 |
|
||||||
#define VIF_PARTS 31 |
|
||||||
typedef struct{ |
|
||||||
int partitions; /* 0 to 31 */ |
|
||||||
int partitionclass[VIF_PARTS]; /* 0 to 15 */ |
|
||||||
|
|
||||||
int class_dim[VIF_CLASS]; /* 1 to 8 */ |
|
||||||
int class_subs[VIF_CLASS]; /* 0,1,2,3 (bits: 1<<n poss) */ |
|
||||||
int class_book[VIF_CLASS]; /* subs ^ dim entries */ |
|
||||||
int class_subbook[VIF_CLASS][8]; /* [VIF_CLASS][subs] */ |
|
||||||
|
|
||||||
|
|
||||||
int mult; /* 1 2 3 or 4 */
|
|
||||||
int postlist[VIF_POSIT+2]; /* first two implicit */
|
|
||||||
|
|
||||||
} vorbis_info_floor1; |
|
||||||
|
|
||||||
/* Residue backend generic *****************************************/ |
|
||||||
typedef struct{ |
|
||||||
vorbis_info_residue *(*unpack)(vorbis_info *,oggpack_buffer *); |
|
||||||
vorbis_look_residue *(*look) (vorbis_dsp_state *,vorbis_info_mode *, |
|
||||||
vorbis_info_residue *); |
|
||||||
void (*free_info) (vorbis_info_residue *); |
|
||||||
void (*free_look) (vorbis_look_residue *); |
|
||||||
int (*inverse) (struct vorbis_block *,vorbis_look_residue *, |
|
||||||
ogg_int32_t **,int *,int); |
|
||||||
} vorbis_func_residue; |
|
||||||
|
|
||||||
typedef struct vorbis_info_residue0{ |
|
||||||
/* block-partitioned VQ coded straight residue */ |
|
||||||
long begin; |
|
||||||
long end; |
|
||||||
|
|
||||||
/* first stage (lossless partitioning) */ |
|
||||||
int grouping; /* group n vectors per partition */ |
|
||||||
int partitions; /* possible codebooks for a partition */ |
|
||||||
int partvals; /* partitions ^ groupbook dim */ |
|
||||||
int groupbook; /* huffbook for partitioning */ |
|
||||||
int secondstages[64]; /* expanded out to pointers in lookup */ |
|
||||||
int booklist[512]; /* list of second stage books */ |
|
||||||
} vorbis_info_residue0; |
|
||||||
|
|
||||||
/* Mapping backend generic *****************************************/ |
|
||||||
typedef struct{ |
|
||||||
vorbis_info_mapping *(*unpack)(vorbis_info *,oggpack_buffer *); |
|
||||||
vorbis_look_mapping *(*look) (vorbis_dsp_state *,vorbis_info_mode *, |
|
||||||
vorbis_info_mapping *); |
|
||||||
void (*free_info) (vorbis_info_mapping *); |
|
||||||
void (*free_look) (vorbis_look_mapping *); |
|
||||||
int (*inverse) (struct vorbis_block *vb,vorbis_look_mapping *); |
|
||||||
} vorbis_func_mapping; |
|
||||||
|
|
||||||
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 */ |
|
||||||
|
|
||||||
int psy[2]; /* by blocktype; impulse/padding for short,
|
|
||||||
transition/normal for long */ |
|
||||||
|
|
||||||
int coupling_steps; |
|
||||||
int coupling_mag[256]; |
|
||||||
int coupling_ang[256]; |
|
||||||
} vorbis_info_mapping0; |
|
||||||
|
|
||||||
#endif |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,675 @@ |
|||||||
|
/********************************************************************
|
||||||
|
* * |
||||||
|
* THIS FILE IS PART OF THE TremorOggVorbis 'TREMOR' CODEC SOURCE CODE. * |
||||||
|
* * |
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
||||||
|
* * |
||||||
|
* THE TremorOggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * |
||||||
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
|
* * |
||||||
|
******************************************************************** |
||||||
|
|
||||||
|
function: packing variable sized words into an octet stream |
||||||
|
|
||||||
|
********************************************************************/ |
||||||
|
|
||||||
|
/* We're 'LSb' endian; if we write a word but read individual bits,
|
||||||
|
then we'll read the lsb first */ |
||||||
|
|
||||||
|
#include <string.h> |
||||||
|
#include <stdlib.h> |
||||||
|
#include "misc.h" |
||||||
|
#include "tremor_ogg.h" |
||||||
|
|
||||||
|
static unsigned long mask[]= |
||||||
|
{0x00000000,0x00000001,0x00000003,0x00000007,0x0000000f, |
||||||
|
0x0000001f,0x0000003f,0x0000007f,0x000000ff,0x000001ff, |
||||||
|
0x000003ff,0x000007ff,0x00000fff,0x00001fff,0x00003fff, |
||||||
|
0x00007fff,0x0000ffff,0x0001ffff,0x0003ffff,0x0007ffff, |
||||||
|
0x000fffff,0x001fffff,0x003fffff,0x007fffff,0x00ffffff, |
||||||
|
0x01ffffff,0x03ffffff,0x07ffffff,0x0fffffff,0x1fffffff, |
||||||
|
0x3fffffff,0x7fffffff,0xffffffff }; |
||||||
|
|
||||||
|
/* spans forward, skipping as many bytes as headend is negative; if
|
||||||
|
headend is zero, simply finds next byte. If we're up to the end |
||||||
|
of the buffer, leaves headend at zero. If we've read past the end, |
||||||
|
halt the decode process. */ |
||||||
|
|
||||||
|
static void _span(tremor_oggpack_buffer *b){ |
||||||
|
while(b->headend-(b->headbit>>3)<1){ |
||||||
|
b->headend-=b->headbit>>3; |
||||||
|
b->headbit&=0x7; |
||||||
|
|
||||||
|
if(b->head->next){ |
||||||
|
b->count+=b->head->length; |
||||||
|
b->head=b->head->next; |
||||||
|
|
||||||
|
if(b->headend+b->head->length>0) |
||||||
|
b->headptr=b->head->buffer->data+b->head->begin-b->headend; |
||||||
|
|
||||||
|
b->headend+=b->head->length;
|
||||||
|
}else{ |
||||||
|
/* we've either met the end of decode, or gone past it. halt
|
||||||
|
only if we're past */ |
||||||
|
if(b->headend*8<b->headbit) |
||||||
|
/* read has fallen off the end */ |
||||||
|
b->headend=-1; |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void tremor_oggpack_readinit(tremor_oggpack_buffer *b,tremor_ogg_reference *r){ |
||||||
|
memset(b,0,sizeof(*b)); |
||||||
|
|
||||||
|
b->tail=b->head=r; |
||||||
|
b->count=0; |
||||||
|
b->headptr=b->head->buffer->data+b->head->begin; |
||||||
|
b->headend=b->head->length; |
||||||
|
_span(b); |
||||||
|
} |
||||||
|
|
||||||
|
#define _lookspan() while(!end){\ |
||||||
|
head=head->next;\
|
||||||
|
if(!head) return -1;\
|
||||||
|
ptr=head->buffer->data + head->begin;\
|
||||||
|
end=head->length;\
|
||||||
|
} |
||||||
|
|
||||||
|
/* Read in bits without advancing the bitptr; bits <= 32 */ |
||||||
|
long tremor_oggpack_look(tremor_oggpack_buffer *b,int bits){ |
||||||
|
unsigned long m=mask[bits]; |
||||||
|
unsigned long ret; |
||||||
|
|
||||||
|
bits+=b->headbit; |
||||||
|
|
||||||
|
if(bits >= b->headend<<3){ |
||||||
|
int end=b->headend; |
||||||
|
unsigned char *ptr=b->headptr; |
||||||
|
tremor_ogg_reference *head=b->head; |
||||||
|
|
||||||
|
if(end<0)return -1; |
||||||
|
|
||||||
|
if(bits){ |
||||||
|
_lookspan(); |
||||||
|
ret=*ptr++>>b->headbit; |
||||||
|
if(bits>8){ |
||||||
|
--end; |
||||||
|
_lookspan(); |
||||||
|
ret|=*ptr++<<(8-b->headbit);
|
||||||
|
if(bits>16){ |
||||||
|
--end; |
||||||
|
_lookspan(); |
||||||
|
ret|=*ptr++<<(16-b->headbit);
|
||||||
|
if(bits>24){ |
||||||
|
--end; |
||||||
|
_lookspan(); |
||||||
|
ret|=*ptr++<<(24-b->headbit);
|
||||||
|
if(bits>32 && b->headbit){ |
||||||
|
--end; |
||||||
|
_lookspan(); |
||||||
|
ret|=*ptr<<(32-b->headbit); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
}else{ |
||||||
|
|
||||||
|
/* make this a switch jump-table */ |
||||||
|
ret=b->headptr[0]>>b->headbit; |
||||||
|
if(bits>8){ |
||||||
|
ret|=b->headptr[1]<<(8-b->headbit);
|
||||||
|
if(bits>16){ |
||||||
|
ret|=b->headptr[2]<<(16-b->headbit);
|
||||||
|
if(bits>24){ |
||||||
|
ret|=b->headptr[3]<<(24-b->headbit);
|
||||||
|
if(bits>32 && b->headbit) |
||||||
|
ret|=b->headptr[4]<<(32-b->headbit); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
ret&=m; |
||||||
|
return ret; |
||||||
|
} |
||||||
|
|
||||||
|
/* limited to 32 at a time */ |
||||||
|
void tremor_oggpack_adv(tremor_oggpack_buffer *b,int bits){ |
||||||
|
bits+=b->headbit; |
||||||
|
b->headbit=bits&7; |
||||||
|
b->headend-=(bits>>3); |
||||||
|
b->headptr+=(bits>>3); |
||||||
|
if(b->headend<1)_span(b); |
||||||
|
} |
||||||
|
|
||||||
|
int tremor_oggpack_eop(tremor_oggpack_buffer *b){ |
||||||
|
if(b->headend<0)return -1; |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
/* bits <= 32 */ |
||||||
|
long tremor_oggpack_read(tremor_oggpack_buffer *b,int bits){ |
||||||
|
long ret=tremor_oggpack_look(b,bits); |
||||||
|
tremor_oggpack_adv(b,bits); |
||||||
|
return(ret); |
||||||
|
} |
||||||
|
|
||||||
|
long tremor_oggpack_bytes(tremor_oggpack_buffer *b){ |
||||||
|
if(b->headend<0)return b->count+b->head->length; |
||||||
|
return b->count + b->head->length-b->headend +
|
||||||
|
(b->headbit+7)/8; |
||||||
|
} |
||||||
|
|
||||||
|
long tremor_oggpack_bits(tremor_oggpack_buffer *b){ |
||||||
|
if(b->headend<0)return (b->count+b->head->length)*8; |
||||||
|
return (b->count + b->head->length-b->headend)*8 +
|
||||||
|
b->headbit; |
||||||
|
} |
||||||
|
|
||||||
|
/* Self test of the bitwise routines; everything else is based on
|
||||||
|
them, so they damned well better be solid. */ |
||||||
|
|
||||||
|
#ifdef _V_BIT_TEST |
||||||
|
#include <string.h> |
||||||
|
#include <stdlib.h> |
||||||
|
#include <stdio.h> |
||||||
|
#include "framing.c" |
||||||
|
|
||||||
|
static int ilog(unsigned long v){ |
||||||
|
int ret=0; |
||||||
|
while(v){ |
||||||
|
ret++; |
||||||
|
v>>=1; |
||||||
|
} |
||||||
|
return(ret); |
||||||
|
} |
||||||
|
|
||||||
|
tremor_oggpack_buffer r; |
||||||
|
tremor_oggpack_buffer o; |
||||||
|
tremor_ogg_buffer_state *bs; |
||||||
|
tremor_ogg_reference *or; |
||||||
|
#define TESTWORDS 256 |
||||||
|
|
||||||
|
void report(char *in){ |
||||||
|
fprintf(stderr,"%s",in); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
|
||||||
|
int getbyte(tremor_ogg_reference *or,int position){ |
||||||
|
while(or && position>=or->length){ |
||||||
|
position-=or->length; |
||||||
|
or=or->next; |
||||||
|
if(or==NULL){ |
||||||
|
fprintf(stderr,"\n\tERROR: getbyte ran off end of buffer.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if((position+or->begin)&1) |
||||||
|
return (or->buffer->data[(position+or->begin)>>1])&0xff; |
||||||
|
else |
||||||
|
return (or->buffer->data[(position+or->begin)>>1]>>8)&0xff; |
||||||
|
} |
||||||
|
|
||||||
|
void cliptest(unsigned long *b,int vals,int bits,int *comp,int compsize){ |
||||||
|
long i,bitcount=0; |
||||||
|
tremor_ogg_reference *or=tremor_ogg_buffer_alloc(bs,64); |
||||||
|
for(i=0;i<compsize;i++) |
||||||
|
or->buffer->data[i]= comp[i]; |
||||||
|
or->length=i; |
||||||
|
|
||||||
|
tremor_oggpack_readinit(&r,or); |
||||||
|
for(i=0;i<vals;i++){ |
||||||
|
unsigned long test; |
||||||
|
int tbit=bits?bits:ilog(b[i]); |
||||||
|
if((test=tremor_oggpack_look(&r,tbit))==0xffffffff) |
||||||
|
report("out of data!\n"); |
||||||
|
if(test!=(b[i]&mask[tbit])){ |
||||||
|
fprintf(stderr,"%ld) %lx %lx\n",i,(b[i]&mask[tbit]),test); |
||||||
|
report("looked at incorrect value!\n"); |
||||||
|
} |
||||||
|
if((test=tremor_oggpack_read(&r,tbit))==0xffffffff){ |
||||||
|
report("premature end of data when reading!\n"); |
||||||
|
} |
||||||
|
if(test!=(b[i]&mask[tbit])){ |
||||||
|
fprintf(stderr,"%ld) %lx %lx\n",i,(b[i]&mask[tbit]),test); |
||||||
|
report("read incorrect value!\n"); |
||||||
|
} |
||||||
|
bitcount+=tbit; |
||||||
|
|
||||||
|
if(bitcount!=tremor_oggpack_bits(&r)) |
||||||
|
report("wrong number of bits while reading!\n"); |
||||||
|
if((bitcount+7)/8!=tremor_oggpack_bytes(&r)) |
||||||
|
report("wrong number of bytes while reading!\n"); |
||||||
|
|
||||||
|
} |
||||||
|
if(tremor_oggpack_bytes(&r)!=(bitcount+7)/8)report("leftover bytes after read!\n"); |
||||||
|
tremor_ogg_buffer_release(or); |
||||||
|
} |
||||||
|
|
||||||
|
void _end_verify(int count){ |
||||||
|
int i; |
||||||
|
|
||||||
|
/* are the proper number of bits left over? */ |
||||||
|
int leftover=count*8-tremor_oggpack_bits(&o); |
||||||
|
if(leftover>7) |
||||||
|
report("\nERROR: too many bits reported left over.\n"); |
||||||
|
|
||||||
|
/* does reading to exactly byte alignment *not* trip EOF? */ |
||||||
|
if(tremor_oggpack_read(&o,leftover)==-1) |
||||||
|
report("\nERROR: read to but not past exact end tripped EOF.\n"); |
||||||
|
if(tremor_oggpack_bits(&o)!=count*8) |
||||||
|
report("\nERROR: read to but not past exact end reported bad bitcount.\n"); |
||||||
|
|
||||||
|
/* does EOF trip properly after a single additional bit? */ |
||||||
|
if(tremor_oggpack_read(&o,1)!=-1) |
||||||
|
report("\nERROR: read past exact end did not trip EOF.\n"); |
||||||
|
if(tremor_oggpack_bits(&o)!=count*8) |
||||||
|
report("\nERROR: read past exact end reported bad bitcount.\n"); |
||||||
|
|
||||||
|
/* does EOF stay set over additional bit reads? */ |
||||||
|
for(i=0;i<=32;i++){ |
||||||
|
if(tremor_oggpack_read(&o,i)!=-1) |
||||||
|
report("\nERROR: EOF did not stay set on stream.\n"); |
||||||
|
if(tremor_oggpack_bits(&o)!=count*8) |
||||||
|
report("\nERROR: read past exact end reported bad bitcount.\n"); |
||||||
|
} |
||||||
|
}
|
||||||
|
|
||||||
|
void _end_verify2(int count){ |
||||||
|
int i; |
||||||
|
|
||||||
|
/* are the proper number of bits left over? */ |
||||||
|
int leftover=count*8-tremor_oggpack_bits(&o); |
||||||
|
if(leftover>7) |
||||||
|
report("\nERROR: too many bits reported left over.\n"); |
||||||
|
|
||||||
|
/* does reading to exactly byte alignment *not* trip EOF? */ |
||||||
|
tremor_oggpack_adv(&o,leftover); |
||||||
|
if(o.headend!=0) |
||||||
|
report("\nERROR: read to but not past exact end tripped EOF.\n"); |
||||||
|
if(tremor_oggpack_bits(&o)!=count*8) |
||||||
|
report("\nERROR: read to but not past exact end reported bad bitcount.\n"); |
||||||
|
|
||||||
|
/* does EOF trip properly after a single additional bit? */ |
||||||
|
tremor_oggpack_adv(&o,1); |
||||||
|
if(o.headend>=0) |
||||||
|
report("\nERROR: read past exact end did not trip EOF.\n"); |
||||||
|
if(tremor_oggpack_bits(&o)!=count*8) |
||||||
|
report("\nERROR: read past exact end reported bad bitcount.\n"); |
||||||
|
|
||||||
|
/* does EOF stay set over additional bit reads? */ |
||||||
|
for(i=0;i<=32;i++){ |
||||||
|
tremor_oggpack_adv(&o,i); |
||||||
|
if(o.headend>=0) |
||||||
|
report("\nERROR: EOF did not stay set on stream.\n"); |
||||||
|
if(tremor_oggpack_bits(&o)!=count*8) |
||||||
|
report("\nERROR: read past exact end reported bad bitcount.\n"); |
||||||
|
} |
||||||
|
}
|
||||||
|
|
||||||
|
long tremor_ogg_buffer_length(tremor_ogg_reference *or){ |
||||||
|
int count=0; |
||||||
|
while(or){ |
||||||
|
count+=or->length; |
||||||
|
or=or->next; |
||||||
|
} |
||||||
|
return count; |
||||||
|
} |
||||||
|
|
||||||
|
tremor_ogg_reference *tremor_ogg_buffer_extend(tremor_ogg_reference *or,long bytes){ |
||||||
|
if(or){ |
||||||
|
while(or->next){ |
||||||
|
or=or->next; |
||||||
|
} |
||||||
|
or->next=tremor_ogg_buffer_alloc(or->buffer->ptr.owner,bytes); |
||||||
|
return(or->next); |
||||||
|
} |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
void tremor_ogg_buffer_posttruncate(tremor_ogg_reference *or,long pos){ |
||||||
|
/* walk to the point where we want to begin truncate */ |
||||||
|
while(or && pos>or->length){ |
||||||
|
pos-=or->length; |
||||||
|
or=or->next; |
||||||
|
} |
||||||
|
if(or){ |
||||||
|
tremor_ogg_buffer_release(or->next); |
||||||
|
or->next=0; |
||||||
|
or->length=pos; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
int main(void){ |
||||||
|
long i; |
||||||
|
static unsigned long testbuffer1[]= |
||||||
|
{18,12,103948,4325,543,76,432,52,3,65,4,56,32,42,34,21,1,23,32,546,456,7, |
||||||
|
567,56,8,8,55,3,52,342,341,4,265,7,67,86,2199,21,7,1,5,1,4}; |
||||||
|
int test1size=43; |
||||||
|
|
||||||
|
static unsigned long testbuffer2[]= |
||||||
|
{216531625L,1237861823,56732452,131,3212421,12325343,34547562,12313212, |
||||||
|
1233432,534,5,346435231,14436467,7869299,76326614,167548585, |
||||||
|
85525151,0,12321,1,349528352}; |
||||||
|
int test2size=21; |
||||||
|
|
||||||
|
static unsigned long testbuffer3[]= |
||||||
|
{1,0,14,0,1,0,12,0,1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1,1,0,0,1, |
||||||
|
0,1,30,1,1,1,0,0,1,0,0,0,12,0,11,0,1,0,0,1}; |
||||||
|
int test3size=56; |
||||||
|
|
||||||
|
static unsigned long large[]= |
||||||
|
{2136531625L,2137861823,56732452,131,3212421,12325343,34547562,12313212, |
||||||
|
1233432,534,5,2146435231,14436467,7869299,76326614,167548585, |
||||||
|
85525151,0,12321,1,2146528352}; |
||||||
|
|
||||||
|
int onesize=33; |
||||||
|
static int one[33]={146,25,44,151,195,15,153,176,233,131,196,65,85,172,47,40, |
||||||
|
34,242,223,136,35,222,211,86,171,50,225,135,214,75,172, |
||||||
|
223,4}; |
||||||
|
|
||||||
|
int twosize=6; |
||||||
|
static int two[6]={61,255,255,251,231,29}; |
||||||
|
|
||||||
|
int threesize=54; |
||||||
|
static int three[54]={169,2,232,252,91,132,156,36,89,13,123,176,144,32,254, |
||||||
|
142,224,85,59,121,144,79,124,23,67,90,90,216,79,23,83, |
||||||
|
58,135,196,61,55,129,183,54,101,100,170,37,127,126,10, |
||||||
|
100,52,4,14,18,86,77,1}; |
||||||
|
|
||||||
|
int foursize=38; |
||||||
|
static int four[38]={18,6,163,252,97,194,104,131,32,1,7,82,137,42,129,11,72, |
||||||
|
132,60,220,112,8,196,109,64,179,86,9,137,195,208,122,169, |
||||||
|
28,2,133,0,1}; |
||||||
|
|
||||||
|
int fivesize=45; |
||||||
|
static int five[45]={169,2,126,139,144,172,30,4,80,72,240,59,130,218,73,62, |
||||||
|
241,24,210,44,4,20,0,248,116,49,135,100,110,130,181,169, |
||||||
|
84,75,159,2,1,0,132,192,8,0,0,18,22}; |
||||||
|
|
||||||
|
int sixsize=7; |
||||||
|
static int six[7]={17,177,170,242,169,19,148}; |
||||||
|
|
||||||
|
/* Test read/write together */ |
||||||
|
/* Later we test against pregenerated bitstreams */ |
||||||
|
bs=tremor_ogg_buffer_create(); |
||||||
|
|
||||||
|
fprintf(stderr,"\nSmall preclipped packing (LSb): "); |
||||||
|
cliptest(testbuffer1,test1size,0,one,onesize); |
||||||
|
fprintf(stderr,"ok."); |
||||||
|
|
||||||
|
fprintf(stderr,"\nNull bit call (LSb): "); |
||||||
|
cliptest(testbuffer3,test3size,0,two,twosize); |
||||||
|
fprintf(stderr,"ok."); |
||||||
|
|
||||||
|
fprintf(stderr,"\nLarge preclipped packing (LSb): "); |
||||||
|
cliptest(testbuffer2,test2size,0,three,threesize); |
||||||
|
fprintf(stderr,"ok."); |
||||||
|
|
||||||
|
fprintf(stderr,"\n32 bit preclipped packing (LSb): "); |
||||||
|
|
||||||
|
or=tremor_ogg_buffer_alloc(bs,128); |
||||||
|
for(i=0;i<test2size;i++){ |
||||||
|
or->buffer->data[i*4] = large[i]&0xff; |
||||||
|
or->buffer->data[i*4+1] = (large[i]>>8)&0xff; |
||||||
|
or->buffer->data[i*4+2] = (large[i]>>16)&0xff; |
||||||
|
or->buffer->data[i*4+3] = (large[i]>>24)&0xff; |
||||||
|
} |
||||||
|
or->length=test2size*4; |
||||||
|
tremor_oggpack_readinit(&r,or); |
||||||
|
for(i=0;i<test2size;i++){ |
||||||
|
unsigned long test; |
||||||
|
if((test=tremor_oggpack_look(&r,32))==0xffffffffUL)report("out of data. failed!"); |
||||||
|
if(test!=large[i]){ |
||||||
|
fprintf(stderr,"%ld != %ld (%lx!=%lx):",test,large[i], |
||||||
|
test,large[i]); |
||||||
|
report("read incorrect value!\n"); |
||||||
|
} |
||||||
|
tremor_oggpack_adv(&r,32); |
||||||
|
} |
||||||
|
tremor_ogg_buffer_release(or); |
||||||
|
if(tremor_oggpack_bytes(&r)!=test2size*4)report("leftover bytes after read!\n"); |
||||||
|
fprintf(stderr,"ok."); |
||||||
|
|
||||||
|
fprintf(stderr,"\nSmall unclipped packing (LSb): "); |
||||||
|
cliptest(testbuffer1,test1size,7,four,foursize); |
||||||
|
fprintf(stderr,"ok."); |
||||||
|
|
||||||
|
fprintf(stderr,"\nLarge unclipped packing (LSb): "); |
||||||
|
cliptest(testbuffer2,test2size,17,five,fivesize); |
||||||
|
fprintf(stderr,"ok."); |
||||||
|
|
||||||
|
fprintf(stderr,"\nSingle bit unclipped packing (LSb): "); |
||||||
|
cliptest(testbuffer3,test3size,1,six,sixsize); |
||||||
|
fprintf(stderr,"ok."); |
||||||
|
|
||||||
|
fprintf(stderr,"\nTesting read past end (LSb): "); |
||||||
|
{ |
||||||
|
unsigned char dda[]={0,0,0,0}; |
||||||
|
tremor_ogg_buffer lob={dda,8,0,{0}}; |
||||||
|
tremor_ogg_reference lor={&lob,0,8,0}; |
||||||
|
|
||||||
|
tremor_oggpack_readinit(&r,&lor); |
||||||
|
for(i=0;i<64;i++){ |
||||||
|
if(tremor_oggpack_read(&r,1)<0){ |
||||||
|
fprintf(stderr,"failed; got -1 prematurely.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
} |
||||||
|
if(tremor_oggpack_look(&r,1)!=-1 || |
||||||
|
tremor_oggpack_read(&r,1)!=-1){ |
||||||
|
fprintf(stderr,"failed; read past end without -1.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
} |
||||||
|
{ |
||||||
|
unsigned char dda[]={0,0,0,0}; |
||||||
|
tremor_ogg_buffer lob={dda,8,0,{0}}; |
||||||
|
tremor_ogg_reference lor={&lob,0,8,0}; |
||||||
|
unsigned long test; |
||||||
|
|
||||||
|
tremor_oggpack_readinit(&r,&lor); |
||||||
|
if((test=tremor_oggpack_read(&r,30))==0xffffffffUL ||
|
||||||
|
(test=tremor_oggpack_read(&r,16))==0xffffffffUL){ |
||||||
|
fprintf(stderr,"failed 2; got -1 prematurely.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
|
||||||
|
if((test=tremor_oggpack_look(&r,18))==0xffffffffUL){ |
||||||
|
fprintf(stderr,"failed 3; got -1 prematurely.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
if((test=tremor_oggpack_look(&r,19))!=0xffffffffUL){ |
||||||
|
fprintf(stderr,"failed; read past end without -1.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
if((test=tremor_oggpack_look(&r,32))!=0xffffffffUL){ |
||||||
|
fprintf(stderr,"failed; read past end without -1.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
} |
||||||
|
fprintf(stderr,"ok.\n"); |
||||||
|
|
||||||
|
/* now the scary shit: randomized testing */ |
||||||
|
|
||||||
|
for(i=0;i<10000;i++){ |
||||||
|
long j,count=0,count2=0,bitcount=0; |
||||||
|
unsigned long values[TESTWORDS]; |
||||||
|
int len[TESTWORDS]; |
||||||
|
unsigned char flat[4*TESTWORDS]; /* max possible needed size */ |
||||||
|
|
||||||
|
memset(flat,0,sizeof(flat)); |
||||||
|
fprintf(stderr,"\rRandomized testing (LSb)... (%ld) ",10000-i); |
||||||
|
|
||||||
|
/* generate a list of words and lengths */ |
||||||
|
/* write the required number of bits out to packbuffer */ |
||||||
|
{ |
||||||
|
long word=0; |
||||||
|
long bit=0; |
||||||
|
int k; |
||||||
|
|
||||||
|
for(j=0;j<TESTWORDS;j++){ |
||||||
|
values[j]=rand(); |
||||||
|
len[j]=(rand()%33); |
||||||
|
|
||||||
|
for(k=0;k<len[j];k++){ |
||||||
|
flat[word] |= ((values[j]>>k)&0x1)<<bit; |
||||||
|
bit++; |
||||||
|
bitcount++; |
||||||
|
if(bit>7){ |
||||||
|
bit=0; |
||||||
|
word++; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
count2=(bitcount+7)>>3; |
||||||
|
|
||||||
|
/* construct random-length buffer chain from flat vector; random
|
||||||
|
byte starting offset within the length of the vector */ |
||||||
|
{ |
||||||
|
tremor_ogg_reference *or=NULL,*orl=NULL; |
||||||
|
long pos=0; |
||||||
|
|
||||||
|
/* build buffer chain */ |
||||||
|
while(count2){ |
||||||
|
int ilen=(rand()%32),k; |
||||||
|
int ibegin=(rand()%32); |
||||||
|
|
||||||
|
|
||||||
|
if(ilen>count2)ilen=count2; |
||||||
|
|
||||||
|
if(or) |
||||||
|
orl=tremor_ogg_buffer_extend(orl,64); |
||||||
|
else |
||||||
|
or=orl=tremor_ogg_buffer_alloc(bs,64); |
||||||
|
|
||||||
|
orl->length=ilen; |
||||||
|
orl->begin=ibegin; |
||||||
|
|
||||||
|
for(k=0;k<ilen;k++) |
||||||
|
orl->buffer->data[ibegin++]= flat[pos++]; |
||||||
|
|
||||||
|
count2-=ilen; |
||||||
|
} |
||||||
|
|
||||||
|
if(tremor_ogg_buffer_length(or)!=(bitcount+7)/8){ |
||||||
|
fprintf(stderr,"\nERROR: buffer length incorrect after build.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
{ |
||||||
|
int begin=0; //=(rand()%TESTWORDS);
|
||||||
|
int ilen=(rand()%(TESTWORDS-begin)); |
||||||
|
int bitoffset,bitcount=0; |
||||||
|
unsigned long temp; |
||||||
|
|
||||||
|
for(j=0;j<begin;j++) |
||||||
|
bitcount+=len[j]; |
||||||
|
or=tremor_ogg_buffer_pretruncate(or,bitcount/8); |
||||||
|
bitoffset=bitcount%=8; |
||||||
|
for(;j<begin+ilen;j++) |
||||||
|
bitcount+=len[j]; |
||||||
|
tremor_ogg_buffer_posttruncate(or,((bitcount+7)/8)); |
||||||
|
|
||||||
|
if((count=tremor_ogg_buffer_length(or))!=(bitcount+7)/8){ |
||||||
|
fprintf(stderr,"\nERROR: buffer length incorrect after truncate.\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
|
||||||
|
tremor_oggpack_readinit(&o,or); |
||||||
|
|
||||||
|
/* verify bit count */ |
||||||
|
if(tremor_oggpack_bits(&o)!=0){ |
||||||
|
fprintf(stderr,"\nERROR: Read bitcounter not zero!\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
if(tremor_oggpack_bytes(&o)!=0){ |
||||||
|
fprintf(stderr,"\nERROR: Read bytecounter not zero!\n"); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
|
||||||
|
bitcount=bitoffset; |
||||||
|
tremor_oggpack_read(&o,bitoffset); |
||||||
|
|
||||||
|
/* read and compare to original list */ |
||||||
|
for(j=begin;j<begin+ilen;j++){ |
||||||
|
temp=tremor_oggpack_read(&o,len[j]); |
||||||
|
if(temp==0xffffffffUL){ |
||||||
|
fprintf(stderr,"\nERROR: End of stream too soon! word: %ld,%d\n", |
||||||
|
j-begin,ilen); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
if(temp!=(values[j]&mask[len[j]])){ |
||||||
|
fprintf(stderr,"\nERROR: Incorrect read %lx != %lx, word %ld, len %d\n" |
||||||
|
, |
||||||
|
values[j]&mask[len[j]],temp,j-begin,len[j]); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
bitcount+=len[j]; |
||||||
|
if(tremor_oggpack_bits(&o)!=bitcount){ |
||||||
|
fprintf(stderr,"\nERROR: Read bitcounter %d != %ld!\n", |
||||||
|
bitcount,tremor_oggpack_bits(&o)); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
if(tremor_oggpack_bytes(&o)!=(bitcount+7)/8){ |
||||||
|
fprintf(stderr,"\nERROR: Read bytecounter %d != %ld!\n", |
||||||
|
(bitcount+7)/8,tremor_oggpack_bytes(&o)); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
_end_verify(count); |
||||||
|
|
||||||
|
/* look/adv version */ |
||||||
|
tremor_oggpack_readinit(&o,or); |
||||||
|
bitcount=bitoffset; |
||||||
|
tremor_oggpack_adv(&o,bitoffset); |
||||||
|
|
||||||
|
/* read and compare to original list */ |
||||||
|
for(j=begin;j<begin+ilen;j++){ |
||||||
|
temp=tremor_oggpack_look(&o,len[j]); |
||||||
|
|
||||||
|
if(temp==0xffffffffUL){ |
||||||
|
fprintf(stderr,"\nERROR: End of stream too soon! word: %ld\n", |
||||||
|
j-begin); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
if(temp!=(values[j]&mask[len[j]])){ |
||||||
|
fprintf(stderr,"\nERROR: Incorrect look %lx != %lx, word %ld, len %d\n" |
||||||
|
, |
||||||
|
values[j]&mask[len[j]],temp,j-begin,len[j]); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
tremor_oggpack_adv(&o,len[j]); |
||||||
|
bitcount+=len[j]; |
||||||
|
if(tremor_oggpack_bits(&o)!=bitcount){ |
||||||
|
fprintf(stderr,"\nERROR: Look/Adv bitcounter %d != %ld!\n", |
||||||
|
bitcount,tremor_oggpack_bits(&o)); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
if(tremor_oggpack_bytes(&o)!=(bitcount+7)/8){ |
||||||
|
fprintf(stderr,"\nERROR: Look/Adv bytecounter %d != %ld!\n", |
||||||
|
(bitcount+7)/8,tremor_oggpack_bytes(&o)); |
||||||
|
exit(1); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
_end_verify2(count); |
||||||
|
|
||||||
|
} |
||||||
|
tremor_ogg_buffer_release(or); |
||||||
|
} |
||||||
|
} |
||||||
|
fprintf(stderr,"\rRandomized testing (LSb)... ok. \n"); |
||||||
|
|
||||||
|
return(0); |
||||||
|
}
|
||||||
|
#endif |
@ -1,497 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: PCM data vector blocking, windowing and dis/reassembly |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#include <stdio.h> |
|
||||||
#include <stdlib.h> |
|
||||||
#include <string.h> |
|
||||||
#include <ogg/ogg.h> |
|
||||||
#include "ivorbiscodec.h" |
|
||||||
#include "codec_internal.h" |
|
||||||
|
|
||||||
#include "window.h" |
|
||||||
#include "registry.h" |
|
||||||
#include "misc.h" |
|
||||||
|
|
||||||
static int ilog(unsigned int v){ |
|
||||||
int ret=0; |
|
||||||
if(v)--v; |
|
||||||
while(v){ |
|
||||||
ret++; |
|
||||||
v>>=1; |
|
||||||
} |
|
||||||
return(ret); |
|
||||||
} |
|
||||||
|
|
||||||
/* pcm accumulator examples (not exhaustive):
|
|
||||||
|
|
||||||
<-------------- lW ----------------> |
|
||||||
<--------------- W ----------------> |
|
||||||
: .....|..... _______________ | |
|
||||||
: .''' | '''_--- | |\ | |
|
||||||
:.....''' |_____--- '''......| | \_______| |
|
||||||
:.................|__________________|_______|__|______| |
|
||||||
|<------ Sl ------>| > Sr < |endW |
|
||||||
|beginSl |endSl | |endSr
|
|
||||||
|beginW |endlW |beginSr |
|
||||||
|
|
||||||
|
|
||||||
|< lW >|
|
|
||||||
<--------------- W ----------------> |
|
||||||
| | .. ______________ | |
|
||||||
| | ' `/ | ---_ | |
|
||||||
|___.'___/`. | ---_____|
|
|
||||||
|_______|__|_______|_________________| |
|
||||||
| >|Sl|< |<------ Sr ----->|endW |
|
||||||
| | |endSl |beginSr |endSr |
|
||||||
|beginW | |endlW
|
|
||||||
mult[0] |beginSl mult[n] |
|
||||||
|
|
||||||
<-------------- lW -----------------> |
|
||||||
|<--W-->|
|
|
||||||
: .............. ___ | |
|
|
||||||
: .''' |`/ \ | |
|
|
||||||
:.....''' |/`....\|...|
|
|
||||||
:.........................|___|___|___|
|
|
||||||
|Sl |Sr |endW
|
|
||||||
| | |endSr |
|
||||||
| |beginSr |
|
||||||
| |endSl |
|
||||||
|beginSl |
|
||||||
|beginW |
|
||||||
*/ |
|
||||||
|
|
||||||
/* block abstraction setup *********************************************/ |
|
||||||
|
|
||||||
#ifndef WORD_ALIGN |
|
||||||
#define WORD_ALIGN 8 |
|
||||||
#endif |
|
||||||
|
|
||||||
int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){ |
|
||||||
memset(vb,0,sizeof(*vb)); |
|
||||||
vb->vd=v; |
|
||||||
vb->localalloc=0; |
|
||||||
vb->localstore=NULL; |
|
||||||
|
|
||||||
return(0); |
|
||||||
} |
|
||||||
|
|
||||||
void *_vorbis_block_alloc(vorbis_block *vb,long bytes){ |
|
||||||
bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1); |
|
||||||
if(bytes+vb->localtop>vb->localalloc){ |
|
||||||
/* can't just _ogg_realloc... there are outstanding pointers */ |
|
||||||
if(vb->localstore){ |
|
||||||
struct alloc_chain *link=(struct alloc_chain *)_ogg_malloc(sizeof(*link)); |
|
||||||
vb->totaluse+=vb->localtop; |
|
||||||
link->next=vb->reap; |
|
||||||
link->ptr=vb->localstore; |
|
||||||
vb->reap=link; |
|
||||||
} |
|
||||||
/* highly conservative */ |
|
||||||
vb->localalloc=bytes; |
|
||||||
vb->localstore=_ogg_malloc(vb->localalloc); |
|
||||||
vb->localtop=0; |
|
||||||
} |
|
||||||
{ |
|
||||||
void *ret=(void *)(((char *)vb->localstore)+vb->localtop); |
|
||||||
vb->localtop+=bytes; |
|
||||||
return ret; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/* reap the chain, pull the ripcord */ |
|
||||||
void _vorbis_block_ripcord(vorbis_block *vb){ |
|
||||||
/* reap the chain */ |
|
||||||
struct alloc_chain *reap=vb->reap; |
|
||||||
while(reap){ |
|
||||||
struct alloc_chain *next=reap->next; |
|
||||||
_ogg_free(reap->ptr); |
|
||||||
memset(reap,0,sizeof(*reap)); |
|
||||||
_ogg_free(reap); |
|
||||||
reap=next; |
|
||||||
} |
|
||||||
/* consolidate storage */ |
|
||||||
if(vb->totaluse){ |
|
||||||
vb->localstore=_ogg_realloc(vb->localstore,vb->totaluse+vb->localalloc); |
|
||||||
vb->localalloc+=vb->totaluse; |
|
||||||
vb->totaluse=0; |
|
||||||
} |
|
||||||
|
|
||||||
/* pull the ripcord */ |
|
||||||
vb->localtop=0; |
|
||||||
vb->reap=NULL; |
|
||||||
} |
|
||||||
|
|
||||||
int vorbis_block_clear(vorbis_block *vb){ |
|
||||||
_vorbis_block_ripcord(vb); |
|
||||||
if(vb->localstore)_ogg_free(vb->localstore); |
|
||||||
|
|
||||||
memset(vb,0,sizeof(*vb)); |
|
||||||
return(0); |
|
||||||
} |
|
||||||
|
|
||||||
static int _vds_init(vorbis_dsp_state *v,vorbis_info *vi){ |
|
||||||
int i; |
|
||||||
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; |
|
||||||
private_state *b=NULL; |
|
||||||
|
|
||||||
if(ci==NULL) return 1; |
|
||||||
|
|
||||||
memset(v,0,sizeof(*v)); |
|
||||||
b=(private_state *)(v->backend_state=_ogg_calloc(1,sizeof(*b))); |
|
||||||
|
|
||||||
v->vi=vi; |
|
||||||
b->modebits=ilog(ci->modes); |
|
||||||
|
|
||||||
/* Vorbis I uses only window type 0 */ |
|
||||||
b->window[0]=_vorbis_window(0,ci->blocksizes[0]/2); |
|
||||||
b->window[1]=_vorbis_window(0,ci->blocksizes[1]/2); |
|
||||||
|
|
||||||
/* finish the codebooks */ |
|
||||||
if(!ci->fullbooks){ |
|
||||||
ci->fullbooks=(codebook *)_ogg_calloc(ci->books,sizeof(*ci->fullbooks)); |
|
||||||
for(i=0;i<ci->books;i++){ |
|
||||||
if(ci->book_param[i]==NULL) |
|
||||||
goto abort_books; |
|
||||||
if(vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i])) |
|
||||||
goto abort_books; |
|
||||||
/* decode codebooks are now standalone after init */ |
|
||||||
vorbis_staticbook_destroy(ci->book_param[i]); |
|
||||||
ci->book_param[i]=NULL; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
v->pcm_storage=ci->blocksizes[1]; |
|
||||||
v->pcm=(ogg_int32_t **)_ogg_malloc(vi->channels*sizeof(*v->pcm)); |
|
||||||
v->pcmret=(ogg_int32_t **)_ogg_malloc(vi->channels*sizeof(*v->pcmret)); |
|
||||||
for(i=0;i<vi->channels;i++) |
|
||||||
v->pcm[i]=(ogg_int32_t *)_ogg_calloc(v->pcm_storage,sizeof(*v->pcm[i])); |
|
||||||
|
|
||||||
/* all 1 (large block) or 0 (small block) */ |
|
||||||
/* explicitly set for the sake of clarity */ |
|
||||||
v->lW=0; /* previous window size */ |
|
||||||
v->W=0; /* current window size */ |
|
||||||
|
|
||||||
/* initialize all the mapping/backend lookups */ |
|
||||||
b->mode=(vorbis_look_mapping **)_ogg_calloc(ci->modes,sizeof(*b->mode)); |
|
||||||
for(i=0;i<ci->modes;i++){ |
|
||||||
int mapnum=ci->mode_param[i]->mapping; |
|
||||||
int maptype=ci->map_type[mapnum]; |
|
||||||
b->mode[i]=_mapping_P[maptype]->look(v,ci->mode_param[i], |
|
||||||
ci->map_param[mapnum]); |
|
||||||
} |
|
||||||
return 0; |
|
||||||
abort_books: |
|
||||||
for(i=0;i<ci->books;i++){ |
|
||||||
if(ci->book_param[i]!=NULL){ |
|
||||||
vorbis_staticbook_destroy(ci->book_param[i]); |
|
||||||
ci->book_param[i]=NULL; |
|
||||||
} |
|
||||||
} |
|
||||||
vorbis_dsp_clear(v); |
|
||||||
return -1; |
|
||||||
} |
|
||||||
|
|
||||||
int vorbis_synthesis_restart(vorbis_dsp_state *v){ |
|
||||||
vorbis_info *vi=v->vi; |
|
||||||
codec_setup_info *ci; |
|
||||||
|
|
||||||
if(!v->backend_state)return -1; |
|
||||||
if(!vi)return -1; |
|
||||||
ci=vi->codec_setup; |
|
||||||
if(!ci)return -1; |
|
||||||
|
|
||||||
v->centerW=ci->blocksizes[1]/2; |
|
||||||
v->pcm_current=v->centerW; |
|
||||||
|
|
||||||
v->pcm_returned=-1; |
|
||||||
v->granulepos=-1; |
|
||||||
v->sequence=-1; |
|
||||||
((private_state *)(v->backend_state))->sample_count=-1; |
|
||||||
|
|
||||||
return(0); |
|
||||||
} |
|
||||||
|
|
||||||
int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi){ |
|
||||||
if(_vds_init(v,vi))return 1; |
|
||||||
vorbis_synthesis_restart(v); |
|
||||||
|
|
||||||
return 0; |
|
||||||
} |
|
||||||
|
|
||||||
void vorbis_dsp_clear(vorbis_dsp_state *v){ |
|
||||||
int i; |
|
||||||
if(v){ |
|
||||||
vorbis_info *vi=v->vi; |
|
||||||
codec_setup_info *ci=(codec_setup_info *)(vi?vi->codec_setup:NULL); |
|
||||||
private_state *b=(private_state *)v->backend_state; |
|
||||||
|
|
||||||
if(v->pcm){ |
|
||||||
for(i=0;i<vi->channels;i++) |
|
||||||
if(v->pcm[i])_ogg_free(v->pcm[i]); |
|
||||||
_ogg_free(v->pcm); |
|
||||||
if(v->pcmret)_ogg_free(v->pcmret); |
|
||||||
} |
|
||||||
|
|
||||||
/* free mode lookups; these are actually vorbis_look_mapping structs */ |
|
||||||
if(ci){ |
|
||||||
for(i=0;i<ci->modes;i++){ |
|
||||||
int mapnum=ci->mode_param[i]->mapping; |
|
||||||
int maptype=ci->map_type[mapnum]; |
|
||||||
if(b && b->mode)_mapping_P[maptype]->free_look(b->mode[i]); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
if(b){ |
|
||||||
if(b->mode)_ogg_free(b->mode);
|
|
||||||
_ogg_free(b); |
|
||||||
} |
|
||||||
|
|
||||||
memset(v,0,sizeof(*v)); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/* Unlike in analysis, the window is only partially applied for each
|
|
||||||
block. The time domain envelope is not yet handled at the point of |
|
||||||
calling (as it relies on the previous block). */ |
|
||||||
|
|
||||||
int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ |
|
||||||
vorbis_info *vi=v->vi; |
|
||||||
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; |
|
||||||
private_state *b=v->backend_state; |
|
||||||
int i,j; |
|
||||||
|
|
||||||
if(v->pcm_current>v->pcm_returned && v->pcm_returned!=-1)return(OV_EINVAL); |
|
||||||
|
|
||||||
v->lW=v->W; |
|
||||||
v->W=vb->W; |
|
||||||
v->nW=-1; |
|
||||||
|
|
||||||
if((v->sequence==-1)|| |
|
||||||
(v->sequence+1 != vb->sequence)){ |
|
||||||
v->granulepos=-1; /* out of sequence; lose count */ |
|
||||||
b->sample_count=-1; |
|
||||||
} |
|
||||||
|
|
||||||
v->sequence=vb->sequence; |
|
||||||
|
|
||||||
if(vb->pcm){ /* no pcm to process if vorbis_synthesis_trackonly
|
|
||||||
was called on block */ |
|
||||||
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; |
|
||||||
}else{ |
|
||||||
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){ |
|
||||||
if(v->W){ |
|
||||||
/* large/large */ |
|
||||||
ogg_int32_t *pcm=v->pcm[j]+prevCenter; |
|
||||||
ogg_int32_t *p=vb->pcm[j]; |
|
||||||
for(i=0;i<n1;i++) |
|
||||||
pcm[i]+=p[i]; |
|
||||||
}else{ |
|
||||||
/* large/small */ |
|
||||||
ogg_int32_t *pcm=v->pcm[j]+prevCenter+n1/2-n0/2; |
|
||||||
ogg_int32_t *p=vb->pcm[j]; |
|
||||||
for(i=0;i<n0;i++) |
|
||||||
pcm[i]+=p[i]; |
|
||||||
} |
|
||||||
}else{ |
|
||||||
if(v->W){ |
|
||||||
/* small/large */ |
|
||||||
ogg_int32_t *pcm=v->pcm[j]+prevCenter; |
|
||||||
ogg_int32_t *p=vb->pcm[j]+n1/2-n0/2; |
|
||||||
for(i=0;i<n0;i++) |
|
||||||
pcm[i]+=p[i]; |
|
||||||
for(;i<n1/2+n0/2;i++) |
|
||||||
pcm[i]=p[i]; |
|
||||||
}else{ |
|
||||||
/* small/small */ |
|
||||||
ogg_int32_t *pcm=v->pcm[j]+prevCenter; |
|
||||||
ogg_int32_t *p=vb->pcm[j]; |
|
||||||
for(i=0;i<n0;i++) |
|
||||||
pcm[i]+=p[i]; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/* the copy section */ |
|
||||||
{ |
|
||||||
ogg_int32_t *pcm=v->pcm[j]+thisCenter; |
|
||||||
ogg_int32_t *p=vb->pcm[j]+n; |
|
||||||
for(i=0;i<n;i++) |
|
||||||
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 */ |
|
||||||
|
|
||||||
if(v->pcm_returned==-1){ |
|
||||||
v->pcm_returned=thisCenter; |
|
||||||
v->pcm_current=thisCenter; |
|
||||||
}else{ |
|
||||||
v->pcm_returned=prevCenter; |
|
||||||
v->pcm_current=prevCenter+ |
|
||||||
ci->blocksizes[v->lW]/4+ |
|
||||||
ci->blocksizes[v->W]/4; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
/* track the frame number... This is for convenience, but also
|
|
||||||
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 |
|
||||||
is. For this reason, vorbisfile will always try to make sure |
|
||||||
it reads the last two marked pages in proper sequence */ |
|
||||||
|
|
||||||
if(b->sample_count==-1){ |
|
||||||
b->sample_count=0; |
|
||||||
}else{ |
|
||||||
b->sample_count+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4; |
|
||||||
} |
|
||||||
|
|
||||||
if(v->granulepos==-1){ |
|
||||||
if(vb->granulepos!=-1){ /* only set if we have a position to set to */ |
|
||||||
|
|
||||||
v->granulepos=vb->granulepos; |
|
||||||
|
|
||||||
/* is this a short page? */ |
|
||||||
if(b->sample_count>v->granulepos){ |
|
||||||
/* corner case; if this is both the first and last audio page,
|
|
||||||
then spec says the end is cut, not beginning */ |
|
||||||
long extra=b->sample_count-vb->granulepos; |
|
||||||
|
|
||||||
/* we use ogg_int64_t for granule positions because a
|
|
||||||
uint64 isn't universally available. Unfortunately, |
|
||||||
that means granposes can be 'negative' and result in |
|
||||||
extra being negative */ |
|
||||||
if(extra<0) |
|
||||||
extra=0; |
|
||||||
|
|
||||||
if(vb->eofflag){ |
|
||||||
/* trim the end */ |
|
||||||
/* no preceeding granulepos; assume we started at zero (we'd
|
|
||||||
have to in a short single-page stream) */ |
|
||||||
/* granulepos could be -1 due to a seek, but that would result
|
|
||||||
in a long coun`t, not short count */ |
|
||||||
|
|
||||||
/* Guard against corrupt/malicious frames that set EOP and
|
|
||||||
a backdated granpos; don't rewind more samples than we |
|
||||||
actually have */ |
|
||||||
if(extra > v->pcm_current - v->pcm_returned) |
|
||||||
extra = v->pcm_current - v->pcm_returned; |
|
||||||
|
|
||||||
v->pcm_current-=extra; |
|
||||||
}else{ |
|
||||||
/* trim the beginning */ |
|
||||||
v->pcm_returned+=extra; |
|
||||||
if(v->pcm_returned>v->pcm_current) |
|
||||||
v->pcm_returned=v->pcm_current; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
}else{ |
|
||||||
v->granulepos+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4; |
|
||||||
if(vb->granulepos!=-1 && v->granulepos!=vb->granulepos){ |
|
||||||
|
|
||||||
if(v->granulepos>vb->granulepos){ |
|
||||||
long extra=v->granulepos-vb->granulepos; |
|
||||||
|
|
||||||
if(extra) |
|
||||||
if(vb->eofflag){ |
|
||||||
/* partial last frame. Strip the extra samples off */ |
|
||||||
|
|
||||||
/* Guard against corrupt/malicious frames that set EOP and
|
|
||||||
a backdated granpos; don't rewind more samples than we |
|
||||||
actually have */ |
|
||||||
if(extra > v->pcm_current - v->pcm_returned) |
|
||||||
extra = v->pcm_current - v->pcm_returned; |
|
||||||
|
|
||||||
/* we use ogg_int64_t for granule positions because a
|
|
||||||
uint64 isn't universally available. Unfortunately, |
|
||||||
that means granposes can be 'negative' and result in |
|
||||||
extra being negative */ |
|
||||||
if(extra<0) |
|
||||||
extra=0; |
|
||||||
|
|
||||||
v->pcm_current-=extra; |
|
||||||
|
|
||||||
} /* else {Shouldn't happen *unless* the bitstream is out of
|
|
||||||
spec. Either way, believe the bitstream } */ |
|
||||||
} /* 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); |
|
||||||
} |
|
||||||
|
|
||||||
/* pcm==NULL indicates we just want the pending samples, no more */ |
|
||||||
int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm){ |
|
||||||
vorbis_info *vi=v->vi; |
|
||||||
if(v->pcm_returned>-1 && v->pcm_returned<v->pcm_current){ |
|
||||||
if(pcm){ |
|
||||||
int i; |
|
||||||
for(i=0;i<vi->channels;i++) |
|
||||||
v->pcmret[i]=v->pcm[i]+v->pcm_returned; |
|
||||||
*pcm=v->pcmret; |
|
||||||
} |
|
||||||
return(v->pcm_current-v->pcm_returned); |
|
||||||
} |
|
||||||
return(0); |
|
||||||
} |
|
||||||
|
|
||||||
int vorbis_synthesis_read(vorbis_dsp_state *v,int bytes){ |
|
||||||
if(bytes && v->pcm_returned+bytes>v->pcm_current)return(OV_EINVAL); |
|
||||||
v->pcm_returned+=bytes; |
|
||||||
return(0); |
|
||||||
} |
|
||||||
|
|
@ -1,24 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2008 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: shared block functions |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#ifndef _V_BLOCK_ |
|
||||||
#define _V_BLOCK_ |
|
||||||
|
|
||||||
extern void _vorbis_block_ripcord(vorbis_block *vb); |
|
||||||
extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes); |
|
||||||
|
|
||||||
#endif |
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,298 @@ |
|||||||
|
/********************************************************************
|
||||||
|
* * |
||||||
|
* THIS FILE IS PART OF THE TremorOggVorbis 'TREMOR' CODEC SOURCE CODE. * |
||||||
|
* * |
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
||||||
|
* * |
||||||
|
* THE TremorOggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * |
||||||
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
|
* * |
||||||
|
******************************************************************** |
||||||
|
|
||||||
|
function: PCM data vector blocking, windowing and dis/reassembly |
||||||
|
|
||||||
|
********************************************************************/ |
||||||
|
|
||||||
|
#include <stdlib.h> |
||||||
|
#include "tremor_ogg.h" |
||||||
|
#include "mdct.h" |
||||||
|
#include "ivorbiscodec.h" |
||||||
|
#include "codec_internal.h" |
||||||
|
#include "misc.h" |
||||||
|
#include "window_lookup.h" |
||||||
|
|
||||||
|
int vorbis_dsp_restart(vorbis_dsp_state *v){ |
||||||
|
if(!v)return -1; |
||||||
|
{ |
||||||
|
vorbis_info *vi=v->vi; |
||||||
|
codec_setup_info *ci; |
||||||
|
|
||||||
|
if(!vi)return -1; |
||||||
|
ci=vi->codec_setup; |
||||||
|
if(!ci)return -1; |
||||||
|
|
||||||
|
v->out_end=-1; |
||||||
|
v->out_begin=-1; |
||||||
|
|
||||||
|
v->granulepos=-1; |
||||||
|
v->sequence=-1; |
||||||
|
v->sample_count=-1; |
||||||
|
} |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi){ |
||||||
|
int i; |
||||||
|
|
||||||
|
vorbis_dsp_state *v=_tremor_ogg_calloc(1,sizeof(*v)); |
||||||
|
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; |
||||||
|
|
||||||
|
v->vi=vi; |
||||||
|
|
||||||
|
v->work=(tremor_ogg_int32_t **)_tremor_ogg_malloc(vi->channels*sizeof(*v->work)); |
||||||
|
v->mdctright=(tremor_ogg_int32_t **)_tremor_ogg_malloc(vi->channels*sizeof(*v->mdctright)); |
||||||
|
for(i=0;i<vi->channels;i++){ |
||||||
|
v->work[i]=(tremor_ogg_int32_t *)_tremor_ogg_calloc(1,(ci->blocksizes[1]>>1)* |
||||||
|
sizeof(*v->work[i])); |
||||||
|
v->mdctright[i]=(tremor_ogg_int32_t *)_tremor_ogg_calloc(1,(ci->blocksizes[1]>>2)* |
||||||
|
sizeof(*v->mdctright[i])); |
||||||
|
} |
||||||
|
|
||||||
|
v->lW=0; /* previous window size */ |
||||||
|
v->W=0; /* current window size */ |
||||||
|
|
||||||
|
vorbis_dsp_restart(v); |
||||||
|
return v; |
||||||
|
} |
||||||
|
|
||||||
|
void vorbis_dsp_destroy(vorbis_dsp_state *v){ |
||||||
|
int i; |
||||||
|
if(v){ |
||||||
|
vorbis_info *vi=v->vi; |
||||||
|
|
||||||
|
if(v->work){ |
||||||
|
for(i=0;i<vi->channels;i++) |
||||||
|
if(v->work[i])_tremor_ogg_free(v->work[i]); |
||||||
|
_tremor_ogg_free(v->work); |
||||||
|
} |
||||||
|
if(v->mdctright){ |
||||||
|
for(i=0;i<vi->channels;i++) |
||||||
|
if(v->mdctright[i])_tremor_ogg_free(v->mdctright[i]); |
||||||
|
_tremor_ogg_free(v->mdctright); |
||||||
|
} |
||||||
|
|
||||||
|
_tremor_ogg_free(v); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
static LOOKUP_T *_vorbis_window(int left){ |
||||||
|
switch(left){ |
||||||
|
case 32: |
||||||
|
return vwin64; |
||||||
|
case 64: |
||||||
|
return vwin128; |
||||||
|
case 128: |
||||||
|
return vwin256; |
||||||
|
case 256: |
||||||
|
return vwin512; |
||||||
|
case 512: |
||||||
|
return vwin1024; |
||||||
|
case 1024: |
||||||
|
return vwin2048; |
||||||
|
case 2048: |
||||||
|
return vwin4096; |
||||||
|
#ifndef LIMIT_TO_64kHz |
||||||
|
case 4096: |
||||||
|
return vwin8192; |
||||||
|
#endif |
||||||
|
default: |
||||||
|
return(0); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/* pcm==0 indicates we just want the pending samples, no more */ |
||||||
|
int vorbis_dsp_pcmout(vorbis_dsp_state *v,tremor_ogg_int16_t *pcm,int samples){ |
||||||
|
vorbis_info *vi=v->vi; |
||||||
|
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; |
||||||
|
if(v->out_begin>-1 && v->out_begin<v->out_end){ |
||||||
|
int n=v->out_end-v->out_begin; |
||||||
|
if(pcm){ |
||||||
|
int i; |
||||||
|
if(n>samples)n=samples; |
||||||
|
for(i=0;i<vi->channels;i++) |
||||||
|
mdct_unroll_lap(ci->blocksizes[0],ci->blocksizes[1], |
||||||
|
v->lW,v->W,v->work[i],v->mdctright[i], |
||||||
|
_vorbis_window(ci->blocksizes[0]>>1), |
||||||
|
_vorbis_window(ci->blocksizes[1]>>1), |
||||||
|
pcm+i,vi->channels, |
||||||
|
v->out_begin,v->out_begin+n); |
||||||
|
} |
||||||
|
return(n); |
||||||
|
} |
||||||
|
return(0); |
||||||
|
} |
||||||
|
|
||||||
|
int vorbis_dsp_read(vorbis_dsp_state *v,int s){ |
||||||
|
if(s && v->out_begin+s>v->out_end)return(OV_EINVAL); |
||||||
|
v->out_begin+=s; |
||||||
|
return(0); |
||||||
|
} |
||||||
|
|
||||||
|
long vorbis_packet_blocksize(vorbis_info *vi,tremor_ogg_packet *op){ |
||||||
|
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; |
||||||
|
tremor_oggpack_buffer opb; |
||||||
|
int mode; |
||||||
|
int modebits=0; |
||||||
|
int v=ci->modes; |
||||||
|
|
||||||
|
tremor_oggpack_readinit(&opb,op->packet); |
||||||
|
|
||||||
|
/* Check the packet type */ |
||||||
|
if(tremor_oggpack_read(&opb,1)!=0){ |
||||||
|
/* Oops. This is not an audio data packet */ |
||||||
|
return(OV_ENOTAUDIO); |
||||||
|
} |
||||||
|
|
||||||
|
while(v>1){ |
||||||
|
modebits++; |
||||||
|
v>>=1; |
||||||
|
} |
||||||
|
|
||||||
|
/* read our mode and pre/post windowsize */ |
||||||
|
mode=tremor_oggpack_read(&opb,modebits); |
||||||
|
if(mode==-1)return(OV_EBADPACKET); |
||||||
|
return(ci->blocksizes[ci->mode_param[mode].blockflag]); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
static int ilog(tremor_ogg_uint32_t v){ |
||||||
|
int ret=0; |
||||||
|
if(v)--v; |
||||||
|
while(v){ |
||||||
|
ret++; |
||||||
|
v>>=1; |
||||||
|
} |
||||||
|
return(ret); |
||||||
|
} |
||||||
|
|
||||||
|
int vorbis_dsp_synthesis(vorbis_dsp_state *vd,tremor_ogg_packet *op,int decodep){ |
||||||
|
vorbis_info *vi=vd->vi; |
||||||
|
codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; |
||||||
|
int mode,i; |
||||||
|
|
||||||
|
tremor_oggpack_readinit(&vd->opb,op->packet); |
||||||
|
|
||||||
|
/* Check the packet type */ |
||||||
|
if(tremor_oggpack_read(&vd->opb,1)!=0){ |
||||||
|
/* Oops. This is not an audio data packet */ |
||||||
|
return OV_ENOTAUDIO ; |
||||||
|
} |
||||||
|
|
||||||
|
/* read our mode and pre/post windowsize */ |
||||||
|
mode=tremor_oggpack_read(&vd->opb,ilog(ci->modes)); |
||||||
|
if(mode==-1 || mode>=ci->modes) return OV_EBADPACKET; |
||||||
|
|
||||||
|
/* shift information we still need from last window */ |
||||||
|
vd->lW=vd->W; |
||||||
|
vd->W=ci->mode_param[mode].blockflag; |
||||||
|
for(i=0;i<vi->channels;i++) |
||||||
|
mdct_shift_right(ci->blocksizes[vd->lW],vd->work[i],vd->mdctright[i]); |
||||||
|
|
||||||
|
if(vd->W){ |
||||||
|
int temp; |
||||||
|
tremor_oggpack_read(&vd->opb,1); |
||||||
|
temp=tremor_oggpack_read(&vd->opb,1); |
||||||
|
if(temp==-1) return OV_EBADPACKET; |
||||||
|
} |
||||||
|
|
||||||
|
/* packet decode and portions of synthesis that rely on only this block */ |
||||||
|
if(decodep){ |
||||||
|
mapping_inverse(vd,ci->map_param+ci->mode_param[mode].mapping); |
||||||
|
|
||||||
|
if(vd->out_begin==-1){ |
||||||
|
vd->out_begin=0; |
||||||
|
vd->out_end=0; |
||||||
|
}else{ |
||||||
|
vd->out_begin=0; |
||||||
|
vd->out_end=ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/* track the frame number... This is for convenience, but also
|
||||||
|
making sure our last packet doesn't end with added padding. |
||||||
|
|
||||||
|
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 |
||||||
|
is. For this reason, vorbisfile will always try to make sure |
||||||
|
it reads the last two marked pages in proper sequence */ |
||||||
|
|
||||||
|
/* if we're out of sequence, dump granpos tracking until we sync back up */ |
||||||
|
if(vd->sequence==-1 || vd->sequence+1 != op->packetno-3){ |
||||||
|
/* out of sequence; lose count */ |
||||||
|
vd->granulepos=-1; |
||||||
|
vd->sample_count=-1; |
||||||
|
} |
||||||
|
|
||||||
|
vd->sequence=op->packetno; |
||||||
|
vd->sequence=vd->sequence-3; |
||||||
|
|
||||||
|
if(vd->sample_count==-1){ |
||||||
|
vd->sample_count=0; |
||||||
|
}else{ |
||||||
|
vd->sample_count+= |
||||||
|
ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; |
||||||
|
} |
||||||
|
|
||||||
|
if(vd->granulepos==-1){ |
||||||
|
if(op->granulepos!=-1){ /* only set if we have a
|
||||||
|
position to set to */ |
||||||
|
|
||||||
|
vd->granulepos=op->granulepos; |
||||||
|
|
||||||
|
/* is this a short page? */ |
||||||
|
if(vd->sample_count>vd->granulepos){ |
||||||
|
/* corner case; if this is both the first and last audio page,
|
||||||
|
then spec says the end is cut, not beginning */ |
||||||
|
if(op->e_o_s){ |
||||||
|
/* trim the end */ |
||||||
|
/* no preceeding granulepos; assume we started at zero (we'd
|
||||||
|
have to in a short single-page stream) */ |
||||||
|
/* granulepos could be -1 due to a seek, but that would result
|
||||||
|
in a long coun t, not short count */ |
||||||
|
|
||||||
|
vd->out_end-=vd->sample_count-vd->granulepos; |
||||||
|
}else{ |
||||||
|
/* trim the beginning */ |
||||||
|
vd->out_begin+=vd->sample_count-vd->granulepos; |
||||||
|
if(vd->out_begin>vd->out_end) |
||||||
|
vd->out_begin=vd->out_end; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
}else{ |
||||||
|
vd->granulepos+= |
||||||
|
ci->blocksizes[vd->lW]/4+ci->blocksizes[vd->W]/4; |
||||||
|
if(op->granulepos!=-1 && vd->granulepos!=op->granulepos){ |
||||||
|
|
||||||
|
if(vd->granulepos>op->granulepos){ |
||||||
|
long extra=vd->granulepos-op->granulepos; |
||||||
|
|
||||||
|
if(extra) |
||||||
|
if(op->e_o_s){ |
||||||
|
/* partial last frame. Strip the extra samples off */ |
||||||
|
vd->out_end-=extra; |
||||||
|
} /* else {Shouldn't happen *unless* the bitstream is out of
|
||||||
|
spec. Either way, believe the bitstream } */ |
||||||
|
} /* else {Shouldn't happen *unless* the bitstream is out of
|
||||||
|
spec. Either way, believe the bitstream } */ |
||||||
|
vd->granulepos=op->granulepos; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return(0); |
||||||
|
} |
@ -0,0 +1,92 @@ |
|||||||
|
/********************************************************************
|
||||||
|
* * |
||||||
|
* THIS FILE IS PART OF THE TremorOggVorbis 'TREMOR' CODEC SOURCE CODE. * |
||||||
|
* * |
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
||||||
|
* * |
||||||
|
* THE TremorOggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * |
||||||
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
|
* * |
||||||
|
******************************************************************** |
||||||
|
|
||||||
|
function: floor dB lookup |
||||||
|
|
||||||
|
********************************************************************/ |
||||||
|
|
||||||
|
#include "os.h" |
||||||
|
|
||||||
|
#ifdef _LOW_ACCURACY_ |
||||||
|
# define XdB(n) ((((n)>>8)+1)>>1) |
||||||
|
#else |
||||||
|
# define XdB(n) (n) |
||||||
|
#endif |
||||||
|
|
||||||
|
const tremor_ogg_int32_t FLOOR_fromdB_LOOKUP[256]={ |
||||||
|
XdB(0x000000e5), XdB(0x000000f4), XdB(0x00000103), XdB(0x00000114), |
||||||
|
XdB(0x00000126), XdB(0x00000139), XdB(0x0000014e), XdB(0x00000163), |
||||||
|
XdB(0x0000017a), XdB(0x00000193), XdB(0x000001ad), XdB(0x000001c9), |
||||||
|
XdB(0x000001e7), XdB(0x00000206), XdB(0x00000228), XdB(0x0000024c), |
||||||
|
XdB(0x00000272), XdB(0x0000029b), XdB(0x000002c6), XdB(0x000002f4), |
||||||
|
XdB(0x00000326), XdB(0x0000035a), XdB(0x00000392), XdB(0x000003cd), |
||||||
|
XdB(0x0000040c), XdB(0x00000450), XdB(0x00000497), XdB(0x000004e4), |
||||||
|
XdB(0x00000535), XdB(0x0000058c), XdB(0x000005e8), XdB(0x0000064a), |
||||||
|
XdB(0x000006b3), XdB(0x00000722), XdB(0x00000799), XdB(0x00000818), |
||||||
|
XdB(0x0000089e), XdB(0x0000092e), XdB(0x000009c6), XdB(0x00000a69), |
||||||
|
XdB(0x00000b16), XdB(0x00000bcf), XdB(0x00000c93), XdB(0x00000d64), |
||||||
|
XdB(0x00000e43), XdB(0x00000f30), XdB(0x0000102d), XdB(0x0000113a), |
||||||
|
XdB(0x00001258), XdB(0x0000138a), XdB(0x000014cf), XdB(0x00001629), |
||||||
|
XdB(0x0000179a), XdB(0x00001922), XdB(0x00001ac4), XdB(0x00001c82), |
||||||
|
XdB(0x00001e5c), XdB(0x00002055), XdB(0x0000226f), XdB(0x000024ac), |
||||||
|
XdB(0x0000270e), XdB(0x00002997), XdB(0x00002c4b), XdB(0x00002f2c), |
||||||
|
XdB(0x0000323d), XdB(0x00003581), XdB(0x000038fb), XdB(0x00003caf), |
||||||
|
XdB(0x000040a0), XdB(0x000044d3), XdB(0x0000494c), XdB(0x00004e10), |
||||||
|
XdB(0x00005323), XdB(0x0000588a), XdB(0x00005e4b), XdB(0x0000646b), |
||||||
|
XdB(0x00006af2), XdB(0x000071e5), XdB(0x0000794c), XdB(0x0000812e), |
||||||
|
XdB(0x00008993), XdB(0x00009283), XdB(0x00009c09), XdB(0x0000a62d), |
||||||
|
XdB(0x0000b0f9), XdB(0x0000bc79), XdB(0x0000c8b9), XdB(0x0000d5c4), |
||||||
|
XdB(0x0000e3a9), XdB(0x0000f274), XdB(0x00010235), XdB(0x000112fd), |
||||||
|
XdB(0x000124dc), XdB(0x000137e4), XdB(0x00014c29), XdB(0x000161bf), |
||||||
|
XdB(0x000178bc), XdB(0x00019137), XdB(0x0001ab4a), XdB(0x0001c70e), |
||||||
|
XdB(0x0001e4a1), XdB(0x0002041f), XdB(0x000225aa), XdB(0x00024962), |
||||||
|
XdB(0x00026f6d), XdB(0x000297f0), XdB(0x0002c316), XdB(0x0002f109), |
||||||
|
XdB(0x000321f9), XdB(0x00035616), XdB(0x00038d97), XdB(0x0003c8b4), |
||||||
|
XdB(0x000407a7), XdB(0x00044ab2), XdB(0x00049218), XdB(0x0004de23), |
||||||
|
XdB(0x00052f1e), XdB(0x0005855c), XdB(0x0005e135), XdB(0x00064306), |
||||||
|
XdB(0x0006ab33), XdB(0x00071a24), XdB(0x0007904b), XdB(0x00080e20), |
||||||
|
XdB(0x00089422), XdB(0x000922da), XdB(0x0009bad8), XdB(0x000a5cb6), |
||||||
|
XdB(0x000b091a), XdB(0x000bc0b1), XdB(0x000c8436), XdB(0x000d5471), |
||||||
|
XdB(0x000e3233), XdB(0x000f1e5f), XdB(0x001019e4), XdB(0x001125c1), |
||||||
|
XdB(0x00124306), XdB(0x001372d5), XdB(0x0014b663), XdB(0x00160ef7), |
||||||
|
XdB(0x00177df0), XdB(0x001904c1), XdB(0x001aa4f9), XdB(0x001c603d), |
||||||
|
XdB(0x001e384f), XdB(0x00202f0f), XdB(0x0022467a), XdB(0x002480b1), |
||||||
|
XdB(0x0026dff7), XdB(0x002966b3), XdB(0x002c1776), XdB(0x002ef4fc), |
||||||
|
XdB(0x0032022d), XdB(0x00354222), XdB(0x0038b828), XdB(0x003c67c2), |
||||||
|
XdB(0x004054ae), XdB(0x004482e8), XdB(0x0048f6af), XdB(0x004db488), |
||||||
|
XdB(0x0052c142), XdB(0x005821ff), XdB(0x005ddc33), XdB(0x0063f5b0), |
||||||
|
XdB(0x006a74a7), XdB(0x00715faf), XdB(0x0078bdce), XdB(0x0080967f), |
||||||
|
XdB(0x0088f1ba), XdB(0x0091d7f9), XdB(0x009b5247), XdB(0x00a56a41), |
||||||
|
XdB(0x00b02a27), XdB(0x00bb9ce2), XdB(0x00c7ce12), XdB(0x00d4ca17), |
||||||
|
XdB(0x00e29e20), XdB(0x00f15835), XdB(0x0101074b), XdB(0x0111bb4e), |
||||||
|
XdB(0x01238531), XdB(0x01367704), XdB(0x014aa402), XdB(0x016020a7), |
||||||
|
XdB(0x017702c3), XdB(0x018f6190), XdB(0x01a955cb), XdB(0x01c4f9cf), |
||||||
|
XdB(0x01e269a8), XdB(0x0201c33b), XdB(0x0223265a), XdB(0x0246b4ea), |
||||||
|
XdB(0x026c9302), XdB(0x0294e716), XdB(0x02bfda13), XdB(0x02ed9793), |
||||||
|
XdB(0x031e4e09), XdB(0x03522ee4), XdB(0x03896ed0), XdB(0x03c445e2), |
||||||
|
XdB(0x0402efd6), XdB(0x0445ac4b), XdB(0x048cbefc), XdB(0x04d87013), |
||||||
|
XdB(0x05290c67), XdB(0x057ee5ca), XdB(0x05da5364), XdB(0x063bb204), |
||||||
|
XdB(0x06a36485), XdB(0x0711d42b), XdB(0x0787710e), XdB(0x0804b299), |
||||||
|
XdB(0x088a17ef), XdB(0x0918287e), XdB(0x09af747c), XdB(0x0a50957e), |
||||||
|
XdB(0x0afc2f19), XdB(0x0bb2ef7f), XdB(0x0c759034), XdB(0x0d44d6ca), |
||||||
|
XdB(0x0e2195bc), XdB(0x0f0cad0d), XdB(0x10070b62), XdB(0x1111aeea), |
||||||
|
XdB(0x122da66c), XdB(0x135c120f), XdB(0x149e24d9), XdB(0x15f525b1), |
||||||
|
XdB(0x176270e3), XdB(0x18e7794b), XdB(0x1a85c9ae), XdB(0x1c3f06d1), |
||||||
|
XdB(0x1e14f07d), XdB(0x200963d7), XdB(0x221e5ccd), XdB(0x2455f870), |
||||||
|
XdB(0x26b2770b), XdB(0x29363e2b), XdB(0x2be3db5c), XdB(0x2ebe06b6), |
||||||
|
XdB(0x31c7a55b), XdB(0x3503ccd4), XdB(0x3875c5aa), XdB(0x3c210f44), |
||||||
|
XdB(0x4009632b), XdB(0x4432b8cf), XdB(0x48a149bc), XdB(0x4d59959e), |
||||||
|
XdB(0x52606733), XdB(0x57bad899), XdB(0x5d6e593a), XdB(0x6380b298), |
||||||
|
XdB(0x69f80e9a), XdB(0x70dafda8), XdB(0x78307d76), XdB(0x7fffffff), |
||||||
|
}; |
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,265 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2009 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: illustrate seeking, and test it too |
|
||||||
last mod: $Id$ |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#include <stdlib.h> |
|
||||||
#include <stdio.h> |
|
||||||
#include "ivorbiscodec.h" |
|
||||||
#include "ivorbisfile.h" |
|
||||||
|
|
||||||
#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */ |
|
||||||
# include <io.h> |
|
||||||
# include <fcntl.h> |
|
||||||
#endif |
|
||||||
|
|
||||||
void _verify(OggVorbis_File *ov, |
|
||||||
ogg_int64_t val, |
|
||||||
ogg_int64_t pcmval, |
|
||||||
ogg_int64_t timeval, |
|
||||||
ogg_int64_t pcmlength, |
|
||||||
char *bigassbuffer){ |
|
||||||
int j; |
|
||||||
long bread; |
|
||||||
char buffer[4096]; |
|
||||||
int dummy; |
|
||||||
ogg_int64_t pos; |
|
||||||
|
|
||||||
/* verify the raw position, the pcm position and position decode */ |
|
||||||
if(val!=-1 && ov_raw_tell(ov)<val){ |
|
||||||
fprintf(stderr,"raw position out of tolerance: requested %ld, got %ld\n", |
|
||||||
(long)val,(long)ov_raw_tell(ov)); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
if(pcmval!=-1 && ov_pcm_tell(ov)>pcmval){ |
|
||||||
fprintf(stderr,"pcm position out of tolerance: requested %ld, got %ld\n", |
|
||||||
(long)pcmval,(long)ov_pcm_tell(ov)); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
if(timeval!=-1 && ov_time_tell(ov)>timeval){ |
|
||||||
fprintf(stderr,"time position out of tolerance: requested %ld, got %ld\n", |
|
||||||
(long)timeval,(long)ov_time_tell(ov)); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
pos=ov_pcm_tell(ov); |
|
||||||
if(pos<0 || pos>pcmlength){ |
|
||||||
fprintf(stderr,"pcm position out of bounds: got %ld\n",(long)pos); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
bread=ov_read(ov,buffer,4096,&dummy); |
|
||||||
if(bigassbuffer){ |
|
||||||
for(j=0;j<bread;j++){ |
|
||||||
if(buffer[j]!=bigassbuffer[j+pos*4]){ |
|
||||||
fprintf(stderr,"data position after seek doesn't match pcm position\n"); |
|
||||||
|
|
||||||
{ |
|
||||||
FILE *f=fopen("a.m","w"); |
|
||||||
for(j=0;j<bread;j++)fprintf(f,"%d\n",(int)buffer[j]); |
|
||||||
fclose(f); |
|
||||||
f=fopen("b.m","w"); |
|
||||||
for(j=0;j<bread;j++)fprintf(f,"%d\n",(int)bigassbuffer[j+pos*2]); |
|
||||||
fclose(f); |
|
||||||
} |
|
||||||
|
|
||||||
exit(1); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
int main(){ |
|
||||||
OggVorbis_File ov; |
|
||||||
int i,ret; |
|
||||||
ogg_int64_t pcmlength; |
|
||||||
ogg_int64_t timelength; |
|
||||||
char *bigassbuffer; |
|
||||||
int dummy; |
|
||||||
|
|
||||||
#ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */ |
|
||||||
_setmode( _fileno( stdin ), _O_BINARY ); |
|
||||||
#endif |
|
||||||
|
|
||||||
|
|
||||||
/* open the file/pipe on stdin */ |
|
||||||
if(ov_open(stdin, &ov, NULL, 0) < 0) { |
|
||||||
fprintf(stderr,"Could not open input as an OggVorbis file.\n\n"); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
|
|
||||||
if(ov_seekable(&ov)){ |
|
||||||
|
|
||||||
/* to simplify our own lives, we want to assume the whole file is
|
|
||||||
stereo. Verify this to avoid potentially mystifying users |
|
||||||
(pissing them off is OK, just don't confuse them) */ |
|
||||||
for(i=0;i<ov.links;i++){ |
|
||||||
vorbis_info *vi=ov_info(&ov,i); |
|
||||||
if(vi->channels!=2){ |
|
||||||
fprintf(stderr,"Sorry; right now seeking_test can only use Vorbis files\n" |
|
||||||
"that are entirely stereo.\n\n"); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/* because we want to do sample-level verification that the seek
|
|
||||||
does what it claimed, decode the entire file into memory */ |
|
||||||
pcmlength=ov_pcm_total(&ov,-1); |
|
||||||
timelength=ov_time_total(&ov,-1); |
|
||||||
bigassbuffer=malloc(pcmlength*4); /* w00t */ |
|
||||||
if(bigassbuffer){ |
|
||||||
i=0; |
|
||||||
while(i<pcmlength*4){ |
|
||||||
int ret=ov_read(&ov,bigassbuffer+i,pcmlength*4-i,&dummy); |
|
||||||
if(ret<0)continue; |
|
||||||
if(ret){ |
|
||||||
i+=ret; |
|
||||||
}else{ |
|
||||||
pcmlength=i/4; |
|
||||||
} |
|
||||||
fprintf(stderr,"\rloading.... [%ld left] ", |
|
||||||
(long)(pcmlength*4-i)); |
|
||||||
} |
|
||||||
}else{ |
|
||||||
fprintf(stderr,"\rfile too large to load into memory for read tests;\n\tonly verifying seek positioning...\n"); |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
ogg_int64_t length=ov.end; |
|
||||||
fprintf(stderr,"\rtesting raw seeking to random places in %ld bytes....\n", |
|
||||||
(long)length); |
|
||||||
|
|
||||||
for(i=0;i<1000;i++){ |
|
||||||
ogg_int64_t val=rand()*length/RAND_MAX; |
|
||||||
fprintf(stderr,"\r\t%d [raw position %ld]... ",i,(long)val); |
|
||||||
ret=ov_raw_seek(&ov,val); |
|
||||||
if(ret<0){ |
|
||||||
fprintf(stderr,"seek failed: %d\n",ret); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
|
|
||||||
_verify(&ov,val,-1,-1.,pcmlength,bigassbuffer); |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
fprintf(stderr,"\r"); |
|
||||||
{ |
|
||||||
fprintf(stderr,"testing pcm page seeking to random places in %ld samples....\n", |
|
||||||
(long)pcmlength); |
|
||||||
|
|
||||||
for(i=0;i<1000;i++){ |
|
||||||
ogg_int64_t val=i==0?0:(double)rand()*pcmlength/RAND_MAX; |
|
||||||
fprintf(stderr,"\r\t%d [pcm position %ld]... ",i,(long)val); |
|
||||||
ret=ov_pcm_seek_page(&ov,val); |
|
||||||
if(ret<0){ |
|
||||||
fprintf(stderr,"seek failed: %d\n",ret); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
|
|
||||||
_verify(&ov,-1,val,-1.,pcmlength,bigassbuffer); |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
fprintf(stderr,"\r"); |
|
||||||
{ |
|
||||||
fprintf(stderr,"testing pcm exact seeking to random places in %ld samples....\n", |
|
||||||
(long)pcmlength); |
|
||||||
|
|
||||||
for(i=0;i<1000;i++){ |
|
||||||
ogg_int64_t val=i==0?0:(double)rand()*pcmlength/RAND_MAX; |
|
||||||
fprintf(stderr,"\r\t%d [pcm position %ld]... ",i,(long)val); |
|
||||||
ret=ov_pcm_seek(&ov,val); |
|
||||||
if(ret<0){ |
|
||||||
fprintf(stderr,"seek failed: %d\n",ret); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
if(ov_pcm_tell(&ov)!=val){ |
|
||||||
fprintf(stderr,"Declared position didn't perfectly match request: %ld != %ld\n", |
|
||||||
(long)val,(long)ov_pcm_tell(&ov)); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
|
|
||||||
_verify(&ov,-1,val,-1.,pcmlength,bigassbuffer); |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
fprintf(stderr,"\r"); |
|
||||||
{ |
|
||||||
fprintf(stderr,"testing time page seeking to random places in %ld milliseconds....\n", |
|
||||||
(long)timelength); |
|
||||||
|
|
||||||
for(i=0;i<1000;i++){ |
|
||||||
ogg_int64_t val=(double)rand()*timelength/RAND_MAX; |
|
||||||
fprintf(stderr,"\r\t%d [time position %ld]... ",i,(long)val); |
|
||||||
ret=ov_time_seek_page(&ov,val); |
|
||||||
if(ret<0){ |
|
||||||
fprintf(stderr,"seek failed: %d\n",ret); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
|
|
||||||
_verify(&ov,-1,-1,val,pcmlength,bigassbuffer); |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
fprintf(stderr,"\r"); |
|
||||||
{ |
|
||||||
fprintf(stderr,"testing time exact seeking to random places in %ld milliseconds....\n", |
|
||||||
(long)timelength); |
|
||||||
|
|
||||||
for(i=0;i<1000;i++){ |
|
||||||
ogg_int64_t val=(double)rand()*timelength/RAND_MAX; |
|
||||||
fprintf(stderr,"\r\t%d [time position %ld]... ",i,(long)val); |
|
||||||
ret=ov_time_seek(&ov,val); |
|
||||||
if(ret<0){ |
|
||||||
fprintf(stderr,"seek failed: %d\n",ret); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
if(ov_time_tell(&ov)<val-1 || ov_time_tell(&ov)>val+1){ |
|
||||||
fprintf(stderr,"Declared position didn't perfectly match request: %ld != %ld\n", |
|
||||||
(long)val,(long)ov_time_tell(&ov)); |
|
||||||
exit(1); |
|
||||||
} |
|
||||||
|
|
||||||
_verify(&ov,-1,-1,val,pcmlength,bigassbuffer); |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
fprintf(stderr,"\r \nOK.\n\n"); |
|
||||||
|
|
||||||
|
|
||||||
}else{ |
|
||||||
fprintf(stderr,"Standard input was not seekable.\n"); |
|
||||||
} |
|
||||||
|
|
||||||
ov_clear(&ov); |
|
||||||
return 0; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,208 @@ |
|||||||
|
/********************************************************************
|
||||||
|
* * |
||||||
|
* THIS FILE IS PART OF THE TremorOggVorbis SOFTWARE CODEC SOURCE CODE. * |
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
||||||
|
* * |
||||||
|
* THE TremorOggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
||||||
|
* by the XIPHOPHORUS Company http://www.xiph.org/ *
|
||||||
|
* * |
||||||
|
********************************************************************/ |
||||||
|
|
||||||
|
#define HEAD_ALIGN 64 |
||||||
|
#include <stdlib.h> |
||||||
|
#include <string.h> |
||||||
|
#include <stdio.h> |
||||||
|
#define MISC_C |
||||||
|
#include "misc.h" |
||||||
|
#include <sys/time.h> |
||||||
|
|
||||||
|
static void **pointers=NULL; |
||||||
|
static long *insertlist=NULL; /* We can't embed this in the pointer list;
|
||||||
|
a pointer can have any value... */ |
||||||
|
|
||||||
|
static char **files=NULL; |
||||||
|
static long *file_bytes=NULL; |
||||||
|
static int filecount=0; |
||||||
|
|
||||||
|
static int ptop=0; |
||||||
|
static int palloced=0; |
||||||
|
static int pinsert=0; |
||||||
|
|
||||||
|
typedef struct { |
||||||
|
char *file; |
||||||
|
long line; |
||||||
|
long ptr; |
||||||
|
long bytes; |
||||||
|
} head; |
||||||
|
|
||||||
|
long global_bytes=0; |
||||||
|
long start_time=-1; |
||||||
|
|
||||||
|
static void *_insert(void *ptr,long bytes,char *file,long line){ |
||||||
|
((head *)ptr)->file=file; |
||||||
|
((head *)ptr)->line=line; |
||||||
|
((head *)ptr)->ptr=pinsert; |
||||||
|
((head *)ptr)->bytes=bytes-HEAD_ALIGN; |
||||||
|
|
||||||
|
if(pinsert>=palloced){ |
||||||
|
palloced+=64; |
||||||
|
if(pointers){ |
||||||
|
pointers=(void **)realloc(pointers,sizeof(void **)*palloced); |
||||||
|
insertlist=(long *)realloc(insertlist,sizeof(long *)*palloced); |
||||||
|
}else{ |
||||||
|
pointers=(void **)malloc(sizeof(void **)*palloced); |
||||||
|
insertlist=(long *)malloc(sizeof(long *)*palloced); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
pointers[pinsert]=ptr; |
||||||
|
|
||||||
|
if(pinsert==ptop) |
||||||
|
pinsert=++ptop; |
||||||
|
else |
||||||
|
pinsert=insertlist[pinsert]; |
||||||
|
|
||||||
|
#ifdef _VDBG_GRAPHFILE |
||||||
|
{ |
||||||
|
FILE *out; |
||||||
|
struct timeval tv; |
||||||
|
static struct timezone tz; |
||||||
|
int i; |
||||||
|
char buffer[80]; |
||||||
|
gettimeofday(&tv,&tz); |
||||||
|
|
||||||
|
for(i=0;i<filecount;i++) |
||||||
|
if(!strcmp(file,files[i]))break; |
||||||
|
|
||||||
|
if(i==filecount){ |
||||||
|
filecount++; |
||||||
|
if(!files){ |
||||||
|
files=malloc(filecount*sizeof(*files)); |
||||||
|
file_bytes=malloc(filecount*sizeof(*file_bytes)); |
||||||
|
}else{ |
||||||
|
files=realloc(files,filecount*sizeof(*files)); |
||||||
|
file_bytes=realloc(file_bytes,filecount*sizeof(*file_bytes)); |
||||||
|
} |
||||||
|
files[i]=strdup(file); |
||||||
|
file_bytes[i]=0; |
||||||
|
} |
||||||
|
|
||||||
|
file_bytes[i]+=bytes-HEAD_ALIGN; |
||||||
|
|
||||||
|
if(start_time==-1)start_time=(tv.tv_sec*1000)+(tv.tv_usec/1000); |
||||||
|
|
||||||
|
snprintf(buffer,80,"%s",file); |
||||||
|
if(strchr(buffer,'.'))strchr(buffer,'.')[0]=0; |
||||||
|
strcat(buffer,_VDBG_GRAPHFILE); |
||||||
|
out=fopen(buffer,"a"); |
||||||
|
fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), |
||||||
|
file_bytes[i]-(bytes-HEAD_ALIGN)); |
||||||
|
fprintf(out,"%ld, %ld # FILE %s LINE %ld\n", |
||||||
|
-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), |
||||||
|
file_bytes[i],file,line); |
||||||
|
fclose(out); |
||||||
|
|
||||||
|
out=fopen("total"_VDBG_GRAPHFILE,"a"); |
||||||
|
fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), |
||||||
|
global_bytes); |
||||||
|
fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), |
||||||
|
global_bytes+(bytes-HEAD_ALIGN)); |
||||||
|
fclose(out); |
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
global_bytes+=(bytes-HEAD_ALIGN); |
||||||
|
|
||||||
|
return(ptr+HEAD_ALIGN); |
||||||
|
} |
||||||
|
|
||||||
|
static void _ripremove(void *ptr){ |
||||||
|
int insert; |
||||||
|
|
||||||
|
#ifdef _VDBG_GRAPHFILE |
||||||
|
{ |
||||||
|
FILE *out=fopen("total"_VDBG_GRAPHFILE,"a"); |
||||||
|
struct timeval tv; |
||||||
|
static struct timezone tz; |
||||||
|
char buffer[80]; |
||||||
|
char *file =((head *)ptr)->file; |
||||||
|
long bytes =((head *)ptr)->bytes; |
||||||
|
int i; |
||||||
|
|
||||||
|
gettimeofday(&tv,&tz); |
||||||
|
fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), |
||||||
|
global_bytes); |
||||||
|
fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), |
||||||
|
global_bytes-((head *)ptr)->bytes); |
||||||
|
fclose(out); |
||||||
|
|
||||||
|
for(i=0;i<filecount;i++) |
||||||
|
if(!strcmp(file,files[i]))break; |
||||||
|
|
||||||
|
snprintf(buffer,80,"%s",file); |
||||||
|
if(strchr(buffer,'.'))strchr(buffer,'.')[0]=0; |
||||||
|
strcat(buffer,_VDBG_GRAPHFILE); |
||||||
|
out=fopen(buffer,"a"); |
||||||
|
fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), |
||||||
|
file_bytes[i]); |
||||||
|
fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), |
||||||
|
file_bytes[i]-bytes); |
||||||
|
fclose(out); |
||||||
|
|
||||||
|
file_bytes[i]-=bytes; |
||||||
|
|
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
global_bytes-=((head *)ptr)->bytes; |
||||||
|
|
||||||
|
insert=((head *)ptr)->ptr; |
||||||
|
insertlist[insert]=pinsert; |
||||||
|
pinsert=insert; |
||||||
|
|
||||||
|
if(pointers[insert]==NULL){ |
||||||
|
fprintf(stderr,"DEBUGGING MALLOC ERROR: freeing previously freed memory\n"); |
||||||
|
fprintf(stderr,"\t%s %ld\n",((head *)ptr)->file,((head *)ptr)->line); |
||||||
|
} |
||||||
|
|
||||||
|
if(global_bytes<0){ |
||||||
|
fprintf(stderr,"DEBUGGING MALLOC ERROR: freeing unmalloced memory\n"); |
||||||
|
} |
||||||
|
|
||||||
|
pointers[insert]=NULL; |
||||||
|
} |
||||||
|
|
||||||
|
void _VDBG_dump(void){ |
||||||
|
int i; |
||||||
|
for(i=0;i<ptop;i++){ |
||||||
|
head *ptr=pointers[i]; |
||||||
|
if(ptr) |
||||||
|
fprintf(stderr,"unfreed bytes from %s:%ld\n", |
||||||
|
ptr->file,ptr->line); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line){ |
||||||
|
bytes+=HEAD_ALIGN; |
||||||
|
if(ptr){ |
||||||
|
ptr-=HEAD_ALIGN; |
||||||
|
_ripremove(ptr); |
||||||
|
ptr=realloc(ptr,bytes); |
||||||
|
}else{ |
||||||
|
ptr=malloc(bytes); |
||||||
|
memset(ptr,0,bytes); |
||||||
|
} |
||||||
|
return _insert(ptr,bytes,file,line); |
||||||
|
} |
||||||
|
|
||||||
|
extern void _VDBG_free(void *ptr,char *file,long line){ |
||||||
|
if(ptr){ |
||||||
|
ptr-=HEAD_ALIGN; |
||||||
|
_ripremove(ptr); |
||||||
|
free(ptr); |
||||||
|
} |
||||||
|
} |
||||||
|
|
@ -0,0 +1,42 @@ |
|||||||
|
/********************************************************************
|
||||||
|
* * |
||||||
|
* THIS FILE IS PART OF THE TremorOggVorbis 'TREMOR' CODEC SOURCE CODE. * |
||||||
|
* * |
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
||||||
|
* * |
||||||
|
* THE TremorOggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
||||||
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
|
* * |
||||||
|
******************************************************************** |
||||||
|
|
||||||
|
function: #ifdef jail to whip a few platforms into the UNIX ideal. |
||||||
|
|
||||||
|
********************************************************************/ |
||||||
|
#ifndef _TREMOR_OS_TYPES_H |
||||||
|
#define _TREMOR_OS_TYPES_H |
||||||
|
|
||||||
|
#include <stdint.h> |
||||||
|
#ifdef _LOW_ACCURACY_ |
||||||
|
# define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9)) |
||||||
|
# define LOOKUP_T const unsigned char |
||||||
|
#else |
||||||
|
# define X(n) (n) |
||||||
|
# define LOOKUP_T const tremor_ogg_int32_t |
||||||
|
#endif |
||||||
|
|
||||||
|
/* make it easy on the folks that want to compile the libs with a
|
||||||
|
different malloc than stdlib */ |
||||||
|
#define _tremor_ogg_malloc malloc |
||||||
|
#define _tremor_ogg_calloc calloc |
||||||
|
#define _tremor_ogg_realloc realloc |
||||||
|
#define _tremor_ogg_free free |
||||||
|
|
||||||
|
typedef int64_t tremor_ogg_int64_t; |
||||||
|
typedef int32_t tremor_ogg_int32_t; |
||||||
|
typedef uint32_t tremor_ogg_uint32_t; |
||||||
|
typedef int16_t tremor_ogg_int16_t; |
||||||
|
typedef uint16_t tremor_ogg_uint16_t; |
||||||
|
|
||||||
|
#endif /* _TREMOR_OS_TYPES_H */ |
@ -1,50 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: registry for floor, res backends and channel mappings |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#include "ivorbiscodec.h" |
|
||||||
#include "codec_internal.h" |
|
||||||
#include "registry.h" |
|
||||||
#include "misc.h" |
|
||||||
|
|
||||||
|
|
||||||
/* seems like major overkill now; the backend numbers will grow into
|
|
||||||
the infrastructure soon enough */ |
|
||||||
|
|
||||||
extern vorbis_func_floor floor0_exportbundle; |
|
||||||
extern vorbis_func_floor floor1_exportbundle; |
|
||||||
extern vorbis_func_residue residue0_exportbundle; |
|
||||||
extern vorbis_func_residue residue1_exportbundle; |
|
||||||
extern vorbis_func_residue residue2_exportbundle; |
|
||||||
extern vorbis_func_mapping mapping0_exportbundle; |
|
||||||
|
|
||||||
vorbis_func_floor *_floor_P[]={ |
|
||||||
&floor0_exportbundle, |
|
||||||
&floor1_exportbundle, |
|
||||||
}; |
|
||||||
|
|
||||||
vorbis_func_residue *_residue_P[]={ |
|
||||||
&residue0_exportbundle, |
|
||||||
&residue1_exportbundle, |
|
||||||
&residue2_exportbundle, |
|
||||||
}; |
|
||||||
|
|
||||||
vorbis_func_mapping *_mapping_P[]={ |
|
||||||
&mapping0_exportbundle, |
|
||||||
}; |
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,40 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: registry for time, floor, res backends and channel mappings |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#ifndef _V_REG_H_ |
|
||||||
#define _V_REG_H_ |
|
||||||
|
|
||||||
#define VI_TRANSFORMB 1 |
|
||||||
#define VI_WINDOWB 1 |
|
||||||
#define VI_TIMEB 1 |
|
||||||
#define VI_FLOORB 2 |
|
||||||
#define VI_RESB 3 |
|
||||||
#define VI_MAPB 1 |
|
||||||
|
|
||||||
#include "backends.h" |
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(VORBISDLL_IMPORT) |
|
||||||
# define EXTERN __declspec(dllimport) extern |
|
||||||
#else |
|
||||||
# define EXTERN extern |
|
||||||
#endif |
|
||||||
|
|
||||||
EXTERN vorbis_func_floor *_floor_P[]; |
|
||||||
EXTERN vorbis_func_residue *_residue_P[]; |
|
||||||
EXTERN vorbis_func_mapping *_mapping_P[]; |
|
||||||
|
|
||||||
#endif |
|
@ -1,447 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: basic shared codebook operations |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#include <stdlib.h> |
|
||||||
#include <math.h> |
|
||||||
#include <string.h> |
|
||||||
#include <ogg/ogg.h> |
|
||||||
#include "misc.h" |
|
||||||
#include "ivorbiscodec.h" |
|
||||||
#include "codebook.h" |
|
||||||
|
|
||||||
/**** pack/unpack helpers ******************************************/ |
|
||||||
int _ilog(unsigned int v){ |
|
||||||
int ret=0; |
|
||||||
while(v){ |
|
||||||
ret++; |
|
||||||
v>>=1; |
|
||||||
} |
|
||||||
return(ret); |
|
||||||
} |
|
||||||
|
|
||||||
/* 32 bit float (not IEEE; nonnormalized mantissa +
|
|
||||||
biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm
|
|
||||||
Why not IEEE? It's just not that important here. */ |
|
||||||
|
|
||||||
#define VQ_FEXP 10 |
|
||||||
#define VQ_FMAN 21 |
|
||||||
#define VQ_FEXP_BIAS 768 /* bias toward values smaller than 1. */ |
|
||||||
|
|
||||||
static ogg_int32_t _float32_unpack(long val,int *point){ |
|
||||||
long mant=val&0x1fffff; |
|
||||||
int sign=val&0x80000000; |
|
||||||
long exp =(val&0x7fe00000L)>>VQ_FMAN; |
|
||||||
|
|
||||||
exp-=(VQ_FMAN-1)+VQ_FEXP_BIAS; |
|
||||||
|
|
||||||
if(mant){ |
|
||||||
while(!(mant&0x40000000)){ |
|
||||||
mant<<=1; |
|
||||||
exp-=1; |
|
||||||
} |
|
||||||
|
|
||||||
if(sign)mant= -mant; |
|
||||||
}else{ |
|
||||||
sign=0; |
|
||||||
exp=-9999; |
|
||||||
} |
|
||||||
|
|
||||||
*point=exp; |
|
||||||
return mant; |
|
||||||
} |
|
||||||
|
|
||||||
/* given a list of word lengths, generate a list of codewords. Works
|
|
||||||
for length ordered or unordered, always assigns the lowest valued |
|
||||||
codewords first. Extended to handle unused entries (length 0) */ |
|
||||||
ogg_uint32_t *_make_words(long *l,long n,long sparsecount){ |
|
||||||
long i,j,count=0; |
|
||||||
ogg_uint32_t marker[33]; |
|
||||||
ogg_uint32_t *r=(ogg_uint32_t *)_ogg_malloc((sparsecount?sparsecount:n)*sizeof(*r)); |
|
||||||
memset(marker,0,sizeof(marker)); |
|
||||||
|
|
||||||
for(i=0;i<n;i++){ |
|
||||||
long length=l[i]; |
|
||||||
if(length>0){ |
|
||||||
ogg_uint32_t entry=marker[length]; |
|
||||||
|
|
||||||
/* when we claim a node for an entry, we also claim the nodes
|
|
||||||
below it (pruning off the imagined tree that may have dangled |
|
||||||
from it) as well as blocking the use of any nodes directly |
|
||||||
above for leaves */ |
|
||||||
|
|
||||||
/* update ourself */ |
|
||||||
if(length<32 && (entry>>length)){ |
|
||||||
/* error condition; the lengths must specify an overpopulated tree */ |
|
||||||
_ogg_free(r); |
|
||||||
return(NULL); |
|
||||||
} |
|
||||||
r[count++]=entry; |
|
||||||
|
|
||||||
/* Look to see if the next shorter marker points to the node
|
|
||||||
above. if so, update it and repeat. */ |
|
||||||
{ |
|
||||||
for(j=length;j>0;j--){ |
|
||||||
|
|
||||||
if(marker[j]&1){ |
|
||||||
/* have to jump branches */ |
|
||||||
if(j==1) |
|
||||||
marker[1]++; |
|
||||||
else |
|
||||||
marker[j]=marker[j-1]<<1; |
|
||||||
break; /* invariant says next upper marker would already
|
|
||||||
have been moved if it was on the same path */ |
|
||||||
} |
|
||||||
marker[j]++; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/* prune the tree; the implicit invariant says all the longer
|
|
||||||
markers were dangling from our just-taken node. Dangle them |
|
||||||
from our *new* node. */ |
|
||||||
for(j=length+1;j<33;j++) |
|
||||||
if((marker[j]>>1) == entry){ |
|
||||||
entry=marker[j]; |
|
||||||
marker[j]=marker[j-1]<<1; |
|
||||||
}else |
|
||||||
break; |
|
||||||
}else |
|
||||||
if(sparsecount==0)count++; |
|
||||||
} |
|
||||||
|
|
||||||
/* sanity check the huffman tree; an underpopulated tree must be
|
|
||||||
rejected. The only exception is the one-node pseudo-nil tree, |
|
||||||
which appears to be underpopulated because the tree doesn't |
|
||||||
really exist; there's only one possible 'codeword' or zero bits, |
|
||||||
but the above tree-gen code doesn't mark that. */ |
|
||||||
if(sparsecount != 1){ |
|
||||||
for(i=1;i<33;i++) |
|
||||||
if(marker[i] & (0xffffffffUL>>(32-i))){ |
|
||||||
_ogg_free(r); |
|
||||||
return(NULL); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/* bitreverse the words because our bitwise packer/unpacker is LSb
|
|
||||||
endian */ |
|
||||||
for(i=0,count=0;i<n;i++){ |
|
||||||
ogg_uint32_t temp=0; |
|
||||||
for(j=0;j<l[i];j++){ |
|
||||||
temp<<=1; |
|
||||||
temp|=(r[count]>>j)&1; |
|
||||||
} |
|
||||||
|
|
||||||
if(sparsecount){ |
|
||||||
if(l[i]) |
|
||||||
r[count++]=temp; |
|
||||||
}else |
|
||||||
r[count++]=temp; |
|
||||||
} |
|
||||||
|
|
||||||
return(r); |
|
||||||
} |
|
||||||
|
|
||||||
/* there might be a straightforward one-line way to do the below
|
|
||||||
that's portable and totally safe against roundoff, but I haven't |
|
||||||
thought of it. Therefore, we opt on the side of caution */ |
|
||||||
long _book_maptype1_quantvals(const static_codebook *b){ |
|
||||||
/* get us a starting hint, we'll polish it below */ |
|
||||||
int bits=_ilog(b->entries); |
|
||||||
int vals=b->entries>>((bits-1)*(b->dim-1)/b->dim); |
|
||||||
|
|
||||||
while(1){ |
|
||||||
long acc=1; |
|
||||||
long acc1=1; |
|
||||||
int i; |
|
||||||
for(i=0;i<b->dim;i++){ |
|
||||||
acc*=vals; |
|
||||||
acc1*=vals+1; |
|
||||||
} |
|
||||||
if(acc<=b->entries && acc1>b->entries){ |
|
||||||
return(vals); |
|
||||||
}else{ |
|
||||||
if(acc>b->entries){ |
|
||||||
vals--; |
|
||||||
}else{ |
|
||||||
vals++; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/* different than what _book_unquantize does for mainline:
|
|
||||||
we repack the book in a fixed point format that shares the same |
|
||||||
binary point. Upon first use, we can shift point if needed */ |
|
||||||
|
|
||||||
/* we need to deal with two map types: in map type 1, the values are
|
|
||||||
generated algorithmically (each column of the vector counts through |
|
||||||
the values in the quant vector). in map type 2, all the values came |
|
||||||
in in an explicit list. Both value lists must be unpacked */ |
|
||||||
|
|
||||||
ogg_int32_t *_book_unquantize(const static_codebook *b,int n,int *sparsemap, |
|
||||||
int *maxpoint){ |
|
||||||
long j,k,count=0; |
|
||||||
if(b->maptype==1 || b->maptype==2){ |
|
||||||
int quantvals; |
|
||||||
int minpoint,delpoint; |
|
||||||
ogg_int32_t mindel=_float32_unpack(b->q_min,&minpoint); |
|
||||||
ogg_int32_t delta=_float32_unpack(b->q_delta,&delpoint); |
|
||||||
ogg_int32_t *r=(ogg_int32_t *)_ogg_calloc(n*b->dim,sizeof(*r)); |
|
||||||
int *rp=(int *)_ogg_calloc(n*b->dim,sizeof(*rp)); |
|
||||||
|
|
||||||
*maxpoint=minpoint; |
|
||||||
|
|
||||||
/* maptype 1 and 2 both use a quantized value vector, but
|
|
||||||
different sizes */ |
|
||||||
switch(b->maptype){ |
|
||||||
case 1: |
|
||||||
/* most of the time, entries%dimensions == 0, but we need to be
|
|
||||||
well defined. We define that the possible vales at each |
|
||||||
scalar is values == entries/dim. If entries%dim != 0, we'll |
|
||||||
have 'too few' values (values*dim<entries), which means that |
|
||||||
we'll have 'left over' entries; left over entries use zeroed |
|
||||||
values (and are wasted). So don't generate codebooks like |
|
||||||
that */ |
|
||||||
quantvals=_book_maptype1_quantvals(b); |
|
||||||
for(j=0;j<b->entries;j++){ |
|
||||||
if((sparsemap && b->lengthlist[j]) || !sparsemap){ |
|
||||||
ogg_int32_t last=0; |
|
||||||
int lastpoint=0; |
|
||||||
int indexdiv=1; |
|
||||||
for(k=0;k<b->dim;k++){ |
|
||||||
int index= (j/indexdiv)%quantvals; |
|
||||||
int point=0; |
|
||||||
int val=VFLOAT_MULTI(delta,delpoint, |
|
||||||
abs(b->quantlist[index]),&point); |
|
||||||
|
|
||||||
val=VFLOAT_ADD(mindel,minpoint,val,point,&point); |
|
||||||
val=VFLOAT_ADD(last,lastpoint,val,point,&point); |
|
||||||
|
|
||||||
if(b->q_sequencep){ |
|
||||||
last=val;
|
|
||||||
lastpoint=point; |
|
||||||
} |
|
||||||
|
|
||||||
if(sparsemap){ |
|
||||||
r[sparsemap[count]*b->dim+k]=val; |
|
||||||
rp[sparsemap[count]*b->dim+k]=point; |
|
||||||
}else{ |
|
||||||
r[count*b->dim+k]=val; |
|
||||||
rp[count*b->dim+k]=point; |
|
||||||
} |
|
||||||
if(*maxpoint<point)*maxpoint=point; |
|
||||||
indexdiv*=quantvals; |
|
||||||
} |
|
||||||
count++; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
break; |
|
||||||
case 2: |
|
||||||
for(j=0;j<b->entries;j++){ |
|
||||||
if((sparsemap && b->lengthlist[j]) || !sparsemap){ |
|
||||||
ogg_int32_t last=0; |
|
||||||
int lastpoint=0; |
|
||||||
|
|
||||||
for(k=0;k<b->dim;k++){ |
|
||||||
int point=0; |
|
||||||
int val=VFLOAT_MULTI(delta,delpoint, |
|
||||||
abs(b->quantlist[j*b->dim+k]),&point); |
|
||||||
|
|
||||||
val=VFLOAT_ADD(mindel,minpoint,val,point,&point); |
|
||||||
val=VFLOAT_ADD(last,lastpoint,val,point,&point); |
|
||||||
|
|
||||||
if(b->q_sequencep){ |
|
||||||
last=val;
|
|
||||||
lastpoint=point; |
|
||||||
} |
|
||||||
|
|
||||||
if(sparsemap){ |
|
||||||
r[sparsemap[count]*b->dim+k]=val; |
|
||||||
rp[sparsemap[count]*b->dim+k]=point; |
|
||||||
}else{ |
|
||||||
r[count*b->dim+k]=val; |
|
||||||
rp[count*b->dim+k]=point; |
|
||||||
} |
|
||||||
if(*maxpoint<point)*maxpoint=point; |
|
||||||
} |
|
||||||
count++; |
|
||||||
} |
|
||||||
} |
|
||||||
break; |
|
||||||
} |
|
||||||
|
|
||||||
for(j=0;j<n*b->dim;j++) |
|
||||||
if(rp[j]<*maxpoint) |
|
||||||
r[j]>>=*maxpoint-rp[j]; |
|
||||||
|
|
||||||
_ogg_free(rp); |
|
||||||
return(r); |
|
||||||
} |
|
||||||
return(NULL); |
|
||||||
} |
|
||||||
|
|
||||||
void vorbis_staticbook_destroy(static_codebook *b){ |
|
||||||
if(b->quantlist)_ogg_free(b->quantlist); |
|
||||||
if(b->lengthlist)_ogg_free(b->lengthlist); |
|
||||||
memset(b,0,sizeof(*b)); |
|
||||||
_ogg_free(b); |
|
||||||
} |
|
||||||
|
|
||||||
void vorbis_book_clear(codebook *b){ |
|
||||||
/* static book is not cleared; we're likely called on the lookup and
|
|
||||||
the static codebook belongs to the info struct */ |
|
||||||
if(b->valuelist)_ogg_free(b->valuelist); |
|
||||||
if(b->codelist)_ogg_free(b->codelist); |
|
||||||
|
|
||||||
if(b->dec_index)_ogg_free(b->dec_index); |
|
||||||
if(b->dec_codelengths)_ogg_free(b->dec_codelengths); |
|
||||||
if(b->dec_firsttable)_ogg_free(b->dec_firsttable); |
|
||||||
|
|
||||||
memset(b,0,sizeof(*b)); |
|
||||||
} |
|
||||||
|
|
||||||
static ogg_uint32_t bitreverse(ogg_uint32_t x){ |
|
||||||
x= ((x>>16)&0x0000ffffUL) | ((x<<16)&0xffff0000UL); |
|
||||||
x= ((x>> 8)&0x00ff00ffUL) | ((x<< 8)&0xff00ff00UL); |
|
||||||
x= ((x>> 4)&0x0f0f0f0fUL) | ((x<< 4)&0xf0f0f0f0UL); |
|
||||||
x= ((x>> 2)&0x33333333UL) | ((x<< 2)&0xccccccccUL); |
|
||||||
return((x>> 1)&0x55555555UL) | ((x<< 1)&0xaaaaaaaaUL); |
|
||||||
} |
|
||||||
|
|
||||||
static int sort32a(const void *a,const void *b){ |
|
||||||
return (**(ogg_uint32_t **)a>**(ogg_uint32_t **)b)- |
|
||||||
(**(ogg_uint32_t **)a<**(ogg_uint32_t **)b); |
|
||||||
} |
|
||||||
|
|
||||||
/* decode codebook arrangement is more heavily optimized than encode */ |
|
||||||
int vorbis_book_init_decode(codebook *c,const static_codebook *s){ |
|
||||||
int i,j,n=0,tabn; |
|
||||||
int *sortindex; |
|
||||||
memset(c,0,sizeof(*c)); |
|
||||||
|
|
||||||
/* count actually used entries */ |
|
||||||
for(i=0;i<s->entries;i++) |
|
||||||
if(s->lengthlist[i]>0) |
|
||||||
n++; |
|
||||||
|
|
||||||
c->entries=s->entries; |
|
||||||
c->used_entries=n; |
|
||||||
c->dim=s->dim; |
|
||||||
|
|
||||||
if(n>0){ |
|
||||||
/* two different remappings go on here.
|
|
||||||
|
|
||||||
First, we collapse the likely sparse codebook down only to |
|
||||||
actually represented values/words. This collapsing needs to be |
|
||||||
indexed as map-valueless books are used to encode original entry |
|
||||||
positions as integers. |
|
||||||
|
|
||||||
Second, we reorder all vectors, including the entry index above, |
|
||||||
by sorted bitreversed codeword to allow treeless decode. */ |
|
||||||
|
|
||||||
/* perform sort */ |
|
||||||
ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries); |
|
||||||
ogg_uint32_t **codep=(ogg_uint32_t **)alloca(sizeof(*codep)*n); |
|
||||||
|
|
||||||
if(codes==NULL)goto err_out; |
|
||||||
|
|
||||||
for(i=0;i<n;i++){ |
|
||||||
codes[i]=bitreverse(codes[i]); |
|
||||||
codep[i]=codes+i; |
|
||||||
} |
|
||||||
|
|
||||||
qsort(codep,n,sizeof(*codep),sort32a); |
|
||||||
|
|
||||||
sortindex=(int *)alloca(n*sizeof(*sortindex)); |
|
||||||
c->codelist=(ogg_uint32_t *)_ogg_malloc(n*sizeof(*c->codelist)); |
|
||||||
/* the index is a reverse index */ |
|
||||||
for(i=0;i<n;i++){ |
|
||||||
int position=codep[i]-codes; |
|
||||||
sortindex[position]=i; |
|
||||||
} |
|
||||||
|
|
||||||
for(i=0;i<n;i++) |
|
||||||
c->codelist[sortindex[i]]=codes[i]; |
|
||||||
_ogg_free(codes); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
c->valuelist=_book_unquantize(s,n,sortindex,&c->binarypoint); |
|
||||||
c->dec_index=(int *)_ogg_malloc(n*sizeof(*c->dec_index)); |
|
||||||
|
|
||||||
for(n=0,i=0;i<s->entries;i++) |
|
||||||
if(s->lengthlist[i]>0) |
|
||||||
c->dec_index[sortindex[n++]]=i; |
|
||||||
|
|
||||||
c->dec_codelengths=(char *)_ogg_malloc(n*sizeof(*c->dec_codelengths)); |
|
||||||
for(n=0,i=0;i<s->entries;i++) |
|
||||||
if(s->lengthlist[i]>0) |
|
||||||
c->dec_codelengths[sortindex[n++]]=s->lengthlist[i]; |
|
||||||
|
|
||||||
c->dec_firsttablen=_ilog(c->used_entries)-4; /* this is magic */ |
|
||||||
if(c->dec_firsttablen<5)c->dec_firsttablen=5; |
|
||||||
if(c->dec_firsttablen>8)c->dec_firsttablen=8; |
|
||||||
|
|
||||||
tabn=1<<c->dec_firsttablen; |
|
||||||
c->dec_firsttable=(ogg_uint32_t *)_ogg_calloc(tabn,sizeof(*c->dec_firsttable)); |
|
||||||
c->dec_maxlength=0; |
|
||||||
|
|
||||||
for(i=0;i<n;i++){ |
|
||||||
if(c->dec_maxlength<c->dec_codelengths[i]) |
|
||||||
c->dec_maxlength=c->dec_codelengths[i]; |
|
||||||
if(c->dec_codelengths[i]<=c->dec_firsttablen){ |
|
||||||
ogg_uint32_t orig=bitreverse(c->codelist[i]); |
|
||||||
for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++) |
|
||||||
c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/* now fill in 'unused' entries in the firsttable with hi/lo search
|
|
||||||
hints for the non-direct-hits */ |
|
||||||
{ |
|
||||||
ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen); |
|
||||||
long lo=0,hi=0; |
|
||||||
|
|
||||||
for(i=0;i<tabn;i++){ |
|
||||||
ogg_uint32_t word=i<<(32-c->dec_firsttablen); |
|
||||||
if(c->dec_firsttable[bitreverse(word)]==0){ |
|
||||||
while((lo+1)<n && c->codelist[lo+1]<=word)lo++; |
|
||||||
while( hi<n && word>=(c->codelist[hi]&mask))hi++; |
|
||||||
|
|
||||||
/* we only actually have 15 bits per hint to play with here.
|
|
||||||
In order to overflow gracefully (nothing breaks, efficiency |
|
||||||
just drops), encode as the difference from the extremes. */ |
|
||||||
{ |
|
||||||
unsigned long loval=lo; |
|
||||||
unsigned long hival=n-hi; |
|
||||||
|
|
||||||
if(loval>0x7fff)loval=0x7fff; |
|
||||||
if(hival>0x7fff)hival=0x7fff; |
|
||||||
c->dec_firsttable[bitreverse(word)]= |
|
||||||
0x80000000UL | (loval<<15) | hival; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
return(0); |
|
||||||
err_out: |
|
||||||
vorbis_book_clear(c); |
|
||||||
return(-1); |
|
||||||
} |
|
||||||
|
|
@ -1,131 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: single-block PCM synthesis |
|
||||||
last mod: $Id: synthesis.c,v 1.4 2003/03/29 03:07:21 xiphmont Exp $ |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#include <stdio.h> |
|
||||||
#include <ogg/ogg.h> |
|
||||||
#include "ivorbiscodec.h" |
|
||||||
#include "codec_internal.h" |
|
||||||
#include "registry.h" |
|
||||||
#include "misc.h" |
|
||||||
#include "block.h" |
|
||||||
|
|
||||||
static int _vorbis_synthesis1(vorbis_block *vb,ogg_packet *op,int decodep){ |
|
||||||
vorbis_dsp_state *vd= vb ? vb->vd : 0; |
|
||||||
private_state *b= vd ? (private_state *)vd->backend_state: 0; |
|
||||||
vorbis_info *vi= vd ? vd->vi : 0; |
|
||||||
codec_setup_info *ci= vi ? (codec_setup_info *)vi->codec_setup : 0; |
|
||||||
oggpack_buffer *opb=vb ? &vb->opb : 0; |
|
||||||
int type,mode,i; |
|
||||||
|
|
||||||
if (!vd || !b || !vi || !ci || !opb) { |
|
||||||
return OV_EBADPACKET; |
|
||||||
} |
|
||||||
|
|
||||||
/* first things first. Make sure decode is ready */ |
|
||||||
_vorbis_block_ripcord(vb); |
|
||||||
oggpack_readinit(opb,op->packet,op->bytes); |
|
||||||
|
|
||||||
/* Check the packet type */ |
|
||||||
if(oggpack_read(opb,1)!=0){ |
|
||||||
/* Oops. This is not an audio data packet */ |
|
||||||
return(OV_ENOTAUDIO); |
|
||||||
} |
|
||||||
|
|
||||||
/* read our mode and pre/post windowsize */ |
|
||||||
mode=oggpack_read(opb,b->modebits); |
|
||||||
if(mode==-1)return(OV_EBADPACKET); |
|
||||||
|
|
||||||
vb->mode=mode; |
|
||||||
if(!ci->mode_param[mode]){ |
|
||||||
return(OV_EBADPACKET); |
|
||||||
} |
|
||||||
|
|
||||||
vb->W=ci->mode_param[mode]->blockflag; |
|
||||||
if(vb->W){ |
|
||||||
vb->lW=oggpack_read(opb,1); |
|
||||||
vb->nW=oggpack_read(opb,1); |
|
||||||
if(vb->nW==-1) return(OV_EBADPACKET); |
|
||||||
}else{ |
|
||||||
vb->lW=0; |
|
||||||
vb->nW=0; |
|
||||||
} |
|
||||||
|
|
||||||
/* more setup */ |
|
||||||
vb->granulepos=op->granulepos; |
|
||||||
vb->sequence=op->packetno; /* first block is third packet */ |
|
||||||
vb->eofflag=op->e_o_s; |
|
||||||
|
|
||||||
if(decodep){ |
|
||||||
/* alloc pcm passback storage */ |
|
||||||
vb->pcmend=ci->blocksizes[vb->W]; |
|
||||||
vb->pcm=(ogg_int32_t **)_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels); |
|
||||||
for(i=0;i<vi->channels;i++) |
|
||||||
vb->pcm[i]=(ogg_int32_t *)_vorbis_block_alloc(vb,vb->pcmend*sizeof(*vb->pcm[i])); |
|
||||||
|
|
||||||
/* unpack_header enforces range checking */ |
|
||||||
type=ci->map_type[ci->mode_param[mode]->mapping]; |
|
||||||
|
|
||||||
return(_mapping_P[type]->inverse(vb,b->mode[mode])); |
|
||||||
}else{ |
|
||||||
/* no pcm */ |
|
||||||
vb->pcmend=0; |
|
||||||
vb->pcm=NULL; |
|
||||||
|
|
||||||
return(0); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){ |
|
||||||
return _vorbis_synthesis1(vb,op,1); |
|
||||||
} |
|
||||||
|
|
||||||
/* used to track pcm position without actually performing decode.
|
|
||||||
Useful for sequential 'fast forward' */ |
|
||||||
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; |
|
||||||
int mode; |
|
||||||
|
|
||||||
oggpack_readinit(&opb,op->packet,op->bytes); |
|
||||||
|
|
||||||
/* Check the packet type */ |
|
||||||
if(oggpack_read(&opb,1)!=0){ |
|
||||||
/* Oops. This is not an audio data packet */ |
|
||||||
return(OV_ENOTAUDIO); |
|
||||||
} |
|
||||||
|
|
||||||
{ |
|
||||||
int modebits=0; |
|
||||||
int v=ci->modes; |
|
||||||
while(v>1){ |
|
||||||
modebits++; |
|
||||||
v>>=1; |
|
||||||
} |
|
||||||
|
|
||||||
/* read our mode and pre/post windowsize */ |
|
||||||
mode=oggpack_read(&opb,modebits); |
|
||||||
} |
|
||||||
if(mode==-1 || !ci->mode_param[mode])return(OV_EBADPACKET); |
|
||||||
return(ci->blocksizes[ci->mode_param[mode]->blockflag]); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
@ -0,0 +1,206 @@ |
|||||||
|
/********************************************************************
|
||||||
|
* * |
||||||
|
* THIS FILE IS PART OF THE TremorOggVorbis 'TREMOR' CODEC SOURCE CODE. * |
||||||
|
* * |
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
||||||
|
* * |
||||||
|
* THE TremorOggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * |
||||||
|
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
||||||
|
* * |
||||||
|
******************************************************************** |
||||||
|
|
||||||
|
function: subsumed libogg includes |
||||||
|
|
||||||
|
********************************************************************/ |
||||||
|
#ifndef _TREMOR_OGG_H |
||||||
|
#define _TREMOR_OGG_H |
||||||
|
|
||||||
|
#ifdef __cplusplus |
||||||
|
extern "C" { |
||||||
|
#endif |
||||||
|
|
||||||
|
#include "os_types.h" |
||||||
|
|
||||||
|
typedef struct tremor_ogg_buffer_state{ |
||||||
|
struct tremor_ogg_buffer *unused_buffers; |
||||||
|
struct tremor_ogg_reference *unused_references; |
||||||
|
int outstanding; |
||||||
|
int shutdown; |
||||||
|
} tremor_ogg_buffer_state; |
||||||
|
|
||||||
|
typedef struct tremor_ogg_buffer { |
||||||
|
unsigned char *data; |
||||||
|
long size; |
||||||
|
int refcount; |
||||||
|
|
||||||
|
union { |
||||||
|
tremor_ogg_buffer_state *owner; |
||||||
|
struct tremor_ogg_buffer *next; |
||||||
|
} ptr; |
||||||
|
} tremor_ogg_buffer; |
||||||
|
|
||||||
|
typedef struct tremor_ogg_reference { |
||||||
|
tremor_ogg_buffer *buffer; |
||||||
|
long begin; |
||||||
|
long length; |
||||||
|
|
||||||
|
struct tremor_ogg_reference *next; |
||||||
|
} tremor_ogg_reference; |
||||||
|
|
||||||
|
typedef struct tremor_oggpack_buffer { |
||||||
|
int headbit; |
||||||
|
unsigned char *headptr; |
||||||
|
long headend; |
||||||
|
|
||||||
|
/* memory management */ |
||||||
|
tremor_ogg_reference *head; |
||||||
|
tremor_ogg_reference *tail; |
||||||
|
|
||||||
|
/* render the byte/bit counter API constant time */ |
||||||
|
long count; /* doesn't count the tail */ |
||||||
|
} tremor_oggpack_buffer; |
||||||
|
|
||||||
|
typedef struct oggbyte_buffer { |
||||||
|
tremor_ogg_reference *baseref; |
||||||
|
|
||||||
|
tremor_ogg_reference *ref; |
||||||
|
unsigned char *ptr; |
||||||
|
long pos; |
||||||
|
long end; |
||||||
|
} oggbyte_buffer; |
||||||
|
|
||||||
|
typedef struct tremor_ogg_sync_state { |
||||||
|
/* decode memory management pool */ |
||||||
|
tremor_ogg_buffer_state *bufferpool; |
||||||
|
|
||||||
|
/* stream buffers */ |
||||||
|
tremor_ogg_reference *fifo_head; |
||||||
|
tremor_ogg_reference *fifo_tail; |
||||||
|
long fifo_fill; |
||||||
|
|
||||||
|
/* stream sync management */ |
||||||
|
int unsynced; |
||||||
|
int headerbytes; |
||||||
|
int bodybytes; |
||||||
|
|
||||||
|
} tremor_ogg_sync_state; |
||||||
|
|
||||||
|
typedef struct tremor_ogg_stream_state { |
||||||
|
tremor_ogg_reference *header_head; |
||||||
|
tremor_ogg_reference *header_tail; |
||||||
|
tremor_ogg_reference *body_head; |
||||||
|
tremor_ogg_reference *body_tail; |
||||||
|
|
||||||
|
int e_o_s; /* set when we have buffered the last
|
||||||
|
packet in the logical bitstream */ |
||||||
|
int b_o_s; /* set after we've written the initial page
|
||||||
|
of a logical bitstream */ |
||||||
|
long serialno; |
||||||
|
long pageno; |
||||||
|
tremor_ogg_int64_t packetno; /* sequence number for decode; the framing
|
||||||
|
knows where there's a hole in the data, |
||||||
|
but we need coupling so that the codec |
||||||
|
(which is in a seperate abstraction |
||||||
|
layer) also knows about the gap */ |
||||||
|
tremor_ogg_int64_t granulepos; |
||||||
|
|
||||||
|
int lacing_fill; |
||||||
|
tremor_ogg_uint32_t body_fill; |
||||||
|
|
||||||
|
/* decode-side state data */ |
||||||
|
int holeflag; |
||||||
|
int spanflag; |
||||||
|
int clearflag; |
||||||
|
int laceptr; |
||||||
|
tremor_ogg_uint32_t body_fill_next; |
||||||
|
|
||||||
|
} tremor_ogg_stream_state; |
||||||
|
|
||||||
|
typedef struct { |
||||||
|
tremor_ogg_reference *packet; |
||||||
|
long bytes; |
||||||
|
long b_o_s; |
||||||
|
long e_o_s; |
||||||
|
tremor_ogg_int64_t granulepos; |
||||||
|
tremor_ogg_int64_t packetno; /* sequence number for decode; the framing
|
||||||
|
knows where there's a hole in the data, |
||||||
|
but we need coupling so that the codec |
||||||
|
(which is in a seperate abstraction |
||||||
|
layer) also knows about the gap */ |
||||||
|
} tremor_ogg_packet; |
||||||
|
|
||||||
|
typedef struct { |
||||||
|
tremor_ogg_reference *header; |
||||||
|
int header_len; |
||||||
|
tremor_ogg_reference *body; |
||||||
|
long body_len; |
||||||
|
} tremor_ogg_page; |
||||||
|
|
||||||
|
/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ |
||||||
|
|
||||||
|
extern void tremor_oggpack_readinit(tremor_oggpack_buffer *b,tremor_ogg_reference *r); |
||||||
|
extern long tremor_oggpack_look(tremor_oggpack_buffer *b,int bits); |
||||||
|
extern void tremor_oggpack_adv(tremor_oggpack_buffer *b,int bits); |
||||||
|
extern long tremor_oggpack_read(tremor_oggpack_buffer *b,int bits); |
||||||
|
extern long tremor_oggpack_bytes(tremor_oggpack_buffer *b); |
||||||
|
extern long tremor_oggpack_bits(tremor_oggpack_buffer *b); |
||||||
|
extern int tremor_oggpack_eop(tremor_oggpack_buffer *b); |
||||||
|
|
||||||
|
/* Ogg BITSTREAM PRIMITIVES: decoding **************************/ |
||||||
|
|
||||||
|
extern tremor_ogg_sync_state *tremor_ogg_sync_create(void); |
||||||
|
extern int tremor_ogg_sync_destroy(tremor_ogg_sync_state *oy); |
||||||
|
extern int tremor_ogg_sync_reset(tremor_ogg_sync_state *oy); |
||||||
|
|
||||||
|
extern unsigned char *tremor_ogg_sync_bufferin(tremor_ogg_sync_state *oy, long size); |
||||||
|
extern int tremor_ogg_sync_wrote(tremor_ogg_sync_state *oy, long bytes); |
||||||
|
extern long tremor_ogg_sync_pageseek(tremor_ogg_sync_state *oy,tremor_ogg_page *og); |
||||||
|
extern int tremor_ogg_sync_pageout(tremor_ogg_sync_state *oy, tremor_ogg_page *og); |
||||||
|
extern int tremor_ogg_stream_pagein(tremor_ogg_stream_state *os, tremor_ogg_page *og); |
||||||
|
extern int tremor_ogg_stream_packetout(tremor_ogg_stream_state *os,tremor_ogg_packet *op); |
||||||
|
extern int tremor_ogg_stream_packetpeek(tremor_ogg_stream_state *os,tremor_ogg_packet *op); |
||||||
|
|
||||||
|
/* Ogg BITSTREAM PRIMITIVES: general ***************************/ |
||||||
|
|
||||||
|
extern tremor_ogg_stream_state *tremor_ogg_stream_create(int serialno); |
||||||
|
extern int tremor_ogg_stream_destroy(tremor_ogg_stream_state *os); |
||||||
|
extern int tremor_ogg_stream_reset(tremor_ogg_stream_state *os); |
||||||
|
extern int tremor_ogg_stream_reset_serialno(tremor_ogg_stream_state *os,int serialno); |
||||||
|
extern int tremor_ogg_stream_eos(tremor_ogg_stream_state *os); |
||||||
|
|
||||||
|
extern int tremor_ogg_page_checksum_set(tremor_ogg_page *og); |
||||||
|
|
||||||
|
extern int tremor_ogg_page_version(tremor_ogg_page *og); |
||||||
|
extern int tremor_ogg_page_continued(tremor_ogg_page *og); |
||||||
|
extern int tremor_ogg_page_bos(tremor_ogg_page *og); |
||||||
|
extern int tremor_ogg_page_eos(tremor_ogg_page *og); |
||||||
|
extern tremor_ogg_int64_t tremor_ogg_page_granulepos(tremor_ogg_page *og); |
||||||
|
extern tremor_ogg_uint32_t tremor_ogg_page_serialno(tremor_ogg_page *og); |
||||||
|
extern tremor_ogg_uint32_t tremor_ogg_page_pageno(tremor_ogg_page *og); |
||||||
|
extern int tremor_ogg_page_packets(tremor_ogg_page *og); |
||||||
|
extern int tremor_ogg_page_getbuffer(tremor_ogg_page *og, unsigned char **buffer); |
||||||
|
|
||||||
|
extern int tremor_ogg_packet_release(tremor_ogg_packet *op); |
||||||
|
extern int tremor_ogg_page_release(tremor_ogg_page *og); |
||||||
|
|
||||||
|
extern void tremor_ogg_page_dup(tremor_ogg_page *d, tremor_ogg_page *s); |
||||||
|
|
||||||
|
/* Ogg BITSTREAM PRIMITIVES: return codes ***************************/ |
||||||
|
|
||||||
|
#define OGG_SUCCESS 0 |
||||||
|
|
||||||
|
#define OGG_HOLE -10 |
||||||
|
#define OGG_SPAN -11 |
||||||
|
#define OGG_EVERSION -12 |
||||||
|
#define OGG_ESERIAL -13 |
||||||
|
#define OGG_EINVAL -14 |
||||||
|
#define OGG_EEOS -15 |
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus |
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
#endif /* _TREMOR_OGG_H */ |
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="windows-1250"?> |
|
||||||
<VisualStudioPropertySheet |
|
||||||
ProjectType="Visual C++" |
|
||||||
Version="8.00" |
|
||||||
Name="libogg" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
AdditionalIncludeDirectories=""..\..\..\..\libogg-$(LIBOGG_VERSION)\include";..\..\..\..\ogg\include;..\..\..\..\..\..\..\core\ogg\libogg\include" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLinkerTool" |
|
||||||
AdditionalLibraryDirectories=""..\..\..\..\libogg-$(LIBOGG_VERSION)\win32\VS2005\$(PlatformName)\$(ConfigurationName)";"..\..\..\..\ogg\win32\VS2005\$(PlatformName)\$(ConfigurationName)";"..\..\..\..\..\..\..\core\ogg\libogg\win32\VS2005\$(PlatformName)\$(ConfigurationName)"" |
|
||||||
/> |
|
||||||
<UserMacro |
|
||||||
Name="LIBOGG_VERSION" |
|
||||||
Value="1.1.4" |
|
||||||
/> |
|
||||||
</VisualStudioPropertySheet> |
|
@ -1,865 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="Windows-1252"?> |
|
||||||
<VisualStudioProject |
|
||||||
ProjectType="Visual C++" |
|
||||||
Version="8,00" |
|
||||||
Name="libtremor" |
|
||||||
ProjectGUID="{7A8E774E-DD94-43B8-8758-6F9F656CC8D2}" |
|
||||||
RootNamespace="libtremor" |
|
||||||
Keyword="Win32Proj" |
|
||||||
> |
|
||||||
<Platforms> |
|
||||||
<Platform |
|
||||||
Name="Win32" |
|
||||||
/> |
|
||||||
<Platform |
|
||||||
Name="x64" |
|
||||||
/> |
|
||||||
<Platform |
|
||||||
Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" |
|
||||||
/> |
|
||||||
<Platform |
|
||||||
Name="Windows Mobile 5.0 Smartphone SDK (ARMV4I)" |
|
||||||
/> |
|
||||||
<Platform |
|
||||||
Name="Windows Mobile 6 Professional SDK (ARMV4I)" |
|
||||||
/> |
|
||||||
</Platforms> |
|
||||||
<ToolFiles> |
|
||||||
</ToolFiles> |
|
||||||
<Configurations> |
|
||||||
<Configuration |
|
||||||
Name="Debug|Win32" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB" |
|
||||||
MinimalRebuild="true" |
|
||||||
BasicRuntimeChecks="3" |
|
||||||
RuntimeLibrary="3" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
Detect64BitPortabilityProblems="true" |
|
||||||
DebugInformationFormat="4" |
|
||||||
CallingConvention="0" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCFxCopTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Debug|x64" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB" |
|
||||||
MinimalRebuild="true" |
|
||||||
BasicRuntimeChecks="3" |
|
||||||
RuntimeLibrary="3" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
Detect64BitPortabilityProblems="true" |
|
||||||
DebugInformationFormat="3" |
|
||||||
CallingConvention="0" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCFxCopTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="_DEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
MinimalRebuild="true" |
|
||||||
RuntimeLibrary="1" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="_DEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
MinimalRebuild="true" |
|
||||||
RuntimeLibrary="1" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="_DEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
MinimalRebuild="true" |
|
||||||
RuntimeLibrary="1" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|Win32" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB" |
|
||||||
RuntimeLibrary="2" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
Detect64BitPortabilityProblems="true" |
|
||||||
DebugInformationFormat="3" |
|
||||||
CallingConvention="0" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCFxCopTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|x64" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB" |
|
||||||
RuntimeLibrary="2" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
Detect64BitPortabilityProblems="true" |
|
||||||
DebugInformationFormat="3" |
|
||||||
CallingConvention="0" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCFxCopTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="NDEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
RuntimeLibrary="0" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
DebugInformationFormat="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="NDEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
RuntimeLibrary="0" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
DebugInformationFormat="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="NDEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
RuntimeLibrary="0" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
DebugInformationFormat="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
</Configurations> |
|
||||||
<References> |
|
||||||
</References> |
|
||||||
<Files> |
|
||||||
<Filter |
|
||||||
Name="Source Files" |
|
||||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" |
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" |
|
||||||
> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\block.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\codebook.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\floor0.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\floor1.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\info.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\mapping0.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\mdct.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\registry.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\res012.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\sharedbook.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\synthesis.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\window.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
</Filter> |
|
||||||
<Filter |
|
||||||
Name="Header Files" |
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd" |
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" |
|
||||||
> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\backends.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\block.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\codebook.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\codec_internal.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\config_types.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\ivorbiscodec.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\ivorbisfile.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\lsp_lookup.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\mdct.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\mdct_lookup.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\misc.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\ogg.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\os.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\os_types.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\registry.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\window.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\window_lookup.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
</Filter> |
|
||||||
<Filter |
|
||||||
Name="Resource Files" |
|
||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" |
|
||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" |
|
||||||
> |
|
||||||
</Filter> |
|
||||||
<File |
|
||||||
RelativePath=".\ReadMe.txt" |
|
||||||
> |
|
||||||
</File> |
|
||||||
</Files> |
|
||||||
<Globals> |
|
||||||
</Globals> |
|
||||||
</VisualStudioProject> |
|
@ -1,19 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="windows-1250"?> |
|
||||||
<VisualStudioPropertySheet |
|
||||||
ProjectType="Visual C++" |
|
||||||
Version="8.00" |
|
||||||
Name="libogg" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
AdditionalIncludeDirectories=""..\..\..\..\libogg-$(LIBOGG_VERSION)\include";..\..\..\..\ogg\include;..\..\..\..\..\..\..\core\ogg\libogg\include" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLinkerTool" |
|
||||||
AdditionalLibraryDirectories=""..\..\..\..\libogg-$(LIBOGG_VERSION)\win32\VS2008\$(PlatformName)\$(ConfigurationName)";"..\..\..\..\ogg\win32\VS2008\$(PlatformName)\$(ConfigurationName)";"..\..\..\..\..\..\..\core\ogg\libogg\win32\VS2008\$(PlatformName)\$(ConfigurationName)"" |
|
||||||
/> |
|
||||||
<UserMacro |
|
||||||
Name="LIBOGG_VERSION" |
|
||||||
Value="1.1.4" |
|
||||||
/> |
|
||||||
</VisualStudioPropertySheet> |
|
@ -1,865 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="Windows-1252"?> |
|
||||||
<VisualStudioProject |
|
||||||
ProjectType="Visual C++" |
|
||||||
Version="9,00" |
|
||||||
Name="libtremor" |
|
||||||
ProjectGUID="{7A8E774E-DD94-43B8-8758-6F9F656CC8D2}" |
|
||||||
RootNamespace="libtremor" |
|
||||||
Keyword="Win32Proj" |
|
||||||
> |
|
||||||
<Platforms> |
|
||||||
<Platform |
|
||||||
Name="Win32" |
|
||||||
/> |
|
||||||
<Platform |
|
||||||
Name="x64" |
|
||||||
/> |
|
||||||
<Platform |
|
||||||
Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" |
|
||||||
/> |
|
||||||
<Platform |
|
||||||
Name="Windows Mobile 5.0 Smartphone SDK (ARMV4I)" |
|
||||||
/> |
|
||||||
<Platform |
|
||||||
Name="Windows Mobile 6 Professional SDK (ARMV4I)" |
|
||||||
/> |
|
||||||
</Platforms> |
|
||||||
<ToolFiles> |
|
||||||
</ToolFiles> |
|
||||||
<Configurations> |
|
||||||
<Configuration |
|
||||||
Name="Debug|Win32" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB" |
|
||||||
MinimalRebuild="true" |
|
||||||
BasicRuntimeChecks="3" |
|
||||||
RuntimeLibrary="3" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
Detect64BitPortabilityProblems="true" |
|
||||||
DebugInformationFormat="4" |
|
||||||
CallingConvention="0" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCFxCopTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Debug|x64" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB" |
|
||||||
MinimalRebuild="true" |
|
||||||
BasicRuntimeChecks="3" |
|
||||||
RuntimeLibrary="3" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
Detect64BitPortabilityProblems="true" |
|
||||||
DebugInformationFormat="3" |
|
||||||
CallingConvention="0" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCFxCopTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="_DEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
MinimalRebuild="true" |
|
||||||
RuntimeLibrary="1" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="_DEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
MinimalRebuild="true" |
|
||||||
RuntimeLibrary="1" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
Optimization="0" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="_DEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
MinimalRebuild="true" |
|
||||||
RuntimeLibrary="1" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|Win32" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB" |
|
||||||
RuntimeLibrary="2" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
Detect64BitPortabilityProblems="true" |
|
||||||
DebugInformationFormat="3" |
|
||||||
CallingConvention="0" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCFxCopTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|x64" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB" |
|
||||||
RuntimeLibrary="2" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
Detect64BitPortabilityProblems="true" |
|
||||||
DebugInformationFormat="3" |
|
||||||
CallingConvention="0" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCFxCopTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="NDEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
RuntimeLibrary="0" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
DebugInformationFormat="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="NDEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
RuntimeLibrary="0" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
DebugInformationFormat="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
<Configuration |
|
||||||
Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)" |
|
||||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" |
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" |
|
||||||
ConfigurationType="4" |
|
||||||
InheritedPropertySheets="..\libogg.vsprops" |
|
||||||
CharacterSet="1" |
|
||||||
WholeProgramOptimization="1" |
|
||||||
> |
|
||||||
<Tool |
|
||||||
Name="VCPreBuildEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCustomBuildTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXMLDataGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCMIDLTool" |
|
||||||
TargetEnvironment="1" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCLCompilerTool" |
|
||||||
ExecutionBucket="7" |
|
||||||
AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\libogg\include" |
|
||||||
PreprocessorDefinitions="NDEBUG;_LIB;_WIN32_WCE=$(CEVER);UNDER_CE;WIN32;WINCE;$(ARCHFAM);$(_ARCHFAM_);$(PLATFORMDEFINES)" |
|
||||||
RuntimeLibrary="0" |
|
||||||
TreatWChar_tAsBuiltInType="false" |
|
||||||
UsePrecompiledHeader="0" |
|
||||||
WarningLevel="3" |
|
||||||
DebugInformationFormat="3" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCManagedResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCResourceCompilerTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPreLinkEventTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCLibrarianTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCALinkTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCXDCMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCBscMakeTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCCodeSignTool" |
|
||||||
/> |
|
||||||
<Tool |
|
||||||
Name="VCPostBuildEventTool" |
|
||||||
/> |
|
||||||
<DeploymentTool |
|
||||||
ForceDirty="-1" |
|
||||||
RemoteDirectory="" |
|
||||||
RegisterOutput="0" |
|
||||||
AdditionalFiles="" |
|
||||||
/> |
|
||||||
<DebuggerTool |
|
||||||
/> |
|
||||||
</Configuration> |
|
||||||
</Configurations> |
|
||||||
<References> |
|
||||||
</References> |
|
||||||
<Files> |
|
||||||
<Filter |
|
||||||
Name="Source Files" |
|
||||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" |
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" |
|
||||||
> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\block.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\codebook.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\floor0.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\floor1.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\info.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\mapping0.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\mdct.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\registry.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\res012.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\sharedbook.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\synthesis.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\window.c" |
|
||||||
> |
|
||||||
</File> |
|
||||||
</Filter> |
|
||||||
<Filter |
|
||||||
Name="Header Files" |
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd" |
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" |
|
||||||
> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\backends.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\block.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\codebook.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\codec_internal.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\config_types.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\ivorbiscodec.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\ivorbisfile.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\lsp_lookup.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\mdct.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\mdct_lookup.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\misc.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\ogg.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\os.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\os_types.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\registry.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\window.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
<File |
|
||||||
RelativePath="..\..\..\window_lookup.h" |
|
||||||
> |
|
||||||
</File> |
|
||||||
</Filter> |
|
||||||
<Filter |
|
||||||
Name="Resource Files" |
|
||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" |
|
||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" |
|
||||||
> |
|
||||||
</Filter> |
|
||||||
<File |
|
||||||
RelativePath=".\ReadMe.txt" |
|
||||||
> |
|
||||||
</File> |
|
||||||
</Files> |
|
||||||
<Globals> |
|
||||||
</Globals> |
|
||||||
</VisualStudioProject> |
|
@ -1,83 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: window functions |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#include <stdlib.h> |
|
||||||
#include <math.h> |
|
||||||
#include "misc.h" |
|
||||||
#include "window.h" |
|
||||||
#include "window_lookup.h" |
|
||||||
|
|
||||||
const void *_vorbis_window(int type, int left){ |
|
||||||
|
|
||||||
switch(type){ |
|
||||||
case 0: |
|
||||||
|
|
||||||
switch(left){ |
|
||||||
case 32: |
|
||||||
return vwin64; |
|
||||||
case 64: |
|
||||||
return vwin128; |
|
||||||
case 128: |
|
||||||
return vwin256; |
|
||||||
case 256: |
|
||||||
return vwin512; |
|
||||||
case 512: |
|
||||||
return vwin1024; |
|
||||||
case 1024: |
|
||||||
return vwin2048; |
|
||||||
case 2048: |
|
||||||
return vwin4096; |
|
||||||
case 4096: |
|
||||||
return vwin8192; |
|
||||||
default: |
|
||||||
return(0); |
|
||||||
} |
|
||||||
break; |
|
||||||
default: |
|
||||||
return(0); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
void _vorbis_apply_window(ogg_int32_t *d,const void *window_p[2], |
|
||||||
long *blocksizes, |
|
||||||
int lW,int W,int nW){ |
|
||||||
|
|
||||||
LOOKUP_T *window[2]={window_p[0],window_p[1]}; |
|
||||||
long n=blocksizes[W]; |
|
||||||
long ln=blocksizes[lW]; |
|
||||||
long rn=blocksizes[nW]; |
|
||||||
|
|
||||||
long leftbegin=n/4-ln/4; |
|
||||||
long leftend=leftbegin+ln/2; |
|
||||||
|
|
||||||
long rightbegin=n/2+n/4-rn/4; |
|
||||||
long rightend=rightbegin+rn/2; |
|
||||||
|
|
||||||
int i,p; |
|
||||||
|
|
||||||
for(i=0;i<leftbegin;i++) |
|
||||||
d[i]=0; |
|
||||||
|
|
||||||
for(p=0;i<leftend;i++,p++) |
|
||||||
d[i]=MULT31(d[i],window[lW][p]); |
|
||||||
|
|
||||||
for(i=rightbegin,p=rn/2-1;i<rightend;i++,p--) |
|
||||||
d[i]=MULT31(d[i],window[nW][p]); |
|
||||||
|
|
||||||
for(;i<n;i++) |
|
||||||
d[i]=0; |
|
||||||
} |
|
@ -1,27 +0,0 @@ |
|||||||
/********************************************************************
|
|
||||||
* * |
|
||||||
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
|
||||||
* * |
|
||||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
|
||||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
|
||||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
|
||||||
* * |
|
||||||
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * |
|
||||||
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
|
|
||||||
* * |
|
||||||
******************************************************************** |
|
||||||
|
|
||||||
function: window functions |
|
||||||
|
|
||||||
********************************************************************/ |
|
||||||
|
|
||||||
#ifndef _V_WINDOW_ |
|
||||||
#define _V_WINDOW_ |
|
||||||
|
|
||||||
extern const void *_vorbis_window(int type,int left); |
|
||||||
extern void _vorbis_apply_window(ogg_int32_t *d,const void *window[2], |
|
||||||
long *blocksizes, |
|
||||||
int lW,int W,int nW); |
|
||||||
|
|
||||||
|
|
||||||
#endif |
|
Loading…
Reference in new issue