summaryrefslogtreecommitdiff
path: root/drivers/opus/analysis.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-05-03 22:32:38 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-05-03 22:32:38 -0300
commitdd69aeceac3d1798d0869d8adfb44af883b5fb93 (patch)
tree717e9b909ada0661940f6f3d2bd5349c6424bbf1 /drivers/opus/analysis.h
parent567cb691ec49844101247bb9dc34bc2722f6af4f (diff)
parentb81d9e6d614a67fd58e2256e90055589205bfa30 (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'drivers/opus/analysis.h')
-rw-r--r--drivers/opus/analysis.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/opus/analysis.h b/drivers/opus/analysis.h
index 548614d529..9d81164e25 100644
--- a/drivers/opus/analysis.h
+++ b/drivers/opus/analysis.h
@@ -39,6 +39,8 @@
#define DETECT_SIZE 200
typedef struct {
+ int arch;
+#define TONALITY_ANALYSIS_RESET_START angle
float angle[240];
float d_angle[240];
float d2_angle[240];
@@ -78,8 +80,19 @@ typedef struct {
AnalysisInfo info[DETECT_SIZE];
} TonalityAnalysisState;
-void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info,
- const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int c2, int C, int lsb_depth, downmix_func downmix);
+/** Initialize a TonalityAnalysisState struct.
+ *
+ * This performs some possibly slow initialization steps which should
+ * 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);
+
+/** Reset a TonalityAnalysisState stuct.
+ *
+ * Call this when there's a discontinuity in the data.
+ */
+void tonality_analysis_reset(TonalityAnalysisState *analysis);
void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int len);