Working on some stability issues (appears to be solved by making the pitch
projection less aggressive). Also, fixed a 64-bit overflow in the stereo mode and added a "band rotation" function.
This commit is contained in:
parent
f347dd3b3d
commit
4a897680e3
6 changed files with 140 additions and 17 deletions
|
@ -266,6 +266,9 @@ int celt_encode(CELTEncoder *st, short *pcm)
|
|||
normalise_bands(st->mode, P, bandEp);
|
||||
}
|
||||
|
||||
band_rotation(st->mode, X, -1);
|
||||
band_rotation(st->mode, P, -1);
|
||||
|
||||
quant_energy(st->mode, bandE, st->oldBandE, &st->enc);
|
||||
|
||||
/* Pitch prediction */
|
||||
|
@ -295,6 +298,8 @@ int celt_encode(CELTEncoder *st, short *pcm)
|
|||
//printf ("\n");
|
||||
}
|
||||
|
||||
band_rotation(st->mode, X, 1);
|
||||
|
||||
/* Synthesis */
|
||||
denormalise_bands(st->mode, X, bandE);
|
||||
|
||||
|
@ -495,6 +500,7 @@ int celt_decode(CELTDecoder *st, char *data, int len, short *pcm)
|
|||
compute_band_energies(st->mode, P, bandEp);
|
||||
normalise_bands(st->mode, P, bandEp);
|
||||
}
|
||||
band_rotation(st->mode, P, -1);
|
||||
|
||||
/* Get the pitch gains */
|
||||
unquant_pitch(gains, st->mode->nbPBands, &dec);
|
||||
|
@ -505,6 +511,8 @@ int celt_decode(CELTDecoder *st, char *data, int len, short *pcm)
|
|||
/* Decode fixed codebook and merge with pitch */
|
||||
unquant_bands(st->mode, X, P, &dec);
|
||||
|
||||
band_rotation(st->mode, X, 1);
|
||||
|
||||
/* Synthesis */
|
||||
denormalise_bands(st->mode, X, bandE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue