00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef AVCODEC_MPEGAUDIODSP_H
00020 #define AVCODEC_MPEGAUDIODSP_H
00021
00022 #include <stdint.h>
00023 #include "libavutil/common.h"
00024
00025 typedef struct MPADSPContext {
00026 void (*apply_window_float)(float *synth_buf, float *window,
00027 int *dither_state, float *samples, int incr);
00028 void (*apply_window_fixed)(int32_t *synth_buf, int32_t *window,
00029 int *dither_state, int16_t *samples, int incr);
00030 void (*dct32_float)(float *dst, const float *src);
00031 void (*dct32_fixed)(int *dst, const int *src);
00032
00033 void (*imdct36_blocks_float)(float *out, float *buf, float *in,
00034 int count, int switch_point, int block_type);
00035 void (*imdct36_blocks_fixed)(int *out, int *buf, int *in,
00036 int count, int switch_point, int block_type);
00037 } MPADSPContext;
00038
00039 void ff_mpadsp_init(MPADSPContext *s);
00040
00041 extern int32_t ff_mpa_synth_window_fixed[];
00042 extern float ff_mpa_synth_window_float[];
00043
00044 extern const int32_t ff_mpa_enwindow[257];
00045
00046 void ff_mpa_synth_filter_fixed(MPADSPContext *s,
00047 int32_t *synth_buf_ptr, int *synth_buf_offset,
00048 int32_t *window, int *dither_state,
00049 int16_t *samples, int incr,
00050 int32_t *sb_samples);
00051
00052 void ff_mpa_synth_filter_float(MPADSPContext *s,
00053 float *synth_buf_ptr, int *synth_buf_offset,
00054 float *window, int *dither_state,
00055 float *samples, int incr,
00056 float *sb_samples);
00057
00058 void ff_mpadsp_init_arm(MPADSPContext *s);
00059 void ff_mpadsp_init_mmx(MPADSPContext *s);
00060 void ff_mpadsp_init_altivec(MPADSPContext *s);
00061 void ff_mpadsp_init_mipsfpu(MPADSPContext *s);
00062 void ff_mpadsp_init_mipsdspr1(MPADSPContext *s);
00063
00064 void ff_mpa_synth_init_float(float *window);
00065 void ff_mpa_synth_init_fixed(int32_t *window);
00066
00067 void ff_mpadsp_apply_window_float(float *synth_buf, float *window,
00068 int *dither_state, float *samples,
00069 int incr);
00070 void ff_mpadsp_apply_window_fixed(int32_t *synth_buf, int32_t *window,
00071 int *dither_state, int16_t *samples,
00072 int incr);
00073
00074 void ff_imdct36_blocks_float(float *out, float *buf, float *in,
00075 int count, int switch_point, int block_type);
00076
00077 void ff_imdct36_blocks_fixed(int *out, int *buf, int *in,
00078 int count, int switch_point, int block_type);
00079
00080 void ff_init_mpadsp_tabs_float(void);
00081 void ff_init_mpadsp_tabs_fixed(void);
00082
00084 #define MDCT_BUF_SIZE FFALIGN(36, 2*4)
00085
00086 extern int ff_mdct_win_fixed[8][MDCT_BUF_SIZE];
00087 extern float ff_mdct_win_float[8][MDCT_BUF_SIZE];
00088
00089 #endif