summaryrefslogtreecommitdiff
path: root/libavcodec/sipr.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2010-01-16 03:44:17 +0000
committerVitor Sessak <vitor1001@gmail.com>2010-01-16 03:44:17 +0000
commitd79c06b2adb67447e7ebffd95384e9a12e102a7f (patch)
tree66cd371957a55933e4aa2455c484dc081097f7f9 /libavcodec/sipr.c
parent65323ed279c79a9e033b873beee6d5b3349cf2c4 (diff)
Allow a SIPR table to be used by the upcoming SIPR16k decoder
Originally committed as revision 21233 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/sipr.c')
-rw-r--r--libavcodec/sipr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
index 2db018ce53..78bf8a2a69 100644
--- a/libavcodec/sipr.c
+++ b/libavcodec/sipr.c
@@ -110,6 +110,13 @@ static const SiprModeParam modes[MODE_COUNT] = {
}
};
+const float ff_pow_0_5[] = {
+ 1.0/(1 << 1), 1.0/(1 << 2), 1.0/(1 << 3), 1.0/(1 << 4),
+ 1.0/(1 << 5), 1.0/(1 << 6), 1.0/(1 << 7), 1.0/(1 << 8),
+ 1.0/(1 << 9), 1.0/(1 << 10), 1.0/(1 << 11), 1.0/(1 << 12),
+ 1.0/(1 << 13), 1.0/(1 << 14), 1.0/(1 << 15), 1.0/(1 << 16)
+};
+
static void dequant(float *out, const int *idx, const float *cbs[])
{
int i;
@@ -273,7 +280,7 @@ static void postfilter_5k0(SiprContext *ctx, const float *lpc, float *samples)
for (i = 0; i < LP_FILTER_ORDER; i++) {
lpc_d[i] = lpc[i] * ff_pow_0_75[i];
- lpc_n[i] = lpc[i] * pow_0_5 [i];
+ lpc_n[i] = lpc[i] * ff_pow_0_5 [i];
};
memcpy(pole_out - LP_FILTER_ORDER, ctx->postfilter_mem,