| 1 | /* Copyright (c) 2011 Xiph.Org Foundation |
| 2 | Written by Jean-Marc Valin */ |
| 3 | /* |
| 4 | Redistribution and use in source and binary forms, with or without |
| 5 | modification, are permitted provided that the following conditions |
| 6 | are met: |
| 7 | |
| 8 | - Redistributions of source code must retain the above copyright |
| 9 | notice, this list of conditions and the following disclaimer. |
| 10 | |
| 11 | - Redistributions in binary form must reproduce the above copyright |
| 12 | notice, this list of conditions and the following disclaimer in the |
| 13 | documentation and/or other materials provided with the distribution. |
| 14 | |
| 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR |
| 19 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | #ifndef ANALYSIS_H |
| 29 | #define ANALYSIS_Hcxx . . $ `external/opusfile/opus/analysis.h:29:9`! |
| 30 | |
| 31 | #include "celt.h"cxx . . $ `<file>/external/opusfile/opus/celt/celt.h`/ |
| 32 | #include "opus_private.h"cxx . . $ `<file>/external/opusfile/opus/opus_private.h`/ |
| 33 | #include "mlp.h"cxx . . $ `<file>/external/opusfile/opus/mlp.h`/ |
| 34 | |
| 35 | #define NB_FRAMEScxx . . $ `external/opusfile/opus/analysis.h:35:9`! 8 |
| 36 | #define NB_TBANDScxx . . $ `external/opusfile/opus/analysis.h:36:9`! 18 |
| 37 | #define ANALYSIS_BUF_SIZEcxx . . $ `external/opusfile/opus/analysis.h:37:9`! 720 /* 30 ms at 24 kHz */ |
| 38 | |
| 39 | /* At that point we can stop counting frames because it no longer matters. */ |
| 40 | #define ANALYSIS_COUNT_MAXcxx . . $ `external/opusfile/opus/analysis.h:40:9`! 10000 |
| 41 | |
| 42 | #define DETECT_SIZEcxx . . $ `external/opusfile/opus/analysis.h:42:9`! 100 |
| 43 | |
| 44 | /* Uncomment this to print the MLP features on stdout. */ |
| 45 | /*#define MLP_TRAINING*/ |
| 46 | |
| 47 | typedef structcxx . . $ $anonymous_type_fd18cfbd828b08a9_0# { |
| 48 | int archcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#arch.; |
| 49 | int applicationcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#application.; |
| 50 | opus_int32cxx . . $ opus_int32# Fscxx . . $ $anonymous_type_fd18cfbd828b08a9_0#Fs.; |
| 51 | #define TONALITY_ANALYSIS_RESET_STARTcxx . . $ `external/opusfile/opus/analysis.h:51:9`! angle |
| 52 | float anglecxx . . $ $anonymous_type_fd18cfbd828b08a9_0#angle.[240]; |
| 53 | float d_anglecxx . . $ $anonymous_type_fd18cfbd828b08a9_0#d_angle.[240]; |
| 54 | float d2_anglecxx . . $ $anonymous_type_fd18cfbd828b08a9_0#d2_angle.[240]; |
| 55 | opus_val32cxx . . $ opus_val32# inmemcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#inmem.[ANALYSIS_BUF_SIZEcxx . . $ `external/opusfile/opus/analysis.h:37:9`!]; |
| 56 | int mem_fillcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#mem_fill.; /* number of usable samples in the buffer */ |
| 57 | float prev_band_tonalitycxx . . $ $anonymous_type_fd18cfbd828b08a9_0#prev_band_tonality.[NB_TBANDScxx . . $ `external/opusfile/opus/analysis.h:36:9`!]; |
| 58 | float prev_tonalitycxx . . $ $anonymous_type_fd18cfbd828b08a9_0#prev_tonality.; |
| 59 | int prev_bandwidthcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#prev_bandwidth.; |
| 60 | float Ecxx . . $ $anonymous_type_fd18cfbd828b08a9_0#E.[NB_FRAMEScxx . . $ `external/opusfile/opus/analysis.h:35:9`!][NB_TBANDScxx . . $ `external/opusfile/opus/analysis.h:36:9`!]; |
| 61 | float logEcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#logE.[NB_FRAMEScxx . . $ `external/opusfile/opus/analysis.h:35:9`!][NB_TBANDScxx . . $ `external/opusfile/opus/analysis.h:36:9`!]; |
| 62 | float lowEcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#lowE.[NB_TBANDScxx . . $ `external/opusfile/opus/analysis.h:36:9`!]; |
| 63 | float highEcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#highE.[NB_TBANDScxx . . $ `external/opusfile/opus/analysis.h:36:9`!]; |
| 64 | float meanEcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#meanE.[NB_TBANDScxx . . $ `external/opusfile/opus/analysis.h:36:9`!+1]; |
| 65 | float memcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#mem.[32]; |
| 66 | float cmeancxx . . $ $anonymous_type_fd18cfbd828b08a9_0#cmean.[8]; |
| 67 | float stdcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#std.[9]; |
| 68 | float Etrackercxx . . $ $anonymous_type_fd18cfbd828b08a9_0#Etracker.; |
| 69 | float lowECountcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#lowECount.; |
| 70 | int E_countcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#E_count.; |
| 71 | int countcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#count.; |
| 72 | int analysis_offsetcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#analysis_offset.; |
| 73 | int write_poscxx . . $ $anonymous_type_fd18cfbd828b08a9_0#write_pos.; |
| 74 | int read_poscxx . . $ $anonymous_type_fd18cfbd828b08a9_0#read_pos.; |
| 75 | int read_subframecxx . . $ $anonymous_type_fd18cfbd828b08a9_0#read_subframe.; |
| 76 | float hp_ener_accumcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#hp_ener_accum.; |
| 77 | int initializedcxx . . $ $anonymous_type_fd18cfbd828b08a9_0#initialized.; |
| 78 | float rnn_statecxx . . $ $anonymous_type_fd18cfbd828b08a9_0#rnn_state.[MAX_NEURONScxx . . $ `external/opusfile/opus/mlp.h:34:9`!]; |
| 79 | opus_val32cxx . . $ opus_val32# downmix_statecxx . . $ $anonymous_type_fd18cfbd828b08a9_0#downmix_state.[3]; |
| 80 | AnalysisInfocxx . . $ AnalysisInfo# infocxx . . $ $anonymous_type_fd18cfbd828b08a9_0#info.[DETECT_SIZEcxx . . $ `external/opusfile/opus/analysis.h:42:9`!]; |
| 81 | } TonalityAnalysisStatecxx . . $ TonalityAnalysisState#; |
| 82 | |
| 83 | /** Initialize a TonalityAnalysisState struct. |
| 84 | * |
| 85 | * This performs some possibly slow initialization steps which should |
| 86 | * not be repeated every analysis step. No allocated memory is retained |
| 87 | * by the state struct, so no cleanup call is required. |
| 88 | */ |
| 89 | void tonality_analysis_initcxx . . $ tonality_analysis_init(5cde130da58486cc).(TonalityAnalysisStatecxx . . $ TonalityAnalysisState# *analysis, opus_int32cxx . . $ opus_int32# Fs); |
| 90 | |
| 91 | /** Reset a TonalityAnalysisState stuct. |
| 92 | * |
| 93 | * Call this when there's a discontinuity in the data. |
| 94 | */ |
| 95 | void tonality_analysis_resetcxx . . $ tonality_analysis_reset(7c5857d7d6165048).(TonalityAnalysisStatecxx . . $ TonalityAnalysisState# *analysis); |
| 96 | |
| 97 | void tonality_get_infocxx . . $ tonality_get_info(d24b8c968f71556b).(TonalityAnalysisStatecxx . . $ TonalityAnalysisState# *tonal, AnalysisInfocxx . . $ AnalysisInfo# *info_out, int len); |
| 98 | |
| 99 | void run_analysiscxx . . $ run_analysis(699baedfddffc973).(TonalityAnalysisStatecxx . . $ TonalityAnalysisState# *analysis, const CELTModecxx . . $ `external/opusfile/opus/celt/celt.h:51:9`! *celt_mode, const void *analysis_pcm, |
| 100 | int analysis_frame_size, int frame_size, int c1, int c2, int C, opus_int32cxx . . $ opus_int32# Fs, |
| 101 | int lsb_depth, downmix_funccxx . . $ downmix_func# downmix, AnalysisInfocxx . . $ AnalysisInfo# *analysis_info); |
| 102 | |
| 103 | #endif |