summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZentaro Kavanagh <illiminable@xiph.org>2006-04-21 18:32:44 +0000
committerZentaro Kavanagh <illiminable@xiph.org>2006-04-21 18:32:44 +0000
commit33d07d9f01d19eadaa3ccc3255e64f8818457e52 (patch)
treed516ed80bb10bfde333ce6b70533aac9deb41d8b
parent99ef5101f31f961c1cdf8f5133133bacf21f7e79 (diff)
downloadtremor-33d07d9f01d19eadaa3ccc3255e64f8818457e52.tar.gz
* Use the provided STIN macros so it builds on win32
* Add VS2005 project files git-svn-id: https://svn.xiph.org/trunk/Tremor@11211 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--codebook.c2
-rw-r--r--floor0.c10
-rw-r--r--misc.h26
-rw-r--r--win32/VS2005/libtremor/libtremor.vcproj293
4 files changed, 312 insertions, 19 deletions
diff --git a/codebook.c b/codebook.c
index b7b2303..4cff584 100644
--- a/codebook.c
+++ b/codebook.c
@@ -147,7 +147,7 @@ static ogg_uint32_t bitreverse(ogg_uint32_t x){
return((x>> 1)&0x55555555) | ((x<< 1)&0xaaaaaaaa);
}
-static inline long decode_packed_entry_number(codebook *book,
+STIN long decode_packed_entry_number(codebook *book,
oggpack_buffer *b){
int read=book->dec_maxlength;
long lo,hi;
diff --git a/floor0.c b/floor0.c
index 081d00e..bdb83b8 100644
--- a/floor0.c
+++ b/floor0.c
@@ -48,7 +48,7 @@ typedef struct {
returns in m.8 format */
static long ADJUST_SQRT2[2]={8192,5792};
-static inline ogg_int32_t vorbis_invsqlook_i(long a,long e){
+STIN ogg_int32_t vorbis_invsqlook_i(long a,long e){
long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1);
long d=a&INVSQ_LOOKUP_I_MASK; /* 0.10 */
long val=INVSQ_LOOKUP_I[i]- /* 1.16 */
@@ -60,7 +60,7 @@ static inline ogg_int32_t vorbis_invsqlook_i(long a,long e){
/* interpolated lookup based fromdB function, domain -140dB to 0dB only */
/* a is in n.12 format */
-static inline ogg_int32_t vorbis_fromdBlook_i(long a){
+STIN ogg_int32_t vorbis_fromdBlook_i(long a){
int i=(-a)>>(12-FROMdB2_SHIFT);
if(i<0) return 0x7fffffff;
if(i>=(FROMdB_LOOKUP_SZ<<FROMdB_SHIFT))return 0;
@@ -70,7 +70,7 @@ static inline ogg_int32_t vorbis_fromdBlook_i(long a){
/* interpolated lookup based cos function, domain 0 to PI only */
/* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */
-static inline ogg_int32_t vorbis_coslook_i(long a){
+STIN ogg_int32_t vorbis_coslook_i(long a){
int i=a>>COS_LOOKUP_I_SHIFT;
int d=a&COS_LOOKUP_I_MASK;
return COS_LOOKUP_I[i]- ((d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>>
@@ -79,7 +79,7 @@ static inline ogg_int32_t vorbis_coslook_i(long a){
/* interpolated lookup based cos function */
/* a is in 0.16 format, where 0==0, 2^^16==PI, return .LSP_FRACBITS */
-static inline ogg_int32_t vorbis_coslook2_i(long a){
+STIN ogg_int32_t vorbis_coslook2_i(long a){
a=a&0x1ffff;
if(a>0x10000)a=0x20000-a;
@@ -102,7 +102,7 @@ static const int barklook[28]={
};
/* used in init only; interpolate the long way */
-static inline ogg_int32_t toBARK(int n){
+STIN ogg_int32_t toBARK(int n){
int i;
for(i=0;i<27;i++)
if(n>=barklook[i] && n<barklook[i+1])break;
diff --git a/misc.h b/misc.h
index 0547ac7..763b506 100644
--- a/misc.h
+++ b/misc.h
@@ -51,17 +51,17 @@ union magic {
};
#endif
-static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
+STIN ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
union magic magic;
magic.whole = (ogg_int64_t)x * y;
return magic.halves.hi;
}
-static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) {
+STIN ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) {
return MULT32(x,y)<<1;
}
-static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
+STIN ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
union magic magic;
magic.whole = (ogg_int64_t)x * y;
return ((ogg_uint32_t)(magic.halves.lo)>>15) | ((magic.halves.hi)<<17);
@@ -83,15 +83,15 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
* tables in this case.
*/
-static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
+STIN ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
return (x >> 9) * y; /* y preshifted >>23 */
}
-static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) {
+STIN ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) {
return (x >> 8) * y; /* y preshifted >>23 */
}
-static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
+STIN ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
return (x >> 6) * y; /* y preshifted >>9 */
}
@@ -128,7 +128,7 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
#else
-static inline void XPROD32(ogg_int32_t a, ogg_int32_t b,
+STIN void XPROD32(ogg_int32_t a, ogg_int32_t b,
ogg_int32_t t, ogg_int32_t v,
ogg_int32_t *x, ogg_int32_t *y)
{
@@ -136,7 +136,7 @@ static inline void XPROD32(ogg_int32_t a, ogg_int32_t b,
*y = MULT32(b, t) - MULT32(a, v);
}
-static inline void XPROD31(ogg_int32_t a, ogg_int32_t b,
+STIN void XPROD31(ogg_int32_t a, ogg_int32_t b,
ogg_int32_t t, ogg_int32_t v,
ogg_int32_t *x, ogg_int32_t *y)
{
@@ -144,7 +144,7 @@ static inline void XPROD31(ogg_int32_t a, ogg_int32_t b,
*y = MULT31(b, t) - MULT31(a, v);
}
-static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b,
+STIN void XNPROD31(ogg_int32_t a, ogg_int32_t b,
ogg_int32_t t, ogg_int32_t v,
ogg_int32_t *x, ogg_int32_t *y)
{
@@ -159,7 +159,7 @@ static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b,
#ifndef _V_CLIP_MATH
#define _V_CLIP_MATH
-static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
+STIN ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
int ret=x;
ret-= ((x<=32767)-1)&(x-32767);
ret-= ((x>=-32768)-1)&(x+32768);
@@ -168,7 +168,7 @@ static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
#endif
-static inline ogg_int32_t VFLOAT_MULT(ogg_int32_t a,ogg_int32_t ap,
+STIN ogg_int32_t VFLOAT_MULT(ogg_int32_t a,ogg_int32_t ap,
ogg_int32_t b,ogg_int32_t bp,
ogg_int32_t *p){
if(a && b){
@@ -185,7 +185,7 @@ static inline ogg_int32_t VFLOAT_MULT(ogg_int32_t a,ogg_int32_t ap,
int _ilog(unsigned int);
-static inline ogg_int32_t VFLOAT_MULTI(ogg_int32_t a,ogg_int32_t ap,
+STIN ogg_int32_t VFLOAT_MULTI(ogg_int32_t a,ogg_int32_t ap,
ogg_int32_t i,
ogg_int32_t *p){
@@ -193,7 +193,7 @@ static inline ogg_int32_t VFLOAT_MULTI(ogg_int32_t a,ogg_int32_t ap,
return VFLOAT_MULT(a,ap,i<<-ip,ip,p);
}
-static inline ogg_int32_t VFLOAT_ADD(ogg_int32_t a,ogg_int32_t ap,
+STIN ogg_int32_t VFLOAT_ADD(ogg_int32_t a,ogg_int32_t ap,
ogg_int32_t b,ogg_int32_t bp,
ogg_int32_t *p){
diff --git a/win32/VS2005/libtremor/libtremor.vcproj b/win32/VS2005/libtremor/libtremor.vcproj
new file mode 100644
index 0000000..46c1ee8
--- /dev/null
+++ b/win32/VS2005/libtremor/libtremor.vcproj
@@ -0,0 +1,293 @@
+<?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"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <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|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ 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="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </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="..\..\..\bitwise.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\block.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\codebook.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\floor0.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\floor1.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\framing.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>