diff options
author | Jan Buethe <jbuethe@amazon.de> | 2022-10-25 13:26:43 +0000 |
---|---|---|
committer | Jan Buethe <jbuethe@amazon.de> | 2022-10-25 13:26:43 +0000 |
commit | 8c021778d539e03b3a628c98f8193e60f176aa50 (patch) | |
tree | 29411eab791a3db52ab4829f357280cf1e7ecdd6 /silk | |
parent | bfca954231b31db73f6be03573aa6c4012e257ba (diff) | |
download | opus-8c021778d539e03b3a628c98f8193e60f176aa50.tar.gz |
addressed compiler warnings
Diffstat (limited to 'silk')
-rw-r--r-- | silk/dred_coding.c | 5 | ||||
-rw-r--r-- | silk/dred_encoder.c | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/silk/dred_coding.c b/silk/dred_coding.c index 90a1d98c..9e1bfcea 100644 --- a/silk/dred_coding.c +++ b/silk/dred_coding.c @@ -32,6 +32,7 @@ #include "config.h" #endif +#include "celt/entenc.h" #include "celt/vq.h" #include "celt/cwrs.h" #include "celt/laplace.h" @@ -60,7 +61,6 @@ static void encode_pvq(const int *iy, int N, int K, ec_enc *enc) { } void dred_encode_state(ec_enc *enc, float *x) { - int k; int iy[PVQ_DIM]; op_pvq_search_c(x, iy, PVQ_K, PVQ_DIM, 0); encode_pvq(iy, PVQ_DIM, PVQ_K, enc); @@ -69,7 +69,6 @@ void dred_encode_state(ec_enc *enc, float *x) { void dred_encode_latents(ec_enc *enc, const float *x, const opus_int16 *scale, const opus_int16 *dzone, const opus_int16 *r, const opus_int16 *p0) { int i; float eps = .1f; - int tell1 = ec_tell(enc); for (i=0;i<LATENT_DIM;i++) { float delta; float xq; @@ -105,7 +104,6 @@ void dred_decode_state(ec_enc *dec, float *x) { int k; int iy[PVQ_DIM]; float norm = 0; - int tell1 = ec_tell(dec); decode_pvq(iy, PVQ_DIM, PVQ_K, dec); /*printf("tell: %d\n", ec_tell(dec)-tell1);*/ for (k = 0; k < PVQ_DIM; k++) @@ -123,7 +121,6 @@ void dred_decode_state(ec_enc *dec, float *x) { void dred_decode_latents(ec_dec *dec, float *x, const opus_int16 *scale, const opus_int16 *r, const opus_int16 *p0) { int i; for (i=0;i<LATENT_DIM;i++) { - float xq; int q; q = ec_laplace_decode_p0(dec, p0[i], r[i]); x[i] = q*256.f/(scale[i] == 0 ? 1 : scale[i]); diff --git a/silk/dred_encoder.c b/silk/dred_encoder.c index ab50f3b9..459b26e6 100644 --- a/silk/dred_encoder.c +++ b/silk/dred_encoder.c @@ -9,7 +9,7 @@ #include "dred_encoder.h" #include "dred_coding.h" - +#include "celt/entenc.h" void init_dred_encoder(DREDEnc* enc) { @@ -20,10 +20,10 @@ void init_dred_encoder(DREDEnc* enc) void dred_encode_silk_frame(DREDEnc *enc, const opus_int16 *silk_frame) { - opus_int16 *dead_zone = DRED_rdovae_get_dead_zone_pointer(); - opus_int16 *p0 = DRED_rdovae_get_p0_pointer(); - opus_int16 *quant_scales = DRED_rdovae_get_quant_scales_pointer(); - opus_int16 *r = DRED_rdovae_get_r_pointer(); + const opus_int16 *dead_zone = DRED_rdovae_get_dead_zone_pointer(); + const opus_int16 *p0 = DRED_rdovae_get_p0_pointer(); + const opus_int16 *quant_scales = DRED_rdovae_get_quant_scales_pointer(); + const opus_int16 *r = DRED_rdovae_get_r_pointer(); float input_buffer[2*DRED_NUM_FEATURES] = {0}; |