comparison mpegaudiodec_float.c @ 12044:49c528a39187 libavcodec

mpegaudio: move compute_antialias_float() to mpegaudiodec_float.c Also put compute_antialias_integer() under !CONFIG_FLOAT and change forward declarations to declare only the relevant one of these. Fixes warnings about unused functions and pointer type mismatches.
author mru
date Thu, 01 Jul 2010 23:21:20 +0000
parents 3f3d08bb5cf8
children fb3fcaf3c1b6
comparison
equal deleted inserted replaced
12043:f9a0bd0888a4 12044:49c528a39187
37 s->dct.dct32(synth_buf, sb_samples); 37 s->dct.dct32(synth_buf, sb_samples);
38 s->apply_window_mp3(synth_buf, window, dither_state, samples, incr); 38 s->apply_window_mp3(synth_buf, window, dither_state, samples, incr);
39 39
40 offset = (offset - 32) & 511; 40 offset = (offset - 32) & 511;
41 *synth_buf_offset = offset; 41 *synth_buf_offset = offset;
42 }
43
44 static void compute_antialias_float(MPADecodeContext *s,
45 GranuleDef *g)
46 {
47 float *ptr;
48 int n, i;
49
50 /* we antialias only "long" bands */
51 if (g->block_type == 2) {
52 if (!g->switch_point)
53 return;
54 /* XXX: check this for 8000Hz case */
55 n = 1;
56 } else {
57 n = SBLIMIT - 1;
58 }
59
60 ptr = g->sb_hybrid + 18;
61 for(i = n;i > 0;i--) {
62 float tmp0, tmp1;
63 float *csa = &csa_table_float[0][0];
64 #define FLOAT_AA(j)\
65 tmp0= ptr[-1-j];\
66 tmp1= ptr[ j];\
67 ptr[-1-j] = tmp0 * csa[0+4*j] - tmp1 * csa[1+4*j];\
68 ptr[ j] = tmp0 * csa[1+4*j] + tmp1 * csa[0+4*j];
69
70 FLOAT_AA(0)
71 FLOAT_AA(1)
72 FLOAT_AA(2)
73 FLOAT_AA(3)
74 FLOAT_AA(4)
75 FLOAT_AA(5)
76 FLOAT_AA(6)
77 FLOAT_AA(7)
78
79 ptr += 18;
80 }
42 } 81 }
43 82
44 #if CONFIG_MP1FLOAT_DECODER 83 #if CONFIG_MP1FLOAT_DECODER
45 AVCodec mp1float_decoder = 84 AVCodec mp1float_decoder =
46 { 85 {