optimisations: faster handling of the zero for compute_band_energies() and
normalise_bands(). Also, another bunch of restrict qualifiers -- mainly to tell the compiler there's no aliasing between the array bounds and the data.
This commit is contained in:
parent
25aeed74f1
commit
a56c34f381
2 changed files with 23 additions and 22 deletions
|
@ -56,16 +56,16 @@ void compute_band_energies(const CELTMode *m, const celt_sig_t *X, celt_ener_t *
|
|||
* @param X Spectrum (returned normalised)
|
||||
* @param bands Square root of the energy for each band
|
||||
*/
|
||||
void normalise_bands(const CELTMode *m, const celt_sig_t *freq, celt_norm_t *X, const celt_ener_t *bands);
|
||||
void normalise_bands(const CELTMode *m, const celt_sig_t * restrict freq, celt_norm_t * restrict X, const celt_ener_t *bands);
|
||||
|
||||
void renormalise_bands(const CELTMode *m, celt_norm_t *X);
|
||||
void renormalise_bands(const CELTMode *m, celt_norm_t * restrict X);
|
||||
|
||||
/** Denormalise each band of X to restore full amplitude
|
||||
* @param m Mode data
|
||||
* @param X Spectrum (returned de-normalised)
|
||||
* @param bands Square root of the energy for each band
|
||||
*/
|
||||
void denormalise_bands(const CELTMode *m, const celt_norm_t *X, celt_sig_t *freq, const celt_ener_t *bands);
|
||||
void denormalise_bands(const CELTMode *m, const celt_norm_t * restrict X, celt_sig_t * restrict freq, const celt_ener_t *bands);
|
||||
|
||||
/** Compute the pitch predictor gain for each pitch band
|
||||
* @param m Mode data
|
||||
|
@ -76,7 +76,7 @@ void denormalise_bands(const CELTMode *m, const celt_norm_t *X, celt_sig_t *freq
|
|||
*/
|
||||
void compute_pitch_gain(const CELTMode *m, const celt_norm_t *X, const celt_norm_t *P, celt_pgain_t *gains);
|
||||
|
||||
void pitch_quant_bands(const CELTMode *m, celt_norm_t *P, const celt_pgain_t *gains);
|
||||
void pitch_quant_bands(const CELTMode *m, celt_norm_t * restrict P, const celt_pgain_t * restrict gains);
|
||||
|
||||
/** Quantisation/encoding of the residual spectrum
|
||||
* @param m Mode data
|
||||
|
@ -86,7 +86,7 @@ void pitch_quant_bands(const CELTMode *m, celt_norm_t *P, const celt_pgain_t *ga
|
|||
* @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
|
||||
* @param enc Entropy encoder
|
||||
*/
|
||||
void quant_bands(const CELTMode *m, celt_norm_t *X, celt_norm_t *P, celt_mask_t *W, int total_bits, ec_enc *enc);
|
||||
void quant_bands(const CELTMode *m, celt_norm_t * restrict X, celt_norm_t *P, celt_mask_t *W, int total_bits, ec_enc *enc);
|
||||
|
||||
/** Decoding of the residual spectrum
|
||||
* @param m Mode data
|
||||
|
@ -95,7 +95,7 @@ void quant_bands(const CELTMode *m, celt_norm_t *X, celt_norm_t *P, celt_mask_t
|
|||
* @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
|
||||
* @param dec Entropy decoder
|
||||
*/
|
||||
void unquant_bands(const CELTMode *m, celt_norm_t *X, celt_norm_t *P, int total_bits, ec_dec *dec);
|
||||
void unquant_bands(const CELTMode *m, celt_norm_t * restrict X, celt_norm_t *P, int total_bits, ec_dec *dec);
|
||||
|
||||
void stereo_mix(const CELTMode *m, celt_norm_t *X, const celt_ener_t *bank, int dir);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue