mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
WMA: extend exponent table up to 75
Fixes issue 1565. Originally committed as revision 20593 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
60fa95683d
commit
168f92ffaa
@ -240,8 +240,8 @@ static void decode_exp_lsp(WMACodecContext *s, int ch)
|
|||||||
s->block_len, lsp_coefs);
|
s->block_len, lsp_coefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** pow(10, i / 16.0) for i in -60..67 */
|
/** pow(10, i / 16.0) for i in -60..75 */
|
||||||
static const float pow_tab[128] = {
|
static const float pow_tab[] = {
|
||||||
1.7782794100389e-04, 2.0535250264571e-04,
|
1.7782794100389e-04, 2.0535250264571e-04,
|
||||||
2.3713737056617e-04, 2.7384196342644e-04,
|
2.3713737056617e-04, 2.7384196342644e-04,
|
||||||
3.1622776601684e-04, 3.6517412725484e-04,
|
3.1622776601684e-04, 3.6517412725484e-04,
|
||||||
@ -306,6 +306,10 @@ static const float pow_tab[128] = {
|
|||||||
7.4989420933246e+03, 8.6596432336007e+03,
|
7.4989420933246e+03, 8.6596432336007e+03,
|
||||||
1.0000000000000e+04, 1.1547819846895e+04,
|
1.0000000000000e+04, 1.1547819846895e+04,
|
||||||
1.3335214321633e+04, 1.5399265260595e+04,
|
1.3335214321633e+04, 1.5399265260595e+04,
|
||||||
|
1.7782794100389e+04, 2.0535250264571e+04,
|
||||||
|
2.3713737056617e+04, 2.7384196342644e+04,
|
||||||
|
3.1622776601684e+04, 3.6517412725484e+04,
|
||||||
|
4.2169650342858e+04, 4.8696752516586e+04,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -345,8 +349,11 @@ static int decode_exp_vlc(WMACodecContext *s, int ch)
|
|||||||
return -1;
|
return -1;
|
||||||
/* NOTE: this offset is the same as MPEG4 AAC ! */
|
/* NOTE: this offset is the same as MPEG4 AAC ! */
|
||||||
last_exp += code - 60;
|
last_exp += code - 60;
|
||||||
if ((unsigned)last_exp + 60 > FF_ARRAY_ELEMS(pow_tab))
|
if ((unsigned)last_exp + 60 > FF_ARRAY_ELEMS(pow_tab)) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",
|
||||||
|
last_exp);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
v = ptab[last_exp];
|
v = ptab[last_exp];
|
||||||
iv = iptab[last_exp];
|
iv = iptab[last_exp];
|
||||||
if (v > max_scale)
|
if (v > max_scale)
|
||||||
|
Loading…
Reference in New Issue
Block a user