Commit 0d8f1a58 authored by johan's avatar johan

Merge branch 'master' into annexb

# Conflicts:
#	configure.ac
#	include/Makefile.am
#	include/bcg729/Makefile.am
#	test/bin/Makefile.am
parents 28927fe2 06a55d73
......@@ -31,5 +31,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/Bcg729Targets.cmake")
get_filename_component(BCG729_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(BCG729_INCLUDE_DIRS "${BCG729_CMAKE_DIR}/../../../include")
set(BCG729_LIBRARIES BelledonneCommunications::bcg729)
set(BCG729_LIBRARIES bcg729)
set(BCG729_FOUND 1)
......@@ -21,12 +21,12 @@
############################################################################
cmake_minimum_required(VERSION 3.0)
project(BCG729 C)
project(bcg729 VERSION 1.0.1 LANGUAGES C)
set(PACKAGE "bcg729")
set(PACKAGE_NAME "${PACKAGE}")
set(PACKAGE_VERSION "0.1")
set(PACKAGE "${PROJECT_NAME}")
set(PACKAGE_NAME "${PROJECT_NAME}")
set(PACKAGE_VERSION "${PROJECT_VERSION}")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "support@belledonne-communications.com")
set(PACKAGE_TARNAME "bcg729")
......@@ -34,12 +34,19 @@ set(PACKAGE_URL "")
set(VERSION "${PACKAGE_VERSION}")
option(ENABLE_TESTS "Enable compilation of the tests." No)
option(ENABLE_MSPLUGIN "Enable compilation of the mediastreamer2 plugin." Yes)
option(ENABLE_SHARED "Build shared library." YES)
option(ENABLE_STATIC "Build static library." YES)
option(ENABLE_TESTS "Enable compilation of the tests." NO)
option(ENABLE_MSPLUGIN "Enable compilation of the mediastreamer2 plugin." YES)
include(GNUInstallDirs)
if(ENABLE_MSPLUGIN)
find_package(Mediastreamer2)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_ms2_CONFIG_DIR}/Mediastreamer2Config.cmake")
else()
find_package(Mediastreamer2)
endif()
if(NOT MEDIASTREAMER2_FOUND)
message(WARNING "Could not find the mediastreamer2 libraries!")
......@@ -66,7 +73,10 @@ add_definitions(-DHAVE_CONFIG_H)
if(MSVC)
add_definitions("/W3")
else()
add_definitions("-Wall" "-Werror")
add_definitions("-Wall")
if (NOT IOS)
add_definitions("-Werror")
endif()
endif()
add_subdirectory(src)
......@@ -74,7 +84,7 @@ if(ENABLE_MSPLUGIN)
add_subdirectory(msbcg729)
endif()
if(ENABLE_TESTS)
add_subdirectory(test)
#add_subdirectory(test)
endif()
......@@ -86,21 +96,19 @@ write_basic_package_version_file(
)
export(EXPORT Bcg729Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/Bcg729Targets.cmake"
NAMESPACE BelledonneCommunications::
)
configure_file(Bcg729Config.cmake
"${CMAKE_CURRENT_BINARY_DIR}/Bcg729Config.cmake"
COPYONLY
)
set(ConfigPackageLocation lib/cmake/Bcg729)
set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_DATADIR}/Bcg729/cmake")
install(EXPORT Bcg729Targets
FILE Bcg729Targets.cmake
NAMESPACE BelledonneCommunications::
DESTINATION ${ConfigPackageLocation}
DESTINATION ${CONFIG_PACKAGE_LOCATION}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/Bcg729Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/Bcg729ConfigVersion.cmake"
DESTINATION ${ConfigPackageLocation}
DESTINATION ${CONFIG_PACKAGE_LOCATION}
)
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = bcg729.spec
EXTRA_DIST = bcg729.spec Bcg729Config.cmake CMakeLists.txt config.h.cmake msbcg729/CMakeLists.txt src/CMakeLists.txt
SUBDIRS = include src
if BUILD_MSBCG729
......
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\msbcg729\bcg729_dec.c" />
<ClCompile Include="..\..\..\msbcg729\bcg729_enc.c" />
<ClCompile Include="..\..\..\src\adaptativeCodebookSearch.c" />
<ClCompile Include="..\..\..\src\codebooks.c" />
<ClCompile Include="..\..\..\src\computeAdaptativeCodebookGain.c" />
<ClCompile Include="..\..\..\src\computeLP.c" />
<ClCompile Include="..\..\..\src\computeWeightedSpeech.c" />
<ClCompile Include="..\..\..\src\decodeAdaptativeCodeVector.c" />
<ClCompile Include="..\..\..\src\decodeFixedCodeVector.c" />
<ClCompile Include="..\..\..\src\decodeGains.c" />
<ClCompile Include="..\..\..\src\decodeLSP.c" />
<ClCompile Include="..\..\..\src\decoder.c" />
<ClCompile Include="..\..\..\src\encoder.c" />
<ClCompile Include="..\..\..\src\findOpenLoopPitchDelay.c" />
<ClCompile Include="..\..\..\src\fixedCodebookSearch.c" />
<ClCompile Include="..\..\..\src\gainQuantization.c" />
<ClCompile Include="..\..\..\src\interpolateqLSP.c" />
<ClCompile Include="..\..\..\src\LP2LSPConversion.c" />
<ClCompile Include="..\..\..\src\LPSynthesisFilter.c" />
<ClCompile Include="..\..\..\src\LSPQuantization.c" />
<ClCompile Include="..\..\..\src\postFilter.c" />
<ClCompile Include="..\..\..\src\postProcessing.c" />
<ClCompile Include="..\..\..\src\preProcessing.c" />
<ClCompile Include="..\..\..\src\qLSP2LP.c" />
<ClCompile Include="..\..\..\src\utils.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\bcg729\decoder.h" />
<ClInclude Include="..\..\..\include\bcg729\encoder.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\linphone\mediastreamer2\build\windows10\mediastreamer2\mediastreamer2.vcxproj">
<Project>{88e3c241-eb6f-4c84-80dc-89b8961daf80}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\..\linphone\oRTP\build\windows10\ortp\ortp.vcxproj">
<Project>{2e56b851-9d8d-40e5-84bb-e4ee63b71d25}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{acf5ea95-d647-4d0c-8f97-2cd9aae8a2e0}</ProjectGuid>
<Keyword>DynamicLibrary</Keyword>
<ProjectName>libmsbcg729</ProjectName>
<RootNamespace>libmsbcg729</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10</ApplicationTypeRevision>
<WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.10069.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\include;$(ProjectDir)..\..\..\..\linphone\mediastreamer2\include;$(ProjectDir)..\..\..\..\linphone\oRTP\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
......@@ -3,7 +3,7 @@
AC_INIT([bcg729],[1.0])
AC_INIT([bcg729],[1.0.1])
AC_CANONICAL_SYSTEM
AC_PREREQ(2.63)
AC_CONFIG_SRCDIR([src/encoder.c])
......
SUBDIRS = bcg729
private_headers= adaptativeCodebookSearch.h \
basicOperationsMacros.h \
codebooks.h \
codecParameters.h \
computeAdaptativeCodebookGain.h \
computeLP.h \
computeWeightedSpeech.h \
decodeAdaptativeCodeVector.h \
decodeFixedCodeVector.h \
decodeGains.h \
decodeLSP.h \
findOpenLoopPitchDelay.h \
fixedCodebookSearch.h \
fixedPointMacros.h \
floatingPointMacros.h \
g729FixedPointMath.h \
gainQuantization.h \
interpolateqLSP.h \
LP2LSPConversion.h \
LPSynthesisFilter.h \
LSPQuantization.h \
postFilter.h \
postProcessing.h \
preProcessing.h \
qLSP2LP.h \
typedef.h \
utils.h
EXTRA_DIST=$(private_headers)
bcg729_includedir=$(includedir)/bcg729
public_headers=encoder.h decoder.h
bcg729_include_HEADERS=
bcg729_include_HEADERS+=encoder.h decoder.h
if !BUILD_MSBCG729
bcg729_include_HEADERS+=$(public_headers)
endif
EXTRA_DIST=$(bcg729_include_HEADERS)
EXTRA_DIST=$(public_headers)
......@@ -23,7 +23,7 @@
typedef struct bcg729DecoderChannelContextStruct_struct bcg729DecoderChannelContextStruct;
#include <stdint.h>
#ifdef WIN32
#ifdef _WIN32
#define BCG729_VISIBILITY
#else
#define BCG729_VISIBILITY __attribute__ ((visibility ("default")))
......
......@@ -23,7 +23,7 @@
#include <stdint.h>
typedef struct bcg729EncoderChannelContextStruct_struct bcg729EncoderChannelContextStruct;
#ifdef WIN32
#ifdef _WIN32
#define BCG729_VISIBILITY
#else
#define BCG729_VISIBILITY __attribute__ ((visibility ("default")))
......
......@@ -27,22 +27,32 @@ set(SOURCE_FILES
include_directories(${MEDIASTREAMER2_INCLUDE_DIRS})
add_library(msbcg729 SHARED ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
set_target_properties(msbcg729 PROPERTIES VERSION ${PACKAGE_VERSION} SOVERSION 0)
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libmsbcg729.pdb
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
if(ENABLE_STATIC)
add_library(msbcg729-static STATIC ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
set_target_properties(msbcg729-static PROPERTIES OUTPUT_NAME msbcg729)
target_link_libraries(msbcg729-static ${MEDIASTREAMER2_LIBRARIES})
install(TARGETS msbcg729-static
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
if(ENABLE_SHARED)
add_library(msbcg729 MODULE ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
set_target_properties(msbcg729 PROPERTIES SOVERSION 0)
target_link_libraries(msbcg729 ${MEDIASTREAMER2_LIBRARIES})
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libmsbcg729.pdb
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
set_target_properties(msbcg729 PROPERTIES PREFIX "lib")
endif()
set_target_properties(msbcg729 PROPERTIES PREFIX "lib")
install(TARGETS msbcg729
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
target_link_libraries(msbcg729 ${MEDIASTREAMER2_LIBRARIES})
install(TARGETS msbcg729
RUNTIME DESTINATION lib/mediastreamer/plugins
LIBRARY DESTINATION lib/mediastreamer/plugins
ARCHIVE DESTINATION lib/mediastreamer/plugins
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
......@@ -209,8 +209,8 @@ extern MSFilterDesc ms_bcg729_dec_desc;
#define VERSION "debug"
#endif
MS_PLUGIN_DECLARE(void) libmsbcg729_init(void){
ms_filter_register(&ms_bcg729_enc_desc);
ms_filter_register(&ms_bcg729_dec_desc);
MS_PLUGIN_DECLARE(void) libmsbcg729_init(MSFactory * factory){
ms_factory_register_filter(factory, &ms_bcg729_enc_desc);
ms_factory_register_filter(factory, &ms_bcg729_dec_desc);
ms_message(" libmsbcg729 " VERSION " plugin loaded");
}
......@@ -49,25 +49,37 @@ set(BCG729_SOURCE_FILES
vad.c
)
add_library(bcg729 SHARED ${BCG729_SOURCE_FILES})
set_target_properties(bcg729 PROPERTIES VERSION 0)
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libbcg729.pdb
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
add_library(bcg729-objects OBJECT ${BCG729_SOURCE_FILES})
set_target_properties(bcg729-objects PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if(ENABLE_STATIC)
add_library(bcg729-static STATIC ${BCG729_SOURCE_FILES})
set_target_properties(bcg729-static PROPERTIES OUTPUT_NAME bcg729)
install(TARGETS bcg729-static EXPORT Bcg729Targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
if(ENABLE_SHARED)
add_library(bcg729 SHARED ${BCG729_SOURCE_FILES})
set_target_properties(bcg729 PROPERTIES VERSION 0)
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libbcg729.pdb
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
set_target_properties(bcg729 PROPERTIES PREFIX "lib")
endif()
set_target_properties(bcg729 PROPERTIES PREFIX "lib")
install(TARGETS bcg729 EXPORT Bcg729Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
install(TARGETS bcg729 EXPORT Bcg729Targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
set(ABS_BCG729_SOURCE_FILES )
foreach(elem ${BCG729_SOURCE_FILES})
list(APPEND ABS_BCG729_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${elem}")
......
SUBDIRS = bin
TESTS = testCampaignAll
testCampaignAll-exec: $(srcdir)/testCampaignAll $(srcdir)/testCampaign
cp -f $(srcdir)/testCampaignAll testCampaignAll-exec
cp -f $(srcdir)/testCampaign testCampaign-exec
TESTS = testCampaignAll-exec
EXTRA_DIST=testCampaignAll testCampaign
CLEANFILES=testCampaignAll-exec testCampaign-exec
clean-local:
rm -rf patterns
check_PROGRAMS=adaptativeCodebookSearchTest computeAdaptativeCodebookGainTest computeLPTest computeWeightedSpeechTest decodeAdaptativeCodeVectorTest decodeFixedCodeVectorTest decodeGainsTest decodeLSPTest \
decoderTest encoderTest decoderMultiChannelTest encoderMultiChannelTest findOpenLoopPitchDelayTest fixedCodebookSearchTest g729FixedPointMathTest gainQuantizationTest interpolateqLSPAndConvert2LPTest \
LP2LSPConversionTest LPSynthesisFilterTest LSPQuantizationTest postFilterTest postProcessingTest preProcessingTest computeNoiseExcitationTest CNGdecoderTest CNGRFC3389decoderTest encoderVADTest
util_src=$(top_srcdir)/test/src/testUtils.c
util_src= \
$(top_srcdir)/test/src/testUtils.c \
$(top_srcdir)/test/src/testUtils.h
adaptativeCodebookSearchTest_SOURCES=$(top_srcdir)/test/src/adaptativeCodebookSearchTest.c $(util_src)
computeAdaptativeCodebookGainTest_SOURCES=$(top_srcdir)/test/src/computeAdaptativeCodebookGainTest.c $(util_src)
......
......@@ -29,4 +29,4 @@ if [ ! -d "patterns" ]; then
fi
# run all the tests
./testCampaign all
./testCampaign-exec all
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment