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/alacenc.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/alacenc.c')
-rw-r--r-- | libavcodec/alacenc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c index 5706ae9f4d..d9ff2b8e0a 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -378,6 +378,7 @@ static void write_compressed_frame(AlacEncodeContext *s) static av_cold int alac_encode_init(AVCodecContext *avctx) { AlacEncodeContext *s = avctx->priv_data; + int ret; uint8_t *alac_extradata = av_mallocz(ALAC_EXTRADATA_SIZE+1); avctx->frame_size = DEFAULT_FRAME_SIZE; @@ -455,9 +456,10 @@ static av_cold int alac_encode_init(AVCodecContext *avctx) avctx->coded_frame->key_frame = 1; s->avctx = avctx; - ff_lpc_init(&s->lpc_ctx); + ret = ff_lpc_init(&s->lpc_ctx, avctx->frame_size, s->max_prediction_order, + AV_LPC_TYPE_LEVINSON); - return 0; + return ret; } static int alac_encode_frame(AVCodecContext *avctx, uint8_t *frame, @@ -513,6 +515,8 @@ verbatim: static av_cold int alac_encode_close(AVCodecContext *avctx) { + AlacEncodeContext *s = avctx->priv_data; + ff_lpc_end(&s->lpc_ctx); av_freep(&avctx->extradata); avctx->extradata_size = 0; av_freep(&avctx->coded_frame); |