comparison binkaudio.c @ 11337:15dd07e86519 libavcodec

Perform coefficient transformations in Bink Audio DCT decoder (issue1770)
author pross
date Wed, 03 Mar 2010 09:51:56 +0000
parents bfffb50b80bc
children 98970e51365a
comparison
equal deleted inserted replaced
11336:ad4ac2a6373f 11337:15dd07e86519
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 (CONFIG_BINKAUDIO_RDFT_DECODER && 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) 127 else if (CONFIG_BINKAUDIO_DCT_DECODER)
128 ff_dct_init(&s->trans.dct, frame_len_bits, 0); 128 ff_dct_init(&s->trans.dct, frame_len_bits, 1);
129 else 129 else
130 return -1; 130 return -1;
131 131
132 return 0; 132 return 0;
133 } 133 }
209 i++; 209 i++;
210 } 210 }
211 } 211 }
212 } 212 }
213 213
214 if (CONFIG_BINKAUDIO_DCT_DECODER && use_dct) 214 if (CONFIG_BINKAUDIO_DCT_DECODER && use_dct) {
215 coeffs[0] /= 0.5;
215 ff_dct_calc (&s->trans.dct, coeffs); 216 ff_dct_calc (&s->trans.dct, coeffs);
217 s->dsp.vector_fmul_scalar(coeffs, coeffs, s->frame_len / 2, s->frame_len);
218 }
216 else if (CONFIG_BINKAUDIO_RDFT_DECODER) 219 else if (CONFIG_BINKAUDIO_RDFT_DECODER)
217 ff_rdft_calc(&s->trans.rdft, coeffs); 220 ff_rdft_calc(&s->trans.rdft, coeffs);
218 } 221 }
219 222
220 s->dsp.float_to_int16_interleave(out, (const float **)s->coeffs_ptr, s->frame_len, s->channels); 223 s->dsp.float_to_int16_interleave(out, (const float **)s->coeffs_ptr, s->frame_len, s->channels);