summaryrefslogtreecommitdiff
path: root/libavcodec/flacenc.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-12-07 01:21:06 +0100
committerJanne Grunau <janne-libav@jannau.net>2012-12-07 11:43:28 +0100
commit480be07a9637b56060737106c53ac888bc107e69 (patch)
tree631f7de7da2f03aba6d9f586c2f4ed7cd93a0fab /libavcodec/flacenc.c
parentc25fc5c2bb6ae8c93541c9427df3e47206d95152 (diff)
flac: change minimum and default of lpc_passes option to 1
Avoid use of uninitialized and uncomputed linear least square models during ff_lpc_calc_coefs() for FF_LPC_TYPE_CHOLESKY. Fixes running make fate-flac-16-lpc-cholesk with valgrind --undef-value-errors=yes.
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r--libavcodec/flacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 54bc64c9de..7808e2059c 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -1299,7 +1299,7 @@ static const AVOption options[] = {
{ "fixed", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LPC_TYPE_FIXED }, INT_MIN, INT_MAX, FLAGS, "lpc_type" },
{ "levinson", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LPC_TYPE_LEVINSON }, INT_MIN, INT_MAX, FLAGS, "lpc_type" },
{ "cholesky", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LPC_TYPE_CHOLESKY }, INT_MIN, INT_MAX, FLAGS, "lpc_type" },
-{ "lpc_passes", "Number of passes to use for Cholesky factorization during LPC analysis", offsetof(FlacEncodeContext, options.lpc_passes), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, FLAGS },
+{ "lpc_passes", "Number of passes to use for Cholesky factorization during LPC analysis", offsetof(FlacEncodeContext, options.lpc_passes), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, FLAGS },
{ "min_partition_order", NULL, offsetof(FlacEncodeContext, options.min_partition_order), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, MAX_PARTITION_ORDER, FLAGS },
{ "max_partition_order", NULL, offsetof(FlacEncodeContext, options.max_partition_order), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, MAX_PARTITION_ORDER, FLAGS },
{ "prediction_order_method", "Search method for selecting prediction order", offsetof(FlacEncodeContext, options.prediction_order_method), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, ORDER_METHOD_LOG, FLAGS, "predm" },