History

avcodec/mlpenc: export codebook_search option too

Paul B Mahol committed 3 years ago

Commit ee9fb281 parent 1703bfa1 file · +2 −3Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/mlpenc.c+2−3
@@ -127,6 +127,7 @@ typedef struct MLPEncodeContext { · 126 unmodified lines
127127 int lpc_type;
128128 int lpc_passes;
129129 int prediction_order;
130+ int max_codebook_search;
130131
131132 int num_substreams; ///< Number of substreams contained within this stream.
132133
@@ -204,8 +205,6 @@ typedef struct MLPEncodeContext { · 71 unmodified lines
204205 const ChannelParams *prev_channel_params;
205206 const DecodingParams *prev_decoding_params;
206207
207− unsigned int max_codebook_search;
208−
209208 int shorten_by;
210209
211210 LPCContext lpc_ctx;
@@ -559,7 +558,6 @@ static av_cold int mlp_encode_init(AVCodecContext *avctx) · 347 unmodified lines
559558 /* TODO Let user pass major header interval as parameter. */
560559 ctx->max_restart_interval = MAJOR_HEADER_INTERVAL;
561560
562− ctx->max_codebook_search = 3;
563561 ctx->min_restart_interval = MAJOR_HEADER_INTERVAL;
564562 ctx->restart_intervals = ctx->max_restart_interval / ctx->min_restart_interval;
565563
@@ -2166,6 +2164,7 @@ static const AVOption mlp_options[] = { · 1600 unmodified lines
21662164 { "levinson", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LPC_TYPE_LEVINSON }, 0, 0, FLAGS, "lpc_type" },
21672165 { "cholesky", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LPC_TYPE_CHOLESKY }, 0, 0, FLAGS, "lpc_type" },
21682166 { "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 },
21692168 { "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" },
21702169 { "estimation", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = ORDER_METHOD_EST }, 0, 0, FLAGS, "predm" },
21712170 { "search", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = ORDER_METHOD_SEARCH }, 0, 0, FLAGS, "predm" },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t