# HG changeset patch # User voroshil # Date 1244946666 0 # Node ID ae38e13a63d6790b46319dd304fd63db88d02550 # Parent af3cc583501e623d9dfd87b5ebd149ffc3fffa6b G.729 decoder initialization routine (skeleton) diff -r af3cc583501e -r ae38e13a63d6 g729dec.c --- a/g729dec.c Sun Jun 14 02:29:39 2009 +0000 +++ b/g729dec.c Sun Jun 14 02:31:06 2009 +0000 @@ -97,11 +97,19 @@ return (0x6996966996696996ULL >> (value >> 2)) & 1; } +static av_cold int decoder_init(AVCodecContext * avctx) +{ if (avctx->channels != 1) { av_log(avctx, AV_LOG_ERROR, "Only mono sound is supported (requested channels: %d).\n", avctx->channels); 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], fc + pitch_delay_int[i], fc, 1 << 14,