2 * Copyright (c) 2021, Alliance for Open Media. All rights reserved
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
12 #include "av1/arg_defs.h"
14 static const struct arg_enum_list test_decode_enum
[] = {
15 { "off", TEST_DECODE_OFF
},
16 { "fatal", TEST_DECODE_FATAL
},
17 { "warn", TEST_DECODE_WARN
},
21 static const struct arg_enum_list bitdepth_enum
[] = {
22 { "8", AOM_BITS_8
}, { "10", AOM_BITS_10
}, { "12", AOM_BITS_12
}, { NULL
, 0 }
26 static const struct arg_enum_list stereo_mode_enum
[] = {
27 { "mono", STEREO_FORMAT_MONO
},
28 { "left-right", STEREO_FORMAT_LEFT_RIGHT
},
29 { "bottom-top", STEREO_FORMAT_BOTTOM_TOP
},
30 { "top-bottom", STEREO_FORMAT_TOP_BOTTOM
},
31 { "right-left", STEREO_FORMAT_RIGHT_LEFT
},
36 static const struct arg_enum_list end_usage_enum
[] = { { "vbr", AOM_VBR
},
42 static const struct arg_enum_list tuning_enum
[] = {
43 { "psnr", AOM_TUNE_PSNR
},
44 { "ssim", AOM_TUNE_SSIM
},
45 { "vmaf_with_preprocessing", AOM_TUNE_VMAF_WITH_PREPROCESSING
},
46 { "vmaf_without_preprocessing", AOM_TUNE_VMAF_WITHOUT_PREPROCESSING
},
47 { "vmaf", AOM_TUNE_VMAF_MAX_GAIN
},
48 { "vmaf_neg", AOM_TUNE_VMAF_NEG_MAX_GAIN
},
49 { "butteraugli", AOM_TUNE_BUTTERAUGLI
},
53 #if CONFIG_AV1_ENCODER
54 static const struct arg_enum_list timing_info_enum
[] = {
55 { "unspecified", AOM_TIMING_UNSPECIFIED
},
56 { "constant", AOM_TIMING_EQUAL
},
57 { "model", AOM_TIMING_DEC_MODEL
},
61 static const struct arg_enum_list superblock_size_enum
[] = {
62 { "dynamic", AOM_SUPERBLOCK_SIZE_DYNAMIC
},
63 { "64", AOM_SUPERBLOCK_SIZE_64X64
},
64 { "128", AOM_SUPERBLOCK_SIZE_128X128
},
68 static const struct arg_enum_list matrix_coefficients_enum
[] = {
69 { "identity", AOM_CICP_MC_IDENTITY
},
70 { "bt709", AOM_CICP_MC_BT_709
},
71 { "unspecified", AOM_CICP_MC_UNSPECIFIED
},
72 { "fcc73", AOM_CICP_MC_FCC
},
73 { "bt470bg", AOM_CICP_MC_BT_470_B_G
},
74 { "bt601", AOM_CICP_MC_BT_601
},
75 { "smpte240", AOM_CICP_CP_SMPTE_240
},
76 { "ycgco", AOM_CICP_MC_SMPTE_YCGCO
},
77 { "bt2020ncl", AOM_CICP_MC_BT_2020_NCL
},
78 { "bt2020cl", AOM_CICP_MC_BT_2020_CL
},
79 { "smpte2085", AOM_CICP_MC_SMPTE_2085
},
80 { "chromncl", AOM_CICP_MC_CHROMAT_NCL
},
81 { "chromcl", AOM_CICP_MC_CHROMAT_CL
},
82 { "ictcp", AOM_CICP_MC_ICTCP
},
86 static const struct arg_enum_list chroma_sample_position_enum
[] = {
87 { "unknown", AOM_CSP_UNKNOWN
},
88 { "vertical", AOM_CSP_VERTICAL
},
89 { "colocated", AOM_CSP_COLOCATED
},
93 static const struct arg_enum_list tune_content_enum
[] = {
94 { "default", AOM_CONTENT_DEFAULT
},
95 { "screen", AOM_CONTENT_SCREEN
},
96 { "film", AOM_CONTENT_FILM
},
100 static const struct arg_enum_list transfer_characteristics_enum
[] = {
101 { "unspecified", AOM_CICP_CP_UNSPECIFIED
},
102 { "bt709", AOM_CICP_TC_BT_709
},
103 { "bt470m", AOM_CICP_TC_BT_470_M
},
104 { "bt470bg", AOM_CICP_TC_BT_470_B_G
},
105 { "bt601", AOM_CICP_TC_BT_601
},
106 { "smpte240", AOM_CICP_TC_SMPTE_240
},
107 { "lin", AOM_CICP_TC_LINEAR
},
108 { "log100", AOM_CICP_TC_LOG_100
},
109 { "log100sq10", AOM_CICP_TC_LOG_100_SQRT10
},
110 { "iec61966", AOM_CICP_TC_IEC_61966
},
111 { "bt1361", AOM_CICP_TC_BT_1361
},
112 { "srgb", AOM_CICP_TC_SRGB
},
113 { "bt2020-10bit", AOM_CICP_TC_BT_2020_10_BIT
},
114 { "bt2020-12bit", AOM_CICP_TC_BT_2020_12_BIT
},
115 { "smpte2084", AOM_CICP_TC_SMPTE_2084
},
116 { "hlg", AOM_CICP_TC_HLG
},
117 { "smpte428", AOM_CICP_TC_SMPTE_428
},
121 static const struct arg_enum_list color_primaries_enum
[] = {
122 { "bt709", AOM_CICP_CP_BT_709
},
123 { "unspecified", AOM_CICP_CP_UNSPECIFIED
},
124 { "bt601", AOM_CICP_CP_BT_601
},
125 { "bt470m", AOM_CICP_CP_BT_470_M
},
126 { "bt470bg", AOM_CICP_CP_BT_470_B_G
},
127 { "smpte240", AOM_CICP_CP_SMPTE_240
},
128 { "film", AOM_CICP_CP_GENERIC_FILM
},
129 { "bt2020", AOM_CICP_CP_BT_2020
},
130 { "xyz", AOM_CICP_CP_XYZ
},
131 { "smpte431", AOM_CICP_CP_SMPTE_431
},
132 { "smpte432", AOM_CICP_CP_SMPTE_432
},
133 { "ebu3213", AOM_CICP_CP_EBU_3213
},
136 #endif // CONFIG_AV1_ENCODER
138 const av1_codec_arg_definitions_t g_av1_codec_arg_defs
= {
139 .help
= ARG_DEF(NULL
, "help", 0, "Show usage options and exit"),
141 ARG_DEF("D", "debug", 0, "Debug mode (makes output deterministic)"),
142 .outputfile
= ARG_DEF("o", "output", 1, "Output filename"),
143 .use_yv12
= ARG_DEF(NULL
, "yv12", 0, "Input file is YV12"),
144 .use_i420
= ARG_DEF(NULL
, "i420", 0, "Input file is I420 (default)"),
145 .use_i422
= ARG_DEF(NULL
, "i422", 0, "Input file is I422"),
146 .use_i444
= ARG_DEF(NULL
, "i444", 0, "Input file is I444"),
147 .codecarg
= ARG_DEF(NULL
, "codec", 1, "Codec to use"),
148 .passes
= ARG_DEF("p", "passes", 1, "Number of passes (1/2/3)"),
149 .pass_arg
= ARG_DEF(NULL
, "pass", 1, "Pass to execute (1/2/3)"),
150 .fpf_name
= ARG_DEF(NULL
, "fpf", 1, "First pass statistics file name"),
151 .limit
= ARG_DEF(NULL
, "limit", 1, "Stop encoding after n input frames"),
152 .skip
= ARG_DEF(NULL
, "skip", 1, "Skip the first n input frames"),
153 .good_dl
= ARG_DEF(NULL
, "good", 0, "Use Good Quality Deadline"),
154 .rt_dl
= ARG_DEF(NULL
, "rt", 0, "Use Realtime Quality Deadline"),
155 .ai_dl
= ARG_DEF(NULL
, "allintra", 0, "Use all intra mode"),
156 .quietarg
= ARG_DEF("q", "quiet", 0, "Do not print encode progress"),
157 .verbosearg
= ARG_DEF("v", "verbose", 0, "Show encoder parameters"),
160 "Show PSNR in status line"
161 "(0: Disable PSNR status line display, 1: PSNR calculated using input "
162 "bit-depth (default), 2: PSNR calculated using stream bit-depth), "
163 "takes default option when arguments are not specified"),
164 .use_cfg
= ARG_DEF("c", "cfg", 1, "Config file to use"),
165 .recontest
= ARG_DEF_ENUM(NULL
, "test-decode", 1,
166 "Test encode/decode mismatch", test_decode_enum
),
167 .framerate
= ARG_DEF(NULL
, "fps", 1, "Stream frame rate (rate/scale)"),
169 ARG_DEF(NULL
, "webm", 0, "Output WebM (default when WebM IO is enabled)"),
170 .use_ivf
= ARG_DEF(NULL
, "ivf", 0, "Output IVF"),
171 .use_obu
= ARG_DEF(NULL
, "obu", 0, "Output OBU"),
173 ARG_DEF(NULL
, "q-hist", 1, "Show quantizer histogram (n-buckets)"),
175 ARG_DEF(NULL
, "rate-hist", 1, "Show rate histogram (n-buckets)"),
177 ARG_DEF(NULL
, "disable-warnings", 0,
178 "Disable warnings about potentially incorrect encode settings."),
179 .disable_warning_prompt
=
180 ARG_DEF("y", "disable-warning-prompt", 0,
181 "Display warnings, but do not prompt user to continue."),
182 .bitdeptharg
= ARG_DEF_ENUM(
184 "Bit depth for codec (8 for version <=1, 10 or 12 for version 2)",
186 .inbitdeptharg
= ARG_DEF(NULL
, "input-bit-depth", 1, "Bit depth of input"),
188 .input_chroma_subsampling_x
= ARG_DEF(NULL
, "input-chroma-subsampling-x", 1,
189 "chroma subsampling x value."),
190 .input_chroma_subsampling_y
= ARG_DEF(NULL
, "input-chroma-subsampling-y", 1,
191 "chroma subsampling y value."),
193 .usage
= ARG_DEF("u", "usage", 1,
194 "Usage profile number to use (0: good, 1: rt, 2: allintra)"),
195 .threads
= ARG_DEF("t", "threads", 1, "Max number of threads to use"),
196 .profile
= ARG_DEF(NULL
, "profile", 1, "Bitstream profile number to use"),
197 .width
= ARG_DEF("w", "width", 1, "Frame width"),
198 .height
= ARG_DEF("h", "height", 1, "Frame height"),
199 .forced_max_frame_width
= ARG_DEF(NULL
, "forced_max_frame_width", 1,
200 "Maximum frame width value to force"),
201 .forced_max_frame_height
= ARG_DEF(NULL
, "forced_max_frame_height", 1,
202 "Maximum frame height value to force"),
204 .stereo_mode
= ARG_DEF_ENUM(NULL
, "stereo-mode", 1, "Stereo 3D video format",
207 .timebase
= ARG_DEF(NULL
, "timebase", 1,
208 "Output timestamp precision (fractional seconds)"),
209 .global_error_resilient
= ARG_DEF(NULL
, "global-error-resilient", 1,
210 "Enable global error resiliency features"),
212 ARG_DEF(NULL
, "lag-in-frames", 1, "Max number of frames to lag"),
213 .large_scale_tile
= ARG_DEF(
214 NULL
, "large-scale-tile", 1,
215 "Large scale tile coding (0: off (default), 1: on (ivf output only))"),
217 ARG_DEF(NULL
, "monochrome", 0, "Monochrome video (no chroma planes)"),
218 .full_still_picture_hdr
= ARG_DEF(NULL
, "full-still-picture-hdr", 0,
219 "Use full header for still picture"),
220 .use_16bit_internal
=
221 ARG_DEF(NULL
, "use-16bit-internal", 0, "Force use of 16-bit pipeline"),
223 ARG_DEF(NULL
, "drop-frame", 1, "Temporal resampling threshold (buf %)"),
224 .resize_mode
= ARG_DEF(NULL
, "resize-mode", 1, "Frame resize mode"),
225 .resize_denominator
=
226 ARG_DEF(NULL
, "resize-denominator", 1, "Frame resize denominator"),
227 .resize_kf_denominator
= ARG_DEF(NULL
, "resize-kf-denominator", 1,
228 "Frame resize keyframe denominator"),
230 ARG_DEF(NULL
, "superres-mode", 1, "Frame super-resolution mode"),
231 .superres_denominator
= ARG_DEF(NULL
, "superres-denominator", 1,
232 "Frame super-resolution denominator"),
233 .superres_kf_denominator
=
234 ARG_DEF(NULL
, "superres-kf-denominator", 1,
235 "Frame super-resolution keyframe denominator"),
236 .superres_qthresh
= ARG_DEF(NULL
, "superres-qthresh", 1,
237 "Frame super-resolution qindex threshold"),
238 .superres_kf_qthresh
=
239 ARG_DEF(NULL
, "superres-kf-qthresh", 1,
240 "Frame super-resolution keyframe qindex threshold"),
242 ARG_DEF_ENUM(NULL
, "end-usage", 1, "Rate control mode", end_usage_enum
),
243 .target_bitrate
= ARG_DEF(NULL
, "target-bitrate", 1, "Bitrate (kbps)"),
244 .min_quantizer
= ARG_DEF(NULL
, "min-q", 1, "Minimum (best) quantizer"),
245 .max_quantizer
= ARG_DEF(NULL
, "max-q", 1, "Maximum (worst) quantizer"),
246 .undershoot_pct
= ARG_DEF(NULL
, "undershoot-pct", 1,
247 "Datarate undershoot (min) target (%)"),
249 ARG_DEF(NULL
, "overshoot-pct", 1, "Datarate overshoot (max) target (%)"),
250 .buf_sz
= ARG_DEF(NULL
, "buf-sz", 1, "Client buffer size (ms)"),
252 ARG_DEF(NULL
, "buf-initial-sz", 1, "Client initial buffer size (ms)"),
254 ARG_DEF(NULL
, "buf-optimal-sz", 1, "Client optimal buffer size (ms)"),
255 .bias_pct
= ARG_DEF(NULL
, "bias-pct", 1, "CBR/VBR bias (0=CBR, 100=VBR)"),
257 ARG_DEF(NULL
, "minsection-pct", 1, "GOP min bitrate (% of target)"),
259 ARG_DEF(NULL
, "maxsection-pct", 1, "GOP max bitrate (% of target)"),
261 ARG_DEF(NULL
, "enable-fwd-kf", 1, "Enable forward reference keyframes"),
263 ARG_DEF(NULL
, "kf-min-dist", 1, "Minimum keyframe interval (frames)"),
265 ARG_DEF(NULL
, "kf-max-dist", 1, "Maximum keyframe interval (frames)"),
266 .kf_disabled
= ARG_DEF(NULL
, "disable-kf", 0, "Disable keyframe placement"),
267 .sframe_dist
= ARG_DEF(NULL
, "sframe-dist", 1, "S-Frame interval (frames)"),
269 ARG_DEF(NULL
, "sframe-mode", 1, "S-Frame insertion mode (1..2)"),
270 .save_as_annexb
= ARG_DEF(NULL
, "annexb", 1, "Save as Annex-B"),
271 .noise_sens
= ARG_DEF(NULL
, "noise-sensitivity", 1,
272 "Noise sensitivity (frames to blur)"),
273 .sharpness
= ARG_DEF(NULL
, "sharpness", 1,
274 "Bias towards block sharpness in rate-distortion "
275 "optimization of transform coefficients "
276 "(0..7), default is 0"),
278 ARG_DEF(NULL
, "static-thresh", 1, "Motion detection threshold"),
280 ARG_DEF(NULL
, "auto-alt-ref", 1, "Enable automatic alt reference frames"),
282 ARG_DEF(NULL
, "arnr-maxframes", 1, "AltRef max frames (0..15)"),
284 ARG_DEF(NULL
, "arnr-strength", 1, "AltRef filter strength (0..6)"),
285 .tune_metric
= ARG_DEF_ENUM(NULL
, "tune", 1, "Distortion metric tuned with",
288 ARG_DEF(NULL
, "cq-level", 1, "Constant/Constrained Quality level"),
289 .max_intra_rate_pct
=
290 ARG_DEF(NULL
, "max-intra-rate", 1, "Max I-frame bitrate (pct)"),
291 #if CONFIG_AV1_ENCODER
293 ARG_DEF(NULL
, "cpu-used", 1,
294 "Speed setting (0..6 in good mode, 6..9 in realtime mode)"),
296 ARG_DEF(NULL
, "row-mt", 1,
297 "Enable row based multi-threading (0: off, 1: on (default))"),
298 #if CONFIG_FRAME_PARALLEL_ENCODE
301 "Enable frame parallel multi-threading (0: off (default), 1: on)"),
304 ARG_DEF(NULL
, "tile-columns", 1, "Number of tile columns to use, log2"),
306 ARG_DEF(NULL
, "tile-rows", 1, "Number of tile rows to use, log2"),
307 .enable_tpl_model
= ARG_DEF(NULL
, "enable-tpl-model", 1,
308 "RDO based on frame temporal dependency "
309 "(0: off, 1: backward source based). "
310 "This is required for deltaq mode."),
311 .enable_keyframe_filtering
= ARG_DEF(
312 NULL
, "enable-keyframe-filtering", 1,
313 "Apply temporal filtering on key frame"
314 "(0: no filter, 1: filter without overlay (default), "
315 "2: filter with overlay - experimental, may break random access in "
317 .tile_width
= ARG_DEF(NULL
, "tile-width", 1, "Tile widths (comma separated)"),
319 ARG_DEF(NULL
, "tile-height", 1, "Tile heights (command separated)"),
320 .lossless
= ARG_DEF(NULL
, "lossless", 1,
321 "Lossless mode (0: false (default), 1: true)"),
322 .enable_cdef
= ARG_DEF(
323 NULL
, "enable-cdef", 1,
324 "Enable the constrained directional enhancement filter (0: false, "
325 "1: true (default), 2: disable for non-reference frames)"),
326 .enable_restoration
= ARG_DEF(NULL
, "enable-restoration", 1,
327 "Enable the loop restoration filter (0: false "
328 "(default in Realtime mode), "
329 "1: true (default in Non-realtime mode))"),
330 .enable_rect_partitions
= ARG_DEF(NULL
, "enable-rect-partitions", 1,
331 "Enable rectangular partitions "
332 "(0: false, 1: true (default))"),
333 .enable_ab_partitions
=
334 ARG_DEF(NULL
, "enable-ab-partitions", 1,
335 "Enable ab partitions (0: false, 1: true (default))"),
336 .enable_1to4_partitions
= ARG_DEF(NULL
, "enable-1to4-partitions", 1,
337 "Enable 1:4 and 4:1 partitions "
338 "(0: false, 1: true (default))"),
339 .min_partition_size
=
340 ARG_DEF(NULL
, "min-partition-size", 1,
341 "Set min partition size "
342 "(4:4x4, 8:8x8, 16:16x16, 32:32x32, 64:64x64, 128:128x128). "
343 "On frame with 4k+ resolutions or higher speed settings, the min "
344 "partition size will have a minimum of 8."),
345 .max_partition_size
=
346 ARG_DEF(NULL
, "max-partition-size", 1,
347 "Set max partition size "
348 "(4:4x4, 8:8x8, 16:16x16, 32:32x32, 64:64x64, 128:128x128)"),
349 .enable_dual_filter
= ARG_DEF(NULL
, "enable-dual-filter", 1,
350 "Enable dual filter "
351 "(0: false, 1: true (default))"),
352 .enable_chroma_deltaq
= ARG_DEF(NULL
, "enable-chroma-deltaq", 1,
353 "Enable chroma delta quant "
354 "(0: false (default), 1: true)"),
355 .enable_intra_edge_filter
= ARG_DEF(NULL
, "enable-intra-edge-filter", 1,
356 "Enable intra edge filtering "
357 "(0: false, 1: true (default))"),
358 .enable_order_hint
= ARG_DEF(NULL
, "enable-order-hint", 1,
360 "(0: false, 1: true (default))"),
362 ARG_DEF(NULL
, "enable-tx64", 1,
363 "Enable 64-pt transform (0: false, 1: true (default))"),
365 ARG_DEF(NULL
, "enable-flip-idtx", 1,
366 "Enable extended transform type (0: false, 1: true (default)) "
367 "including FLIPADST_DCT, DCT_FLIPADST, FLIPADST_FLIPADST, "
368 "ADST_FLIPADST, FLIPADST_ADST, IDTX, V_DCT, H_DCT, V_ADST, "
369 "H_ADST, V_FLIPADST, H_FLIPADST"),
371 ARG_DEF(NULL
, "enable-rect-tx", 1,
372 "Enable rectangular transform (0: false, 1: true (default))"),
373 .enable_dist_wtd_comp
= ARG_DEF(NULL
, "enable-dist-wtd-comp", 1,
374 "Enable distance-weighted compound "
375 "(0: false, 1: true (default))"),
376 .enable_masked_comp
= ARG_DEF(NULL
, "enable-masked-comp", 1,
377 "Enable masked (wedge/diff-wtd) compound "
378 "(0: false, 1: true (default))"),
379 .enable_onesided_comp
= ARG_DEF(NULL
, "enable-onesided-comp", 1,
380 "Enable one sided compound "
381 "(0: false, 1: true (default))"),
382 .enable_interintra_comp
= ARG_DEF(NULL
, "enable-interintra-comp", 1,
383 "Enable interintra compound "
384 "(0: false, 1: true (default))"),
385 .enable_smooth_interintra
= ARG_DEF(NULL
, "enable-smooth-interintra", 1,
386 "Enable smooth interintra mode "
387 "(0: false, 1: true (default))"),
388 .enable_diff_wtd_comp
= ARG_DEF(NULL
, "enable-diff-wtd-comp", 1,
389 "Enable difference-weighted compound "
390 "(0: false, 1: true (default))"),
391 .enable_interinter_wedge
= ARG_DEF(NULL
, "enable-interinter-wedge", 1,
392 "Enable interinter wedge compound "
393 "(0: false, 1: true (default))"),
394 .enable_interintra_wedge
= ARG_DEF(NULL
, "enable-interintra-wedge", 1,
395 "Enable interintra wedge compound "
396 "(0: false, 1: true (default))"),
397 .enable_global_motion
= ARG_DEF(NULL
, "enable-global-motion", 1,
398 "Enable global motion "
399 "(0: false, 1: true (default))"),
400 .enable_warped_motion
= ARG_DEF(NULL
, "enable-warped-motion", 1,
401 "Enable local warped motion "
402 "(0: false, 1: true (default))"),
403 .enable_filter_intra
= ARG_DEF(NULL
, "enable-filter-intra", 1,
404 "Enable filter intra prediction mode "
405 "(0: false, 1: true (default))"),
406 .enable_smooth_intra
= ARG_DEF(NULL
, "enable-smooth-intra", 1,
407 "Enable smooth intra prediction modes "
408 "(0: false, 1: true (default))"),
409 .enable_paeth_intra
= ARG_DEF(
410 NULL
, "enable-paeth-intra", 1,
411 "Enable Paeth intra prediction mode (0: false, 1: true (default))"),
412 .enable_cfl_intra
= ARG_DEF(NULL
, "enable-cfl-intra", 1,
413 "Enable chroma from luma intra prediction mode "
414 "(0: false, 1: true (default))"),
415 .enable_directional_intra
=
416 ARG_DEF(NULL
, "enable-directional-intra", 1,
417 "Enable directional intra prediction modes "
418 "(0: false, 1: true (default))"),
419 .enable_diagonal_intra
=
420 ARG_DEF(NULL
, "enable-diagonal-intra", 1,
421 "Enable diagonal (D45 to D203) intra prediction modes, which are "
422 "a subset of directional modes. Has no effect if "
423 "enable-directional-intra is 0 (0: false, 1: true (default))"),
424 .force_video_mode
= ARG_DEF(NULL
, "force-video-mode", 1,
425 "Force video mode (0: false, 1: true (default))"),
426 .enable_obmc
= ARG_DEF(NULL
, "enable-obmc", 1,
427 "Enable OBMC (0: false, 1: true (default))"),
429 ARG_DEF(NULL
, "enable-overlay", 1,
430 "Enable coding overlay frames (0: false, 1: true (default))"),
432 ARG_DEF(NULL
, "enable-palette", 1,
433 "Enable palette prediction mode (0: false, 1: true (default))"),
434 .enable_intrabc
= ARG_DEF(NULL
, "enable-intrabc", 1,
435 "Enable intra block copy prediction mode "
436 "(0: false, 1: true (default))"),
437 .enable_angle_delta
=
438 ARG_DEF(NULL
, "enable-angle-delta", 1,
439 "Enable intra angle delta (0: false, 1: true (default))"),
440 .disable_trellis_quant
= ARG_DEF(
441 NULL
, "disable-trellis-quant", 1,
442 "Disable trellis optimization of quantized coefficients (0: false "
443 "1: true 2: true for rd search 3: true for estimate yrd serch "
446 ARG_DEF(NULL
, "enable-qm", 1,
447 "Enable quantisation matrices (0: false (default), 1: true)"),
448 .qm_min
= ARG_DEF(NULL
, "qm-min", 1,
449 "Min quant matrix flatness (0..15), default is 8"),
450 .qm_max
= ARG_DEF(NULL
, "qm-max", 1,
451 "Max quant matrix flatness (0..15), default is 15"),
452 .reduced_tx_type_set
= ARG_DEF(NULL
, "reduced-tx-type-set", 1,
453 "Use reduced set of transform types"),
454 .use_intra_dct_only
=
455 ARG_DEF(NULL
, "use-intra-dct-only", 1, "Use DCT only for INTRA modes"),
456 .use_inter_dct_only
=
457 ARG_DEF(NULL
, "use-inter-dct-only", 1, "Use DCT only for INTER modes"),
458 .use_intra_default_tx_only
=
459 ARG_DEF(NULL
, "use-intra-default-tx-only", 1,
460 "Use Default-transform only for INTRA modes"),
461 .quant_b_adapt
= ARG_DEF(NULL
, "quant-b-adapt", 1, "Use adaptive quantize_b"),
462 .coeff_cost_upd_freq
= ARG_DEF(NULL
, "coeff-cost-upd-freq", 1,
463 "Update freq for coeff costs. "
464 "0: SB, 1: SB Row per Tile, 2: Tile, 3: Off"),
465 .mode_cost_upd_freq
= ARG_DEF(NULL
, "mode-cost-upd-freq", 1,
466 "Update freq for mode costs. "
467 "0: SB, 1: SB Row per Tile, 2: Tile, 3: Off"),
468 .mv_cost_upd_freq
= ARG_DEF(NULL
, "mv-cost-upd-freq", 1,
469 "Update freq for mv costs. "
470 "0: SB, 1: SB Row per Tile, 2: Tile, 3: Off"),
471 .dv_cost_upd_freq
= ARG_DEF(NULL
, "dv-cost-upd-freq", 1,
472 "Update freq for dv costs. "
473 "0: SB, 1: SB Row per Tile, 2: Tile, 3: Off"),
474 .num_tg
= ARG_DEF(NULL
, "num-tile-groups", 1,
475 "Maximum number of tile groups, default is 1"),
477 ARG_DEF(NULL
, "mtu-size", 1,
478 "MTU size for a tile group, default is 0 (no MTU targeting), "
479 "overrides maximum number of tile groups"),
480 .timing_info
= ARG_DEF_ENUM(
481 NULL
, "timing-info", 1,
482 "Signal timing info in the bitstream (model unly works for no "
483 "hidden frames, no super-res yet):",
487 ARG_DEF(NULL
, "vmaf-model-path", 1, "Path to the VMAF model file"),
489 .partition_info_path
= ARG_DEF(NULL
, "partition-info-path", 1,
490 "Partition information read and write path"),
491 .film_grain_test
= ARG_DEF(
492 NULL
, "film-grain-test", 1,
493 "Film grain test vectors (0: none (default), 1: test-1 2: test-2, "
495 .film_grain_table
= ARG_DEF(NULL
, "film-grain-table", 1,
496 "Path to file containing film grain parameters"),
498 .denoise_noise_level
=
499 ARG_DEF(NULL
, "denoise-noise-level", 1,
500 "Amount of noise (from 0 = don't denoise, to 50)"),
501 .denoise_block_size
= ARG_DEF(NULL
, "denoise-block-size", 1,
502 "Denoise block size (default = 32)"),
503 .enable_dnl_denoising
= ARG_DEF(NULL
, "enable-dnl-denoising", 1,
504 "Apply denoising to the frame "
505 "being encoded when denoise-noise-level is "
506 "enabled (0: false, 1: true (default))"),
508 .enable_ref_frame_mvs
=
509 ARG_DEF(NULL
, "enable-ref-frame-mvs", 1,
510 "Enable temporal mv prediction (default is 1)"),
511 .frame_parallel_decoding
=
512 ARG_DEF(NULL
, "frame-parallel", 1,
513 "Enable frame parallel decodability features "
514 "(0: false (default), 1: true)"),
515 .error_resilient_mode
= ARG_DEF(NULL
, "error-resilient", 1,
516 "Enable error resilient features "
517 "(0: false (default), 1: true)"),
518 .aq_mode
= ARG_DEF(NULL
, "aq-mode", 1,
519 "Adaptive quantization mode (0: off (default), 1: "
520 "variance 2: complexity, "
521 "3: cyclic refresh)"),
523 ARG_DEF(NULL
, "deltaq-mode", 1,
524 "Delta qindex mode (0: off, 1: deltaq objective (default), "
525 "2: deltaq placeholder, 3: key frame visual quality, 4: user "
526 "rating based visual quality optimization). "
527 "Currently this requires enable-tpl-model as a prerequisite."),
528 .deltaq_strength
= ARG_DEF(NULL
, "deltaq-strength", 1,
529 "Deltaq strength for"
530 " --deltaq-mode=4 (%)"),
531 .deltalf_mode
= ARG_DEF(NULL
, "delta-lf-mode", 1,
532 "Enable delta-lf-mode (0: off (default), 1: on)"),
533 .frame_periodic_boost
=
534 ARG_DEF(NULL
, "frame-boost", 1,
535 "Enable frame periodic boost (0: off (default), 1: on)"),
536 .gf_cbr_boost_pct
= ARG_DEF(NULL
, "gf-cbr-boost", 1,
537 "Boost for Golden Frame in CBR mode (pct)"),
538 .max_inter_rate_pct
=
539 ARG_DEF(NULL
, "max-inter-rate", 1, "Max P-frame bitrate (pct)"),
540 .min_gf_interval
= ARG_DEF(
541 NULL
, "min-gf-interval", 1,
542 "min gf/arf frame interval (default 0, indicating in-built behavior)"),
543 .max_gf_interval
= ARG_DEF(
544 NULL
, "max-gf-interval", 1,
545 "max gf/arf frame interval (default 0, indicating in-built behavior)"),
547 ARG_DEF(NULL
, "gf-min-pyr-height", 1,
548 "Min height for GF group pyramid structure (0 (default) to 5)"),
549 .gf_max_pyr_height
= ARG_DEF(
550 NULL
, "gf-max-pyr-height", 1,
551 "maximum height for GF group pyramid structure (0 to 5 (default))"),
552 .max_reference_frames
= ARG_DEF(NULL
, "max-reference-frames", 1,
553 "maximum number of reference frames allowed "
554 "per frame (3 to 7 (default))"),
555 .reduced_reference_set
=
556 ARG_DEF(NULL
, "reduced-reference-set", 1,
557 "Use reduced set of single and compound references (0: off "
558 "(default), 1: on)"),
559 .target_seq_level_idx
= ARG_DEF(
560 NULL
, "target-seq-level-idx", 1,
561 "Target sequence level index. "
562 "Possible values are in the form of \"ABxy\"(pad leading zeros if "
563 "less than 4 digits). "
564 "AB: Operating point(OP) index, "
565 "xy: Target level index for the OP. "
566 "E.g. \"0\" means target level index 0 for the 0th OP, "
567 "\"1021\" means target level index 21 for the 10th OP."),
568 .set_min_cr
= ARG_DEF(
570 "Set minimum compression ratio. Take integer values. Default is 0. "
571 "If non-zero, encoder will try to keep the compression ratio of "
572 "each frame to be higher than the given value divided by 100."),
574 .input_color_primaries
= ARG_DEF_ENUM(
575 NULL
, "color-primaries", 1,
576 "Color primaries (CICP) of input content:", color_primaries_enum
),
578 .input_transfer_characteristics
=
579 ARG_DEF_ENUM(NULL
, "transfer-characteristics", 1,
580 "Transfer characteristics (CICP) of input content:",
581 transfer_characteristics_enum
),
583 .input_matrix_coefficients
= ARG_DEF_ENUM(
584 NULL
, "matrix-coefficients", 1,
585 "Matrix coefficients (CICP) of input content:", matrix_coefficients_enum
),
587 .input_chroma_sample_position
=
588 ARG_DEF_ENUM(NULL
, "chroma-sample-position", 1,
589 "The chroma sample position when chroma 4:2:0 is signaled:",
590 chroma_sample_position_enum
),
592 .tune_content
= ARG_DEF_ENUM(NULL
, "tune-content", 1, "Tune content type",
596 ARG_DEF(NULL
, "cdf-update-mode", 1,
597 "CDF update mode for entropy coding "
598 "(0: no CDF update, 1: update CDF on all frames(default), "
599 "2: selectively update CDF on some frames)"),
601 .superblock_size
= ARG_DEF_ENUM(NULL
, "sb-size", 1, "Superblock size to use",
602 superblock_size_enum
),
605 ARG_DEF(NULL
, "set-tier-mask", 1,
606 "Set bit mask to specify which tier each of the 32 possible "
607 "operating points conforms to. "
608 "Bit value 0(defualt): Main Tier, 1: High Tier."),
610 .use_fixed_qp_offsets
=
611 ARG_DEF(NULL
, "use-fixed-qp-offsets", 1,
612 "Enable fixed QP offsets for frames at different levels of the "
613 "pyramid. Selected automatically from --cq-level if "
614 "--fixed-qp-offsets is not provided. If this option is not "
615 "specified (default), offsets are adaptively chosen by the "
618 .fixed_qp_offsets
= ARG_DEF(
619 NULL
, "fixed-qp-offsets", 1,
620 "Set fixed QP offsets for frames at different levels of the "
621 "pyramid. Comma-separated list of 5 offsets for keyframe, ALTREF, "
622 "and 3 levels of internal alt-refs. If this option is not "
623 "specified (default), offsets are adaptively chosen by the "
626 .vbr_corpus_complexity_lap
= ARG_DEF(
627 NULL
, "vbr-corpus-complexity-lap", 1,
628 "Set average corpus complexity per mb for single pass VBR using lap. "
629 "(0..10000), default is 0"),
632 ARG_DEF(NULL
, "fwd-kf-dist", -1,
633 "Set distance between forward keyframes. A value of -1 means no "
634 "repetitive forward keyframes. Default is -1."),
636 .enable_tx_size_search
= ARG_DEF(
637 NULL
, "enable-tx-size-search", 1,
638 "Enable transform size search to find the best size for each block. "
639 "If false, transforms always have the largest possible size "
640 "(0: false, 1: true (default))"),
642 .loopfilter_control
= ARG_DEF(
643 NULL
, "loopfilter-control", 1,
644 "Control loop filtering "
645 "(0: Loopfilter disabled for all frames, 1: Enable "
646 "loopfilter for all frames (default), 2: Disable loopfilter for "
647 "non-reference frames, 3: Disable loopfilter for frames with low motion"),
649 .auto_intra_tools_off
= ARG_DEF(
650 NULL
, "auto-intra-tools-off", 1,
651 "Automatically turn off several intra coding tools for allintra mode. "
652 "Only in effect if --deltaq-mode=3."),
655 ARG_DEF(NULL
, "two-pass-input", 1,
656 "The input file for the second pass for three-pass encoding."),
657 .two_pass_output
= ARG_DEF(
658 NULL
, "two-pass-output", 1,
659 "The output file for the first two passes for three-pass encoding."),
661 ARG_DEF(NULL
, "two-pass-width", 1, "The width of two-pass-input."),
663 ARG_DEF(NULL
, "two-pass-height", 1, "The height of two-pass-input."),
665 ARG_DEF("spf", "second-pass-log", 1, "Log file from second pass."),
666 #endif // CONFIG_AV1_ENCODER