mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
Revert "btstack_cvsd_plc: remove unused function"
This reverts commit fbd9085d679240e60bad03926cf8538e726fac89.
This commit is contained in:
parent
cf26f982bf
commit
fdcb66e42c
@ -53,12 +53,22 @@
|
|||||||
#include "btstack_cvsd_plc.h"
|
#include "btstack_cvsd_plc.h"
|
||||||
#include "btstack_debug.h"
|
#include "btstack_debug.h"
|
||||||
|
|
||||||
|
// static float rcos[CVSD_OLAL] = {
|
||||||
|
// 0.99148655f,0.96623611f,0.92510857f,0.86950446f,
|
||||||
|
// 0.80131732f,0.72286918f,0.63683150f,0.54613418f,
|
||||||
|
// 0.45386582f,0.36316850f,0.27713082f,0.19868268f,
|
||||||
|
// 0.13049554f,0.07489143f,0.03376389f,0.00851345f};
|
||||||
|
|
||||||
static float rcos[CVSD_OLAL] = {
|
static float rcos[CVSD_OLAL] = {
|
||||||
0.99148655f,0.92510857f,
|
0.99148655f,0.92510857f,
|
||||||
0.80131732f,0.63683150f,
|
0.80131732f,0.63683150f,
|
||||||
0.45386582f,0.27713082f,
|
0.45386582f,0.27713082f,
|
||||||
0.13049554f,0.03376389f};
|
0.13049554f,0.03376389f};
|
||||||
|
|
||||||
|
float btstack_cvsd_plc_rcos(int index){
|
||||||
|
if (index > CVSD_OLAL) return 0;
|
||||||
|
return rcos[index];
|
||||||
|
}
|
||||||
// taken from http://www.codeproject.com/Articles/69941/Best-Square-Root-Method-Algorithm-Function-Precisi
|
// taken from http://www.codeproject.com/Articles/69941/Best-Square-Root-Method-Algorithm-Function-Precisi
|
||||||
// Algorithm: Babylonian Method + some manipulations on IEEE 32 bit floating point representation
|
// Algorithm: Babylonian Method + some manipulations on IEEE 32 bit floating point representation
|
||||||
static float sqrt3(const float x){
|
static float sqrt3(const float x){
|
||||||
|
@ -87,6 +87,7 @@ void btstack_cvsd_dump_statistics(btstack_cvsd_plc_state_t * state);
|
|||||||
int btstack_cvsd_plc_pattern_match(BTSTACK_CVSD_PLC_SAMPLE_FORMAT *y);
|
int btstack_cvsd_plc_pattern_match(BTSTACK_CVSD_PLC_SAMPLE_FORMAT *y);
|
||||||
float btstack_cvsd_plc_amplitude_match(btstack_cvsd_plc_state_t *plc_state, uint16_t num_samples, BTSTACK_CVSD_PLC_SAMPLE_FORMAT *y, BTSTACK_CVSD_PLC_SAMPLE_FORMAT bestmatch);
|
float btstack_cvsd_plc_amplitude_match(btstack_cvsd_plc_state_t *plc_state, uint16_t num_samples, BTSTACK_CVSD_PLC_SAMPLE_FORMAT *y, BTSTACK_CVSD_PLC_SAMPLE_FORMAT bestmatch);
|
||||||
BTSTACK_CVSD_PLC_SAMPLE_FORMAT btstack_cvsd_plc_crop_sample(float val);
|
BTSTACK_CVSD_PLC_SAMPLE_FORMAT btstack_cvsd_plc_crop_sample(float val);
|
||||||
|
float btstack_cvsd_plc_rcos(int index);
|
||||||
|
|
||||||
#ifdef OCTAVE_OUTPUT
|
#ifdef OCTAVE_OUTPUT
|
||||||
void btstack_cvsd_plc_octave_set_base_name(const char * name);
|
void btstack_cvsd_plc_octave_set_base_name(const char * name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user