comparison binkaudio.c @ 11216:359c8ba0698e libavcodec

Fix compilation of binkaudio_rdft when dct is disabled
author daniel
date Fri, 19 Feb 2010 20:51:12 +0000
parents 28f00789adcd
children bfffb50b80bc
comparison
equal deleted inserted replaced
11215:964d01b50f17 11216:359c8ba0698e
120 avctx->sample_fmt = SAMPLE_FMT_S16; 120 avctx->sample_fmt = SAMPLE_FMT_S16;
121 121
122 for (i = 0; i < s->channels; i++) 122 for (i = 0; i < s->channels; i++)
123 s->coeffs_ptr[i] = s->coeffs + i * s->frame_len; 123 s->coeffs_ptr[i] = s->coeffs + i * s->frame_len;
124 124
125 if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) 125 if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)
126 ff_rdft_init(&s->trans.rdft, frame_len_bits, IRIDFT); 126 ff_rdft_init(&s->trans.rdft, frame_len_bits, IRIDFT);
127 else if (CONFIG_BINKAUDIO_DCT_DECODER)
128 ff_dct_init(&s->trans.dct, frame_len_bits, 0);
127 else 129 else
128 ff_dct_init(&s->trans.dct, frame_len_bits, 0); 130 return -1;
129 131
130 return 0; 132 return 0;
131 } 133 }
132 134
133 static float get_float(GetBitContext *gb) 135 static float get_float(GetBitContext *gb)
207 i++; 209 i++;
208 } 210 }
209 } 211 }
210 } 212 }
211 213
212 if (use_dct) 214 if (CONFIG_BINKAUDIO_DCT_DECODER && use_dct)
213 ff_dct_calc (&s->trans.dct, coeffs); 215 ff_dct_calc (&s->trans.dct, coeffs);
214 else 216 else if (CONFIG_BINKAUDIO_RDFT_DECODER)
215 ff_rdft_calc(&s->trans.rdft, coeffs); 217 ff_rdft_calc(&s->trans.rdft, coeffs);
216 } 218 }
217 219
218 s->dsp.float_to_int16_interleave(out, (const float **)s->coeffs_ptr, s->frame_len, s->channels); 220 s->dsp.float_to_int16_interleave(out, (const float **)s->coeffs_ptr, s->frame_len, s->channels);
219 221
233 235
234 static av_cold int decode_end(AVCodecContext *avctx) 236 static av_cold int decode_end(AVCodecContext *avctx)
235 { 237 {
236 BinkAudioContext * s = avctx->priv_data; 238 BinkAudioContext * s = avctx->priv_data;
237 av_freep(&s->bands); 239 av_freep(&s->bands);
238 if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) 240 if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)
239 ff_rdft_end(&s->trans.rdft); 241 ff_rdft_end(&s->trans.rdft);
240 else 242 else if (CONFIG_BINKAUDIO_DCT_DECODER)
241 ff_dct_end(&s->trans.dct); 243 ff_dct_end(&s->trans.dct);
242 return 0; 244 return 0;
243 } 245 }
244 246
245 static void get_bits_align32(GetBitContext *s) 247 static void get_bits_align32(GetBitContext *s)