📄 mp3enc_own_fp.h
字号:
/*//////////////////////////////////////////////////////////////////////////////
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright(c) 2006-2007 Intel Corporation. All Rights Reserved.
//
*/
#ifndef __MP3ENC_OWN_FP_H__
#define __MP3ENC_OWN_FP_H__
#include "math.h"
#include "mp3enc_own.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef PI
#define PI 3.14159265359f
#endif
typedef Ipp32f samplefbout[2][18][32];
struct _MP3Enc {
MP3Enc_com com;
// mdct
IppsMDCTFwdSpec_32f *pMDCTSpec12;
IppsMDCTFwdSpec_32f *pMDCTSpec36;
Ipp8u *pMDCTbuf;
IppsFilterSpec_PQMF_MP3 *pPQMFSpec[NUM_CHANNELS];
Ipp8u *pqmf_mem;
Ipp32s pqmf_size;
VM_ALIGN16_DECL(Ipp32f) mdct_win[4][36];
Ipp32f ca[8], cs[8];
// ------//-------
VM_ALIGN16_DECL(Ipp32f) input_buffer[NUM_CHANNELS+LFE_CHANNEL][480 + 1152];
VM_ALIGN16_DECL(samplefbout) fbout_data[NUM_CHANNELS];
VM_ALIGN16_DECL(Ipp32f) mdct_out[2][2][576];
samplefbout *fbout[3];
Ipp32s fbout_prev;
Ipp32f mc_lfe_buf[12];
VM_ALIGN16_DECL(Ipp32f) pa_hann_window_long[512*2];
VM_ALIGN16_DECL(Ipp32f) pa_hann_window_short[128*2];
Ipp32f mdct_line_abs[576];
Ipp32f mdct_scaled[576];
Ipp32f mdct_rqnt[576];
Ipp32f pa_sprdngf_long[MAX_PPT_LONG * MAX_PPT_LONG];
Ipp32f pa_sprdngf_short[MAX_PPT_SHORT * MAX_PPT_SHORT];
Ipp32f pa_rnorm_long[MAX_PPT_LONG];
Ipp32f pa_rnorm_short[MAX_PPT_SHORT];
Ipp32f pa_nb_long[NUM_CHANNELS][2][MAX_PPT_LONG];
VM_ALIGN16_DECL(Ipp32f) fft_line_long[2][2*512+2];
VM_ALIGN16_DECL(Ipp32f) fft_line_short[2][3][2*128+2];
Ipp32f pa_ratio_l[2][4][SBBND_L];
Ipp32f pa_ratio_s[2][4][3][SBBND_S];
Ipp32f pa_ratio_l_next[4][SBBND_L];
Ipp32f pa_ratio_s_next[4][3][SBBND_S];
Ipp32f ms_pwr[2];
Ipp32f ms_coef[2], ms_coef_next;
IppsFFTSpec_R_32f* pa_pFFTSpecShort;
IppsFFTSpec_R_32f* pa_pFFTSpecLong;
Ipp8u* pa_pBuffer;
VM_ALIGN16_DECL(Ipp32f) pa_r[NUM_CHANNELS][3][512];
VM_ALIGN16_DECL(Ipp32f) pa_re[NUM_CHANNELS][3][512];
VM_ALIGN16_DECL(Ipp32f) pa_im[NUM_CHANNELS][3][512];
VM_ALIGN16_DECL(Ipp32f) pa_r_short[4][3][3][128];
VM_ALIGN16_DECL(Ipp32f) pa_re_short[4][3][3][128];
VM_ALIGN16_DECL(Ipp32f) pa_im_short[4][3][3][128];
/* l12 */
VM_ALIGN16_DECL(Ipp32f) pa_snr[NUM_CHANNELS+1][32];
Ipp32f *snr;
/* *** */
Ipp32f pa_next_frame_PE[4];
Ipp32f pa_curr_frame_PE[4];
Ipp32f pa_curr_frame_PE_st[2][4];
Ipp32s start_common_scalefac;
Ipp32s finish_common_scalefac;
Ipp32s common_scalefactor_update[2];
Ipp32s last_frame_common_scalefactor[2];
Ipp32s pa_iblen_long; // = 512
Ipp32s pa_iblen_short;// = 128
Ipp32s pa_current_f_r_index[NUM_CHANNELS]; // Can be 0, 1, 2
Ipp32s pa_num_ptt_long;
Ipp32s pa_num_ptt_short;
Ipp32s pa_nb_curr_index[NUM_CHANNELS];
Ipp32s pa_nb_prev_index[NUM_CHANNELS];
Ipp32s pa_desired_block_type[4];
Ipp32s pa_next_desired_block_type[2][4];
};
typedef struct _ptblthr_12 {
Ipp32s numlines;
Ipp32f absthr;
} ptblthr_12;
typedef struct _ptbl_l {
Ipp32s numlines;
Ipp32f bval;
} ptbl_l;
typedef struct _ptbl_s {
Ipp32s numlines;
Ipp32f qthr;
Ipp32f SNR;
Ipp32f bval;
} ptbl_s;
typedef struct _p2sb {
Ipp32s bu;
Ipp32s bo;
Ipp32f w1;
Ipp32f w2;
} p2sb;
extern const Ipp32f mp3enc_ptbl_TMN_l2[3][CBANDS_12];
extern const Ipp32f mp3enc_ptbl_minval_l12[3][CBANDS_12];
extern const Ipp32f mp3enc_ptbl_bval_l12[3][CBANDS_12];
extern const Ipp32s mp3enc_ptbl_numlines_l12[3][CBANDS_12];
extern const ptblthr_12 mp3enc_absthr[3][132];
extern const ptbl_l mp3enc_ptbl_l[3][CBANDS_l];
extern const ptbl_s mp3enc_ptbl_s[3][CBANDS_s];
extern const p2sb mp3enc_p2sb_l[3][SBBND_L];
extern const p2sb mp3enc_p2sb_s[3][SBBND_S];
MP3Status mp3enc_mdctInit(MP3Enc *state, Ipp8u *mem, Ipp32s *size);
Ipp32s mp3enc_mdctInSubband(MP3Enc *state, Ipp32f *in, Ipp32f *out, Ipp32s block_type);
Ipp32s mp3enc_mdctBlock(MP3Enc *state);
Ipp32s mp3enc_quantization_l1(MP3Enc *state);
Ipp32s mp3enc_quantization_l2(MP3Enc *state);
Ipp32s mp3enc_quantization_l3(MP3Enc *state);
MP3Status mp3enc_psychoacousticInit(MP3Enc *state, Ipp8u *mem, Ipp32s *size);
void mp3enc_psychoacoustic_l1(MP3Enc *state, Ipp32f **pa_buffer);
void mp3enc_psychoacoustic_l2(MP3Enc *state, Ipp32f **pa_buffer);
void mp3enc_psychoacoustic_l3(MP3Enc *state, Ipp32f **pa_buffer);
void mp3enc_mc_normalizing (MP3Enc *state);
void mp3enc_mc_matricing (MP3Enc *state);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -