/* generic decoder variables */
AVCodecContext* avctx; ///< codec context for av_log
AVFrame frame; ///< AVFrame for decoded output
- DSPContext dsp; ///< accelerated DSP functions
AVFloatDSPContext fdsp;
uint8_t frame_data[MAX_FRAMESIZE +
FF_INPUT_BUFFER_PADDING_SIZE];///< compressed frame data
int num_possible_block_sizes;
s->avctx = avctx;
- ff_dsputil_init(&s->dsp, avctx);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);
} else {
av_log_ask_for_sample(avctx, "Unknown extradata size\n");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
/** generic init */
int c;
/* Should never consume more than 3073 bits (256 iterations for the
- * while loop when always the minimum amount of 128 samples is substracted
+ * while loop when always the minimum amount of 128 samples is subtracted
* from missing samples in the 8 channel case).
* 1 + BLOCK_MAX_SIZE * MAX_CHANNELS / BLOCK_MIN_SIZE * (MAX_CHANNELS + 4)
*/
if (get_bits1(&s->gb)) {
av_log_ask_for_sample(s->avctx,
"unsupported channel transform bit\n");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
for (s->num_chgroups = 0; remaining_channels &&
winlen >>= 1;
- s->dsp.vector_fmul_window(start, start, start + winlen,
- window, winlen);
+ s->fdsp.vector_fmul_window(start, start, start + winlen,
+ window, winlen);
s->channel[c].prev_block_len = s->subframe_len;
}
s->channels_for_cur_subframe = 0;
for (i = 0; i < s->avctx->channels; i++) {
const int cur_subframe = s->channel[i].cur_subframe;
- /** substract already processed samples */
+ /** subtract already processed samples */
total_samples -= s->channel[i].decoded_samples;
/** and count if there are multiple subframes that match our profile */
/** no idea for what the following bit is used */
if (get_bits1(&s->gb)) {
av_log_ask_for_sample(s->avctx, "reserved bit set\n");
- return AVERROR_INVALIDDATA;
+ return AVERROR_PATCHWELCOME;
}
/* get output buffer */
s->frame.nb_samples = s->samples_per_frame;
- 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");
s->packet_loss = 1;
return 0;