diff options
author | Djordje Pesut <djordje.pesut@imgtec.com> | 2015-07-20 13:36:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-20 17:20:16 +0200 |
commit | f85bc147fb87de048ccc5767e186ac59ec0284ef (patch) | |
tree | b94b04d6110ec84a79fa1466d29c700d04d1f841 /libavcodec/sbr.h | |
parent | b0414da90d6da34144ad9dadd5445fe62cf755a6 (diff) | |
download | ffmpeg-f85bc147fb87de048ccc5767e186ac59ec0284ef.tar.gz |
avcodec: Implementation of AAC_fixed_decoder (SBR-module)
Add fixed poind code.
Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/sbr.h')
-rw-r--r-- | libavcodec/sbr.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/libavcodec/sbr.h b/libavcodec/sbr.h index ff00acba0d..66a88a2898 100644 --- a/libavcodec/sbr.h +++ b/libavcodec/sbr.h @@ -66,9 +66,9 @@ typedef struct SBRData { */ unsigned bs_frame_class; unsigned bs_add_harmonic_flag; - unsigned bs_num_env; + AAC_SIGNE bs_num_env; uint8_t bs_freq_res[7]; - unsigned bs_num_noise; + AAC_SIGNE bs_num_noise; uint8_t bs_df_env[5]; uint8_t bs_df_noise[2]; uint8_t bs_invf_mode[2][5]; @@ -80,25 +80,25 @@ typedef struct SBRData { * @name State variables * @{ */ - DECLARE_ALIGNED(32, float, synthesis_filterbank_samples)[SBR_SYNTHESIS_BUF_SIZE]; - DECLARE_ALIGNED(32, float, analysis_filterbank_samples) [1312]; + DECLARE_ALIGNED(32, INTFLOAT, synthesis_filterbank_samples)[SBR_SYNTHESIS_BUF_SIZE]; + DECLARE_ALIGNED(32, INTFLOAT, analysis_filterbank_samples) [1312]; int synthesis_filterbank_samples_offset; ///l_APrev and l_A int e_a[2]; ///Chirp factors - float bw_array[5]; + INTFLOAT bw_array[5]; ///QMF values of the original signal - float W[2][32][32][2]; + INTFLOAT W[2][32][32][2]; ///QMF output of the HF adjustor int Ypos; - DECLARE_ALIGNED(16, float, Y)[2][38][64][2]; - DECLARE_ALIGNED(16, float, g_temp)[42][48]; - float q_temp[42][48]; + DECLARE_ALIGNED(16, INTFLOAT, Y)[2][38][64][2]; + DECLARE_ALIGNED(16, AAC_FLOAT, g_temp)[42][48]; + AAC_FLOAT q_temp[42][48]; uint8_t s_indexmapped[8][48]; ///Envelope scalefactors - float env_facs[6][48]; + AAC_FLOAT env_facs[6][48]; ///Noise scalefactors - float noise_facs[3][5]; + AAC_FLOAT noise_facs[3][5]; ///Envelope time borders uint8_t t_env[8]; ///Envelope time border of the last envelope of the previous frame @@ -117,18 +117,18 @@ typedef struct SpectralBandReplication SpectralBandReplication; */ typedef struct AACSBRContext { int (*sbr_lf_gen)(AACContext *ac, SpectralBandReplication *sbr, - float X_low[32][40][2], const float W[2][32][32][2], + INTFLOAT X_low[32][40][2], const INTFLOAT W[2][32][32][2], int buf_idx); - void (*sbr_hf_assemble)(float Y1[38][64][2], - const float X_high[64][40][2], + void (*sbr_hf_assemble)(INTFLOAT Y1[38][64][2], + const INTFLOAT X_high[64][40][2], SpectralBandReplication *sbr, SBRData *ch_data, const int e_a[2]); - int (*sbr_x_gen)(SpectralBandReplication *sbr, float X[2][38][64], - const float Y0[38][64][2], const float Y1[38][64][2], - const float X_low[32][40][2], int ch); + int (*sbr_x_gen)(SpectralBandReplication *sbr, INTFLOAT X[2][38][64], + const INTFLOAT Y0[38][64][2], const INTFLOAT Y1[38][64][2], + const INTFLOAT X_low[32][40][2], int ch); void (*sbr_hf_inverse_filter)(SBRDSPContext *dsp, - float (*alpha0)[2], float (*alpha1)[2], - const float X_low[32][40][2], int k0); + INTFLOAT (*alpha0)[2], INTFLOAT (*alpha1)[2], + const INTFLOAT X_low[32][40][2], int k0); } AACSBRContext; /** @@ -151,23 +151,23 @@ struct SpectralBandReplication { unsigned bs_smoothing_mode; /** @} */ unsigned bs_coupling; - unsigned k[5]; ///< k0, k1, k2 + AAC_SIGNE k[5]; ///< k0, k1, k2 ///kx', and kx respectively, kx is the first QMF subband where SBR is used. ///kx' is its value from the previous frame - unsigned kx[2]; + AAC_SIGNE kx[2]; ///M' and M respectively, M is the number of QMF subbands that use SBR. - unsigned m[2]; + AAC_SIGNE m[2]; unsigned kx_and_m_pushed; ///The number of frequency bands in f_master - unsigned n_master; + AAC_SIGNE n_master; SBRData data[2]; PSContext ps; ///N_Low and N_High respectively, the number of frequency bands for low and high resolution - unsigned n[2]; + AAC_SIGNE n[2]; ///Number of noise floor bands - unsigned n_q; + AAC_SIGNE n_q; ///Number of limiter bands - unsigned n_lim; + AAC_SIGNE n_lim; ///The master QMF frequency grouping uint16_t f_master[49]; ///Frequency borders for low resolution SBR @@ -178,33 +178,33 @@ struct SpectralBandReplication { uint16_t f_tablenoise[6]; ///Frequency borders for the limiter uint16_t f_tablelim[30]; - unsigned num_patches; + AAC_SIGNE num_patches; uint8_t patch_num_subbands[6]; uint8_t patch_start_subband[6]; ///QMF low frequency input to the HF generator - DECLARE_ALIGNED(16, float, X_low)[32][40][2]; + DECLARE_ALIGNED(16, INTFLOAT, X_low)[32][40][2]; ///QMF output of the HF generator - DECLARE_ALIGNED(16, float, X_high)[64][40][2]; + DECLARE_ALIGNED(16, INTFLOAT, X_high)[64][40][2]; ///QMF values of the reconstructed signal - DECLARE_ALIGNED(16, float, X)[2][2][38][64]; + DECLARE_ALIGNED(16, INTFLOAT, X)[2][2][38][64]; ///Zeroth coefficient used to filter the subband signals - DECLARE_ALIGNED(16, float, alpha0)[64][2]; + DECLARE_ALIGNED(16, INTFLOAT, alpha0)[64][2]; ///First coefficient used to filter the subband signals - DECLARE_ALIGNED(16, float, alpha1)[64][2]; + DECLARE_ALIGNED(16, INTFLOAT, alpha1)[64][2]; ///Dequantized envelope scalefactors, remapped - float e_origmapped[7][48]; + AAC_FLOAT e_origmapped[7][48]; ///Dequantized noise scalefactors, remapped - float q_mapped[7][48]; + AAC_FLOAT q_mapped[7][48]; ///Sinusoidal presence, remapped uint8_t s_mapped[7][48]; ///Estimated envelope - float e_curr[7][48]; + AAC_FLOAT e_curr[7][48]; ///Amplitude adjusted noise scalefactors - float q_m[7][48]; + AAC_FLOAT q_m[7][48]; ///Sinusoidal levels - float s_m[7][48]; - float gain[7][48]; - DECLARE_ALIGNED(32, float, qmf_filter_scratch)[5][64]; + AAC_FLOAT s_m[7][48]; + AAC_FLOAT gain[7][48]; + DECLARE_ALIGNED(32, INTFLOAT, qmf_filter_scratch)[5][64]; FFTContext mdct_ana; FFTContext mdct; SBRDSPContext dsp; |