Revision fe2ff6d2 libavcodec/nellymoserdec.c
libavcodec/nellymoserdec.c | ||
---|---|---|
38 | 38 |
#include "avcodec.h" |
39 | 39 |
#include "dsputil.h" |
40 | 40 |
#include "fft.h" |
41 |
#include "fmtconvert.h" |
|
41 | 42 |
|
42 | 43 |
#define ALT_BITSTREAM_READER_LE |
43 | 44 |
#include "get_bits.h" |
... | ... | |
52 | 53 |
float scale_bias; |
53 | 54 |
DSPContext dsp; |
54 | 55 |
FFTContext imdct_ctx; |
56 |
FmtConvertContext fmt_conv; |
|
55 | 57 |
DECLARE_ALIGNED(16, float,imdct_out)[NELLY_BUF_LEN * 2]; |
56 | 58 |
} NellyMoserDecodeContext; |
57 | 59 |
|
... | ... | |
134 | 136 |
ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0); |
135 | 137 |
|
136 | 138 |
dsputil_init(&s->dsp, avctx); |
139 |
ff_fmt_convert_init(&s->fmt_conv, avctx); |
|
137 | 140 |
|
138 | 141 |
s->scale_bias = 1.0/(1*8); |
139 | 142 |
|
... | ... | |
175 | 178 |
|
176 | 179 |
for (i=0 ; i<blocks ; i++) { |
177 | 180 |
nelly_decode_block(s, &buf[i*NELLY_BLOCK_LEN], s->float_buf); |
178 |
s->dsp.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES);
|
|
181 |
s->fmt_conv.float_to_int16(&samples[i*NELLY_SAMPLES], s->float_buf, NELLY_SAMPLES);
|
|
179 | 182 |
*data_size += NELLY_SAMPLES*sizeof(int16_t); |
180 | 183 |
} |
181 | 184 |
|
Also available in: Unified diff