~siretart/libav/trusty

« back to all changes in this revision

Viewing changes to libavcodec/mpc.c

  • Committer: Reinhard Tartler
  • Date: 2013-10-23 03:04:17 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: siretart@tauware.de-20131023030417-1o6mpkl1l0raifjt
mergeĀ fromĀ debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
/**
44
44
 * Process decoded Musepack data and produce PCM
45
45
 */
46
 
static void mpc_synth(MPCContext *c, int16_t *out, int channels)
 
46
static void mpc_synth(MPCContext *c, int16_t **out, int channels)
47
47
{
48
48
    int dither_state = 0;
49
49
    int i, ch;
50
 
    OUT_INT samples[MPA_MAX_CHANNELS * MPA_FRAME_SIZE], *samples_ptr;
51
50
 
52
51
    for(ch = 0;  ch < channels; ch++){
53
 
        samples_ptr = samples + ch;
54
52
        for(i = 0; i < SAMPLES_PER_BAND; i++) {
55
53
            ff_mpa_synth_filter_fixed(&c->mpadsp,
56
54
                                c->synth_buf[ch], &(c->synth_buf_offset[ch]),
57
55
                                ff_mpa_synth_window_fixed, &dither_state,
58
 
                                samples_ptr, channels,
 
56
                                out[ch] + 32 * i, 1,
59
57
                                c->sb_samples[ch][i]);
60
 
            samples_ptr += 32 * channels;
61
58
        }
62
59
    }
63
 
    for(i = 0; i < MPC_FRAME_SIZE*channels; i++)
64
 
        *out++=samples[i];
65
60
}
66
61
 
67
 
void ff_mpc_dequantize_and_synth(MPCContext * c, int maxband, void *data, int channels)
 
62
void ff_mpc_dequantize_and_synth(MPCContext * c, int maxband, int16_t **out,
 
63
                                 int channels)
68
64
{
69
65
    int i, j, ch;
70
66
    Band *bands = c->bands;
100
96
        }
101
97
    }
102
98
 
103
 
    mpc_synth(c, data, channels);
 
99
    mpc_synth(c, out, channels);
104
100
}