#include "synth_filter.h"
#include "dcadsp.h"
#include "fmtconvert.h"
+#include "internal.h"
#if ARCH_ARM
# include "arm/dca.h"
s->lfe = get_bits(&s->gb, 2);
s->predictor_history = get_bits(&s->gb, 1);
+ if (s->lfe == 3) {
+ s->lfe = 0;
+ av_log_ask_for_sample(s->avctx, "LFE is 3\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
/* TODO: check CRC */
if (s->crc_present)
s->header_crc = get_bits(&s->gb, 16);
for (k = 0; k < s->prim_channels; k++) {
/* static float pcm_to_double[8] = { 32768.0, 32768.0, 524288.0, 524288.0,
0, 8388608.0, 8388608.0 };*/
- if(s->channel_order_tab[k] >= 0)
- qmf_32_subbands(s, k, subband_samples[k],
- s->samples_chanptr[s->channel_order_tab[k]],
- M_SQRT1_2 / 32768.0 /* pcm_to_double[s->source_pcm_res] */);
+ if (s->channel_order_tab[k] >= 0)
+ qmf_32_subbands(s, k, subband_samples[k],
+ s->samples_chanptr[s->channel_order_tab[k]],
+ M_SQRT1_2 / 32768.0 /* pcm_to_double[s->source_pcm_res] */);
}
/* Down mixing */
continue;
}
+ if (s->xch_base_channel < 2) {
+ av_log_ask_for_sample(avctx, "XCh with fewer than 2 base channels is not supported\n");
+ continue;
+ }
+
/* much like core primary audio coding header */
dca_parse_audio_coding_header(s, s->xch_base_channel, 0);
/* get output buffer */
s->frame.nb_samples = 256 * (s->sample_blocks / 8);
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}