mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
Allow a SIPR table to be used by the upcoming SIPR16k decoder
Originally committed as revision 21233 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
65323ed279
commit
d79c06b2ad
@ -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[])
|
static void dequant(float *out, const int *idx, const float *cbs[])
|
||||||
{
|
{
|
||||||
int i;
|
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++) {
|
for (i = 0; i < LP_FILTER_ORDER; i++) {
|
||||||
lpc_d[i] = lpc[i] * ff_pow_0_75[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,
|
memcpy(pole_out - LP_FILTER_ORDER, ctx->postfilter_mem,
|
||||||
|
@ -24,13 +24,6 @@
|
|||||||
#ifndef AVCODEC_SIPRDATA_H
|
#ifndef AVCODEC_SIPRDATA_H
|
||||||
#define AVCODEC_SIPRDATA_H
|
#define AVCODEC_SIPRDATA_H
|
||||||
|
|
||||||
static const float 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 const float mean_lsf[10] = {
|
static const float mean_lsf[10] = {
|
||||||
0.297151, 0.452308, 0.765443, 1.134803, 1.421125,
|
0.297151, 0.452308, 0.765443, 1.134803, 1.421125,
|
||||||
1.773822, 2.049173, 2.375914, 2.585097, 0.075756
|
1.773822, 2.049173, 2.375914, 2.585097, 0.075756
|
||||||
|
Loading…
Reference in New Issue
Block a user