Hi,
On 04/02/2011 01:21 PM, Anton Khirnov wrote:
> ---
> Found some more flac-specific options.
> ---
> libavcodec/avcodec.h | 29 ++++++++++----
> libavcodec/flacenc.c | 104 +++++++++++++++++++++++++++++++++++++++++++------
> libavcodec/options.c | 20 ++++++----
> libavcodec/version.h | 3 +
> 4 files changed, 127 insertions(+), 29 deletions(-)
>
> +#if FF_API_FLAC_GLOBAL_OPTS
> + /**
> + * @defgroup flac_opts FLAC options
> + * @deprecated Use FLAC encoder private options instead.
> + * @}
> + */
Shouldn't that be @{ instead of @}
> +#if FF_API_FLAC_GLOBAL_OPTS
> /**
> * Determines which LPC analysis algorithm to use.
> * - encoding: Set by user
> * - decoding: unused
> */
> - enum AVLPCType lpc_type;
> + attribute_deprecated enum AVLPCType lpc_type;
Please also deprecate 'enum AVLPCType' and add 'enum LPCType' to lpc.h.
> +#define FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM
> +static const AVOption options[] = {
> + { "lpc_coeff_precision", "LPC coefficient precision",
> offsetof(FlacEncodeContext, options.lpc_coeff_precision),
> + FF_OPT_TYPE_INT, 15, 0, MAX_LPC_PRECISION, FLAGS },
> + { "lpc_type", "LPC algorithm", offsetof(FlacEncodeContext,
> options.lpc_type),
> + FF_OPT_TYPE_INT, AV_LPC_TYPE_DEFAULT, AV_LPC_TYPE_DEFAULT,
> AV_LPC_TYPE_NB-1, FLAGS },
> + { "none", NULL, 0, FF_OPT_TYPE_CONST, AV_LPC_TYPE_NONE, INT_MIN,
> INT_MAX, FLAGS, "lpc_type" },
> + { "fixed", NULL, 0, FF_OPT_TYPE_CONST, AV_LPC_TYPE_FIXED, INT_MIN,
> INT_MAX, FLAGS, "lpc_type" },
> + { "levinson", NULL, 0, FF_OPT_TYPE_CONST, AV_LPC_TYPE_LEVINSON, INT_MIN,
> INT_MAX, FLAGS, "lpc_type" },
> + { "cholesky", NULL, 0, FF_OPT_TYPE_CONST, AV_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), FF_OPT_TYPE_INT, -1,
> INT_MIN, INT_MAX, FLAGS },
> + { "min_partition_order", NULL, offsetof(FlacEncodeContext,
> options.min_partition_order),
> + FF_OPT_TYPE_INT, -1, -1, MAX_PARTITION_ORDER, FLAGS },
> + { "max_partition_order", NULL, offsetof(FlacEncodeContext,
> options.max_partition_order),
> + FF_OPT_TYPE_INT, -1, -1, MAX_PARTITION_ORDER, FLAGS },
> + { "min_prediction_order", NULL, offsetof(FlacEncodeContext,
> options.min_prediction_order),
> + FF_OPT_TYPE_INT, -1, INT_MIN, INT_MAX, FLAGS },
> + { "max_prediction_order", NULL, offsetof(FlacEncodeContext,
> options.max_prediction_order),
> + FF_OPT_TYPE_INT, -1, INT_MIN, INT_MAX, FLAGS },
> + { "prediction_order_method", "Search method for selecting prediction
> order",
> + offsetof(FlacEncodeContext, options.prediction_order_method),
> FF_OPT_TYPE_INT,
> + -1, -1, ORDER_METHOD_LOG, FLAGS, "predm" },
> + { "estimation", NULL, 0, FF_OPT_TYPE_CONST, ORDER_METHOD_EST,
> INT_MIN, INT_MAX, FLAGS, "predm" },
> + { "2level", NULL, 0, FF_OPT_TYPE_CONST, ORDER_METHOD_2LEVEL,
> INT_MIN, INT_MAX, FLAGS, "predm" },
> + { "4level", NULL, 0, FF_OPT_TYPE_CONST, ORDER_METHOD_4LEVEL,
> INT_MIN, INT_MAX, FLAGS, "predm" },
> + { "8level", NULL, 0, FF_OPT_TYPE_CONST, ORDER_METHOD_8LEVEL,
> INT_MIN, INT_MAX, FLAGS, "predm" },
> + { "search", NULL, 0, FF_OPT_TYPE_CONST, ORDER_METHOD_SEARCH,
> INT_MIN, INT_MAX, FLAGS, "predm" },
> + { "log", NULL, 0, FF_OPT_TYPE_CONST, ORDER_METHOD_LOG,
> INT_MIN, INT_MAX, FLAGS, "predm" },
> + { NULL },
I actually prefer the options to be all on a single line even though it
goes over 80 chars. It's much easier to read that way, and it's
consistent with all the other AVOption lists in Libav.
Thanks,
Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel