ac3enc: add float_to_fixed24() with x86-optimized versions to AC3DSPContext

and use in scale_coefficients() for the floating-point AC-3 encoder.
This commit is contained in:
Justin Ruggles
2011-03-17 16:46:48 -04:00
parent 487fef2dcc
commit 0f999cfddb
6 changed files with 166 additions and 9 deletions
+2 -3
View File
@@ -103,9 +103,8 @@ static int normalize_samples(AC3EncodeContext *s)
*/
static void scale_coefficients(AC3EncodeContext *s)
{
int i;
for (i = 0; i < AC3_MAX_COEFS * AC3_MAX_BLOCKS * s->channels; i++)
s->fixed_coef_buffer[i] = SCALE_FLOAT(s->mdct_coef_buffer[i], 24);
s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer, s->mdct_coef_buffer,
AC3_MAX_COEFS * AC3_MAX_BLOCKS * s->channels);
}