mirror of
https://github.com/xiph/opus.git
synced 2025-06-02 16:47:42 +00:00
Remove more useless code
This commit is contained in:
parent
db48088e9f
commit
42a0972a11
3 changed files with 0 additions and 75 deletions
65
dnn/common.c
65
dnn/common.c
|
@ -1,65 +0,0 @@
|
|||
|
||||
/* Copyright (c) 2017-2019 Mozilla */
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "freq.h"
|
||||
#include "lpcnet_private.h"
|
||||
|
||||
|
||||
static void single_interp(float *x, const float *left, const float *right, int id)
|
||||
{
|
||||
int i;
|
||||
float ref[NB_BANDS];
|
||||
float pred[3*NB_BANDS];
|
||||
RNN_COPY(ref, x, NB_BANDS);
|
||||
for (i=0;i<NB_BANDS;i++) pred[i] = .5f*(left[i] + right[i]);
|
||||
for (i=0;i<NB_BANDS;i++) pred[NB_BANDS+i] = left[i];
|
||||
for (i=0;i<NB_BANDS;i++) pred[2*NB_BANDS+i] = right[i];
|
||||
for (i=0;i<NB_BANDS;i++) {
|
||||
x[i] = pred[id*NB_BANDS + i];
|
||||
}
|
||||
if (0) {
|
||||
float err = 0;
|
||||
for (i=0;i<NB_BANDS;i++) {
|
||||
err += (x[i]-ref[i])*(x[i]-ref[i]);
|
||||
}
|
||||
printf("%f\n", sqrt(err/NB_BANDS));
|
||||
}
|
||||
}
|
||||
|
||||
void perform_double_interp(float features[4][NB_TOTAL_FEATURES], const float *mem, int best_id) {
|
||||
int id0, id1;
|
||||
best_id += (best_id >= FORBIDDEN_INTERP);
|
||||
id0 = best_id / 3;
|
||||
id1 = best_id % 3;
|
||||
single_interp(features[0], mem, features[1], id0);
|
||||
single_interp(features[2], features[1], features[3], id1);
|
||||
}
|
|
@ -9,19 +9,12 @@
|
|||
#include "plc_data.h"
|
||||
#include "kiss99.h"
|
||||
|
||||
#define BITS_PER_CHAR 8
|
||||
|
||||
#define PITCH_MIN_PERIOD 32
|
||||
#define PITCH_MAX_PERIOD 256
|
||||
|
||||
#define PITCH_FRAME_SIZE 320
|
||||
#define PITCH_BUF_SIZE (PITCH_MAX_PERIOD+PITCH_FRAME_SIZE)
|
||||
|
||||
#define MULTI 4
|
||||
#define MULTI_MASK (MULTI-1)
|
||||
|
||||
#define FORBIDDEN_INTERP 7
|
||||
|
||||
#define PLC_MAX_FEC 100
|
||||
#define MAX_FEATURE_BUFFER_SIZE 4
|
||||
|
||||
|
@ -99,8 +92,6 @@ struct LPCNetPLCState {
|
|||
|
||||
void preemphasis(float *y, float *mem, const float *x, float coef, int N);
|
||||
|
||||
void perform_double_interp(float features[4][NB_TOTAL_FEATURES], const float *mem, int best_id);
|
||||
|
||||
void compute_frame_features(LPCNetEncState *st, const float *in);
|
||||
|
||||
void decode_packet(float features[4][NB_TOTAL_FEATURES], float *vq_mem, const unsigned char buf[8]);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
LPCNET_SOURCES = \
|
||||
dnn/burg.c \
|
||||
dnn/common.c \
|
||||
dnn/freq.c \
|
||||
dnn/kiss99.c \
|
||||
dnn/lpcnet.c \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue