diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index a0f4a776ec668d7155bc91d9079eda6b48602aa9..0000000000000000000000000000000000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,37 +0,0 @@ -image: Visual Studio 2015 -configuration: -- Debug -- DebugDLL -- DebugDLL_fixed -- Release -- ReleaseDLL -- ReleaseDLL_fixed - -platform: -- Win32 -- x64 - -environment: - api_key: - secure: kR3Ac0NjGwFnTmXdFrR8d6VXjdk5F7L4F/BilC4nvaM= - -build: - project: win32\VS2015\opus.sln - parallel: true - verbosity: minimal - -after_build: -- cd %APPVEYOR_BUILD_FOLDER% -- 7z a opus.zip win32\VS2015\%PLATFORM%\%CONFIGURATION%\opus.??? include\*.h - -test_script: -- cd %APPVEYOR_BUILD_FOLDER%\win32\VS2015\%PLATFORM%\%CONFIGURATION% -- test_opus_api.exe -- test_opus_decode.exe -- test_opus_encode.exe - -artifacts: -- path: opus.zip - -on_success: -- ps: if ($env:api_key -and "$env:configuration/$env:platform" -eq "ReleaseDLL_fixed/x64") { Start-AppveyorBuild -ApiKey $env:api_key -ProjectSlug 'opus-tools' } diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 649c810055f8fe0647ca4ac60852fa8af376b8ab..0000000000000000000000000000000000000000 --- a/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -.gitignore export-ignore -.gitattributes export-ignore - -update_version export-ignore - -*.bat eol=crlf -*.sln eol=crlf -*.vcxproj eol=crlf -*.vcxproj.filters eol=crlf -common.props eol=crlf diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 31e290143c65acc4d55e83ee6c2c513870191370..0000000000000000000000000000000000000000 --- a/.gitignore +++ /dev/null @@ -1,89 +0,0 @@ -Doxyfile -Makefile -Makefile.in -TAGS -aclocal.m4 -autom4te.cache -*.kdevelop.pcs -*.kdevses -compile -config.guess -config.h -config.h.in -config.log -config.status -config.sub -configure -depcomp -INSTALL -install-sh -.deps -.libs -.dirstamp -*.a -*.exe -*.la -*-gnu.S -testcelt -libtool -ltmain.sh -missing -m4/libtool.m4 -m4/ltoptions.m4 -m4/ltsugar.m4 -m4/ltversion.m4 -m4/lt~obsolete.m4 -opus_compare -opus_demo -repacketizer_demo -stamp-h1 -test-driver -*.sw* -*.o -*.lo -*.pc -*.tar.gz -*~ -tests/*test -tests/test_opus_api -tests/test_opus_decode -tests/test_opus_encode -tests/test_opus_padding -tests/test_opus_projection -celt/arm/armopts.s -celt/dump_modes/dump_modes -celt/tests/test_unit_cwrs32 -celt/tests/test_unit_dft -celt/tests/test_unit_entropy -celt/tests/test_unit_laplace -celt/tests/test_unit_mathops -celt/tests/test_unit_mdct -celt/tests/test_unit_rotation -celt/tests/test_unit_types -doc/doxygen_sqlite3.db -doc/doxygen-build.stamp -doc/html -doc/latex -doc/man -package_version -version.h -celt/Debug -celt/Release -celt/x64 -silk/Debug -silk/Release -silk/x64 -silk/fixed/Debug -silk/fixed/Release -silk/fixed/x64 -silk/float/Debug -silk/float/Release -silk/float/x64 -silk/tests/test_unit_LPC_inv_pred_gain -src/Debug -src/Release -src/x64 -/*[Bb]uild*/ -.vs/ -.vscode/ -CMakeSettings.json diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 821c813ec8cff44312cb8cfca912311828dfef36..0000000000000000000000000000000000000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: c - -compiler: - - gcc - - clang - -os: - - linux - - osx - -env: - - CONFIG="" - - CONFIG="--enable-assertions" - - CONFIG="--enable-fixed-point" - - CONFIG="--enable-fixed-point --disable-float-api" - - CONFIG="--enable-fixed-point --enable-assertions" - -script: - - ./autogen.sh - - ./configure $CONFIG - - make distcheck diff --git a/BUILD.generated.gni b/BUILD.generated.gni new file mode 100644 index 0000000000000000000000000000000000000000..0fb2fe4970b03d50a96d950c075e73f660bdf767 --- /dev/null +++ b/BUILD.generated.gni @@ -0,0 +1,246 @@ +# Copyright (c) 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is created by generate_build_files.py. Do not edit manually. + +OPUS_SOURCES = [ + "src/opus.c", + "src/opus_decoder.c", + "src/opus_encoder.c", + "src/opus_multistream.c", + "src/opus_multistream_encoder.c", + "src/opus_multistream_decoder.c", + "src/repacketizer.c", + "src/opus_projection_encoder.c", + "src/opus_projection_decoder.c", + "src/mapping_matrix.c", +] + +OPUS_SOURCES_FLOAT = [ + "src/analysis.c", + "src/mlp.c", + "src/mlp_data.c", +] + +SILK_SOURCES = [ + "silk/CNG.c", + "silk/code_signs.c", + "silk/init_decoder.c", + "silk/decode_core.c", + "silk/decode_frame.c", + "silk/decode_parameters.c", + "silk/decode_indices.c", + "silk/decode_pulses.c", + "silk/decoder_set_fs.c", + "silk/dec_API.c", + "silk/enc_API.c", + "silk/encode_indices.c", + "silk/encode_pulses.c", + "silk/gain_quant.c", + "silk/interpolate.c", + "silk/LP_variable_cutoff.c", + "silk/NLSF_decode.c", + "silk/NSQ.c", + "silk/NSQ_del_dec.c", + "silk/PLC.c", + "silk/shell_coder.c", + "silk/tables_gain.c", + "silk/tables_LTP.c", + "silk/tables_NLSF_CB_NB_MB.c", + "silk/tables_NLSF_CB_WB.c", + "silk/tables_other.c", + "silk/tables_pitch_lag.c", + "silk/tables_pulses_per_block.c", + "silk/VAD.c", + "silk/control_audio_bandwidth.c", + "silk/quant_LTP_gains.c", + "silk/VQ_WMat_EC.c", + "silk/HP_variable_cutoff.c", + "silk/NLSF_encode.c", + "silk/NLSF_VQ.c", + "silk/NLSF_unpack.c", + "silk/NLSF_del_dec_quant.c", + "silk/process_NLSFs.c", + "silk/stereo_LR_to_MS.c", + "silk/stereo_MS_to_LR.c", + "silk/check_control_input.c", + "silk/control_SNR.c", + "silk/init_encoder.c", + "silk/control_codec.c", + "silk/A2NLSF.c", + "silk/ana_filt_bank_1.c", + "silk/biquad_alt.c", + "silk/bwexpander_32.c", + "silk/bwexpander.c", + "silk/debug.c", + "silk/decode_pitch.c", + "silk/inner_prod_aligned.c", + "silk/lin2log.c", + "silk/log2lin.c", + "silk/LPC_analysis_filter.c", + "silk/LPC_inv_pred_gain.c", + "silk/table_LSF_cos.c", + "silk/NLSF2A.c", + "silk/NLSF_stabilize.c", + "silk/NLSF_VQ_weights_laroia.c", + "silk/pitch_est_tables.c", + "silk/resampler.c", + "silk/resampler_down2_3.c", + "silk/resampler_down2.c", + "silk/resampler_private_AR2.c", + "silk/resampler_private_down_FIR.c", + "silk/resampler_private_IIR_FIR.c", + "silk/resampler_private_up2_HQ.c", + "silk/resampler_rom.c", + "silk/sigm_Q15.c", + "silk/sort.c", + "silk/sum_sqr_shift.c", + "silk/stereo_decode_pred.c", + "silk/stereo_encode_pred.c", + "silk/stereo_find_predictor.c", + "silk/stereo_quant_pred.c", + "silk/LPC_fit.c", +] + +SILK_SOURCES_SSE4_1 = [ + "silk/x86/NSQ_sse4_1.c", + "silk/x86/NSQ_del_dec_sse4_1.c", + "silk/x86/x86_silk_map.c", + "silk/x86/VAD_sse4_1.c", + "silk/x86/VQ_WMat_EC_sse4_1.c", +] + +SILK_SOURCES_ARM_NEON_INTR = [ + "silk/arm/arm_silk_map.c", + "silk/arm/biquad_alt_neon_intr.c", + "silk/arm/LPC_inv_pred_gain_neon_intr.c", + "silk/arm/NSQ_del_dec_neon_intr.c", + "silk/arm/NSQ_neon.c", +] + +SILK_SOURCES_FIXED = [ + "silk/fixed/LTP_analysis_filter_FIX.c", + "silk/fixed/LTP_scale_ctrl_FIX.c", + "silk/fixed/corrMatrix_FIX.c", + "silk/fixed/encode_frame_FIX.c", + "silk/fixed/find_LPC_FIX.c", + "silk/fixed/find_LTP_FIX.c", + "silk/fixed/find_pitch_lags_FIX.c", + "silk/fixed/find_pred_coefs_FIX.c", + "silk/fixed/noise_shape_analysis_FIX.c", + "silk/fixed/process_gains_FIX.c", + "silk/fixed/regularize_correlations_FIX.c", + "silk/fixed/residual_energy16_FIX.c", + "silk/fixed/residual_energy_FIX.c", + "silk/fixed/warped_autocorrelation_FIX.c", + "silk/fixed/apply_sine_window_FIX.c", + "silk/fixed/autocorr_FIX.c", + "silk/fixed/burg_modified_FIX.c", + "silk/fixed/k2a_FIX.c", + "silk/fixed/k2a_Q16_FIX.c", + "silk/fixed/pitch_analysis_core_FIX.c", + "silk/fixed/vector_ops_FIX.c", + "silk/fixed/schur64_FIX.c", + "silk/fixed/schur_FIX.c", +] + +SILK_SOURCES_FIXED_SSE4_1 = [ + "silk/fixed/x86/vector_ops_FIX_sse4_1.c", + "silk/fixed/x86/burg_modified_FIX_sse4_1.c", +] + +SILK_SOURCES_FIXED_ARM_NEON_INTR = [ + "silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c" +] + +SILK_SOURCES_FLOAT = [ + "silk/float/apply_sine_window_FLP.c", + "silk/float/corrMatrix_FLP.c", + "silk/float/encode_frame_FLP.c", + "silk/float/find_LPC_FLP.c", + "silk/float/find_LTP_FLP.c", + "silk/float/find_pitch_lags_FLP.c", + "silk/float/find_pred_coefs_FLP.c", + "silk/float/LPC_analysis_filter_FLP.c", + "silk/float/LTP_analysis_filter_FLP.c", + "silk/float/LTP_scale_ctrl_FLP.c", + "silk/float/noise_shape_analysis_FLP.c", + "silk/float/process_gains_FLP.c", + "silk/float/regularize_correlations_FLP.c", + "silk/float/residual_energy_FLP.c", + "silk/float/warped_autocorrelation_FLP.c", + "silk/float/wrappers_FLP.c", + "silk/float/autocorrelation_FLP.c", + "silk/float/burg_modified_FLP.c", + "silk/float/bwexpander_FLP.c", + "silk/float/energy_FLP.c", + "silk/float/inner_product_FLP.c", + "silk/float/k2a_FLP.c", + "silk/float/LPC_inv_pred_gain_FLP.c", + "silk/float/pitch_analysis_core_FLP.c", + "silk/float/scale_copy_vector_FLP.c", + "silk/float/scale_vector_FLP.c", + "silk/float/schur_FLP.c", + "silk/float/sort_FLP.c", +] + +CELT_SOURCES = [ + "celt/bands.c", + "celt/celt.c", + "celt/celt_encoder.c", + "celt/celt_decoder.c", + "celt/cwrs.c", + "celt/entcode.c", + "celt/entdec.c", + "celt/entenc.c", + "celt/kiss_fft.c", + "celt/laplace.c", + "celt/mathops.c", + "celt/mdct.c", + "celt/modes.c", + "celt/pitch.c", + "celt/celt_lpc.c", + "celt/quant_bands.c", + "celt/rate.c", + "celt/vq.c", +] + +CELT_SOURCES_SSE = [ + "celt/x86/x86cpu.c", + "celt/x86/x86_celt_map.c", + "celt/x86/pitch_sse.c", +] + +CELT_SOURCES_SSE2 = [ + "celt/x86/pitch_sse2.c", + "celt/x86/vq_sse2.c", +] + +CELT_SOURCES_SSE4_1 = [ + "celt/x86/celt_lpc_sse4_1.c", + "celt/x86/pitch_sse4_1.c", +] + +CELT_SOURCES_ARM = [ + "celt/arm/armcpu.c", + "celt/arm/arm_celt_map.c", +] + +CELT_SOURCES_ARM_ASM = [ + "celt/arm/celt_pitch_xcorr_arm.s", +] + +CELT_AM_SOURCES_ARM_ASM = [ + "celt/arm/armopts.s.in", +] + +CELT_SOURCES_ARM_NEON_INTR = [ + "celt/arm/celt_neon_intr.c", + "celt/arm/pitch_neon_intr.c", +] + +CELT_SOURCES_ARM_NE10 = [ + "celt/arm/celt_fft_ne10.c", + "celt/arm/celt_mdct_ne10.c", +] diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..5563cd9ac7305ac1c33cb18b5488eff06d491cfa --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,211 @@ +# Copyright (C) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//developtools/profiler/build/config.gni") +import("BUILD.generated.gni") + +posix_copts = [ + # Assembler option --noexecstack adds .note.GNU-stack to each object to + # ensure that binaries can be built with non-executable stack. + "-Wa,--noexecstack", + + # This is needed on Linux systems (at least) to get rwlock in pthread. + "-D_XOPEN_SOURCE=700", + + # This list of warnings should match those in the top-level CMakeLists.txt. + "-Wall", + "-Werror", + "-Wformat=2", + "-Wsign-compare", + "-Wmissing-field-initializers", + "-Wwrite-strings", + "-Wshadow", + "-fno-common", + + # Modern build environments should be able to set this to use atomic + # operations for reference counting rather than locks. However, it's + # known not to work on some Android builds. + # "-DOPENSSL_C11_ATOMIC", +] + +config("opus_config"){ + defines = [ + "HAVE_LRINTF=1", + "VAR_ARRAYS=1", + "OPUS_BUILD=1", + ] + cflags_c = posix_copts + include_dirs = [ + "//third_party/opus/", + "//third_party/opus/include/", + "//third_party/opus/celt/", + "//third_party/opus/celt/x86/", + "//third_party/opus/celt/arm/", + "//third_party/opus/silk/", + "//third_party/opus/silk/float", + "//third_party/opus/silk/fixed", + ] +} + +ohos_static_library("libopus") { + sources = OPUS_SOURCES + sources += OPUS_SOURCES_FLOAT + sources += SILK_SOURCES + sources += SILK_SOURCES_FLOAT + sources += CELT_SOURCES + configs = [":opus_config",] + subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" + part_name = "${OHOS_PROFILER_PART_NAME}" +} + +ohos_executable("opus_compare"){ + sources = ["./src/opus_compare.c"] +} +ohos_executable("opus_demo"){ + sources = ["./src/opus_demo.c"] + deps = [":libopus"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("repacketizer_demo"){ + sources = ["./src/repacketizer_demo.c"] + deps = [":libopus"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("test_unit_LPC_inv_pred_gain"){ + sources = ["./silk/tests/test_unit_LPC_inv_pred_gain.c"] + sources += SILK_SOURCES + sources += SILK_SOURCES_FLOAT + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("test_unit_cwrs32"){ + sources = ["./celt/tests/test_unit_cwrs32.c"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("test_unit_dft"){ + sources = ["./celt/tests/test_unit_dft.c"] + sources += CELT_SOURCES + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("celt/tests/test_unit_entropy"){ + sources = ["./celt/tests/test_unit_entropy.c"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("celt/tests/test_unit_laplace"){ + sources = ["./celt/tests/test_unit_laplace.c"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("celt/tests/test_unit_mathops"){ + sources = ["./celt/tests/test_unit_mathops.c"] + sources += CELT_SOURCES + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("celt/tests/test_unit_mdct"){ + sources = ["./celt/tests/test_unit_mdct.c"] + sources += CELT_SOURCES + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("celt/tests/test_unit_rotation"){ + sources = ["./celt/tests/test_unit_rotation.c"] + sources += CELT_SOURCES + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("celt/tests/test_unit_types"){ + sources = ["./celt/tests/test_unit_types.c"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("tests/test_opus_api"){ + sources = ["./tests/test_opus_api.c"] + deps = [":libopus"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("tests/test_opus_decode"){ + sources = ["./tests/test_opus_decode.c"] + deps = [":libopus"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("tests/test_opus_encode"){ + sources = ["./tests/test_opus_encode.c", + "./tests/opus_encode_regressions.c", + ] + deps = [":libopus"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("tests/test_opus_padding"){ + sources = ["./tests/test_opus_padding.c"] + deps = [":libopus"] + libs = [ "m" ] + configs = [":opus_config",] +} + +ohos_executable("tests/test_opus_projection"){ + sources = ["./tests/test_opus_projection.c"] + sources += OPUS_SOURCES + sources += OPUS_SOURCES_FLOAT + sources += SILK_SOURCES + sources += SILK_SOURCES_FLOAT + sources += CELT_SOURCES + libs = [ "m" ] + configs = [":opus_config",] +} + +group("opus_targets"){ +deps = [ + ":libopus", + ":opus_compare", + ":opus_demo", + ":repacketizer_demo", + ":test_unit_LPC_inv_pred_gain", + ":test_unit_cwrs32", + ":test_unit_dft", + ":celt/tests/test_unit_entropy", + ":celt/tests/test_unit_laplace", + ":celt/tests/test_unit_mathops", + ":celt/tests/test_unit_mdct", + ":celt/tests/test_unit_rotation", + ":celt/tests/test_unit_types", + ":tests/test_opus_api", + ":tests/test_opus_decode", + ":tests/test_opus_encode", + ":tests/test_opus_padding", + ":tests/test_opus_projection", + ] +} \ No newline at end of file diff --git a/README.OpenSource b/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..daf856d763234fb35e42eeaf2c015ed4330c6bef --- /dev/null +++ b/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "Opus", + "License": "BSD License", + "License File": " LICENSE_PLEASE_READ.txt", + "Version Number": "master", + "Owner" : "xiph" + "Upstream URL": "https://github.com/xiph/opus", + "Description": "Modern audio compression for the internet." + } +] \ No newline at end of file diff --git a/README.draft b/README.draft deleted file mode 100644 index 8d8e24df22ff84a6d1a2b9ae669187fb287a324b..0000000000000000000000000000000000000000 --- a/README.draft +++ /dev/null @@ -1,54 +0,0 @@ -To build this source code, simply type: - -% make - -If this does not work, or if you want to change the default configuration -(e.g., to compile for a fixed-point architecture), simply edit the options -in the Makefile. - -An up-to-date implementation conforming to this standard is available in a -Git repository at https://git.xiph.org/opus.git or on a website at: -https://opus-codec.org/ -However, although that implementation is expected to remain conformant -with the standard, it is the code in this RFC that shall remain normative. -To build from the git repository instead of using this RFC, follow these -steps: - -1) Clone the repository (latest implementation of this standard at the time -of publication) - -% git clone https://git.xiph.org/opus.git -% cd opus - -2) Compile - -% ./autogen.sh -% ./configure -% make - -Once you have compiled the codec, there will be a opus_demo executable in -the top directory. - -Usage: opus_demo [-e] - [options] - opus_demo -d [options] - - -mode: voip | audio | restricted-lowdelay -options: --e : only runs the encoder (output the bit-stream) --d : only runs the decoder (reads the bit-stream as input) --cbr : enable constant bitrate; default: variable bitrate --cvbr : enable constrained variable bitrate; default: unconstrained --bandwidth : audio bandwidth (from narrowband to fullband); - default: sampling rate --framesize <2.5|5|10|20|40|60> : frame size in ms; default: 20 --max_payload : maximum payload size in bytes, default: 1024 --complexity : complexity, 0 (lowest) ... 10 (highest); default: 10 --inbandfec : enable SILK inband FEC --forcemono : force mono encoding, even for stereo input --dtx : enable SILK DTX --loss : simulate packet loss, in percent (0-100); default: 0 - -input and output are little endian signed 16-bit PCM files or opus bitstreams -with simple opus_demo proprietary framing. diff --git a/Readme_for_ohos.md b/Readme_for_ohos.md new file mode 100644 index 0000000000000000000000000000000000000000..3cdbe354b973d2a4bc55717f9409f374b32c6422 --- /dev/null +++ b/Readme_for_ohos.md @@ -0,0 +1,70 @@ +# Opus + +本项目主要是对原opus库进行ohos版本的编译适配,使其能够在ohos版本上正常使用,不对其原有逻辑进行修改。原项目链接可参考https://github.com/xiph/opus + +### 项目介绍 + +- 项目名称:opus +- 所属系列:C++库的ohos适配 +- 功能:开放的有损声音编码格式 +- 项目适配状态:完成 +- 调用差异:无 +- 项目作者和维护人:hihope +- 联系方式:hihope@hoperun.com +- 参考项目地址:https://github.com/xiph/opus +- 原项目版本:master +- 编程语言:C++ + +### 编译方式 + +准备一套完整的openharmony 3.1beta代码 + +1. 库代码存放路径:./third_party/opus + +2. 修改添加依赖的编译脚本 + + 在/developtools/bytrace_standard/ohos.build文件中添加修改 "//third_party/opus:opus_targets", + + ``` + { + "subsystem": "developtools", + "parts": { + "bytrace_standard": { + "module_list": [ + "//developtools/bytrace_standard/interfaces/innerkits/native:bytrace_core", + "//developtools/bytrace_standard/bin:bytrace_target", + "//developtools/bytrace_standard/bin:bytrace.cfg", + "//developtools/bytrace_standard/interfaces/kits/js/napi:bytrace", + "//third_party/opus:opus_targets", + ], + "inner_kits": [ + { + "type": "so", + "name": "//developtools/bytrace_standard/interfaces/innerkits/native:bytrace_core", + "header": { + "header_files": [ + "bytrace.h" + ], + "header_base": "//developtools/bytrace_standard/interfaces/innerkits/native/include" + } + } + ], + "test_list": [ + "//developtools/bytrace_standard/bin/test:unittest" + ] + } + } + } + ``` + + + +3. 用命令 ./build.sh --product-name rk3568 --ccache 编译 + +4. 生成库文件路径: + + out/rk3568/common/common + + 该路径会生成库文件和一些可执行测试文件 + + \ No newline at end of file diff --git a/config.h b/config.h new file mode 100644 index 0000000000000000000000000000000000000000..9da1360ee58e16a530f2a3dea2e62f9276a58e61 --- /dev/null +++ b/config.h @@ -0,0 +1,223 @@ +/* + * Copyright (C) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Get CPU Info by asm method */ +#define CPU_INFO_BY_ASM 1 + +/* Get CPU Info by c method */ +/* #undef CPU_INFO_BY_C */ + +/* Custom modes */ +/* #undef CUSTOM_MODES */ + +/* Do not build the float API */ +/* #undef DISABLE_FLOAT_API */ + +/* Disable bitstream fixes from RFC 8251 */ +/* #undef DISABLE_UPDATE_DRAFT */ + +/* Assertions */ +/* #undef ENABLE_ASSERTIONS */ + +/* Hardening */ +#define ENABLE_HARDENING 1 + +/* Debug fixed-point implementation */ +/* #undef FIXED_DEBUG */ + +/* Compile as fixed-point (for machines without a fast enough FPU) */ +/* #undef FIXED_POINT */ + +/* Float approximations */ +/* #undef FLOAT_APPROX */ + +/* Fuzzing */ +/* #undef FUZZING */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALLOCA_H */ + +/* NE10 library is installed on host. Make sure it is on target! */ +/* #undef HAVE_ARM_NE10 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `lrint' function. */ +#define HAVE_LRINT 1 + +/* Define to 1 if you have the `lrintf' function. */ +#define HAVE_LRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `__malloc_hook' function. */ +#define HAVE___MALLOC_HOOK 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Make use of ARM asm optimization */ +/* #undef OPUS_ARM_ASM */ + +/* Use generic ARMv4 inline asm optimizations */ +/* #undef OPUS_ARM_INLINE_ASM */ + +/* Use ARMv5E inline asm optimizations */ +/* #undef OPUS_ARM_INLINE_EDSP */ + +/* Use ARMv6 inline asm optimizations */ +/* #undef OPUS_ARM_INLINE_MEDIA */ + +/* Use ARM NEON inline asm optimizations */ +/* #undef OPUS_ARM_INLINE_NEON */ + +/* Define if assembler supports EDSP instructions */ +/* #undef OPUS_ARM_MAY_HAVE_EDSP */ + +/* Define if assembler supports ARMv6 media instructions */ +/* #undef OPUS_ARM_MAY_HAVE_MEDIA */ + +/* Define if compiler supports NEON instructions */ +/* #undef OPUS_ARM_MAY_HAVE_NEON */ + +/* Compiler supports ARMv7/Aarch64 Neon Intrinsics */ +/* #undef OPUS_ARM_MAY_HAVE_NEON_INTR */ + +/* Define if binary requires Aarch64 Neon Intrinsics */ +/* #undef OPUS_ARM_PRESUME_AARCH64_NEON_INTR */ + +/* Define if binary requires EDSP instruction support */ +/* #undef OPUS_ARM_PRESUME_EDSP */ + +/* Define if binary requires ARMv6 media instruction support */ +/* #undef OPUS_ARM_PRESUME_MEDIA */ + +/* Define if binary requires NEON instruction support */ +/* #undef OPUS_ARM_PRESUME_NEON */ + +/* Define if binary requires NEON intrinsics support */ +/* #undef OPUS_ARM_PRESUME_NEON_INTR */ + +/* This is a build of OPUS */ +#define OPUS_BUILD /**/ + +/* Run bit-exactness checks between optimized and c implementations */ +/* #undef OPUS_CHECK_ASM */ + +/* Use run-time CPU capabilities detection */ +#define OPUS_HAVE_RTCD 1 + +/* Compiler supports X86 AVX Intrinsics */ +#define OPUS_X86_MAY_HAVE_AVX 1 + +/* Compiler supports X86 SSE Intrinsics */ +#define OPUS_X86_MAY_HAVE_SSE 1 + +/* Compiler supports X86 SSE2 Intrinsics */ +#define OPUS_X86_MAY_HAVE_SSE2 1 + +/* Compiler supports X86 SSE4.1 Intrinsics */ +#define OPUS_X86_MAY_HAVE_SSE4_1 1 + +/* Define if binary requires AVX intrinsics support */ +/* #undef OPUS_X86_PRESUME_AVX */ + +/* Define if binary requires SSE intrinsics support */ +#define OPUS_X86_PRESUME_SSE 1 + +/* Define if binary requires SSE2 intrinsics support */ +#define OPUS_X86_PRESUME_SSE2 1 + +/* Define if binary requires SSE4.1 intrinsics support */ +/* #undef OPUS_X86_PRESUME_SSE4_1 */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "opus@xiph.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "opus" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "opus unknown" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "opus" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "unknown" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Make use of alloca */ +/* #undef USE_ALLOCA */ + +/* Use C99 variable-size arrays */ +#define VAR_ARRAYS 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict __restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif diff --git a/releases.sha2 b/releases.sha2 deleted file mode 100644 index dc0a6fce4ebdb157c97eadd1cda2a9003c903990..0000000000000000000000000000000000000000 --- a/releases.sha2 +++ /dev/null @@ -1,78 +0,0 @@ -b2f75c4ac5ab837845eb028413fae2a28754bfb0a6d76416e2af1441ef447649 opus-0.9.0.tar.gz -4e379a98ba95bbbfe9087ef10fdd05c8ac9060b6d695f587ea82a7b43a0df4fe opus-0.9.10.tar.gz -b1cad6846a8f819a141009fe3f8f10c946e8eff7e9c2339cd517bb136cc59eae opus-0.9.14.tar.gz -206221afc47b87496588013bd4523e1e9f556336c0813f4372773fc536dd4293 opus-0.9.1.tar.gz -6e85c1b57e1d7b7dfe2928bf92586b96b73a9067e054ede45bd8e6d24bd30582 opus-0.9.2.tar.gz -d916e34c18a396eb7dffc47af754f441af52a290b761e20db9aedb65928c699e opus-0.9.3.tar.gz -53801066fa97329768e7b871fd1495740269ec46802e1c9051aa7e78c6edee5b opus-0.9.5.tar.gz -3bfaeb25f4b4a625a0bc994d6fc6f6776a05193f60099e0a99f7530c6b256309 opus-0.9.6.tar.gz -1b69772c31c5cbaa43d1dfa5b1c495fc29712e8e0ff69d6f8ad46459e5c6715f opus-0.9.7.tar.gz -4aa30d2e0652ffb4a7a22cc8a29c4ce78267626f560a2d9213b1d2d4e618cf36 opus-0.9.8.tar.gz -2f62359f09151fa3b242040dc9b4c5b6bda15557c5daea59c8420f1a2ff328b7 opus-0.9.9.tar.gz -43bcea51afa531f32a6a5fdd9cba4bd496993e26a141217db3cccce6caa7cd74 opus-1.0.0-rc.tar.gz -9250fcc74472d45c1e14745542ec9c8d09982538aefed56962495614be3e0d2d opus-1.0.0.tar.gz -76bc0a31502a51dae9ab737b4db043b9ecfcd0b5861f0bfda41b662bd5b92227 opus-1.0.1-rc2.tar.gz -3de8d6809dac38971ebb305532d4ea532519d3bed08985f25d6c557f9ce5e8ff opus-1.0.1-rc3.tar.gz -8044397a6365a07117b08cbe8f9818bf7c93746908806ba74a2917187bbdda5f opus-1.0.1-rc.tar.gz -80fa5c3caf2ac0fd68f8a22cce1564fc46b368c773a17554887d0066fe1841ef opus-1.0.1.tar.gz -da615edbee5d019c1833071d69a4782c19f178cf9ca1401375036ecef25cd78a opus-1.0.2.tar.gz -191a089c92dbc403de6980463dd3604b65beb12d283c607e246c8076363cb49c opus-1.0.3.tar.gz -a8d40efe87f6c3e76725391457d46277878c7a816ae1642843261463133fa5c8 opus-1.1-alpha.tar.gz -ec1784287f385aef994b64734aaecae04860e61aa50fc6eef6643fa7e40dd193 opus-1.1-beta.tar.gz -8aa16360f59a94d3e38f38f28d24039f7663179682cbae82aa42f1dd9e52e6ed opus-1.1-rc.tar.gz -ebc87a086d4fe677c5e42d56888b1fd25af858e4179eae4f8656270410dffac3 opus-1.1-rc2.tar.gz -cbfd09c58cc10a4d3fcb727ad5d46d7bb549f8185ac922ee28b4581b52a7bee9 opus-1.1-rc3.tar.gz -b9727015a58affcf3db527322bf8c4d2fcf39f5f6b8f15dbceca20206cbe1d95 opus-1.1.tar.gz -0c668639dcd16b14709fc9dc49e6686606f5a256f2eaa1ebaa2f39a66f8626cd opus-1.1.1-beta.tar.gz -66f2a5877c8803dc9a5a44b4f3d0bdc8f06bd066324222d144eb255612b68152 opus-1.1.1-rc.tar.gz -9b84ff56bd7720d5554103c557664efac2b8b18acc4bbcc234cb881ab9a3371e opus-1.1.1.tar.gz -0e290078e31211baa7b5886bcc8ab6bc048b9fc83882532da4a1a45e58e907fd opus-1.1.2.tar.gz -58b6fe802e7e30182e95d0cde890c0ace40b6f125cffc50635f0ad2eef69b633 opus-1.1.3.tar.gz -9122b6b380081dd2665189f97bfd777f04f92dc3ab6698eea1dbb27ad59d8692 opus-1.1.4.tar.gz -eb84981ca0f40a3e5d5e58d2e8582cb2fee05a022825a6dfe14d14b04eb563e4 opus-1.1.5.tar.gz -654a9bebb73266271a28edcfff431e4cfd9bfcde71f42849a0cdd73bece803a7 opus-1.2-alpha.tar.gz -c0e90507259cf21ce7b2c82fb9ac55367d8543dae91cc3d4d2c59afd37f44023 opus-1.2-alpha2.tar.gz -291e979a8a2fb679ed35a5dff5d761a9d9a5e22586fd07934ed94461e2636c7a opus-1.2-beta.tar.gz -85343fdaed96529d94c1e1f3a210fa51240d04ca62fa01e97ef02f88020c2ce9 opus-1.2-rc1.tar.gz -77db45a87b51578fbc49555ef1b10926179861d854eb2613207dc79d9ec0a9a9 opus-1.2.tar.gz -cfafd339ccd9c5ef8d6ab15d7e1a412c054bf4cb4ecbbbcc78c12ef2def70732 opus-1.2.1.tar.gz -7f56e058c9549d03ae35511ad9e16ef6d1eb257836830d54abff0f495f17e187 opus-1.3-beta.tar.gz -96fa28598e8ccd558b297277ad59a045c551ba0e06d65a9675938e084f837669 opus-1.3-rc.tar.gz -f6bab321fb81db984766f1e4d340a9e71a5ca2c5d4d53f4ee072e84afda271ca opus-1.3-rc2.tar.gz -4f3d69aefdf2dbaf9825408e452a8a414ffc60494c70633560700398820dc550 opus-1.3.tar.gz -94ac78ca4f74c4e43bc9fe4ec1ad0aa36f38ab90f45b0727c40dd1e96096e767 opus_testvectors-draft11.tar.gz -94ac78ca4f74c4e43bc9fe4ec1ad0aa36f38ab90f45b0727c40dd1e96096e767 opus_testvectors.tar.gz -6b26a22f9ba87b2b836906a9bb7afec5f8e54d49553b1200382520ee6fedfa55 opus_testvectors-rfc8251.tar.gz -5d2b99757bcb628bab2611f3ed27af6f35276ce3abc96c0ed4399d6c6463dda5 opus-tools-0.1.2.tar.gz -008317297d6ce84f84992abf8cc948a048a4fa135e1d1caf429fafde8965a792 opus-tools-0.1.3.tar.gz -de80485c5afa1fd83c0e16a0dd4860470c872997a7dd0a58e99b2ee8a93e5168 opus-tools-0.1.4.tar.gz -76678d0eb7a9b3d793bd0243f9ced9ab0ecdab263f5232ed940c8f5795fb0405 opus-tools-0.1.5.tar.gz -cc86dbc2a4d76da7e1ed9afee85448c8f798c465a5412233f178783220f3a2c1 opus-tools-0.1.6.tar.gz -e0f08d301555dffc417604269b5a85d2bd197f259c7d6c957f370ffd33d6d9cd opus-tools-0.1.7.tar.gz -e4e188579ea1c4e4d5066460d4a7214a7eafe3539e9a4466fdc98af41ba4a2f6 opus-tools-0.1.8.tar.gz -b1873dd78c7fbc98cf65d6e10cfddb5c2c03b3af93f922139a2104baedb4643a opus-tools-0.1.9.tar.gz -a2357532d19471b70666e0e0ec17d514246d8b3cb2eb168f68bb0f6fd372b28c opus-tools-0.1.10.tar.gz -b4e56cb00d3e509acfba9a9b627ffd8273b876b4e2408642259f6da28fa0ff86 opus-tools-0.2.tar.gz -bd6d14e8897a2f80065ef34a516c70e74f8e00060abdbc238e79e5f99bca3e96 libopusenc-0.1.tar.gz -02e6e0b14cbbe0569d948a46420f9c9a81d93bba32dc576a4007cbf96da68ef3 libopusenc-0.1.1.tar.gz -c79e95eeee43a0b965e9b2c59a243763a8f8b0a7e71441df2aa9084f6171c73a libopusenc-0.2.tar.gz -8298db61a8d3d63e41c1a80705baa8ce9ff3f50452ea7ec1c19a564fe106cbb9 libopusenc-0.2.1.tar.gz -8071b968475c1a17f54b6840d6de9d9ee20f930e827b0401abe3c4cf4f3bf30a opusfile-0.1.tar.gz -b4a678b3b6c4adfb6aff1f67ef658becfe146ea7c7ff228e99543762171557f9 opusfile-0.2.tar.gz -4248927f2c4e316ea5b84fb02bd100bfec8fa4624a6910d77f0af7f0c6cb8baa opusfile-0.3.tar.gz -9836ea11706c44f36de92c4c9b1248e03a4c521e7fb2cff18a0cb4f8b0e79140 opusfile-0.4.tar.gz -f187906b1b35f7f0d7de6a759b4aab512a9279d23adb35d8009e7e33bd6a922a opusfile-0.4.zip -2ce52d006aeeec9f10260dbe3073c4636954a1ab19c82b8baafefe0180aa4a39 opusfile-0.5.tar.gz -b940d62beb15b5974764574b9f265481fe5b6ee16902fb705727546caf956261 opusfile-0.5.zip -2428717b356e139f18ed2fdb5ad990b5654a238907a0058200b39c46a7d03ea6 opusfile-0.6.tar.gz -753339225193df605372944889023b9b3c5378d672e8784d69fa241cd465278c opusfile-0.6.zip -9e2bed13bc729058591a0f1cab2505e8cfd8e7ac460bf10a78bcc3b125e7c301 opusfile-0.7.tar.gz -346967d7989bb83b05949483b76bd0f69a12c59bd8b4457e864902b52bb0ac34 opusfile-0.7.zip -2c231ed3cfaa1b3173f52d740e5bbd77d51b9dfecb87014b404917fba4b855a4 opusfile-0.8.tar.gz -89dff4342c3b789574cbea5c57f11b96d4ebe4d28ab90248c1783ea569b1e9e3 opusfile-0.8.zip -f75fb500e40b122775ac1a71ad80c4477698842a8fe9da4a1b4a1a9f16e4e979 opusfile-0.9.tar.gz -e9591da4d4c9e857436c2d46a28a9e470fa5355ea5a76d4d582f137d18755d36 opusfile-0.9.zip -48e03526ba87ef9cf5f1c47b5ebe3aa195bd89b912a57060c36184a6cd19412f opusfile-0.10.tar.gz -9d9e95d01817ecf48bf6daaea8f071f9b45bd1751ca1fc8ce50e5075eb2bc3c8 opusfile-0.10.zip -74ce9b6cf4da103133e7b5c95df810ceb7195471e1162ed57af415fabf5603bf opusfile-0.11.tar.gz -23c5168026c4f1fc34843650135b409d0fc8cf452508163b4ece8077256ac6ff opusfile-0.11.zip diff --git a/update_version b/update_version deleted file mode 100755 index a9999918d0f7e3cd52eb1c2cdbc70c1d85ccb226..0000000000000000000000000000000000000000 --- a/update_version +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# Creates and updates the package_version information used by configure.ac -# (or other makefiles). When run inside a git repository it will use the -# version information that can be queried from it unless AUTO_UPDATE is set -# to 'no'. If no version is currently known it will be set to 'unknown'. -# -# If called with the argument 'release', the PACKAGE_VERSION will be updated -# even if AUTO_UPDATE=no, but the value of AUTO_UPDATE shall be preserved. -# This is used to force a version update whenever `make dist` is run. -# -# The exit status is 1 if package_version is not modified, else 0 is returned. -# -# This script should NOT be included in distributed tarballs, because if a -# parent directory contains a git repository we do not want to accidentally -# retrieve the version information from it instead. Tarballs should ship -# with only the package_version file. -# -# Ron , 2012. - -SRCDIR=$(dirname $0) - -if [ -e "$SRCDIR/package_version" ]; then - . "$SRCDIR/package_version" -fi - -if [ "$AUTO_UPDATE" = no ]; then - [ "$1" = release ] || exit 1 -else - AUTO_UPDATE=yes -fi - -# We run `git status` before describe here to ensure that we don't get a false -# -dirty from files that have been touched but are not actually altered in the -# working dir. -GIT_VERSION=$(cd "$SRCDIR" && git status > /dev/null 2>&1 \ - && git describe --tags --match 'v*' --dirty 2> /dev/null) -GIT_VERSION=${GIT_VERSION#v} - -if [ -n "$GIT_VERSION" ]; then - - [ "$GIT_VERSION" != "$PACKAGE_VERSION" ] || exit 1 - PACKAGE_VERSION="$GIT_VERSION" - -elif [ -z "$PACKAGE_VERSION" ]; then - # No current package_version and no git ... - # We really shouldn't ever get here, because this script should only be - # included in the git repository, and should usually be export-ignored. - PACKAGE_VERSION="unknown" -else - exit 1 -fi - -cat > "$SRCDIR/package_version" <<-EOF - # Automatically generated by update_version. - # This file may be sourced into a shell script or makefile. - - # Set this to 'no' if you do not wish the version information - # to be checked and updated for every build. Most people will - # never want to change this, it is an option for developers - # making frequent changes that they know will not be released. - AUTO_UPDATE=$AUTO_UPDATE - - PACKAGE_VERSION="$PACKAGE_VERSION" -EOF diff --git a/win32/.gitignore b/win32/.gitignore deleted file mode 100644 index c17feab73d3492ce8662ee69546dec0d9eebbd7d..0000000000000000000000000000000000000000 --- a/win32/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# Visual Studio ignores -[Dd]ebug/ -[Dd]ebugDLL/ -[Dd]ebugDLL_fixed/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleaseDLL/ -[Rr]eleaseDLL_fixed/ -[Rr]eleases/ -*.manifest -*.lastbuildstate -*.lib -*.log -*.idb -*.ipdb -*.ilk -*.iobj -*.obj -*.opensdf -*.pdb -*.sdf -*.suo -*.tlog -*.vcxproj.user -*.vc.db -*.vc.opendb