yading@10
|
1 /*
|
yading@10
|
2 * This file is part of Libav.
|
yading@10
|
3 *
|
yading@10
|
4 * Libav is free software; you can redistribute it and/or
|
yading@10
|
5 * modify it under the terms of the GNU Lesser General Public
|
yading@10
|
6 * License as published by the Free Software Foundation; either
|
yading@10
|
7 * version 2.1 of the License, or (at your option) any later version.
|
yading@10
|
8 *
|
yading@10
|
9 * Libav is distributed in the hope that it will be useful,
|
yading@10
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
yading@10
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
yading@10
|
12 * Lesser General Public License for more details.
|
yading@10
|
13 *
|
yading@10
|
14 * You should have received a copy of the GNU Lesser General Public
|
yading@10
|
15 * License along with Libav; if not, write to the Free Software
|
yading@10
|
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
yading@10
|
17 */
|
yading@10
|
18
|
yading@10
|
19 #ifndef AVCODEC_MPEGAUDIODSP_H
|
yading@10
|
20 #define AVCODEC_MPEGAUDIODSP_H
|
yading@10
|
21
|
yading@10
|
22 #include <stdint.h>
|
yading@10
|
23 #include "libavutil/common.h"
|
yading@10
|
24
|
yading@10
|
25 typedef struct MPADSPContext {
|
yading@10
|
26 void (*apply_window_float)(float *synth_buf, float *window,
|
yading@10
|
27 int *dither_state, float *samples, int incr);
|
yading@10
|
28 void (*apply_window_fixed)(int32_t *synth_buf, int32_t *window,
|
yading@10
|
29 int *dither_state, int16_t *samples, int incr);
|
yading@10
|
30 void (*dct32_float)(float *dst, const float *src);
|
yading@10
|
31 void (*dct32_fixed)(int *dst, const int *src);
|
yading@10
|
32
|
yading@10
|
33 void (*imdct36_blocks_float)(float *out, float *buf, float *in,
|
yading@10
|
34 int count, int switch_point, int block_type);
|
yading@10
|
35 void (*imdct36_blocks_fixed)(int *out, int *buf, int *in,
|
yading@10
|
36 int count, int switch_point, int block_type);
|
yading@10
|
37 } MPADSPContext;
|
yading@10
|
38
|
yading@10
|
39 void ff_mpadsp_init(MPADSPContext *s);
|
yading@10
|
40
|
yading@10
|
41 extern int32_t ff_mpa_synth_window_fixed[];
|
yading@10
|
42 extern float ff_mpa_synth_window_float[];
|
yading@10
|
43
|
yading@10
|
44 extern const int32_t ff_mpa_enwindow[257];
|
yading@10
|
45
|
yading@10
|
46 void ff_mpa_synth_filter_fixed(MPADSPContext *s,
|
yading@10
|
47 int32_t *synth_buf_ptr, int *synth_buf_offset,
|
yading@10
|
48 int32_t *window, int *dither_state,
|
yading@10
|
49 int16_t *samples, int incr,
|
yading@10
|
50 int32_t *sb_samples);
|
yading@10
|
51
|
yading@10
|
52 void ff_mpa_synth_filter_float(MPADSPContext *s,
|
yading@10
|
53 float *synth_buf_ptr, int *synth_buf_offset,
|
yading@10
|
54 float *window, int *dither_state,
|
yading@10
|
55 float *samples, int incr,
|
yading@10
|
56 float *sb_samples);
|
yading@10
|
57
|
yading@10
|
58 void ff_mpadsp_init_arm(MPADSPContext *s);
|
yading@10
|
59 void ff_mpadsp_init_x86(MPADSPContext *s);
|
yading@10
|
60 void ff_mpadsp_init_altivec(MPADSPContext *s);
|
yading@10
|
61 void ff_mpadsp_init_mipsfpu(MPADSPContext *s);
|
yading@10
|
62 void ff_mpadsp_init_mipsdspr1(MPADSPContext *s);
|
yading@10
|
63
|
yading@10
|
64 void ff_mpa_synth_init_float(float *window);
|
yading@10
|
65 void ff_mpa_synth_init_fixed(int32_t *window);
|
yading@10
|
66
|
yading@10
|
67 void ff_mpadsp_apply_window_float(float *synth_buf, float *window,
|
yading@10
|
68 int *dither_state, float *samples,
|
yading@10
|
69 int incr);
|
yading@10
|
70 void ff_mpadsp_apply_window_fixed(int32_t *synth_buf, int32_t *window,
|
yading@10
|
71 int *dither_state, int16_t *samples,
|
yading@10
|
72 int incr);
|
yading@10
|
73
|
yading@10
|
74 void ff_imdct36_blocks_float(float *out, float *buf, float *in,
|
yading@10
|
75 int count, int switch_point, int block_type);
|
yading@10
|
76
|
yading@10
|
77 void ff_imdct36_blocks_fixed(int *out, int *buf, int *in,
|
yading@10
|
78 int count, int switch_point, int block_type);
|
yading@10
|
79
|
yading@10
|
80 void ff_init_mpadsp_tabs_float(void);
|
yading@10
|
81 void ff_init_mpadsp_tabs_fixed(void);
|
yading@10
|
82
|
yading@10
|
83 /** For SSE implementation, MDCT_BUF_SIZE/2 should be 128-bit aligned */
|
yading@10
|
84 #define MDCT_BUF_SIZE FFALIGN(36, 2*4)
|
yading@10
|
85
|
yading@10
|
86 extern int ff_mdct_win_fixed[8][MDCT_BUF_SIZE];
|
yading@10
|
87 extern float ff_mdct_win_float[8][MDCT_BUF_SIZE];
|
yading@10
|
88
|
yading@10
|
89 #endif /* AVCODEC_MPEGAUDIODSP_H */
|