mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-02 14:07:23 +08:00
Refactor AAC unsigned band type decoding for a modest speedup.
Originally committed as revision 17599 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -805,14 +805,6 @@ static int decode_spectrum_and_dequant(AACContext * ac, float coef[1024], GetBit
|
|||||||
if (vq_ptr[2]) coef[coef_tmp_idx + 2] = sign_lookup[get_bits1(gb)];
|
if (vq_ptr[2]) coef[coef_tmp_idx + 2] = sign_lookup[get_bits1(gb)];
|
||||||
if (vq_ptr[3]) coef[coef_tmp_idx + 3] = sign_lookup[get_bits1(gb)];
|
if (vq_ptr[3]) coef[coef_tmp_idx + 3] = sign_lookup[get_bits1(gb)];
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
coef[coef_tmp_idx ] = 1.0f;
|
|
||||||
coef[coef_tmp_idx + 1] = 1.0f;
|
|
||||||
if (dim == 4) {
|
|
||||||
coef[coef_tmp_idx + 2] = 1.0f;
|
|
||||||
coef[coef_tmp_idx + 3] = 1.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (cur_band_type == ESC_BT) {
|
if (cur_band_type == ESC_BT) {
|
||||||
for (j = 0; j < 2; j++) {
|
for (j = 0; j < 2; j++) {
|
||||||
if (vq_ptr[j] == 64.0f) {
|
if (vq_ptr[j] == 64.0f) {
|
||||||
@ -838,6 +830,14 @@ static int decode_spectrum_and_dequant(AACContext * ac, float coef[1024], GetBit
|
|||||||
coef[coef_tmp_idx + 3] *= vq_ptr[3];
|
coef[coef_tmp_idx + 3] *= vq_ptr[3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
coef[coef_tmp_idx ] = vq_ptr[0];
|
||||||
|
coef[coef_tmp_idx + 1] = vq_ptr[1];
|
||||||
|
if (dim == 4) {
|
||||||
|
coef[coef_tmp_idx + 2] = vq_ptr[2];
|
||||||
|
coef[coef_tmp_idx + 3] = vq_ptr[3];
|
||||||
|
}
|
||||||
|
}
|
||||||
coef[coef_tmp_idx ] *= sf[idx];
|
coef[coef_tmp_idx ] *= sf[idx];
|
||||||
coef[coef_tmp_idx + 1] *= sf[idx];
|
coef[coef_tmp_idx + 1] *= sf[idx];
|
||||||
if (dim == 4) {
|
if (dim == 4) {
|
||||||
|
Reference in New Issue
Block a user