- if (alac->wasted_bits) {
- int i, ch;
- for (i = 0; i < outputsamples; i++) {
- for (ch = 0; ch < channels; ch++)
- alac->wasted_bits_buffer[ch][i] = get_bits(&alac->gb, alac->wasted_bits);
- }
- }
- for (chan = 0; chan < channels; chan++) {
- bastardized_rice_decompress(alac,
- alac->predicterror_buffer[chan],
- outputsamples,
- readsamplesize,
- alac->setinfo_rice_initialhistory,
- alac->setinfo_rice_kmodifier,
- ricemodifier[chan] * alac->setinfo_rice_historymult / 4,
- (1 << alac->setinfo_rice_kmodifier) - 1);
-
- if (prediction_type[chan] == 0) {
- /* adaptive fir */
- predictor_decompress_fir_adapt(alac->predicterror_buffer[chan],
- alac->outputsamples_buffer[chan],
- outputsamples,
- readsamplesize,
- predictor_coef_table[chan],
- predictor_coef_num[chan],
- prediction_quantitization[chan]);
- } else {
- av_log(avctx, AV_LOG_ERROR, "FIXME: unhandled prediction type: %i\n", prediction_type[chan]);
- /* I think the only other prediction type (or perhaps this is
- * just a boolean?) runs adaptive fir twice.. like:
- * predictor_decompress_fir_adapt(predictor_error, tempout, ...)
- * predictor_decompress_fir_adapt(predictor_error, outputsamples ...)
- * little strange..
- */
- }
- }
- } else {
- /* not compressed, easy case */
- int i, chan;
- if (alac->setinfo_sample_size <= 16) {
- for (i = 0; i < outputsamples; i++)
- for (chan = 0; chan < channels; chan++) {
- int32_t audiobits;