summaryrefslogtreecommitdiff
path: root/libavcodec/g729dec.c
diff options
context:
space:
mode:
authorVladimir Voroshilov <voroshil@gmail.com>2009-06-14 02:31:06 +0000
committerVladimir Voroshilov <voroshil@gmail.com>2009-06-14 02:31:06 +0000
commit94994d8d9a8002e6c9b49c79c0af3a0952e1905e (patch)
tree45389a4d612af724483c37d95b2489ab4c5ee897 /libavcodec/g729dec.c
parent730c1e4a0660f0c72950bbb61c17fd79453de786 (diff)
G.729 decoder initialization routine (skeleton)
Originally committed as revision 19188 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/g729dec.c')
-rw-r--r--libavcodec/g729dec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index ab39a92cda..28c48b5748 100644
--- a/libavcodec/g729dec.c
+++ b/libavcodec/g729dec.c
@@ -97,11 +97,19 @@ static inline int get_parity(uint8_t value)
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,