opus_celt: move postfilter taps table to the shared opustab.c file

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
pull/265/head
Rostislav Pehlivanov 8 years ago
parent 5ca063799c
commit ba67c2349c
  1. 11
      libavcodec/opus_celt.c
  2. 6
      libavcodec/opustab.c
  3. 2
      libavcodec/opustab.h

@ -594,11 +594,6 @@ static void celt_postfilter(CeltFrame *f, CeltBlock *block)
static int parse_postfilter(CeltFrame *f, OpusRangeCoder *rc, int consumed)
{
static const float postfilter_taps[3][3] = {
{ 0.3066406250f, 0.2170410156f, 0.1296386719f },
{ 0.4638671875f, 0.2680664062f, 0.0 },
{ 0.7998046875f, 0.1000976562f, 0.0 }
};
int i;
memset(f->block[0].pf_gains_new, 0, sizeof(f->block[0].pf_gains_new));
@ -620,9 +615,9 @@ static int parse_postfilter(CeltFrame *f, OpusRangeCoder *rc, int consumed)
CeltBlock *block = &f->block[i];
block->pf_period_new = FFMAX(period, CELT_POSTFILTER_MINPERIOD);
block->pf_gains_new[0] = gain * postfilter_taps[tapset][0];
block->pf_gains_new[1] = gain * postfilter_taps[tapset][1];
block->pf_gains_new[2] = gain * postfilter_taps[tapset][2];
block->pf_gains_new[0] = gain * ff_celt_postfilter_taps[tapset][0];
block->pf_gains_new[1] = gain * ff_celt_postfilter_taps[tapset][1];
block->pf_gains_new[2] = gain * ff_celt_postfilter_taps[tapset][2];
}
}

@ -1085,6 +1085,12 @@ const uint32_t ff_celt_pvq_u[1272] = {
1409933619
};
const float ff_celt_postfilter_taps[3][3] = {
{ 0.3066406250f, 0.2170410156f, 0.1296386719f },
{ 0.4638671875f, 0.2680664062f, 0.0 },
{ 0.7998046875f, 0.1000976562f, 0.0 }
};
DECLARE_ALIGNED(32, const float, ff_celt_window)[120] = {
6.7286966e-05f, 0.00060551348f, 0.0016815970f, 0.0032947962f, 0.0054439943f,
0.0081276923f, 0.011344001f, 0.015090633f, 0.019364886f, 0.024163635f,

@ -151,6 +151,8 @@ extern const uint8_t ff_celt_hadamard_order[];
extern const uint16_t ff_celt_qn_exp2[];
extern const uint32_t ff_celt_pvq_u[1272];
extern const float ff_celt_postfilter_taps[3][3];
extern const float ff_celt_window2[120];
DECLARE_ALIGNED(32, extern const float, ff_celt_window)[120];

Loading…
Cancel
Save