Commit 51027d0b authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

opus: merge encoder and decoder bitallocation functions into one

There's no difference apart from which entropy coding functions get called.
Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent 0c78b6a4
This diff is collapsed.
...@@ -194,4 +194,7 @@ int ff_silk_decode_superframe(SilkContext *s, OpusRangeCoder *rc, ...@@ -194,4 +194,7 @@ int ff_silk_decode_superframe(SilkContext *s, OpusRangeCoder *rc,
/* Encode or decode CELT bands */ /* Encode or decode CELT bands */
void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc); void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc);
/* Encode or decode CELT bitallocation */
void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode);
#endif /* AVCODEC_OPUS_H */ #endif /* AVCODEC_OPUS_H */
This diff is collapsed.
This diff is collapsed.
...@@ -51,6 +51,4 @@ typedef struct OpusPacketInfo { ...@@ -51,6 +51,4 @@ typedef struct OpusPacketInfo {
int frames; int frames;
} OpusPacketInfo; } OpusPacketInfo;
void ff_celt_enc_bitalloc(CeltFrame *f, OpusRangeCoder *rc);
#endif /* AVCODEC_OPUSENC_H */ #endif /* AVCODEC_OPUSENC_H */
...@@ -366,7 +366,7 @@ static int bands_dist(OpusPsyContext *s, CeltFrame *f, float *total_dist) ...@@ -366,7 +366,7 @@ static int bands_dist(OpusPsyContext *s, CeltFrame *f, float *total_dist)
OpusRangeCoder dump; OpusRangeCoder dump;
ff_opus_rc_enc_init(&dump); ff_opus_rc_enc_init(&dump);
ff_celt_enc_bitalloc(f, &dump); ff_celt_bitalloc(f, &dump, 1);
for (i = 0; i < CELT_MAX_BANDS; i++) { for (i = 0; i < CELT_MAX_BANDS; i++) {
float bits = 0.0f; float bits = 0.0f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment