[FFmpeg-cvslog] r19188 - trunk/libavcodec/g729dec.c
voroshil
subversion
Sun Jun 14 04:31:06 CEST 2009
Author: voroshil
Date: Sun Jun 14 04:31:06 2009
New Revision: 19188
Log:
G.729 decoder initialization routine (skeleton)
Modified:
trunk/libavcodec/g729dec.c
Modified: trunk/libavcodec/g729dec.c
==============================================================================
--- trunk/libavcodec/g729dec.c Sun Jun 14 04:29:39 2009 (r19187)
+++ trunk/libavcodec/g729dec.c Sun Jun 14 04:31:06 2009 (r19188)
@@ -97,11 +97,19 @@ static inline int get_parity(uint8_t val
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,
More information about the ffmpeg-cvslog
mailing list