Commit 5781bfae authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Vittorio Giovara

flacenc: Load default prediction_order parameters if none is selected

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent 2e6ba199
......@@ -305,7 +305,9 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
FF_LPC_TYPE_LEVINSON, FF_LPC_TYPE_LEVINSON, FF_LPC_TYPE_LEVINSON,
FF_LPC_TYPE_LEVINSON})[level];
if (s->options.min_prediction_order < 0)
s->options.min_prediction_order = ((int[]){ 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})[level];
if (s->options.max_prediction_order < 0)
s->options.max_prediction_order = ((int[]){ 3, 4, 4, 6, 8, 8, 8, 8, 12, 12, 12, 32, 32})[level];
if (s->options.prediction_order_method < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment