diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-08-28 09:11:45 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-01 13:42:44 -0400 |
commit | 1a3459033dc94d3f6e1b7e7c4de227fda369f2bf (patch) | |
tree | bae054f19164d46ba265fba3f21da2bc4feab65e /libavcodec/mpc.c | |
parent | 3fca0d72105a607926adea702065b1a00adb0b5d (diff) | |
download | ffmpeg-1a3459033dc94d3f6e1b7e7c4de227fda369f2bf.tar.gz |
mpc7/8: use planar sample format
Diffstat (limited to 'libavcodec/mpc.c')
-rw-r--r-- | libavcodec/mpc.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libavcodec/mpc.c b/libavcodec/mpc.c index 6b15a33e5a..5a54a9bad9 100644 --- a/libavcodec/mpc.c +++ b/libavcodec/mpc.c @@ -43,28 +43,24 @@ void ff_mpc_init(void) /** * Process decoded Musepack data and produce PCM */ -static void mpc_synth(MPCContext *c, int16_t *out, int channels) +static void mpc_synth(MPCContext *c, int16_t **out, int channels) { int dither_state = 0; int i, ch; - OUT_INT samples[MPA_MAX_CHANNELS * MPA_FRAME_SIZE], *samples_ptr; for(ch = 0; ch < channels; ch++){ - samples_ptr = samples + ch; for(i = 0; i < SAMPLES_PER_BAND; i++) { ff_mpa_synth_filter_fixed(&c->mpadsp, c->synth_buf[ch], &(c->synth_buf_offset[ch]), ff_mpa_synth_window_fixed, &dither_state, - samples_ptr, channels, + out[ch] + 32 * i, 1, c->sb_samples[ch][i]); - samples_ptr += 32 * channels; } } - for(i = 0; i < MPC_FRAME_SIZE*channels; i++) - *out++=samples[i]; } -void ff_mpc_dequantize_and_synth(MPCContext * c, int maxband, void *data, int channels) +void ff_mpc_dequantize_and_synth(MPCContext * c, int maxband, int16_t **out, + int channels) { int i, j, ch; Band *bands = c->bands; @@ -100,5 +96,5 @@ void ff_mpc_dequantize_and_synth(MPCContext * c, int maxband, void *data, int ch } } - mpc_synth(c, data, channels); + mpc_synth(c, out, channels); } |