OLD | NEW |
1 /* Copyright (c) 2011 Xiph.Org Foundation | 1 /* Copyright (c) 2011 Xiph.Org Foundation |
2 Written by Jean-Marc Valin */ | 2 Written by Jean-Marc Valin */ |
3 /* | 3 /* |
4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
6 are met: | 6 are met: |
7 | 7 |
8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 float mem[32]; | 53 float mem[32]; |
54 float cmean[8]; | 54 float cmean[8]; |
55 float std[9]; | 55 float std[9]; |
56 float music_prob; | 56 float music_prob; |
57 float Etracker; | 57 float Etracker; |
58 float lowECount; | 58 float lowECount; |
59 int E_count; | 59 int E_count; |
60 int last_music; | 60 int last_music; |
61 int last_transition; | 61 int last_transition; |
62 int count; | 62 int count; |
63 opus_val32 subframe_mem[3]; | 63 float subframe_mem[3]; |
64 int analysis_offset; | 64 int analysis_offset; |
65 /** Probability of having speech for time i to DETECT_SIZE-1 (and music befor
e). | 65 /** Probability of having speech for time i to DETECT_SIZE-1 (and music befor
e). |
66 pspeech[0] is the probability that all frames in the window are speech. *
/ | 66 pspeech[0] is the probability that all frames in the window are speech. *
/ |
67 float pspeech[DETECT_SIZE]; | 67 float pspeech[DETECT_SIZE]; |
68 /** Probability of having music for time i to DETECT_SIZE-1 (and speech befor
e). | 68 /** Probability of having music for time i to DETECT_SIZE-1 (and speech befor
e). |
69 pmusic[0] is the probability that all frames in the window are music. */ | 69 pmusic[0] is the probability that all frames in the window are music. */ |
70 float pmusic[DETECT_SIZE]; | 70 float pmusic[DETECT_SIZE]; |
71 float speech_confidence; | 71 float speech_confidence; |
72 float music_confidence; | 72 float music_confidence; |
73 int speech_confidence_count; | 73 int speech_confidence_count; |
74 int music_confidence_count; | 74 int music_confidence_count; |
75 int write_pos; | 75 int write_pos; |
76 int read_pos; | 76 int read_pos; |
77 int read_subframe; | 77 int read_subframe; |
78 AnalysisInfo info[DETECT_SIZE]; | 78 AnalysisInfo info[DETECT_SIZE]; |
79 } TonalityAnalysisState; | 79 } TonalityAnalysisState; |
80 | 80 |
81 void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info, | 81 void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info, |
82 const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int
c2, int C, int lsb_depth, downmix_func downmix); | 82 const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int
c2, int C, int lsb_depth, downmix_func downmix); |
83 | 83 |
84 void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int
len); | 84 void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int
len); |
85 | 85 |
86 void run_analysis(TonalityAnalysisState *analysis, const CELTMode *celt_mode, co
nst void *analysis_pcm, | 86 void run_analysis(TonalityAnalysisState *analysis, const CELTMode *celt_mode, co
nst void *analysis_pcm, |
87 int analysis_frame_size, int frame_size, int c1, int c2, int C,
opus_int32 Fs, | 87 int analysis_frame_size, int frame_size, int c1, int c2, int C,
opus_int32 Fs, |
88 int lsb_depth, downmix_func downmix, AnalysisInfo *analysis_inf
o); | 88 int lsb_depth, downmix_func downmix, AnalysisInfo *analysis_inf
o); |
89 | 89 |
90 #endif | 90 #endif |
OLD | NEW |