diff --git a/CMakeLists.txt b/CMakeLists.txt index a34c6a76d85481fe18739440a351374c4135f629..078f806de2e5aca21fbbb2411d886bbc2f70f902 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,7 +133,7 @@ if(UNIX) endif() target_include_directories(lib_com PUBLIC lib_com PRIVATE lib_enc lib_dec lib_rend lib_debug) if(INCLUDE_SPLIT) - target_include_directories(lib_com PRIVATE lc3plus) + target_include_directories(lib_com PRIVATE lib_lc3plus) endif() file(GLOB libDebugSrcs "lib_debug/*.c") @@ -148,17 +148,17 @@ add_library(lib_enc ${libEncSrcs} ${libEncHeaders}) target_link_libraries(lib_enc lib_com lib_debug) target_include_directories(lib_enc PUBLIC lib_enc PRIVATE lib_dec lib_rend) if(INCLUDE_SPLIT) - target_include_directories(lib_enc PRIVATE lc3plus) + target_include_directories(lib_enc PRIVATE lib_lc3plus) endif() if(INCLUDE_SPLIT) - file(GLOB libLC3plusSrcs "lc3plus/*.c") - file(GLOB libLC3plusHeaders "lc3plus/*.h") + file(GLOB libLC3plusSrcs "lib_lc3plus/*.c") + file(GLOB libLC3plusHeaders "lib_lc3plus/*.h") add_library(lc3plus ${libLC3plusSrcs} ${libLC3plusHeaders}) - target_include_directories(lc3plus PUBLIC lc3plus) - target_link_libraries(lc3plus lib_com) # For including options.h, which is needed for instrumentation to work correctly + target_include_directories(lib_lc3plus PUBLIC lib_lc3plus) + target_link_libraries(lib_lc3plus lib_com) # For including options.h, which is needed for instrumentation to work correctly if(WMOPS) - target_link_libraries(lc3plus lib_debug) + target_link_libraries(lib_lc3plus lib_debug) endif() endif() @@ -191,7 +191,7 @@ else() endif() target_link_libraries(lib_rend lib_dec lib_com lib_debug) # Todo refactor: This dependency on lib_dec should be removed. if(INCLUDE_SPLIT) - target_link_libraries(lib_rend lc3plus) + target_link_libraries(lib_rend lib_lc3plus) endif() target_include_directories(lib_rend PUBLIC lib_rend PRIVATE lib_enc) @@ -210,14 +210,14 @@ endif() add_library(lib_util ${libUtilSrcs} ${libUtilHeaders}) target_include_directories(lib_util PUBLIC lib_util PRIVATE lib_com lib_enc lib_dec lib_rend lib_debug) if(INCLUDE_SPLIT) - target_include_directories(lib_util PRIVATE lc3plus) + target_include_directories(lib_util PRIVATE lib_lc3plus) endif() if(INCLUDE_SPLIT) if(NOT WMOPS) - file(GLOB unitTestIvasLc3plusSrcs "scripts/split_rendering/lc3plus/*.c") - add_executable(ivas_lc3plus_unit_test ${unitTestIvasLc3plusSrcs}) - target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_debug) + file(GLOB unitTestIvasLc3plusSrcs "scripts/split_rendering/lc3plus/*.c") + add_executable(ivas_lc3plus_unit_test ${unitTestIvasLc3plusSrcs}) + target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_debug) endif() endif() @@ -243,9 +243,9 @@ if(COPY_EXECUTABLES_FROM_BUILD_DIR) add_custom_command(TARGET IVAS_dec POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/") add_custom_command(TARGET IVAS_rend POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/") if(INCLUDE_SPLIT) - if (NOT WMOPS) - add_custom_command(TARGET ivas_lc3plus_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/split_rendering/lc3plus") - endif() + if (NOT WMOPS) + add_custom_command(TARGET ivas_lc3plus_unit_test POST_BUILD VERBATIM COMMAND "${CMAKE_COMMAND}" -E copy "$" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/split_rendering/lc3plus") + endif() endif() endif() diff --git a/Makefile b/Makefile index 36a32342fc394e0d7eb8c4240a1a961eaa1500b1..5cf9df3e29ecbebd76caeeef9e9ae2c8b271ea6a 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ SRC_LIBDEBUG = lib_debug SRC_LIBDEC = lib_dec SRC_LIBENC = lib_enc SRC_LIBREND = lib_rend -SRC_LC3PLUS = lc3plus lc3plus/fft +SRC_LC3PLUS = lib_lc3plus lib_lc3plus/fft SRC_LIBUTIL = lib_util SRC_APP = apps BUILD = build diff --git a/Workspace_msvc/Workspace_msvc.sln b/Workspace_msvc/Workspace_msvc.sln index 1d8e08ac9fe62eb11c8a2747f22c01a7e9620e5c..f7a8d6f9e8c1a9d10d9a4f0b02195a48605c37c1 100644 --- a/Workspace_msvc/Workspace_msvc.sln +++ b/Workspace_msvc/Workspace_msvc.sln @@ -20,7 +20,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder", "encoder.vcxproj" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "renderer", "renderer.vcxproj", "{12B4C8A5-1E06-4E30-B443-D1F916F52B47}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LC3plus", "LC3plus.vcxproj", "{95030B82-70CD-4C6B-84D4-61096035BEA2}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LC3plus", "lib_lc3plus.vcxproj", "{95030B82-70CD-4C6B-84D4-61096035BEA2}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{51160D4C-55C9-4C16-A792-D94507225746}" ProjectSection(SolutionItems) = preProject diff --git a/Workspace_msvc/lib_com.vcxproj b/Workspace_msvc/lib_com.vcxproj index 8a1559090269fbef0fc2610f72898c6d055213bb..7403719a8e6a601e174c755a3dd101d836969b79 100644 --- a/Workspace_msvc/lib_com.vcxproj +++ b/Workspace_msvc/lib_com.vcxproj @@ -59,7 +59,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks @@ -94,7 +94,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) true diff --git a/Workspace_msvc/lib_dec.vcxproj b/Workspace_msvc/lib_dec.vcxproj index 5ed2cd88a901cfff235b9de947d5cf9ac916b25d..354348b4c925e0fd7d84548c7b29a18b3b3061e4 100644 --- a/Workspace_msvc/lib_dec.vcxproj +++ b/Workspace_msvc/lib_dec.vcxproj @@ -68,7 +68,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks @@ -108,7 +108,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) true diff --git a/Workspace_msvc/lib_enc.vcxproj b/Workspace_msvc/lib_enc.vcxproj index 4ff380f542c3890f42eb032016956f1726463682..6ef1fcabe125598f20d9d2982b931c33979dd74e 100644 --- a/Workspace_msvc/lib_enc.vcxproj +++ b/Workspace_msvc/lib_enc.vcxproj @@ -68,7 +68,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks @@ -111,7 +111,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) true diff --git a/Workspace_msvc/LC3plus.vcxproj b/Workspace_msvc/lib_lc3plus.vcxproj similarity index 51% rename from Workspace_msvc/LC3plus.vcxproj rename to Workspace_msvc/lib_lc3plus.vcxproj index 7cefc1816b5e33e7e93fa1f54a0702aa226dfc76..207b6903c85e91a2662cbe32fcb77fddcc57f416 100644 --- a/Workspace_msvc/LC3plus.vcxproj +++ b/Workspace_msvc/lib_lc3plus.vcxproj @@ -51,9 +51,9 @@ - LC3plus - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\Obj\ + liblc3plus + .\Debug_$(ProjectName)\ + .\Debug_$(ProjectName)\ LC3plus @@ -71,6 +71,7 @@ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 4305;4244;4996 OldStyle + false Console @@ -98,83 +99,83 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/Workspace_msvc/lib_rend.vcxproj b/Workspace_msvc/lib_rend.vcxproj index 7415fb432c45bd04a67f7c26af6ee5c83c915f01..204f1a966189eab65738abf0aa52c0a200d8ada0 100644 --- a/Workspace_msvc/lib_rend.vcxproj +++ b/Workspace_msvc/lib_rend.vcxproj @@ -68,7 +68,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks @@ -108,7 +108,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) true @@ -178,7 +178,7 @@ - + @@ -191,7 +191,7 @@ - + @@ -218,7 +218,7 @@ {54509728-928b-44d9-a118-a6f92f08b34f} false - + {95030B82-70CD-4C6B-84D4-61096035BEA2} false diff --git a/Workspace_msvc/lib_util.vcxproj b/Workspace_msvc/lib_util.vcxproj index 687e9795a0396b5fdd696f8ba85026b750199dc1..4b787f1d0c0d09f2f792da59462aca4c49ee5461 100644 --- a/Workspace_msvc/lib_util.vcxproj +++ b/Workspace_msvc/lib_util.vcxproj @@ -55,7 +55,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_util;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_util;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);ZLIB_WINAPI;%(PreprocessorDefinitions) false @@ -78,7 +78,7 @@ AnySuitable false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_util;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_util;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);ZLIB_WINAPI;%(PreprocessorDefinitions) true diff --git a/Workspace_msvc/renderer.vcxproj b/Workspace_msvc/renderer.vcxproj index 56c9601e2f261491faaf3d97cb695183873f52e0..bf4a162d1906de0684b6514f5a2a33330ad29c3f 100644 --- a/Workspace_msvc/renderer.vcxproj +++ b/Workspace_msvc/renderer.vcxproj @@ -65,7 +65,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_util;..\lib_rend;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_util;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;WIN32;$(Macros);%(PreprocessorDefinitions) EnableFastChecks @@ -109,7 +109,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_util;..\lib_rend;..\lc3plus;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_util;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) true diff --git a/lib_lc3plus/.clang-format b/lib_lc3plus/.clang-format new file mode 100644 index 0000000000000000000000000000000000000000..47a38a93f2dbdd6d944f9dddc3465e3fb65aec29 --- /dev/null +++ b/lib_lc3plus/.clang-format @@ -0,0 +1,2 @@ +DisableFormat: true +SortIncludes: Never diff --git a/lc3plus/adjust_global_gain.c b/lib_lc3plus/adjust_global_gain.c similarity index 100% rename from lc3plus/adjust_global_gain.c rename to lib_lc3plus/adjust_global_gain.c diff --git a/lc3plus/al_fec_fl.c b/lib_lc3plus/al_fec_fl.c similarity index 100% rename from lc3plus/al_fec_fl.c rename to lib_lc3plus/al_fec_fl.c diff --git a/lc3plus/apply_global_gain.c b/lib_lc3plus/apply_global_gain.c similarity index 100% rename from lc3plus/apply_global_gain.c rename to lib_lc3plus/apply_global_gain.c diff --git a/lc3plus/ari_codec.c b/lib_lc3plus/ari_codec.c similarity index 100% rename from lc3plus/ari_codec.c rename to lib_lc3plus/ari_codec.c diff --git a/lc3plus/attack_detector.c b/lib_lc3plus/attack_detector.c similarity index 100% rename from lc3plus/attack_detector.c rename to lib_lc3plus/attack_detector.c diff --git a/lc3plus/clib.h b/lib_lc3plus/clib.h similarity index 100% rename from lc3plus/clib.h rename to lib_lc3plus/clib.h diff --git a/lc3plus/constants.c b/lib_lc3plus/constants.c similarity index 100% rename from lc3plus/constants.c rename to lib_lc3plus/constants.c diff --git a/lc3plus/constants.h b/lib_lc3plus/constants.h similarity index 100% rename from lc3plus/constants.h rename to lib_lc3plus/constants.h diff --git a/lc3plus/cutoff_bandwidth.c b/lib_lc3plus/cutoff_bandwidth.c similarity index 100% rename from lc3plus/cutoff_bandwidth.c rename to lib_lc3plus/cutoff_bandwidth.c diff --git a/lc3plus/dct4.c b/lib_lc3plus/dct4.c similarity index 100% rename from lc3plus/dct4.c rename to lib_lc3plus/dct4.c diff --git a/lc3plus/dec_entropy.c b/lib_lc3plus/dec_entropy.c similarity index 100% rename from lc3plus/dec_entropy.c rename to lib_lc3plus/dec_entropy.c diff --git a/lc3plus/dec_lc3_fl.c b/lib_lc3plus/dec_lc3_fl.c similarity index 100% rename from lc3plus/dec_lc3_fl.c rename to lib_lc3plus/dec_lc3_fl.c diff --git a/lc3plus/defines.h b/lib_lc3plus/defines.h similarity index 100% rename from lc3plus/defines.h rename to lib_lc3plus/defines.h diff --git a/lc3plus/detect_cutoff_warped.c b/lib_lc3plus/detect_cutoff_warped.c similarity index 100% rename from lc3plus/detect_cutoff_warped.c rename to lib_lc3plus/detect_cutoff_warped.c diff --git a/lc3plus/enc_entropy.c b/lib_lc3plus/enc_entropy.c similarity index 100% rename from lc3plus/enc_entropy.c rename to lib_lc3plus/enc_entropy.c diff --git a/lc3plus/enc_lc3_fl.c b/lib_lc3plus/enc_lc3_fl.c similarity index 100% rename from lc3plus/enc_lc3_fl.c rename to lib_lc3plus/enc_lc3_fl.c diff --git a/lc3plus/estimate_global_gain.c b/lib_lc3plus/estimate_global_gain.c similarity index 100% rename from lc3plus/estimate_global_gain.c rename to lib_lc3plus/estimate_global_gain.c diff --git a/lc3plus/fft/cfft.c b/lib_lc3plus/fft/cfft.c similarity index 100% rename from lc3plus/fft/cfft.c rename to lib_lc3plus/fft/cfft.c diff --git a/lc3plus/fft/cfft.h b/lib_lc3plus/fft/cfft.h similarity index 100% rename from lc3plus/fft/cfft.h rename to lib_lc3plus/fft/cfft.h diff --git a/lc3plus/fft/fft_15_16.h b/lib_lc3plus/fft/fft_15_16.h similarity index 100% rename from lc3plus/fft/fft_15_16.h rename to lib_lc3plus/fft/fft_15_16.h diff --git a/lc3plus/fft/fft_240_480.h b/lib_lc3plus/fft/fft_240_480.h similarity index 100% rename from lc3plus/fft/fft_240_480.h rename to lib_lc3plus/fft/fft_240_480.h diff --git a/lc3plus/fft/fft_2_9.h b/lib_lc3plus/fft/fft_2_9.h similarity index 100% rename from lc3plus/fft/fft_2_9.h rename to lib_lc3plus/fft/fft_2_9.h diff --git a/lc3plus/fft/fft_32.h b/lib_lc3plus/fft/fft_32.h similarity index 100% rename from lc3plus/fft/fft_32.h rename to lib_lc3plus/fft/fft_32.h diff --git a/lc3plus/fft/fft_384_768.h b/lib_lc3plus/fft/fft_384_768.h similarity index 100% rename from lc3plus/fft/fft_384_768.h rename to lib_lc3plus/fft/fft_384_768.h diff --git a/lc3plus/fft/fft_60_128.h b/lib_lc3plus/fft/fft_60_128.h similarity index 100% rename from lc3plus/fft/fft_60_128.h rename to lib_lc3plus/fft/fft_60_128.h diff --git a/lc3plus/fft/fft_generic.h b/lib_lc3plus/fft/fft_generic.h similarity index 100% rename from lc3plus/fft/fft_generic.h rename to lib_lc3plus/fft/fft_generic.h diff --git a/lc3plus/fft/iis_fft.c b/lib_lc3plus/fft/iis_fft.c similarity index 100% rename from lc3plus/fft/iis_fft.c rename to lib_lc3plus/fft/iis_fft.c diff --git a/lc3plus/fft/iis_fft.h b/lib_lc3plus/fft/iis_fft.h similarity index 100% rename from lc3plus/fft/iis_fft.h rename to lib_lc3plus/fft/iis_fft.h diff --git a/lc3plus/fft/iisfft.c b/lib_lc3plus/fft/iisfft.c similarity index 100% rename from lc3plus/fft/iisfft.c rename to lib_lc3plus/fft/iisfft.c diff --git a/lc3plus/fft/iisfft.h b/lib_lc3plus/fft/iisfft.h similarity index 100% rename from lc3plus/fft/iisfft.h rename to lib_lc3plus/fft/iisfft.h diff --git a/lc3plus/functions.h b/lib_lc3plus/functions.h similarity index 100% rename from lc3plus/functions.h rename to lib_lc3plus/functions.h diff --git a/lc3plus/imdct.c b/lib_lc3plus/imdct.c similarity index 100% rename from lc3plus/imdct.c rename to lib_lc3plus/imdct.c diff --git a/lc3plus/lc3.c b/lib_lc3plus/lc3.c similarity index 100% rename from lc3plus/lc3.c rename to lib_lc3plus/lc3.c diff --git a/lc3plus/lc3.h b/lib_lc3plus/lc3.h similarity index 100% rename from lc3plus/lc3.h rename to lib_lc3plus/lc3.h diff --git a/lc3plus/lc3plus_fft.c b/lib_lc3plus/lc3plus_fft.c similarity index 100% rename from lc3plus/lc3plus_fft.c rename to lib_lc3plus/lc3plus_fft.c diff --git a/lc3plus/license.h b/lib_lc3plus/license.h similarity index 100% rename from lc3plus/license.h rename to lib_lc3plus/license.h diff --git a/lc3plus/ltpf_coder.c b/lib_lc3plus/ltpf_coder.c similarity index 100% rename from lc3plus/ltpf_coder.c rename to lib_lc3plus/ltpf_coder.c diff --git a/lc3plus/ltpf_decoder.c b/lib_lc3plus/ltpf_decoder.c similarity index 100% rename from lc3plus/ltpf_decoder.c rename to lib_lc3plus/ltpf_decoder.c diff --git a/lc3plus/mdct.c b/lib_lc3plus/mdct.c similarity index 100% rename from lc3plus/mdct.c rename to lib_lc3plus/mdct.c diff --git a/lc3plus/mdct_shaping.c b/lib_lc3plus/mdct_shaping.c similarity index 100% rename from lc3plus/mdct_shaping.c rename to lib_lc3plus/mdct_shaping.c diff --git a/lc3plus/near_nyquist_detector.c b/lib_lc3plus/near_nyquist_detector.c similarity index 100% rename from lc3plus/near_nyquist_detector.c rename to lib_lc3plus/near_nyquist_detector.c diff --git a/lc3plus/noise_factor.c b/lib_lc3plus/noise_factor.c similarity index 100% rename from lc3plus/noise_factor.c rename to lib_lc3plus/noise_factor.c diff --git a/lc3plus/noise_filling.c b/lib_lc3plus/noise_filling.c similarity index 100% rename from lc3plus/noise_filling.c rename to lib_lc3plus/noise_filling.c diff --git a/lc3plus/olpa.c b/lib_lc3plus/olpa.c similarity index 100% rename from lc3plus/olpa.c rename to lib_lc3plus/olpa.c diff --git a/lc3plus/pc_apply.c b/lib_lc3plus/pc_apply.c similarity index 100% rename from lc3plus/pc_apply.c rename to lib_lc3plus/pc_apply.c diff --git a/lc3plus/pc_classify.c b/lib_lc3plus/pc_classify.c similarity index 100% rename from lc3plus/pc_classify.c rename to lib_lc3plus/pc_classify.c diff --git a/lc3plus/pc_main.c b/lib_lc3plus/pc_main.c similarity index 100% rename from lc3plus/pc_main.c rename to lib_lc3plus/pc_main.c diff --git a/lc3plus/pc_update.c b/lib_lc3plus/pc_update.c similarity index 100% rename from lc3plus/pc_update.c rename to lib_lc3plus/pc_update.c diff --git a/lc3plus/per_band_energy.c b/lib_lc3plus/per_band_energy.c similarity index 100% rename from lc3plus/per_band_energy.c rename to lib_lc3plus/per_band_energy.c diff --git a/lc3plus/plc_classify.c b/lib_lc3plus/plc_classify.c similarity index 100% rename from lc3plus/plc_classify.c rename to lib_lc3plus/plc_classify.c diff --git a/lc3plus/plc_compute_stab_fac.c b/lib_lc3plus/plc_compute_stab_fac.c similarity index 100% rename from lc3plus/plc_compute_stab_fac.c rename to lib_lc3plus/plc_compute_stab_fac.c diff --git a/lc3plus/plc_damping_scrambling.c b/lib_lc3plus/plc_damping_scrambling.c similarity index 100% rename from lc3plus/plc_damping_scrambling.c rename to lib_lc3plus/plc_damping_scrambling.c diff --git a/lc3plus/plc_main.c b/lib_lc3plus/plc_main.c similarity index 100% rename from lc3plus/plc_main.c rename to lib_lc3plus/plc_main.c diff --git a/lc3plus/plc_noise_substitution.c b/lib_lc3plus/plc_noise_substitution.c similarity index 100% rename from lc3plus/plc_noise_substitution.c rename to lib_lc3plus/plc_noise_substitution.c diff --git a/lc3plus/plc_phecu_f0_refine_first.c b/lib_lc3plus/plc_phecu_f0_refine_first.c similarity index 100% rename from lc3plus/plc_phecu_f0_refine_first.c rename to lib_lc3plus/plc_phecu_f0_refine_first.c diff --git a/lc3plus/plc_phecu_fec_hq.c b/lib_lc3plus/plc_phecu_fec_hq.c similarity index 100% rename from lc3plus/plc_phecu_fec_hq.c rename to lib_lc3plus/plc_phecu_fec_hq.c diff --git a/lc3plus/plc_phecu_hq_ecu.c b/lib_lc3plus/plc_phecu_hq_ecu.c similarity index 100% rename from lc3plus/plc_phecu_hq_ecu.c rename to lib_lc3plus/plc_phecu_hq_ecu.c diff --git a/lc3plus/plc_phecu_lf_peak_analysis.c b/lib_lc3plus/plc_phecu_lf_peak_analysis.c similarity index 100% rename from lc3plus/plc_phecu_lf_peak_analysis.c rename to lib_lc3plus/plc_phecu_lf_peak_analysis.c diff --git a/lc3plus/plc_phecu_rec_frame.c b/lib_lc3plus/plc_phecu_rec_frame.c similarity index 100% rename from lc3plus/plc_phecu_rec_frame.c rename to lib_lc3plus/plc_phecu_rec_frame.c diff --git a/lc3plus/plc_phecu_setf0hz.c b/lib_lc3plus/plc_phecu_setf0hz.c similarity index 100% rename from lc3plus/plc_phecu_setf0hz.c rename to lib_lc3plus/plc_phecu_setf0hz.c diff --git a/lc3plus/plc_phecu_spec_ana.c b/lib_lc3plus/plc_phecu_spec_ana.c similarity index 100% rename from lc3plus/plc_phecu_spec_ana.c rename to lib_lc3plus/plc_phecu_spec_ana.c diff --git a/lc3plus/plc_phecu_subst_spec.c b/lib_lc3plus/plc_phecu_subst_spec.c similarity index 100% rename from lc3plus/plc_phecu_subst_spec.c rename to lib_lc3plus/plc_phecu_subst_spec.c diff --git a/lc3plus/plc_phecu_tba_per_band_gain.c b/lib_lc3plus/plc_phecu_tba_per_band_gain.c similarity index 100% rename from lc3plus/plc_phecu_tba_per_band_gain.c rename to lib_lc3plus/plc_phecu_tba_per_band_gain.c diff --git a/lc3plus/plc_phecu_tba_spect_Xavg.c b/lib_lc3plus/plc_phecu_tba_spect_Xavg.c similarity index 100% rename from lc3plus/plc_phecu_tba_spect_Xavg.c rename to lib_lc3plus/plc_phecu_tba_spect_Xavg.c diff --git a/lc3plus/plc_phecu_tba_trans_dect_gains.c b/lib_lc3plus/plc_phecu_tba_trans_dect_gains.c similarity index 100% rename from lc3plus/plc_phecu_tba_trans_dect_gains.c rename to lib_lc3plus/plc_phecu_tba_trans_dect_gains.c diff --git a/lc3plus/plc_phecu_trans_burst_ana_sub.c b/lib_lc3plus/plc_phecu_trans_burst_ana_sub.c similarity index 100% rename from lc3plus/plc_phecu_trans_burst_ana_sub.c rename to lib_lc3plus/plc_phecu_trans_burst_ana_sub.c diff --git a/lc3plus/plc_tdc.c b/lib_lc3plus/plc_tdc.c similarity index 100% rename from lc3plus/plc_tdc.c rename to lib_lc3plus/plc_tdc.c diff --git a/lc3plus/plc_tdc_tdac.c b/lib_lc3plus/plc_tdc_tdac.c similarity index 100% rename from lc3plus/plc_tdc_tdac.c rename to lib_lc3plus/plc_tdc_tdac.c diff --git a/lc3plus/plc_update.c b/lib_lc3plus/plc_update.c similarity index 100% rename from lc3plus/plc_update.c rename to lib_lc3plus/plc_update.c diff --git a/lc3plus/quantize_spec.c b/lib_lc3plus/quantize_spec.c similarity index 100% rename from lc3plus/quantize_spec.c rename to lib_lc3plus/quantize_spec.c diff --git a/lc3plus/reorder_bitstream.c b/lib_lc3plus/reorder_bitstream.c similarity index 100% rename from lc3plus/reorder_bitstream.c rename to lib_lc3plus/reorder_bitstream.c diff --git a/lc3plus/resamp12k8.c b/lib_lc3plus/resamp12k8.c similarity index 100% rename from lc3plus/resamp12k8.c rename to lib_lc3plus/resamp12k8.c diff --git a/lc3plus/residual_coding.c b/lib_lc3plus/residual_coding.c similarity index 100% rename from lc3plus/residual_coding.c rename to lib_lc3plus/residual_coding.c diff --git a/lc3plus/residual_decoding.c b/lib_lc3plus/residual_decoding.c similarity index 100% rename from lc3plus/residual_decoding.c rename to lib_lc3plus/residual_decoding.c diff --git a/lc3plus/setup_com_lc3.c b/lib_lc3plus/setup_com_lc3.c similarity index 100% rename from lc3plus/setup_com_lc3.c rename to lib_lc3plus/setup_com_lc3.c diff --git a/lc3plus/setup_dec_lc3.c b/lib_lc3plus/setup_dec_lc3.c similarity index 100% rename from lc3plus/setup_dec_lc3.c rename to lib_lc3plus/setup_dec_lc3.c diff --git a/lc3plus/setup_dec_lc3.h b/lib_lc3plus/setup_dec_lc3.h similarity index 100% rename from lc3plus/setup_dec_lc3.h rename to lib_lc3plus/setup_dec_lc3.h diff --git a/lc3plus/setup_enc_lc3.c b/lib_lc3plus/setup_enc_lc3.c similarity index 100% rename from lc3plus/setup_enc_lc3.c rename to lib_lc3plus/setup_enc_lc3.c diff --git a/lc3plus/setup_enc_lc3.h b/lib_lc3plus/setup_enc_lc3.h similarity index 100% rename from lc3plus/setup_enc_lc3.h rename to lib_lc3plus/setup_enc_lc3.h diff --git a/lc3plus/sns_compute_scf.c b/lib_lc3plus/sns_compute_scf.c similarity index 100% rename from lc3plus/sns_compute_scf.c rename to lib_lc3plus/sns_compute_scf.c diff --git a/lc3plus/sns_interpolate_scf.c b/lib_lc3plus/sns_interpolate_scf.c similarity index 100% rename from lc3plus/sns_interpolate_scf.c rename to lib_lc3plus/sns_interpolate_scf.c diff --git a/lc3plus/sns_quantize_scf.c b/lib_lc3plus/sns_quantize_scf.c similarity index 100% rename from lc3plus/sns_quantize_scf.c rename to lib_lc3plus/sns_quantize_scf.c diff --git a/lc3plus/structs.h b/lib_lc3plus/structs.h similarity index 100% rename from lc3plus/structs.h rename to lib_lc3plus/structs.h diff --git a/lc3plus/tns_coder.c b/lib_lc3plus/tns_coder.c similarity index 100% rename from lc3plus/tns_coder.c rename to lib_lc3plus/tns_coder.c diff --git a/lc3plus/tns_decoder.c b/lib_lc3plus/tns_decoder.c similarity index 100% rename from lc3plus/tns_decoder.c rename to lib_lc3plus/tns_decoder.c diff --git a/lc3plus/util.h b/lib_lc3plus/util.h similarity index 100% rename from lc3plus/util.h rename to lib_lc3plus/util.h diff --git a/scripts/check-format.sh b/scripts/check-format.sh index 8ec2991cdae57eea5b9fae51bdf0ba892ae9d8cf..5d8336defefae8bb08370c25bd787d4aee569af3 100755 --- a/scripts/check-format.sh +++ b/scripts/check-format.sh @@ -160,7 +160,7 @@ fi if [ -z "$FILES" ]; then if [ $ALL ]; then - FILES=$(ls lib*/*.[c,h] apps/*.[c,h]) + FILES=$(ls lib_com/*.[c,h] lib_dec/*.[c,h] lib_enc/*.[c,h] lib_rend/*.[c,h] lib_util/*.[c,h] apps/*.[c,h]) elif [ -d ".svn" ]; then if [ ! -x "$(command -v svn)" ]; then echo "Subversion doesn't seem to be installed. Please ensure svn is in your PATH" diff --git a/scripts/lc3plus_lib_setup/get_lc3plus.sh b/scripts/lc3plus_lib_setup/get_lc3plus.sh index 01ad362b717228ef82a3410a99b37b473045c242..71b2a722ba76247d9bf1f7f19e7ce70fd94c874e 100755 --- a/scripts/lc3plus_lib_setup/get_lc3plus.sh +++ b/scripts/lc3plus_lib_setup/get_lc3plus.sh @@ -26,9 +26,12 @@ rm -r ETSI_Release/LC3plus_ETSI_src_va15eb59632b_20230228/src/floating_point/msv find ETSI_Release/LC3plus_ETSI_src_va15eb59632b_20230228/src/floating_point -type f -exec chmod -x {} \; # Move to output dir -rm -rf ../../lc3plus -mkdir ../../lc3plus -mv ETSI_Release/LC3plus_ETSI_src_va15eb59632b_20230228/src/floating_point/* ../../lc3plus +rm -rf ../../lib_lc3plus +mkdir ../../lib_lc3plus +mv ETSI_Release/LC3plus_ETSI_src_va15eb59632b_20230228/src/floating_point/* ../../lib_lc3plus + +# Create additional files +printf "DisableFormat: true\nSortIncludes: Never\n" > ../../lib_lc3plus/.clang-format # Clean up rm -rf lc3plus_sources.zip ETSI_Release diff --git a/scripts/makefile_noSR.patch b/scripts/makefile_noSR.patch index ccd70bac67256e069e5b954284780a74e0f9a16b..fe4b24dcb00005479400d0720e540d1392eb3393 100644 --- a/scripts/makefile_noSR.patch +++ b/scripts/makefile_noSR.patch @@ -4,7 +4,7 @@ SRC_LIBDEC = lib_dec SRC_LIBENC = lib_enc SRC_LIBREND = lib_rend --SRC_LC3PLUS = lc3plus lc3plus/fft +-SRC_LC3PLUS = lib_lc3plus lib_lc3plus/fft SRC_LIBUTIL = lib_util SRC_APP = apps BUILD = build diff --git a/scripts/prepare_delivery.sh b/scripts/prepare_delivery.sh index b925ac667782e0a5be8c36134ef8b08b074abb13..dd9634a0fbe0e150e531819bd61aae350a3cae3f 100755 --- a/scripts/prepare_delivery.sh +++ b/scripts/prepare_delivery.sh @@ -94,7 +94,7 @@ cp -R ${ROOT}/lib_dec $OUTDIR cp -R ${ROOT}/lib_enc $OUTDIR cp -R ${ROOT}/lib_util $OUTDIR cp -R ${ROOT}/lib_rend $OUTDIR -cp -R ${ROOT}/lc3plus $OUTDIR +cp -R ${ROOT}/lib_lc3plus $OUTDIR cp -R ${ROOT}/apps $OUTDIR mkdir $OUTDIR/lib_debug cp ${ROOT}/lib_debug/wmc_auto.[ch] $OUTDIR/lib_debug @@ -140,57 +140,8 @@ sed -i.bak -e "s/\/\*\ *\(#define\ *SPLIT_REND_WITH_HEAD_ROT\ *\)\*\//\1/g" ${OU if [ $STRIP_SPLITREND -ne 0 ]; then echo "Stripping Split Rendering" - - # remove complete lc3plus folder - rm -R $OUTDIR/lc3plus - # remove other split rendering files - declare -a sr_files_rend=( - "lib_rend/ivas_lcld_decoder.c" - "lib_rend/ivas_lcld_encoder.c" - "lib_rend/ivas_MSPred.c" - "lib_rend/ivas_NoiseGen.c" - "lib_rend/ivas_PerceptualModel.c" - "lib_rend/ivas_PredDecoder.c" - "lib_rend/ivas_PredEncoder.c" - "lib_rend/ivas_RMSEnvGrouping.c" - "lib_rend/ivas_cldfb_codec_bitstream.c" - "lib_rend/ivas_cldfb_codec_bitstream.h" - "lib_rend/ivas_lc3plus_common.c" - "lib_rend/ivas_lc3plus_common.h" - "lib_rend/ivas_lc3plus_dec.c" - "lib_rend/ivas_lc3plus_dec.h" - "lib_rend/ivas_lc3plus_enc.c" - "lib_rend/ivas_lc3plus_enc.h" - "lib_rend/ivas_lcld_rom_tables.c" - "lib_rend/ivas_lcld_rom_tables.h" - "lib_rend/ivas_splitRend_lcld_dec.c" - "lib_rend/ivas_splitRend_lcld_enc.c" - "lib_rend/ivas_splitRendererPLC.c" - "lib_rend/ivas_splitRendererPost.c" - "lib_rend/ivas_splitRendererPre.c" - "lib_rend/ivas_splitRenderer_utils.c" - ) - - for file in ${sr_files_rend[@]}; do - rm $OUTDIR/$file - file_windows=${file//\//'\\'} - sed -i.bak -e "/${file_windows}/d" ${OUTDIR}/Workspace_msvc/lib_rend.vcxproj - done - - declare -a sr_files_util=( - "lib_util/split_rend_bfi_file_reader.c" - "lib_util/split_rend_bfi_file_reader.h" - "lib_util/split_render_file_read_write.c" - "lib_util/split_render_file_read_write.h" - ) - - for file in ${sr_files_util[@]}; do - rm $OUTDIR/$file - file_windows=${file//\//'\\'} - sed -i.bak -e "/${file_windows}/d" ${OUTDIR}/Workspace_msvc/lib_util.vcxproj - done - + ${ROOT}/scripts/strip_split_rendering.sh ${OUTDIR} # strip macros declare -a sr_macros=( @@ -220,14 +171,6 @@ if [ $STRIP_SPLITREND -ne 0 ]; then # patch Makefile patch ${OUTDIR}/Makefile < ${ROOT}/scripts/makefile_noSR.patch - # delete project file - rm ${OUTDIR}/Workspace_msvc/LC3plus.vcxproj - - # patch project/solution files - sed -i.bak "/LC3plus.vcxproj/,+1d" ${OUTDIR}/Workspace_msvc/Workspace_msvc.sln - find ${OUTDIR}/Workspace_msvc -name "*.vcxproj" -exec sed -i.bak -e "s/..\\lc3plus\;//g" \{\} \; - sed -i.bak "/LC3plus.vcxproj/,+3d" ${OUTDIR}/Workspace_msvc/lib_rend.vcxproj # patch dependency - # delete readme_split_rendering rm ${OUTDIR}/readme_split_rendering.txt diff --git a/scripts/prepare_instrumentation.sh b/scripts/prepare_instrumentation.sh index 01807256bc27f093f8f1d94bc57da2f118d8eb93..bbf401dd4052ef75beafed5991b47eeecef649ba 100755 --- a/scripts/prepare_instrumentation.sh +++ b/scripts/prepare_instrumentation.sh @@ -81,7 +81,6 @@ mkdir $targetdir # copy files from source-dir cp -R ../lib_* $targetdir -cp -R ../lc3plus $targetdir cp -R ../apps $targetdir cp -R ../Makefile $targetdir cp -R ../CMakeLists.txt $targetdir @@ -128,7 +127,7 @@ find $targetdir -name "*.[ch]" -exec sed -i.bak -e "s/\(0x[0-9a-fA-F]*\)UL/\(\(u "tools/$system/wmc_tool" -m "$targetdir/apps/encoder.c" "$targetdir/lib_enc/*.c" "$targetdir/lib_com/*.c" >> /dev/null "tools/$system/wmc_tool" -m "$targetdir/apps/decoder.c" "$targetdir/lib_dec/*.c" "$targetdir/lib_rend/*.c" >> /dev/null if [ $INCLUDE_SPLIT -eq 1 ]; then - "tools/$system/wmc_tool" -m "$targetdir/apps/renderer.c" "$targetdir/lib_rend/*.c" "$targetdir/lc3plus/*.c" "$targetdir/lc3plus/fft/*.c" >> /dev/null + "tools/$system/wmc_tool" -m "$targetdir/apps/renderer.c" "$targetdir/lib_rend/*.c" "$targetdir/lib_lc3plus/*.c" "$targetdir/lib_lc3plus/fft/*.c" >> /dev/null fi # automatically enable #define WMOPS in options.h diff --git a/scripts/strip_split_rendering.py b/scripts/strip_split_rendering.py index 3f98db24198c7ae2ad228c20719e8c97f09df841..556e9553153a0a3e0346a2c1c2c893bae74152c2 100644 --- a/scripts/strip_split_rendering.py +++ b/scripts/strip_split_rendering.py @@ -30,6 +30,9 @@ # the United Nations Convention on Contracts on the International Sales of Goods. # +import os +import glob + # remove other split rendering files sr_files_rend=[ "lib_rend\\ivas_lcld_decoder.c", @@ -48,8 +51,8 @@ sr_files_rend=[ "lib_rend\\ivas_lc3plus_dec.h", "lib_rend\\ivas_lc3plus_enc.c", "lib_rend\\ivas_lc3plus_enc.h", - "lib_rend/ivas_lcld_rom_tables.c" - "lib_rend/ivas_lcld_rom_tables.h" + "lib_rend\\ivas_lcld_rom_tables.c" + "lib_rend\\ivas_lcld_rom_tables.h" "lib_rend\\ivas_splitRend_lcld_dec.c", "lib_rend\\ivas_splitRend_lcld_enc.c", "lib_rend\\ivas_splitRendererPLC.c", @@ -67,20 +70,55 @@ sr_files_util=[ if __name__ == "__main__": + wsfile = '.\Workspace_msvc\Workspace_msvc.sln' rendproj = '.\Workspace_msvc\lib_rend.vcxproj' utilproj = '.\Workspace_msvc\lib_util.vcxproj' + lc3proj = '.\Workspace_msvc\lib_lc3plus.vcxproj' + + # Remove lc3plus project + os.remove(lc3proj) + + # Patch Workspace_msvc.sln + with open(wsfile,'r') as f: + lines = f.readlines() + with open(wsfile,'w') as f: + skip = 0 + for line in lines: + if 'lib_lc3plus.vcxproj' in line: + skip = 1 + else: + if skip == 0: + f.write(line) + else: + skip = skip - 1 + # Patch lib_rend.vcxproj with open(rendproj,'r') as f: lines = f.readlines() with open(rendproj,'w') as f: + skip = 0 for line in lines: - if not any([x in line for x in sr_files_rend]): + if any([x in line for x in sr_files_rend]): + skip = 1 + if 'lib_lc3plus.vcxproj' in line: + skip = 4 + if skip == 0: f.write(line) - + else: + skip = skip - 1 + + # Patch lib_util.vcxproj with open(utilproj,'r') as f: lines = f.readlines() with open(utilproj,'w') as f: for line in lines: if not any([x in line for x in sr_files_util]): f.write(line) - \ No newline at end of file + + # Remove include libraries + for proj in glob.glob('.\Workspace_msvc\*.vcxproj'): + with open(proj,'r') as f: + lines = f.readlines() + with open(proj,'w') as f: + for line in lines: + f.write(line.replace("..\lib_lc3plus;","")) diff --git a/scripts/strip_split_rendering.sh b/scripts/strip_split_rendering.sh index 12d1d6b3a1b5f4f5e65857ac592e5b64f03a0d11..fb645c912f94de16c25105b317e396f41fbbb7ed 100755 --- a/scripts/strip_split_rendering.sh +++ b/scripts/strip_split_rendering.sh @@ -34,7 +34,7 @@ OUTDIR=$1 # remove complete lc3plus folder -rm -R $OUTDIR/lc3plus +rm -R $OUTDIR/lib_lc3plus # remove other split rendering files declare -a sr_files_rend=( @@ -81,4 +81,12 @@ for file in ${sr_files_util[@]}; do rm $OUTDIR/$file file_windows=${file//\//'\\'} sed -i.bak -e "/${file_windows}/d" ${OUTDIR}/Workspace_msvc/lib_util.vcxproj -done \ No newline at end of file +done + +# delete project file +rm ${OUTDIR}/Workspace_msvc/lib_lc3plus.vcxproj + +# patch project/solution files +sed -i.bak "/lib_lc3plus.vcxproj/,+1d" ${OUTDIR}/Workspace_msvc/Workspace_msvc.sln +find ${OUTDIR}/Workspace_msvc -name "*.vcxproj" -exec sed -i.bak -e "s/..\\lib_lc3plus\;//g" \{\} \; +sed -i.bak "/lib_lc3plus.vcxproj/,+3d" ${OUTDIR}/Workspace_msvc/lib_rend.vcxproj # patch dependency \ No newline at end of file