Commit a1bfd7da authored by voroshil's avatar voroshil

G.729 decoder initialization routine (skeleton)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19188 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7f6494a3
...@@ -97,11 +97,19 @@ static inline int get_parity(uint8_t value) ...@@ -97,11 +97,19 @@ static inline int get_parity(uint8_t value)
return (0x6996966996696996ULL >> (value >> 2)) & 1; return (0x6996966996696996ULL >> (value >> 2)) & 1;
} }
static av_cold int decoder_init(AVCodecContext * avctx)
{
if (avctx->channels != 1) { if (avctx->channels != 1) {
av_log(avctx, AV_LOG_ERROR, "Only mono sound is supported (requested channels: %d).\n", avctx->channels); av_log(avctx, AV_LOG_ERROR, "Only mono sound is supported (requested channels: %d).\n", avctx->channels);
return AVERROR_NOFMT; return AVERROR_NOFMT;
} }
/* Both 8kbit/s and 6.4kbit/s modes uses two subframes per frame. */
avctx->frame_size = SUBFRAME_SIZE << 1;
return 0;
}
ff_acelp_weighted_vector_sum(fc + pitch_delay_int[i], ff_acelp_weighted_vector_sum(fc + pitch_delay_int[i],
fc + pitch_delay_int[i], fc + pitch_delay_int[i],
fc, 1 << 14, fc, 1 << 14,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment