ref: a7be4387166462d6dd5ea6184debacb0aca509a0
parent: 1a8bf37dbaa461d410c101d1be302a67b4927035
author: Jean-Marc Valin <[email protected]>
date: Fri Mar 18 02:40:03 EDT 2011
MSVC files
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,7 +12,7 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = celt.pc
-EXTRA_DIST = celt.pc.in Doxyfile Doxyfile.devel
+EXTRA_DIST = celt.pc.in Doxyfile Doxyfile.devel msvc/config.h
rpm: dist
rpmbuild -ta ${PACKAGE}-${VERSION}.tar.gz
--- a/libcelt/libcelt.vcxproj
+++ b/libcelt/libcelt.vcxproj
@@ -45,6 +45,7 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>C:\Data\Work\Codecs_silk_celt_experiments\opus_test\celt\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -60,6 +61,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>C:\Data\Work\Codecs_silk_celt_experiments\opus_test\celt\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -72,12 +74,12 @@
<None Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\msvc\config.h" />
<ClInclude Include="arch.h" />
<ClInclude Include="bands.h" />
<ClInclude Include="celt.h" />
<ClInclude Include="celt_header.h" />
<ClInclude Include="celt_types.h" />
- <ClInclude Include="config.h" />
<ClInclude Include="cwrs.h" />
<ClInclude Include="ecintrin.h" />
<ClInclude Include="entcode.h" />
--- a/libcelt/libcelt.vcxproj.filters
+++ b/libcelt/libcelt.vcxproj.filters
@@ -33,9 +33,6 @@
<ClInclude Include="celt_types.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="config.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="cwrs.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -94,6 +91,9 @@
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="vq.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\msvc\config.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
--- /dev/null
+++ b/msvc/config.h
@@ -1,0 +1,27 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#define CELT_BUILD 1
+
+#define restrict
+#define inline __inline
+
+#define USE_ALLOCA 1
+
+/* Comment out the next line for floating-point code */
+//#define FIXED_POINT 1
+
+#define OPUS_BUILD 1
+
+/* Get rid of the CELT VS compile warnings */
+#if 1
+#pragma warning(disable : 4018)// signed/unsigned mismatch
+#pragma warning(disable : 4244)// conversion from 'double' to 'celt_word16', possible loss of data
+#pragma warning(disable : 4267)// conversion from 'size_t' to 'int', possible loss of data
+#pragma warning(disable : 4305)// truncation from 'double' to 'const float'
+#pragma warning(disable : 4311)// pointer truncation from 'char *' to 'long'
+#pragma warning(disable : 4554)// check operator precedence for possible error; use parentheses to clarify precedence
+#pragma warning(disable : 4996)// This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
+#endif
+
+#endif CONFIG_H