tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

arg_defs.c (35699B)


      1 /*
      2 * Copyright (c) 2021, Alliance for Open Media. All rights reserved.
      3 *
      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.
     10 */
     11 
     12 #include "av1/arg_defs.h"
     13 
     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 },
     18  { NULL, 0 }
     19 };
     20 
     21 static const struct arg_enum_list bitdepth_enum[] = {
     22  { "8", AOM_BITS_8 }, { "10", AOM_BITS_10 }, { "12", AOM_BITS_12 }, { NULL, 0 }
     23 };
     24 
     25 #if CONFIG_WEBM_IO
     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 },
     32  { NULL, 0 }
     33 };
     34 #endif
     35 
     36 static const struct arg_enum_list end_usage_enum[] = { { "vbr", AOM_VBR },
     37                                                       { "cbr", AOM_CBR },
     38                                                       { "cq", AOM_CQ },
     39                                                       { "q", AOM_Q },
     40                                                       { NULL, 0 } };
     41 
     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 },
     50  { "vmaf_saliency_map", AOM_TUNE_VMAF_SALIENCY_MAP },
     51  { "iq", AOM_TUNE_IQ },
     52  { "ssimulacra2", AOM_TUNE_SSIMULACRA2 },
     53  { NULL, 0 }
     54 };
     55 
     56 static const struct arg_enum_list dist_metric_enum[] = {
     57  { "psnr", AOM_DIST_METRIC_PSNR },
     58  { "qm-psnr", AOM_DIST_METRIC_QM_PSNR },
     59  { NULL, 0 }
     60 };
     61 
     62 #if CONFIG_AV1_ENCODER
     63 static const struct arg_enum_list timing_info_enum[] = {
     64  { "unspecified", AOM_TIMING_UNSPECIFIED },
     65  { "constant", AOM_TIMING_EQUAL },
     66  { "model", AOM_TIMING_DEC_MODEL },
     67  { NULL, 0 }
     68 };
     69 
     70 static const struct arg_enum_list superblock_size_enum[] = {
     71  { "dynamic", AOM_SUPERBLOCK_SIZE_DYNAMIC },
     72  { "64", AOM_SUPERBLOCK_SIZE_64X64 },
     73  { "128", AOM_SUPERBLOCK_SIZE_128X128 },
     74  { NULL, 0 }
     75 };
     76 
     77 static const struct arg_enum_list matrix_coefficients_enum[] = {
     78  { "identity", AOM_CICP_MC_IDENTITY },
     79  { "bt709", AOM_CICP_MC_BT_709 },
     80  { "unspecified", AOM_CICP_MC_UNSPECIFIED },
     81  { "fcc73", AOM_CICP_MC_FCC },
     82  { "bt470bg", AOM_CICP_MC_BT_470_B_G },
     83  { "bt601", AOM_CICP_MC_BT_601 },
     84  { "smpte240", AOM_CICP_CP_SMPTE_240 },
     85  { "ycgco", AOM_CICP_MC_SMPTE_YCGCO },
     86  { "bt2020ncl", AOM_CICP_MC_BT_2020_NCL },
     87  { "bt2020cl", AOM_CICP_MC_BT_2020_CL },
     88  { "smpte2085", AOM_CICP_MC_SMPTE_2085 },
     89  { "chromncl", AOM_CICP_MC_CHROMAT_NCL },
     90  { "chromcl", AOM_CICP_MC_CHROMAT_CL },
     91  { "ictcp", AOM_CICP_MC_ICTCP },
     92  { NULL, 0 }
     93 };
     94 
     95 static const struct arg_enum_list chroma_sample_position_enum[] = {
     96  { "unknown", AOM_CSP_UNKNOWN },
     97  { "vertical", AOM_CSP_VERTICAL },
     98  { "colocated", AOM_CSP_COLOCATED },
     99  { NULL, 0 }
    100 };
    101 
    102 static const struct arg_enum_list tune_content_enum[] = {
    103  { "default", AOM_CONTENT_DEFAULT },
    104  { "screen", AOM_CONTENT_SCREEN },
    105  { "film", AOM_CONTENT_FILM },
    106  { NULL, 0 }
    107 };
    108 
    109 static const struct arg_enum_list transfer_characteristics_enum[] = {
    110  { "unspecified", AOM_CICP_CP_UNSPECIFIED },
    111  { "bt709", AOM_CICP_TC_BT_709 },
    112  { "bt470m", AOM_CICP_TC_BT_470_M },
    113  { "bt470bg", AOM_CICP_TC_BT_470_B_G },
    114  { "bt601", AOM_CICP_TC_BT_601 },
    115  { "smpte240", AOM_CICP_TC_SMPTE_240 },
    116  { "lin", AOM_CICP_TC_LINEAR },
    117  { "log100", AOM_CICP_TC_LOG_100 },
    118  { "log100sq10", AOM_CICP_TC_LOG_100_SQRT10 },
    119  { "iec61966", AOM_CICP_TC_IEC_61966 },
    120  { "bt1361", AOM_CICP_TC_BT_1361 },
    121  { "srgb", AOM_CICP_TC_SRGB },
    122  { "bt2020-10bit", AOM_CICP_TC_BT_2020_10_BIT },
    123  { "bt2020-12bit", AOM_CICP_TC_BT_2020_12_BIT },
    124  { "smpte2084", AOM_CICP_TC_SMPTE_2084 },
    125  { "hlg", AOM_CICP_TC_HLG },
    126  { "smpte428", AOM_CICP_TC_SMPTE_428 },
    127  { NULL, 0 }
    128 };
    129 
    130 static const struct arg_enum_list color_primaries_enum[] = {
    131  { "bt709", AOM_CICP_CP_BT_709 },
    132  { "unspecified", AOM_CICP_CP_UNSPECIFIED },
    133  { "bt601", AOM_CICP_CP_BT_601 },
    134  { "bt470m", AOM_CICP_CP_BT_470_M },
    135  { "bt470bg", AOM_CICP_CP_BT_470_B_G },
    136  { "smpte240", AOM_CICP_CP_SMPTE_240 },
    137  { "film", AOM_CICP_CP_GENERIC_FILM },
    138  { "bt2020", AOM_CICP_CP_BT_2020 },
    139  { "xyz", AOM_CICP_CP_XYZ },
    140  { "smpte431", AOM_CICP_CP_SMPTE_431 },
    141  { "smpte432", AOM_CICP_CP_SMPTE_432 },
    142  { "ebu3213", AOM_CICP_CP_EBU_3213 },
    143  { NULL, 0 }
    144 };
    145 #endif  // CONFIG_AV1_ENCODER
    146 
    147 const av1_codec_arg_definitions_t g_av1_codec_arg_defs = {
    148  .help = ARG_DEF(NULL, "help", 0, "Show usage options and exit"),
    149  .debugmode =
    150      ARG_DEF("D", "debug", 0, "Debug mode (makes output deterministic)"),
    151  .outputfile = ARG_DEF("o", "output", 1, "Output filename"),
    152  .use_nv12 = ARG_DEF(NULL, "nv12", 0, "Input file is NV12"),
    153  .use_yv12 = ARG_DEF(NULL, "yv12", 0, "Input file is YV12"),
    154  .use_i420 = ARG_DEF(NULL, "i420", 0, "Input file is I420 (default)"),
    155  .use_i422 = ARG_DEF(NULL, "i422", 0, "Input file is I422"),
    156  .use_i444 = ARG_DEF(NULL, "i444", 0, "Input file is I444"),
    157  .codecarg = ARG_DEF(NULL, "codec", 1, "Codec to use"),
    158  .passes = ARG_DEF("p", "passes", 1, "Number of passes (1/2/3)"),
    159  .pass_arg = ARG_DEF(NULL, "pass", 1, "Pass to execute (1/2/3)"),
    160  .fpf_name = ARG_DEF(NULL, "fpf", 1, "First pass statistics file name"),
    161  .limit = ARG_DEF(NULL, "limit", 1, "Stop encoding after n input frames"),
    162  .skip = ARG_DEF(NULL, "skip", 1, "Skip the first n input frames"),
    163  .good_dl = ARG_DEF(NULL, "good", 0, "Use Good Quality Deadline"),
    164  .rt_dl = ARG_DEF(NULL, "rt", 0, "Use Realtime Quality Deadline"),
    165  .ai_dl = ARG_DEF(NULL, "allintra", 0, "Use all intra mode"),
    166  .quietarg = ARG_DEF("q", "quiet", 0, "Do not print encode progress"),
    167  .verbosearg = ARG_DEF("v", "verbose", 0, "Show encoder parameters"),
    168  .psnrarg = ARG_DEF(
    169      NULL, "psnr", -1,
    170      "Show PSNR in status line "
    171      "(0: Disable PSNR status line display, 1: PSNR calculated using input "
    172      "bit-depth (default), 2: PSNR calculated using stream bit-depth); "
    173      "takes default option when arguments are not specified"),
    174  .use_cfg = ARG_DEF("c", "cfg", 1, "Config file to use"),
    175  .recontest = ARG_DEF_ENUM(NULL, "test-decode", 1,
    176                            "Test encode/decode mismatch", test_decode_enum),
    177  .framerate = ARG_DEF(NULL, "fps", 1, "Stream frame rate (rate/scale)"),
    178  .use_webm =
    179      ARG_DEF(NULL, "webm", 0, "Output WebM (default when WebM IO is enabled)"),
    180  .use_ivf = ARG_DEF(NULL, "ivf", 0, "Output IVF"),
    181  .use_obu = ARG_DEF(NULL, "obu", 0, "Output OBU"),
    182  .q_hist_n =
    183      ARG_DEF(NULL, "q-hist", 1, "Show quantizer histogram (n-buckets)"),
    184  .rate_hist_n =
    185      ARG_DEF(NULL, "rate-hist", 1, "Show rate histogram (n-buckets)"),
    186  .disable_warnings =
    187      ARG_DEF(NULL, "disable-warnings", 0,
    188              "Disable warnings about potentially incorrect encode settings"),
    189  .disable_warning_prompt =
    190      ARG_DEF("y", "disable-warning-prompt", 0,
    191              "Display warnings, but do not prompt user to continue"),
    192  .bitdeptharg =
    193      ARG_DEF_ENUM("b", "bit-depth", 1, "Bit depth for codec", bitdepth_enum),
    194  .inbitdeptharg = ARG_DEF(NULL, "input-bit-depth", 1, "Bit depth of input"),
    195 
    196  .input_chroma_subsampling_x = ARG_DEF(NULL, "input-chroma-subsampling-x", 1,
    197                                        "Chroma subsampling x value"),
    198  .input_chroma_subsampling_y = ARG_DEF(NULL, "input-chroma-subsampling-y", 1,
    199                                        "Chroma subsampling y value"),
    200 
    201  .usage = ARG_DEF("u", "usage", 1,
    202                   "Usage profile number to use (0: good, 1: rt, 2: allintra)"),
    203  .threads = ARG_DEF("t", "threads", 1, "Max number of threads to use"),
    204  .profile = ARG_DEF(NULL, "profile", 1, "Bitstream profile number to use"),
    205  .width = ARG_DEF("w", "width", 1, "Frame width"),
    206  .height = ARG_DEF("h", "height", 1, "Frame height"),
    207  .forced_max_frame_width = ARG_DEF(NULL, "forced_max_frame_width", 1,
    208                                    "Maximum frame width value to force"),
    209  .forced_max_frame_height = ARG_DEF(NULL, "forced_max_frame_height", 1,
    210                                     "Maximum frame height value to force"),
    211 #if CONFIG_WEBM_IO
    212  .stereo_mode = ARG_DEF_ENUM(NULL, "stereo-mode", 1, "Stereo 3D video format",
    213                              stereo_mode_enum),
    214 #endif
    215  .timebase = ARG_DEF(NULL, "timebase", 1,
    216                      "Output timestamp precision (fractional seconds)"),
    217  .global_error_resilient = ARG_DEF(NULL, "global-error-resilient", 1,
    218                                    "Enable global error resiliency features"),
    219  .lag_in_frames =
    220      ARG_DEF(NULL, "lag-in-frames", 1, "Max number of frames to lag"),
    221  .large_scale_tile = ARG_DEF(
    222      NULL, "large-scale-tile", 1,
    223      "Large scale tile coding (0: off (default), 1: on (ivf output only))"),
    224  .monochrome =
    225      ARG_DEF(NULL, "monochrome", 0, "Monochrome video (no chroma planes)"),
    226  .full_still_picture_hdr = ARG_DEF(NULL, "full-still-picture-hdr", 0,
    227                                    "Use full header for still picture"),
    228  .use_16bit_internal =
    229      ARG_DEF(NULL, "use-16bit-internal", 0, "Force use of 16-bit pipeline"),
    230  .dropframe_thresh =
    231      ARG_DEF(NULL, "drop-frame", 1, "Temporal resampling threshold (buf %)"),
    232  .resize_mode = ARG_DEF(
    233      NULL, "resize-mode", 1,
    234      "Frame resize mode (0: off (default), 1: fixed, 2: random, 3: dynamic)"),
    235  .resize_denominator =
    236      ARG_DEF(NULL, "resize-denominator", 1, "Frame resize denominator"),
    237  .resize_kf_denominator = ARG_DEF(NULL, "resize-kf-denominator", 1,
    238                                   "Frame resize keyframe denominator"),
    239  .superres_mode =
    240      ARG_DEF(NULL, "superres-mode", 1,
    241              "Frame super-resolution mode (0: disabled (default), 1: fixed, "
    242              "2: random, 3: qthresh, 4: auto)"),
    243  .superres_denominator = ARG_DEF(NULL, "superres-denominator", 1,
    244                                  "Frame super-resolution denominator"),
    245  .superres_kf_denominator =
    246      ARG_DEF(NULL, "superres-kf-denominator", 1,
    247              "Frame super-resolution keyframe denominator"),
    248  .superres_qthresh = ARG_DEF(NULL, "superres-qthresh", 1,
    249                              "Frame super-resolution qindex threshold"),
    250  .superres_kf_qthresh =
    251      ARG_DEF(NULL, "superres-kf-qthresh", 1,
    252              "Frame super-resolution keyframe qindex threshold"),
    253  .end_usage =
    254      ARG_DEF_ENUM(NULL, "end-usage", 1, "Rate control mode", end_usage_enum),
    255  .target_bitrate = ARG_DEF(NULL, "target-bitrate", 1, "Bitrate (kbps)"),
    256  .min_quantizer = ARG_DEF(NULL, "min-q", 1, "Minimum (best) quantizer"),
    257  .max_quantizer = ARG_DEF(NULL, "max-q", 1, "Maximum (worst) quantizer"),
    258  .undershoot_pct = ARG_DEF(NULL, "undershoot-pct", 1,
    259                            "Datarate undershoot (min) target (%)"),
    260  .overshoot_pct =
    261      ARG_DEF(NULL, "overshoot-pct", 1, "Datarate overshoot (max) target (%)"),
    262  .buf_sz = ARG_DEF(NULL, "buf-sz", 1, "Client buffer size (ms)"),
    263  .buf_initial_sz =
    264      ARG_DEF(NULL, "buf-initial-sz", 1, "Client initial buffer size (ms)"),
    265  .buf_optimal_sz =
    266      ARG_DEF(NULL, "buf-optimal-sz", 1, "Client optimal buffer size (ms)"),
    267  .bias_pct = ARG_DEF(NULL, "bias-pct", 1, "CBR/VBR bias (0=CBR, 100=VBR)"),
    268  .minsection_pct =
    269      ARG_DEF(NULL, "minsection-pct", 1, "GOP min bitrate (% of target)"),
    270  .maxsection_pct =
    271      ARG_DEF(NULL, "maxsection-pct", 1, "GOP max bitrate (% of target)"),
    272  .fwd_kf_enabled =
    273      ARG_DEF(NULL, "enable-fwd-kf", 1, "Enable forward reference keyframes"),
    274  .kf_min_dist =
    275      ARG_DEF(NULL, "kf-min-dist", 1, "Minimum keyframe interval (frames)"),
    276  .kf_max_dist =
    277      ARG_DEF(NULL, "kf-max-dist", 1, "Maximum keyframe interval (frames)"),
    278  .kf_disabled = ARG_DEF(NULL, "disable-kf", 0, "Disable keyframe placement"),
    279  .sframe_dist = ARG_DEF(NULL, "sframe-dist", 1, "S-Frame interval (frames)"),
    280  .sframe_mode =
    281      ARG_DEF(NULL, "sframe-mode", 1, "S-Frame insertion mode (1..2)"),
    282  .save_as_annexb = ARG_DEF(NULL, "annexb", 1, "Save as Annex-B"),
    283  .noise_sens = ARG_DEF(NULL, "noise-sensitivity", 1,
    284                        "Noise sensitivity (frames to blur)"),
    285  .sharpness =
    286      ARG_DEF(NULL, "sharpness", 1,
    287              "Bias towards block sharpness in rate-distortion optimization of "
    288              "transform coefficients and (in all intra mode only) reduce "
    289              "block edge filtering for better sharpness (0..7), default is 0"),
    290  .enable_adaptive_sharpness =
    291      ARG_DEF(NULL, "enable-adaptive-sharpness", 1,
    292              "Enable adaptive sharpness (0: disabled (default), 1: enabled)"),
    293  .static_thresh =
    294      ARG_DEF(NULL, "static-thresh", 1, "Motion detection threshold"),
    295  .auto_altref =
    296      ARG_DEF(NULL, "auto-alt-ref", 1, "Enable automatic alt reference frames"),
    297  .arnr_maxframes =
    298      ARG_DEF(NULL, "arnr-maxframes", 1, "AltRef max frames (0..15)"),
    299  .arnr_strength =
    300      ARG_DEF(NULL, "arnr-strength", 1, "AltRef filter strength (0..6)"),
    301  .tune_metric = ARG_DEF_ENUM(NULL, "tune", 1, "Distortion metric tuned with",
    302                              tuning_enum),
    303  .dist_metric = ARG_DEF_ENUM(
    304      NULL, "dist-metric", 1,
    305      "Distortion metric to use for in-block optimization", dist_metric_enum),
    306  .cq_level =
    307      ARG_DEF(NULL, "cq-level", 1, "Constant/Constrained Quality level"),
    308  .max_intra_rate_pct =
    309      ARG_DEF(NULL, "max-intra-rate", 1, "Max I-frame bitrate (pct)"),
    310 #if CONFIG_AV1_ENCODER
    311  .cpu_used_av1 = ARG_DEF(NULL, "cpu-used", 1,
    312                          "Speed setting (0..6 in good mode, 5..12 in realtime "
    313                          "mode, 0..9 in all intra mode)"),
    314  .rowmtarg =
    315      ARG_DEF(NULL, "row-mt", 1,
    316              "Enable row based multi-threading (0: off, 1: on (default))"),
    317  .fpmtarg = ARG_DEF(
    318      NULL, "fp-mt", 1,
    319      "Enable frame parallel multi-threading (0: off (default), 1: on)"),
    320  .tile_cols =
    321      ARG_DEF(NULL, "tile-columns", 1, "Number of tile columns to use, log2"),
    322  .tile_rows =
    323      ARG_DEF(NULL, "tile-rows", 1, "Number of tile rows to use, log2"),
    324  .auto_tiles = ARG_DEF(NULL, "auto-tiles", 1,
    325                        "Enable auto tiles (0: false (default), 1: true)"),
    326  .enable_tpl_model = ARG_DEF(NULL, "enable-tpl-model", 1,
    327                              "RDO based on frame temporal dependency "
    328                              "(0: off, 1: backward source based); "
    329                              "required for deltaq mode"),
    330  .enable_keyframe_filtering = ARG_DEF(
    331      NULL, "enable-keyframe-filtering", 1,
    332      "Apply temporal filtering on key frame "
    333      "(0: no filter, 1: filter without overlay (default), "
    334      "2: filter with overlay - experimental, may break random access in "
    335      "players)"),
    336  .tile_width = ARG_DEF(NULL, "tile-width", 1, "Tile widths (comma separated)"),
    337  .tile_height =
    338      ARG_DEF(NULL, "tile-height", 1, "Tile heights (command separated)"),
    339  .lossless = ARG_DEF(NULL, "lossless", 1,
    340                      "Lossless mode (0: false (default), 1: true)"),
    341  .enable_cdef = ARG_DEF(
    342      NULL, "enable-cdef", 1,
    343      "Enable the constrained directional enhancement filter (0: false, "
    344      "1: true (default), 2: disable for non-reference frames, 3: enable "
    345      "adaptively based on frame qindex)"),
    346  .enable_restoration = ARG_DEF(NULL, "enable-restoration", 1,
    347                                "Enable the loop restoration filter (0: false "
    348                                "(default in realtime mode), "
    349                                "1: true (default in non-realtime mode))"),
    350  .enable_rect_partitions = ARG_DEF(NULL, "enable-rect-partitions", 1,
    351                                    "Enable rectangular partitions "
    352                                    "(0: false, 1: true (default))"),
    353  .enable_ab_partitions =
    354      ARG_DEF(NULL, "enable-ab-partitions", 1,
    355              "Enable ab partitions (0: false, 1: true (default))"),
    356  .enable_1to4_partitions = ARG_DEF(NULL, "enable-1to4-partitions", 1,
    357                                    "Enable 1:4 and 4:1 partitions "
    358                                    "(0: false, 1: true (default))"),
    359  .min_partition_size =
    360      ARG_DEF(NULL, "min-partition-size", 1,
    361              "Set min partition size "
    362              "(4:4x4, 8:8x8, 16:16x16, 32:32x32, 64:64x64, 128:128x128); "
    363              "with 4k+ resolutions or higher speed settings, min "
    364              "partition size will have a minimum of 8"),
    365  .max_partition_size =
    366      ARG_DEF(NULL, "max-partition-size", 1,
    367              "Set max partition size "
    368              "(4:4x4, 8:8x8, 16:16x16, 32:32x32, 64:64x64, 128:128x128)"),
    369  .enable_dual_filter = ARG_DEF(NULL, "enable-dual-filter", 1,
    370                                "Enable dual filter "
    371                                "(0: false, 1: true (default))"),
    372  .enable_chroma_deltaq = ARG_DEF(NULL, "enable-chroma-deltaq", 1,
    373                                  "Enable chroma delta quant "
    374                                  "(0: false (default), 1: true)"),
    375  .enable_intra_edge_filter = ARG_DEF(NULL, "enable-intra-edge-filter", 1,
    376                                      "Enable intra edge filtering "
    377                                      "(0: false, 1: true (default))"),
    378  .enable_order_hint = ARG_DEF(NULL, "enable-order-hint", 1,
    379                               "Enable order hint "
    380                               "(0: false, 1: true (default))"),
    381  .enable_tx64 =
    382      ARG_DEF(NULL, "enable-tx64", 1,
    383              "Enable 64-pt transform (0: false, 1: true (default))"),
    384  .enable_flip_idtx =
    385      ARG_DEF(NULL, "enable-flip-idtx", 1,
    386              "Enable extended transform type (0: false, 1: true (default)) "
    387              "including FLIPADST_DCT, DCT_FLIPADST, FLIPADST_FLIPADST, "
    388              "ADST_FLIPADST, FLIPADST_ADST, IDTX, V_DCT, H_DCT, V_ADST, "
    389              "H_ADST, V_FLIPADST, H_FLIPADST"),
    390  .enable_rect_tx =
    391      ARG_DEF(NULL, "enable-rect-tx", 1,
    392              "Enable rectangular transform (0: false, 1: true (default))"),
    393  .enable_dist_wtd_comp = ARG_DEF(NULL, "enable-dist-wtd-comp", 1,
    394                                  "Enable distance-weighted compound "
    395                                  "(0: false, 1: true (default))"),
    396  .enable_masked_comp = ARG_DEF(NULL, "enable-masked-comp", 1,
    397                                "Enable masked (wedge/diff-wtd) compound "
    398                                "(0: false, 1: true (default))"),
    399  .enable_onesided_comp = ARG_DEF(NULL, "enable-onesided-comp", 1,
    400                                  "Enable one sided compound "
    401                                  "(0: false, 1: true (default))"),
    402  .enable_interintra_comp = ARG_DEF(NULL, "enable-interintra-comp", 1,
    403                                    "Enable interintra compound "
    404                                    "(0: false, 1: true (default))"),
    405  .enable_smooth_interintra = ARG_DEF(NULL, "enable-smooth-interintra", 1,
    406                                      "Enable smooth interintra mode "
    407                                      "(0: false, 1: true (default))"),
    408  .enable_diff_wtd_comp = ARG_DEF(NULL, "enable-diff-wtd-comp", 1,
    409                                  "Enable difference-weighted compound "
    410                                  "(0: false, 1: true (default))"),
    411  .enable_interinter_wedge = ARG_DEF(NULL, "enable-interinter-wedge", 1,
    412                                     "Enable interinter wedge compound "
    413                                     "(0: false, 1: true (default))"),
    414  .enable_interintra_wedge = ARG_DEF(NULL, "enable-interintra-wedge", 1,
    415                                     "Enable interintra wedge compound "
    416                                     "(0: false, 1: true (default))"),
    417  .enable_global_motion = ARG_DEF(NULL, "enable-global-motion", 1,
    418                                  "Enable global motion "
    419                                  "(0: false, 1: true (default))"),
    420  .enable_warped_motion = ARG_DEF(NULL, "enable-warped-motion", 1,
    421                                  "Enable local warped motion "
    422                                  "(0: false, 1: true (default))"),
    423  .enable_filter_intra = ARG_DEF(NULL, "enable-filter-intra", 1,
    424                                 "Enable filter intra prediction mode "
    425                                 "(0: false, 1: true (default))"),
    426  .enable_smooth_intra = ARG_DEF(NULL, "enable-smooth-intra", 1,
    427                                 "Enable smooth intra prediction modes "
    428                                 "(0: false, 1: true (default))"),
    429  .enable_paeth_intra = ARG_DEF(
    430      NULL, "enable-paeth-intra", 1,
    431      "Enable Paeth intra prediction mode (0: false, 1: true (default))"),
    432  .enable_cfl_intra = ARG_DEF(NULL, "enable-cfl-intra", 1,
    433                              "Enable chroma from luma intra prediction mode "
    434                              "(0: false, 1: true (default))"),
    435  .enable_directional_intra =
    436      ARG_DEF(NULL, "enable-directional-intra", 1,
    437              "Enable directional intra prediction modes "
    438              "(0: false, 1: true (default))"),
    439  .enable_diagonal_intra =
    440      ARG_DEF(NULL, "enable-diagonal-intra", 1,
    441              "Enable diagonal (D45 to D203) intra prediction modes, which are "
    442              "a subset of directional modes; has no effect if "
    443              "enable-directional-intra is 0 (0: false, 1: true (default))"),
    444  .force_video_mode = ARG_DEF(
    445      NULL, "force-video-mode", 1,
    446      "Force video mode even for a single frame (0: false (default), 1: true)"),
    447  .enable_obmc = ARG_DEF(NULL, "enable-obmc", 1,
    448                         "Enable OBMC (0: false, 1: true (default))"),
    449  .enable_overlay =
    450      ARG_DEF(NULL, "enable-overlay", 1,
    451              "Enable coding overlay frames (0: false, 1: true (default))"),
    452  .enable_palette =
    453      ARG_DEF(NULL, "enable-palette", 1,
    454              "Enable palette prediction mode (0: false, 1: true (default))"),
    455  .enable_intrabc = ARG_DEF(NULL, "enable-intrabc", 1,
    456                            "Enable intra block copy prediction mode "
    457                            "(0: false, 1: true (default))"),
    458  .enable_angle_delta =
    459      ARG_DEF(NULL, "enable-angle-delta", 1,
    460              "Enable intra angle delta (0: false, 1: true (default))"),
    461  .disable_trellis_quant = ARG_DEF(
    462      NULL, "disable-trellis-quant", 1,
    463      "Disable trellis optimization of quantized coefficients (0: false "
    464      "1: true  2: true for rd search 3: true for estimate yrd search "
    465      "(default))"),
    466  .enable_qm =
    467      ARG_DEF(NULL, "enable-qm", 1,
    468              "Enable quantisation matrices (0: false (default), 1: true)"),
    469  .qm_min = ARG_DEF(
    470      NULL, "qm-min", 1,
    471      "Min quant matrix flatness (0..15), default is 5 (4 for all intra mode)"),
    472  .qm_max = ARG_DEF(NULL, "qm-max", 1,
    473                    "Max quant matrix flatness (0..15), default is 9 (10 for "
    474                    "all intra mode)"),
    475  .reduced_tx_type_set = ARG_DEF(NULL, "reduced-tx-type-set", 1,
    476                                 "Use reduced set of transform types"),
    477  .use_intra_dct_only =
    478      ARG_DEF(NULL, "use-intra-dct-only", 1, "Use DCT only for INTRA modes"),
    479  .use_inter_dct_only =
    480      ARG_DEF(NULL, "use-inter-dct-only", 1, "Use DCT only for INTER modes"),
    481  .use_intra_default_tx_only =
    482      ARG_DEF(NULL, "use-intra-default-tx-only", 1,
    483              "Use Default-transform only for INTRA modes"),
    484  .quant_b_adapt = ARG_DEF(NULL, "quant-b-adapt", 1, "Use adaptive quantize_b"),
    485  .coeff_cost_upd_freq = ARG_DEF(NULL, "coeff-cost-upd-freq", 1,
    486                                 "Update freq for coeff costs. "
    487                                 "0: SB, 1: SB Row per Tile, 2: Tile, 3: Off"),
    488  .mode_cost_upd_freq = ARG_DEF(NULL, "mode-cost-upd-freq", 1,
    489                                "Update freq for mode costs. "
    490                                "0: SB, 1: SB Row per Tile, 2: Tile, 3: Off"),
    491  .mv_cost_upd_freq = ARG_DEF(NULL, "mv-cost-upd-freq", 1,
    492                              "Update freq for mv costs. "
    493                              "0: SB, 1: SB Row per Tile, 2: Tile, 3: Off"),
    494  .dv_cost_upd_freq = ARG_DEF(NULL, "dv-cost-upd-freq", 1,
    495                              "Update freq for dv costs. "
    496                              "0: SB, 1: SB Row per Tile, 2: Tile, 3: Off"),
    497  .num_tg = ARG_DEF(NULL, "num-tile-groups", 1,
    498                    "Maximum number of tile groups, default is 1"),
    499  .mtu_size =
    500      ARG_DEF(NULL, "mtu-size", 1,
    501              "MTU size for a tile group, default is 0 (no MTU targeting), "
    502              "overrides maximum number of tile groups"),
    503  .timing_info = ARG_DEF_ENUM(
    504      NULL, "timing-info", 1,
    505      "Signal timing info in the bitstream (model only works for no "
    506      "hidden frames, no super-res yet):",
    507      timing_info_enum),
    508 #if CONFIG_TUNE_VMAF
    509  .vmaf_model_path =
    510      ARG_DEF(NULL, "vmaf-model-path", 1, "Path to the VMAF model file"),
    511 #endif
    512  .partition_info_path = ARG_DEF(NULL, "partition-info-path", 1,
    513                                 "Partition information read and write path"),
    514  .enable_rate_guide_deltaq =
    515      ARG_DEF(NULL, "enable-rate-guide-deltaq", 1,
    516              "Enable rate guide deltaq (1), by default off (0). "
    517              "It requires --deltaq-mode=3. "
    518              "If turned on, it requires an input file specified "
    519              "by --rate-distribution-info."),
    520  .rate_distribution_info =
    521      ARG_DEF(NULL, "rate-distribution-info", 1,
    522              "Rate distribution information input."
    523              "It requires --enable-rate-guide-deltaq=1."),
    524  .film_grain_test = ARG_DEF(
    525      NULL, "film-grain-test", 1,
    526      "Film grain test vectors (0: none (default), 1: test-1  2: test-2, "
    527      "... 16: test-16)"),
    528  .film_grain_table = ARG_DEF(NULL, "film-grain-table", 1,
    529                              "Path to file containing film grain parameters"),
    530 #if CONFIG_DENOISE
    531  .denoise_noise_level =
    532      ARG_DEF(NULL, "denoise-noise-level", 1,
    533              "Amount of noise (from 0 = don't denoise, to 50)"),
    534  .denoise_block_size = ARG_DEF(NULL, "denoise-block-size", 1,
    535                                "Denoise block size (default = 32)"),
    536  .enable_dnl_denoising = ARG_DEF(NULL, "enable-dnl-denoising", 1,
    537                                  "Apply denoising to the frame "
    538                                  "being encoded when denoise-noise-level is "
    539                                  "enabled (0: false, 1: true (default))"),
    540 #endif
    541  .enable_ref_frame_mvs =
    542      ARG_DEF(NULL, "enable-ref-frame-mvs", 1,
    543              "Enable temporal mv prediction (default is 1)"),
    544  .frame_parallel_decoding =
    545      ARG_DEF(NULL, "frame-parallel", 1,
    546              "Enable frame parallel decodability features "
    547              "(0: false (default), 1: true)"),
    548  .error_resilient_mode = ARG_DEF(NULL, "error-resilient", 1,
    549                                  "Enable error resilient features "
    550                                  "(0: false (default), 1: true)"),
    551  .aq_mode = ARG_DEF(NULL, "aq-mode", 1,
    552                     "Adaptive quantization mode (0: off (default), 1: "
    553                     "variance 2: complexity, "
    554                     "3: cyclic refresh)"),
    555  .deltaq_mode =
    556      ARG_DEF(NULL, "deltaq-mode", 1,
    557              "Delta qindex mode (0: off, 1: deltaq objective (default), "
    558              "2: deltaq placeholder, 3: key frame visual quality, 4: user "
    559              "rating based visual quality optimization, 5: HDR video, 6: "
    560              "Variance Boost all intra); requires --enable-tpl-model=1"),
    561  .deltaq_strength = ARG_DEF(NULL, "deltaq-strength", 1,
    562                             "Deltaq strength for"
    563                             " --deltaq-mode=4 and --deltaq-mode=6 (%)"),
    564  .deltalf_mode = ARG_DEF(NULL, "delta-lf-mode", 1,
    565                          "Enable delta-lf-mode (0: off (default), 1: on)"),
    566  .frame_periodic_boost =
    567      ARG_DEF(NULL, "frame-boost", 1,
    568              "Enable frame periodic boost (0: off (default), 1: on)"),
    569  .gf_cbr_boost_pct = ARG_DEF(NULL, "gf-cbr-boost", 1,
    570                              "Boost for Golden Frame in CBR mode (pct)"),
    571  .max_inter_rate_pct =
    572      ARG_DEF(NULL, "max-inter-rate", 1, "Max P-frame bitrate (pct)"),
    573  .min_gf_interval = ARG_DEF(
    574      NULL, "min-gf-interval", 1,
    575      "Min gf/arf frame interval (default 0, indicating in-built behavior)"),
    576  .max_gf_interval = ARG_DEF(
    577      NULL, "max-gf-interval", 1,
    578      "Max gf/arf frame interval (default 0, indicating in-built behavior)"),
    579  .gf_min_pyr_height =
    580      ARG_DEF(NULL, "gf-min-pyr-height", 1,
    581              "Min height for GF group pyramid structure (0 (default) to 5)"),
    582  .gf_max_pyr_height = ARG_DEF(
    583      NULL, "gf-max-pyr-height", 1,
    584      "Maximum height for GF group pyramid structure (0 to 5 (default))"),
    585  .max_reference_frames = ARG_DEF(NULL, "max-reference-frames", 1,
    586                                  "Maximum number of reference frames allowed "
    587                                  "per frame (3 to 7 (default))"),
    588  .reduced_reference_set =
    589      ARG_DEF(NULL, "reduced-reference-set", 1,
    590              "Use reduced set of single and compound references (0: off "
    591              "(default), 1: on)"),
    592  .target_seq_level_idx =
    593      ARG_DEF(NULL, "target-seq-level-idx", 1,
    594              "Target sequence level index. "
    595              "Possible values are in the form of \"ABxy\". "
    596              "AB: Operating point (OP) index, "
    597              "xy: Target level index for the OP. "
    598              "E.g. \"0\" means target level index 0 (2.0) for the 0th OP, "
    599              "\"1019\" means target level index 19 (6.3) for the 10th OP."),
    600  .set_min_cr = ARG_DEF(
    601      NULL, "min-cr", 1,
    602      "Set minimum compression ratio. Take integer values. Default is 0. "
    603      "If non-zero, encoder will try to keep the compression ratio of "
    604      "each frame to be higher than the given value divided by 100."),
    605 
    606  .input_color_primaries = ARG_DEF_ENUM(
    607      NULL, "color-primaries", 1,
    608      "Color primaries (CICP) of input content:", color_primaries_enum),
    609 
    610  .input_transfer_characteristics =
    611      ARG_DEF_ENUM(NULL, "transfer-characteristics", 1,
    612                   "Transfer characteristics (CICP) of input content:",
    613                   transfer_characteristics_enum),
    614 
    615  .input_matrix_coefficients = ARG_DEF_ENUM(
    616      NULL, "matrix-coefficients", 1,
    617      "Matrix coefficients (CICP) of input content:", matrix_coefficients_enum),
    618 
    619  .input_chroma_sample_position =
    620      ARG_DEF_ENUM(NULL, "chroma-sample-position", 1,
    621                   "The chroma sample position when chroma 4:2:0 is signaled:",
    622                   chroma_sample_position_enum),
    623 
    624  .tune_content = ARG_DEF_ENUM(NULL, "tune-content", 1, "Tune content type",
    625                               tune_content_enum),
    626 
    627  .cdf_update_mode =
    628      ARG_DEF(NULL, "cdf-update-mode", 1,
    629              "CDF update mode for entropy coding "
    630              "(0: no CDF update, 1: update CDF on all frames (default), "
    631              "2: selectively update CDF on some frames)"),
    632 
    633  .superblock_size = ARG_DEF_ENUM(NULL, "sb-size", 1, "Superblock size to use",
    634                                  superblock_size_enum),
    635 
    636  .set_tier_mask =
    637      ARG_DEF(NULL, "set-tier-mask", 1,
    638              "Set bit mask to specify which tier each of the 32 possible "
    639              "operating points conforms to. "
    640              "Bit value 0 (default): Main Tier, 1: High Tier."),
    641 
    642  .use_fixed_qp_offsets =
    643      ARG_DEF(NULL, "use-fixed-qp-offsets", 1,
    644              "Enable fixed QP offsets for frames at different levels of the "
    645              "pyramid. Selected automatically from --cq-level if "
    646              "--fixed-qp-offsets is not provided. If this option is not "
    647              "specified (default), offsets are adaptively chosen by the "
    648              "encoder."),
    649 
    650  .fixed_qp_offsets = ARG_DEF(
    651      NULL, "fixed-qp-offsets", 1,
    652      "Set fixed QP offsets for frames at different levels of the "
    653      "pyramid. Comma-separated list of 5 offsets for keyframe, ALTREF, "
    654      "and 3 levels of internal alt-refs. If this option is not "
    655      "specified (default), offsets are adaptively chosen by the "
    656      "encoder."),
    657 
    658  .vbr_corpus_complexity_lap = ARG_DEF(
    659      NULL, "vbr-corpus-complexity-lap", 1,
    660      "Set average corpus complexity per mb for single pass VBR using lap. "
    661      "(0..10000), default is 0"),
    662 
    663  .fwd_kf_dist = ARG_DEF(NULL, "fwd-kf-dist", -1,
    664                         "Set distance between forward keyframes. A value of "
    665                         "-1 (default) means no repetitive forward keyframes."),
    666 
    667  .enable_tx_size_search = ARG_DEF(
    668      NULL, "enable-tx-size-search", 1,
    669      "Enable transform size search to find the best size for each block. "
    670      "If false, transforms always have the largest possible size "
    671      "(0: false, 1: true (default)). Ignored in non rd pick mode in "
    672      "real-time coding."),
    673 
    674  .loopfilter_control = ARG_DEF(
    675      NULL, "loopfilter-control", 1,
    676      "Control loop filtering "
    677      "(0: Loopfilter disabled for all frames, 1: Enable loopfilter for all "
    678      "frames (default), 2: Disable loopfilter for non-reference frames, 3: "
    679      "Disable loopfilter for frames with low motion)"),
    680 
    681  .auto_intra_tools_off =
    682      ARG_DEF(NULL, "auto-intra-tools-off", 1,
    683              "Automatically turn off several intra coding tools for all intra "
    684              "mode; only in effect if --deltaq-mode=3"),
    685 
    686  .two_pass_input =
    687      ARG_DEF(NULL, "two-pass-input", 1,
    688              "The input file for the second pass for three-pass encoding"),
    689  .two_pass_output = ARG_DEF(
    690      NULL, "two-pass-output", 1,
    691      "The output file for the first two passes for three-pass encoding"),
    692  .two_pass_width =
    693      ARG_DEF(NULL, "two-pass-width", 1, "The width of two-pass-input"),
    694  .two_pass_height =
    695      ARG_DEF(NULL, "two-pass-height", 1, "The height of two-pass-input"),
    696  .second_pass_log =
    697      ARG_DEF("spf", "second-pass-log", 1, "Log file from second pass"),
    698  .strict_level_conformance =
    699      ARG_DEF(NULL, "strict-level-conformance", 1,
    700              "When set to 1, exit the encoder when it fails to encode "
    701              "to a given target level"),
    702  .kf_max_pyr_height = ARG_DEF(
    703      NULL, "kf-max-pyr-height", 1,
    704      "Maximum height of pyramid structure used for the GOP starting with a "
    705      "key frame (-1 to 5). When set to -1 (default), it does not have any "
    706      "effect. The actual maximum pyramid height will be the minimum of this "
    707      "value and the value of gf_max_pyr_height."),
    708  .sb_qp_sweep =
    709      ARG_DEF(NULL, "sb-qp-sweep", 1,
    710              "When set to 1, enable the superblock level qp sweep for a "
    711              "given lambda to minimize the rdcost."),
    712  .enable_low_complexity_decode = ARG_DEF(
    713      NULL, "enable-low-complexity-decode", 1,
    714      "Enable low complexity decode (0: false (default), 1: true). As of now, "
    715      "this only supports good-quality encoding (speed 1 to 3) for vertical "
    716      "videos between 608p and 720p."),
    717  .screen_detection_mode =
    718      ARG_DEF(NULL, "screen-detection-mode", 1,
    719              "Screen content detection mode (1: standard (default), "
    720              "2: anti-aliased text and graphics aware)"),
    721 #endif  // CONFIG_AV1_ENCODER
    722 };