Opus now only uses the _with_ec() calls to CELT
This commit is contained in:
parent
b4f308a2f9
commit
58686e6fe1
2 changed files with 6 additions and 18 deletions
|
@ -40,12 +40,6 @@
|
|||
#include "opus_private.h"
|
||||
#include "os_support.h"
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
#define celt_decode_native celt_decode
|
||||
#else
|
||||
#define celt_decode_native celt_decode_float
|
||||
#endif
|
||||
|
||||
struct OpusDecoder {
|
||||
int celt_dec_offset;
|
||||
int silk_dec_offset;
|
||||
|
@ -378,7 +372,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
|
|||
if (redundancy && celt_to_silk)
|
||||
{
|
||||
celt_decoder_ctl(celt_dec, CELT_SET_START_BAND(0));
|
||||
celt_decode_native(celt_dec, data+len, redundancy_bytes, redundant_audio, F5);
|
||||
celt_decode_with_ec(celt_dec, data+len, redundancy_bytes, redundant_audio, F5, NULL);
|
||||
celt_decoder_ctl(celt_dec, CELT_GET_RANGE(&redundant_rng));
|
||||
celt_decoder_ctl(celt_dec, CELT_RESET_STATE);
|
||||
}
|
||||
|
@ -422,7 +416,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
|
|||
celt_decoder_ctl(celt_dec, CELT_RESET_STATE);
|
||||
celt_decoder_ctl(celt_dec, CELT_SET_START_BAND(0));
|
||||
|
||||
celt_decode_native(celt_dec, data+len, redundancy_bytes, redundant_audio, F5);
|
||||
celt_decode_with_ec(celt_dec, data+len, redundancy_bytes, redundant_audio, F5, NULL);
|
||||
celt_decoder_ctl(celt_dec, CELT_GET_RANGE(&redundant_rng));
|
||||
smooth_fade(pcm+st->channels*(frame_size-F2_5), redundant_audio+st->channels*F2_5,
|
||||
pcm+st->channels*(frame_size-F2_5), F2_5, st->channels, window, st->Fs);
|
||||
|
|
|
@ -41,12 +41,6 @@
|
|||
#include "opus_private.h"
|
||||
#include "os_support.h"
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
#define celt_encode_native celt_encode
|
||||
#else
|
||||
#define celt_encode_native celt_encode_float
|
||||
#endif
|
||||
|
||||
#define MAX_ENCODER_BUFFER 480
|
||||
|
||||
struct OpusEncoder {
|
||||
|
@ -608,7 +602,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
|
|||
celt_encoder_ctl(celt_enc, CELT_SET_START_BAND(0));
|
||||
celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(0));
|
||||
/* TODO: This wastes CPU a bit compared to just prefilling the buffer */
|
||||
celt_encode_native(celt_enc, &st->delay_buffer[(st->encoder_buffer-st->delay_compensation-st->Fs/400)*st->channels], st->Fs/400, dummy, 10);
|
||||
celt_encode_with_ec(celt_enc, &st->delay_buffer[(st->encoder_buffer-st->delay_compensation-st->Fs/400)*st->channels], st->Fs/400, dummy, 10, NULL);
|
||||
} else {
|
||||
celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(2));
|
||||
}
|
||||
|
@ -710,7 +704,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
|
|||
{
|
||||
celt_encoder_ctl(celt_enc, CELT_SET_START_BAND(0));
|
||||
celt_encoder_ctl(celt_enc, CELT_SET_VBR(0));
|
||||
celt_encode_native(celt_enc, pcm_buf, st->Fs/200, data+nb_compr_bytes, redundancy_bytes);
|
||||
celt_encode_with_ec(celt_enc, pcm_buf, st->Fs/200, data+nb_compr_bytes, redundancy_bytes, NULL);
|
||||
celt_encoder_ctl(celt_enc, CELT_GET_RANGE(&redundant_rng));
|
||||
celt_encoder_ctl(celt_enc, CELT_RESET_STATE);
|
||||
}
|
||||
|
@ -734,9 +728,9 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
|
|||
celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(0));
|
||||
|
||||
/* TODO: We could speed up prefilling here */
|
||||
celt_encode_native(celt_enc, pcm_buf+st->channels*(frame_size-N2-N4), N4, data+nb_compr_bytes, redundancy_bytes);
|
||||
celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2-N4), N4, data+nb_compr_bytes, redundancy_bytes, NULL);
|
||||
|
||||
celt_encode_native(celt_enc, pcm_buf+st->channels*(frame_size-N2), N2, data+nb_compr_bytes, redundancy_bytes);
|
||||
celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2), N2, data+nb_compr_bytes, redundancy_bytes, NULL);
|
||||
celt_encoder_ctl(celt_enc, CELT_GET_RANGE(&redundant_rng));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue