diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-01-21 00:12:03 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-01-23 19:32:06 +0100 |
commit | 7101b1850822c2490cfaf2c5f4addf2ccbf7eab1 (patch) | |
tree | 6515ce34a76a082c1bef7cf9c946e4cf676d2a0a /libavcodec/ra144enc.c | |
parent | 0d8837bdda4cad7e6c280d2648cef8077e54947b (diff) | |
download | ffmpeg-7101b1850822c2490cfaf2c5f4addf2ccbf7eab1.tar.gz |
Separate window function from autocorrelation.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 77a78e9bdcc589efac41da4f92a489f4523667c0)
Diffstat (limited to 'libavcodec/ra144enc.c')
-rw-r--r-- | libavcodec/ra144enc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c index 3f8694eb8f..2c0a6b1fbd 100644 --- a/libavcodec/ra144enc.c +++ b/libavcodec/ra144enc.c @@ -36,6 +36,7 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx) { RA144Context *ractx; + int ret; if (avctx->sample_fmt != AV_SAMPLE_FMT_S16) { av_log(avctx, AV_LOG_ERROR, "invalid sample format\n"); @@ -52,7 +53,16 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx) ractx->lpc_coef[0] = ractx->lpc_tables[0]; ractx->lpc_coef[1] = ractx->lpc_tables[1]; ractx->avctx = avctx; - ff_lpc_init(&ractx->lpc_ctx); + ret = ff_lpc_init(&ractx->lpc_ctx, avctx->frame_size, LPC_ORDER, + AV_LPC_TYPE_LEVINSON); + return ret; +} + + +static av_cold int ra144_encode_close(AVCodecContext *avctx) +{ + RA144Context *ractx = avctx->priv_data; + ff_lpc_end(&ractx->lpc_ctx); return 0; } @@ -506,5 +516,6 @@ AVCodec ra_144_encoder = sizeof(RA144Context), ra144_encode_init, ra144_encode_frame, + ra144_encode_close, .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K) encoder"), }; |