yading@10: /* yading@10: * This file is part of Libav. yading@10: * yading@10: * Libav is free software; you can redistribute it and/or yading@10: * modify it under the terms of the GNU Lesser General Public yading@10: * License as published by the Free Software Foundation; either yading@10: * version 2.1 of the License, or (at your option) any later version. yading@10: * yading@10: * Libav is distributed in the hope that it will be useful, yading@10: * but WITHOUT ANY WARRANTY; without even the implied warranty of yading@10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yading@10: * Lesser General Public License for more details. yading@10: * yading@10: * You should have received a copy of the GNU Lesser General Public yading@10: * License along with Libav; if not, write to the Free Software yading@10: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA yading@10: */ yading@10: yading@10: #ifndef AVCODEC_MPEGAUDIODSP_H yading@10: #define AVCODEC_MPEGAUDIODSP_H yading@10: yading@10: #include yading@10: #include "libavutil/common.h" yading@10: yading@10: typedef struct MPADSPContext { yading@10: void (*apply_window_float)(float *synth_buf, float *window, yading@10: int *dither_state, float *samples, int incr); yading@10: void (*apply_window_fixed)(int32_t *synth_buf, int32_t *window, yading@10: int *dither_state, int16_t *samples, int incr); yading@10: void (*dct32_float)(float *dst, const float *src); yading@10: void (*dct32_fixed)(int *dst, const int *src); yading@10: yading@10: void (*imdct36_blocks_float)(float *out, float *buf, float *in, yading@10: int count, int switch_point, int block_type); yading@10: void (*imdct36_blocks_fixed)(int *out, int *buf, int *in, yading@10: int count, int switch_point, int block_type); yading@10: } MPADSPContext; yading@10: yading@10: void ff_mpadsp_init(MPADSPContext *s); yading@10: yading@10: extern int32_t ff_mpa_synth_window_fixed[]; yading@10: extern float ff_mpa_synth_window_float[]; yading@10: yading@10: extern const int32_t ff_mpa_enwindow[257]; yading@10: yading@10: void ff_mpa_synth_filter_fixed(MPADSPContext *s, yading@10: int32_t *synth_buf_ptr, int *synth_buf_offset, yading@10: int32_t *window, int *dither_state, yading@10: int16_t *samples, int incr, yading@10: int32_t *sb_samples); yading@10: yading@10: void ff_mpa_synth_filter_float(MPADSPContext *s, yading@10: float *synth_buf_ptr, int *synth_buf_offset, yading@10: float *window, int *dither_state, yading@10: float *samples, int incr, yading@10: float *sb_samples); yading@10: yading@10: void ff_mpadsp_init_arm(MPADSPContext *s); yading@10: void ff_mpadsp_init_x86(MPADSPContext *s); yading@10: void ff_mpadsp_init_altivec(MPADSPContext *s); yading@10: void ff_mpadsp_init_mipsfpu(MPADSPContext *s); yading@10: void ff_mpadsp_init_mipsdspr1(MPADSPContext *s); yading@10: yading@10: void ff_mpa_synth_init_float(float *window); yading@10: void ff_mpa_synth_init_fixed(int32_t *window); yading@10: yading@10: void ff_mpadsp_apply_window_float(float *synth_buf, float *window, yading@10: int *dither_state, float *samples, yading@10: int incr); yading@10: void ff_mpadsp_apply_window_fixed(int32_t *synth_buf, int32_t *window, yading@10: int *dither_state, int16_t *samples, yading@10: int incr); yading@10: yading@10: void ff_imdct36_blocks_float(float *out, float *buf, float *in, yading@10: int count, int switch_point, int block_type); yading@10: yading@10: void ff_imdct36_blocks_fixed(int *out, int *buf, int *in, yading@10: int count, int switch_point, int block_type); yading@10: yading@10: void ff_init_mpadsp_tabs_float(void); yading@10: void ff_init_mpadsp_tabs_fixed(void); yading@10: yading@10: /** For SSE implementation, MDCT_BUF_SIZE/2 should be 128-bit aligned */ yading@10: #define MDCT_BUF_SIZE FFALIGN(36, 2*4) yading@10: yading@10: extern int ff_mdct_win_fixed[8][MDCT_BUF_SIZE]; yading@10: extern float ff_mdct_win_float[8][MDCT_BUF_SIZE]; yading@10: yading@10: #endif /* AVCODEC_MPEGAUDIODSP_H */