Unified · Split
| @@ -127,6 +127,7 @@ typedef struct MLPEncodeContext { · 126 unmodified lines | ||
| 127 | 127 | int lpc_type; |
| 128 | 128 | int lpc_passes; |
| 129 | 129 | int prediction_order; |
| 130 | + int max_codebook_search; | |
| 130 | 131 | |
| 131 | 132 | int num_substreams; ///< Number of substreams contained within this stream. |
| 132 | 133 | |
| @@ -204,8 +205,6 @@ typedef struct MLPEncodeContext { · 71 unmodified lines | ||
| 204 | 205 | const ChannelParams *prev_channel_params; |
| 205 | 206 | const DecodingParams *prev_decoding_params; |
| 206 | 207 | |
| 207 | − unsigned int max_codebook_search; | |
| 208 | − | |
| 209 | 208 | int shorten_by; |
| 210 | 209 | |
| 211 | 210 | LPCContext lpc_ctx; |
| @@ -559,7 +558,6 @@ static av_cold int mlp_encode_init(AVCodecContext *avctx) · 347 unmodified lines | ||
| 559 | 558 | /* TODO Let user pass major header interval as parameter. */ |
| 560 | 559 | ctx->max_restart_interval = MAJOR_HEADER_INTERVAL; |
| 561 | 560 | |
| 562 | − ctx->max_codebook_search = 3; | |
| 563 | 561 | ctx->min_restart_interval = MAJOR_HEADER_INTERVAL; |
| 564 | 562 | ctx->restart_intervals = ctx->max_restart_interval / ctx->min_restart_interval; |
| 565 | 563 | |
| @@ -2166,6 +2164,7 @@ static const AVOption mlp_options[] = { · 1600 unmodified lines | ||
| 2166 | 2164 | { "levinson", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LPC_TYPE_LEVINSON }, 0, 0, FLAGS, "lpc_type" }, |
| 2167 | 2165 | { "cholesky", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LPC_TYPE_CHOLESKY }, 0, 0, FLAGS, "lpc_type" }, |
| 2168 | 2166 | { "lpc_passes", "Number of passes to use for Cholesky factorization during LPC analysis", OFFSET(lpc_passes), AV_OPT_TYPE_INT, {.i64 = 2 }, 1, INT_MAX, FLAGS }, |
| 2167 | +{ "codebook_search", "Max number of codebook searches", OFFSET(max_codebook_search), AV_OPT_TYPE_INT, {.i64 = 3 }, 1, 100, FLAGS }, | |
| 2169 | 2168 | { "prediction_order", "Search method for selecting prediction order", OFFSET(prediction_order), AV_OPT_TYPE_INT, {.i64 = ORDER_METHOD_EST }, ORDER_METHOD_EST, ORDER_METHOD_SEARCH, FLAGS, "predm" }, |
| 2170 | 2169 | { "estimation", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = ORDER_METHOD_EST }, 0, 0, FLAGS, "predm" }, |
| 2171 | 2170 | { "search", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = ORDER_METHOD_SEARCH }, 0, 0, FLAGS, "predm" }, |