Fixed pitchEnd wrt to variable frame size. It should (sort of) all work now
This commit is contained in:
parent
ce4dd367c2
commit
e949b72049
2 changed files with 3 additions and 3 deletions
|
@ -227,7 +227,7 @@ int compute_pitch_gain(const CELTMode *m, const celt_sig *X, const celt_sig *P,
|
||||||
celt_word16 delta;
|
celt_word16 delta;
|
||||||
const int C = CHANNELS(_C);
|
const int C = CHANNELS(_C);
|
||||||
celt_word32 Sxy=0, Sxx=0, Syy=0;
|
celt_word32 Sxy=0, Sxx=0, Syy=0;
|
||||||
int len = m->pitchEnd;
|
int len = M*m->pitchEnd;
|
||||||
int N = M*m->eBands[m->nbEBands+1];
|
int N = M*m->eBands[m->nbEBands+1];
|
||||||
#ifdef FIXED_POINT
|
#ifdef FIXED_POINT
|
||||||
int shift = 0;
|
int shift = 0;
|
||||||
|
@ -319,7 +319,7 @@ void apply_pitch(const CELTMode *m, celt_sig *X, const celt_sig *P, int gain_id,
|
||||||
celt_word16 gain;
|
celt_word16 gain;
|
||||||
celt_word16 delta;
|
celt_word16 delta;
|
||||||
const int C = CHANNELS(_C);
|
const int C = CHANNELS(_C);
|
||||||
int len = m->pitchEnd;
|
int len = M*m->pitchEnd;
|
||||||
|
|
||||||
N = M*m->eBands[m->nbEBands+1];
|
N = M*m->eBands[m->nbEBands+1];
|
||||||
gain = ADD16(QCONST16(.5f,14), MULT16_16_16(QCONST16(.05f,14),gain_id));
|
gain = ADD16(QCONST16(.5f,14), MULT16_16_16(QCONST16(.05f,14),gain_id));
|
||||||
|
|
|
@ -343,7 +343,7 @@ CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error)
|
||||||
if (mode->eBands==NULL)
|
if (mode->eBands==NULL)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
mode->pitchEnd = 4000*(celt_int32)frame_size/Fs;
|
mode->pitchEnd = 4000*(celt_int32)mode->shortMdctSize/Fs;
|
||||||
|
|
||||||
/* Overlap must be divisible by 4 */
|
/* Overlap must be divisible by 4 */
|
||||||
if (mode->nbShortMdcts > 1)
|
if (mode->nbShortMdcts > 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue