Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/silk
diff options
context:
space:
mode:
Diffstat (limited to 'silk')
-rw-r--r--silk/dred_config.h2
-rw-r--r--silk/dred_encoder.c6
-rw-r--r--silk/dred_encoder.h2
3 files changed, 3 insertions, 7 deletions
diff --git a/silk/dred_config.h b/silk/dred_config.h
index 86da3b00..a729e696 100644
--- a/silk/dred_config.h
+++ b/silk/dred_config.h
@@ -36,7 +36,7 @@
#define DRED_EXPERIMENTAL_BYTES 2
-#define DRED_MIN_BYTES 16
+#define DRED_MIN_BYTES 8
/* these are inpart duplicates to the values defined in dred_rdovae_constants.h */
#define DRED_SILK_ENCODER_DELAY (79+12-80)
diff --git a/silk/dred_encoder.c b/silk/dred_encoder.c
index 0e1bb33f..bd0fe3fb 100644
--- a/silk/dred_encoder.c
+++ b/silk/dred_encoder.c
@@ -249,21 +249,17 @@ static void dred_encode_latents(ec_enc *enc, const float *x, const opus_uint8 *s
}
}
-int dred_encode_silk_frame(const DREDEnc *enc, unsigned char *buf, int max_chunks, int max_bytes, int arch) {
+int dred_encode_silk_frame(const DREDEnc *enc, unsigned char *buf, int max_chunks, int max_bytes, int q0, int dQ, int arch) {
ec_enc ec_encoder;
int q_level;
int i;
int offset;
int ec_buffer_fill;
- int q0;
- int dQ;
int state_qoffset;
/* entropy coding of state and latents */
ec_enc_init(&ec_encoder, buf, max_bytes);
- q0 = DRED_ENC_Q0;
- dQ = 3;
ec_enc_uint(&ec_encoder, enc->dred_offset, 32);
ec_enc_uint(&ec_encoder, q0, 16);
ec_enc_uint(&ec_encoder, dQ, 8);
diff --git a/silk/dred_encoder.h b/silk/dred_encoder.h
index 795bee4f..469b8085 100644
--- a/silk/dred_encoder.h
+++ b/silk/dred_encoder.h
@@ -66,6 +66,6 @@ void dred_deinit_encoder(DREDEnc *enc);
void dred_compute_latents(DREDEnc *enc, const float *pcm, int frame_size, int extra_delay, int arch);
-int dred_encode_silk_frame(const DREDEnc *enc, unsigned char *buf, int max_chunks, int max_bytes, int arch);
+int dred_encode_silk_frame(const DREDEnc *enc, unsigned char *buf, int max_chunks, int max_bytes, int q0, int dQ, int arch);
#endif