You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
binkaudio: expand quant_table to accommodate all possible values
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
extern const uint16_t ff_wma_critical_freqs[25];
|
extern const uint16_t ff_wma_critical_freqs[25];
|
||||||
|
|
||||||
static float quant_table[95];
|
static float quant_table[96];
|
||||||
|
|
||||||
#define MAX_CHANNELS 2
|
#define MAX_CHANNELS 2
|
||||||
#define BINK_BLOCK_MAX_SIZE (MAX_CHANNELS << 11)
|
#define BINK_BLOCK_MAX_SIZE (MAX_CHANNELS << 11)
|
||||||
@@ -112,7 +112,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
s->block_size = (s->frame_len - s->overlap_len) * s->channels;
|
s->block_size = (s->frame_len - s->overlap_len) * s->channels;
|
||||||
sample_rate_half = (sample_rate + 1) / 2;
|
sample_rate_half = (sample_rate + 1) / 2;
|
||||||
s->root = 2.0 / sqrt(s->frame_len);
|
s->root = 2.0 / sqrt(s->frame_len);
|
||||||
for (i = 0; i < 95; i++) {
|
for (i = 0; i < 96; i++) {
|
||||||
/* constant is result of 0.066399999/log10(M_E) */
|
/* constant is result of 0.066399999/log10(M_E) */
|
||||||
quant_table[i] = expf(i * 0.15289164787221953823f) * s->root;
|
quant_table[i] = expf(i * 0.15289164787221953823f) * s->root;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user