1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

mpegaudio: remove #if 0 blocks

Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
Mans Rullgard 2011-05-09 13:08:08 +01:00
parent 19615089a0
commit 0d849074a4

View File

@ -247,14 +247,6 @@ static inline int l3_unscale(int value, int exponent)
static int dev_4_3_coefs[DEV_ORDER]; static int dev_4_3_coefs[DEV_ORDER];
#if 0 /* unused */
static int pow_mult3[3] = {
POW_FIX(1.0),
POW_FIX(1.25992104989487316476),
POW_FIX(1.58740105196819947474),
};
#endif
static av_cold void int_pow_init(void) static av_cold void int_pow_init(void)
{ {
int i, a; int i, a;
@ -266,53 +258,6 @@ static av_cold void int_pow_init(void)
} }
} }
#if 0 /* unused, remove? */
/* return the mantissa and the binary exponent */
static int int_pow(int i, int *exp_ptr)
{
int e, er, eq, j;
int a, a1;
/* renormalize */
a = i;
e = POW_FRAC_BITS;
while (a < (1 << (POW_FRAC_BITS - 1))) {
a = a << 1;
e--;
}
a -= (1 << POW_FRAC_BITS);
a1 = 0;
for(j = DEV_ORDER - 1; j >= 0; j--)
a1 = POW_MULL(a, dev_4_3_coefs[j] + a1);
a = (1 << POW_FRAC_BITS) + a1;
/* exponent compute (exact) */
e = e * 4;
er = e % 3;
eq = e / 3;
a = POW_MULL(a, pow_mult3[er]);
while (a >= 2 * POW_FRAC_ONE) {
a = a >> 1;
eq++;
}
/* convert to float */
while (a < POW_FRAC_ONE) {
a = a << 1;
eq--;
}
/* now POW_FRAC_ONE <= a < 2 * POW_FRAC_ONE */
#if POW_FRAC_BITS > FRAC_BITS
a = (a + (1 << (POW_FRAC_BITS - FRAC_BITS - 1))) >> (POW_FRAC_BITS - FRAC_BITS);
/* correct overflow */
if (a >= 2 * (1 << FRAC_BITS)) {
a = a >> 1;
eq++;
}
#endif
*exp_ptr = eq;
return a;
}
#endif
static av_cold int decode_init(AVCodecContext * avctx) static av_cold int decode_init(AVCodecContext * avctx)
{ {
MPADecodeContext *s = avctx->priv_data; MPADecodeContext *s = avctx->priv_data;