Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: third_party/opus/src/src/analysis.h

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Pre-increment instead of post-increment Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/opus/src/silk/x86/x86_silk_map.c ('k') | third_party/opus/src/src/analysis.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/opus/src/src/analysis.h
diff --git a/third_party/opus/src/src/analysis.h b/third_party/opus/src/src/analysis.h
index 9eae56a525378a3602444ce960957d44bf91fa61..cac51dfa4eb55d8d1abbb0dee9f070463542df1d 100644
--- a/third_party/opus/src/src/analysis.h
+++ b/third_party/opus/src/src/analysis.h
@@ -33,13 +33,20 @@
#define NB_FRAMES 8
#define NB_TBANDS 18
-#define NB_TOT_BANDS 21
-#define ANALYSIS_BUF_SIZE 720 /* 15 ms at 48 kHz */
+#define ANALYSIS_BUF_SIZE 720 /* 30 ms at 24 kHz */
-#define DETECT_SIZE 200
+/* At that point we can stop counting frames because it no longer matters. */
+#define ANALYSIS_COUNT_MAX 10000
+
+#define DETECT_SIZE 100
+
+/* Uncomment this to print the MLP features on stdout. */
+/*#define MLP_TRAINING*/
typedef struct {
int arch;
+ int application;
+ opus_int32 Fs;
#define TONALITY_ANALYSIS_RESET_START angle
float angle[240];
float d_angle[240];
@@ -48,21 +55,22 @@ typedef struct {
int mem_fill; /* number of usable samples in the buffer */
float prev_band_tonality[NB_TBANDS];
float prev_tonality;
+ int prev_bandwidth;
float E[NB_FRAMES][NB_TBANDS];
+ float logE[NB_FRAMES][NB_TBANDS];
float lowE[NB_TBANDS];
float highE[NB_TBANDS];
- float meanE[NB_TOT_BANDS];
+ float meanE[NB_TBANDS+1];
float mem[32];
float cmean[8];
float std[9];
float music_prob;
+ float vad_prob;
float Etracker;
float lowECount;
int E_count;
int last_music;
- int last_transition;
int count;
- float subframe_mem[3];
int analysis_offset;
/** Probability of having speech for time i to DETECT_SIZE-1 (and music before).
pspeech[0] is the probability that all frames in the window are speech. */
@@ -77,6 +85,8 @@ typedef struct {
int write_pos;
int read_pos;
int read_subframe;
+ float hp_ener_accum;
+ opus_val32 downmix_state[3];
AnalysisInfo info[DETECT_SIZE];
} TonalityAnalysisState;
@@ -86,7 +96,7 @@ typedef struct {
* not be repeated every analysis step. No allocated memory is retained
* by the state struct, so no cleanup call is required.
*/
-void tonality_analysis_init(TonalityAnalysisState *analysis);
+void tonality_analysis_init(TonalityAnalysisState *analysis, opus_int32 Fs);
/** Reset a TonalityAnalysisState stuct.
*
« no previous file with comments | « third_party/opus/src/silk/x86/x86_silk_map.c ('k') | third_party/opus/src/src/analysis.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698