| @@ -128,50 +128,50 @@ int fourcc_is_ivf(const char detect[4]) { · 127 unmodified lines |
| 128 | return 0; | 128 | return 0; |
| 129 | } | 129 | } |
| 130 | | 130 | |
| 131 | static const arg_def_t debugmode = ARG_DEF("D", "debug", 0, | 131 | static const arg_def_t debugmode = ARG_DEF( |
| 132 | "Debug mode (makes output deterministic)"); | 132 | "D", "debug", 0, "Debug mode (makes output deterministic)"); |
| 133 | static const arg_def_t outputfile = ARG_DEF("o", "output", 1, | 133 | static const arg_def_t outputfile = ARG_DEF( |
| 134 | "Output filename"); | 134 | "o", "output", 1, "Output filename"); |
| 135 | static const arg_def_t use_yv12 = ARG_DEF(NULL, "yv12", 0, | 135 | static const arg_def_t use_yv12 = ARG_DEF( |
| 136 | "Input file is YV12 "); | 136 | NULL, "yv12", 0, "Input file is YV12 "); |
| 137 | static const arg_def_t use_i420 = ARG_DEF(NULL, "i420", 0, | 137 | static const arg_def_t use_i420 = ARG_DEF( |
| 138 | "Input file is I420 (default)"); | 138 | NULL, "i420", 0, "Input file is I420 (default)"); |
| 139 | static const arg_def_t use_i422 = ARG_DEF(NULL, "i422", 0, | 139 | static const arg_def_t use_i422 = ARG_DEF( |
| 140 | "Input file is I422"); | 140 | NULL, "i422", 0, "Input file is I422"); |
| 141 | static const arg_def_t use_i444 = ARG_DEF(NULL, "i444", 0, | 141 | static const arg_def_t use_i444 = ARG_DEF( |
| 142 | "Input file is I444"); | 142 | NULL, "i444", 0, "Input file is I444"); |
| 143 | static const arg_def_t use_i440 = ARG_DEF(NULL, "i440", 0, | 143 | static const arg_def_t use_i440 = ARG_DEF( |
| 144 | "Input file is I440"); | 144 | NULL, "i440", 0, "Input file is I440"); |
| 145 | static const arg_def_t codecarg = ARG_DEF(NULL, "codec", 1, | 145 | static const arg_def_t codecarg = ARG_DEF( |
| 146 | "Codec to use"); | 146 | NULL, "codec", 1, "Codec to use"); |
| 147 | static const arg_def_t passes = ARG_DEF("p", "passes", 1, | 147 | static const arg_def_t passes = ARG_DEF( |
| 148 | "Number of passes (1/2)"); | 148 | "p", "passes", 1, "Number of passes (1/2)"); |
| 149 | static const arg_def_t pass_arg = ARG_DEF(NULL, "pass", 1, | 149 | static const arg_def_t pass_arg = ARG_DEF( |
| 150 | "Pass to execute (1/2)"); | 150 | NULL, "pass", 1, "Pass to execute (1/2)"); |
| 151 | static const arg_def_t fpf_name = ARG_DEF(NULL, "fpf", 1, | 151 | static const arg_def_t fpf_name = ARG_DEF( |
| 152 | "First pass statistics file name"); | 152 | NULL, "fpf", 1, "First pass statistics file name"); |
| 153 | #if CONFIG_FP_MB_STATS | 153 | #if CONFIG_FP_MB_STATS |
| 154 | static const arg_def_t fpmbf_name = ARG_DEF(NULL, "fpmbf", 1, | 154 | static const arg_def_t fpmbf_name = ARG_DEF( |
| 155 | "First pass block statistics file name"); | 155 | NULL, "fpmbf", 1, "First pass block statistics file name"); |
| 156 | #endif | 156 | #endif |
| 157 | static const arg_def_t limit = ARG_DEF(NULL, "limit", 1, | 157 | static const arg_def_t limit = ARG_DEF( |
| 158 | "Stop encoding after n input frames"); | 158 | NULL, "limit", 1, "Stop encoding after n input frames"); |
| 159 | static const arg_def_t skip = ARG_DEF(NULL, "skip", 1, | 159 | static const arg_def_t skip = ARG_DEF( |
| 160 | "Skip the first n input frames"); | 160 | NULL, "skip", 1, "Skip the first n input frames"); |
| 161 | static const arg_def_t deadline = ARG_DEF("d", "deadline", 1, | 161 | static const arg_def_t deadline = ARG_DEF( |
| 162 | "Deadline per frame (usec)"); | 162 | "d", "deadline", 1, "Deadline per frame (usec)"); |
| 163 | static const arg_def_t best_dl = ARG_DEF(NULL, "best", 0, | 163 | static const arg_def_t best_dl = ARG_DEF( |
| 164 | "Use Best Quality Deadline"); | 164 | NULL, "best", 0, "Use Best Quality Deadline"); |
| 165 | static const arg_def_t good_dl = ARG_DEF(NULL, "good", 0, | 165 | static const arg_def_t good_dl = ARG_DEF( |
| 166 | "Use Good Quality Deadline"); | 166 | NULL, "good", 0, "Use Good Quality Deadline"); |
| 167 | static const arg_def_t rt_dl = ARG_DEF(NULL, "rt", 0, | 167 | static const arg_def_t rt_dl = ARG_DEF( |
| 168 | "Use Realtime Quality Deadline"); | 168 | NULL, "rt", 0, "Use Realtime Quality Deadline"); |
| 169 | static const arg_def_t quietarg = ARG_DEF("q", "quiet", 0, | 169 | static const arg_def_t quietarg = ARG_DEF( |
| 170 | "Do not print encode progress"); | 170 | "q", "quiet", 0, "Do not print encode progress"); |
| 171 | static const arg_def_t verbosearg = ARG_DEF("v", "verbose", 0, | 171 | static const arg_def_t verbosearg = ARG_DEF( |
| 172 | "Show encoder parameters"); | 172 | "v", "verbose", 0, "Show encoder parameters"); |
| 173 | static const arg_def_t psnrarg = ARG_DEF(NULL, "psnr", 0, | 173 | static const arg_def_t psnrarg = ARG_DEF( |
| 174 | "Show PSNR in status line"); | 174 | NULL, "psnr", 0, "Show PSNR in status line"); |
| 175 | | 175 | |
| 176 | static const struct arg_enum_list test_decode_enum[] = { | 176 | static const struct arg_enum_list test_decode_enum[] = { |
| 177 | {"off", TEST_DECODE_OFF}, | 177 | {"off", TEST_DECODE_OFF}, |
| @@ -179,25 +179,25 @@ static const struct arg_enum_list test_decode_enum[] = { · 1 unmodified line |
| 179 | {"warn", TEST_DECODE_WARN}, | 179 | {"warn", TEST_DECODE_WARN}, |
| 180 | {NULL, 0} | 180 | {NULL, 0} |
| 181 | }; | 181 | }; |
| 182 | static const arg_def_t recontest = ARG_DEF_ENUM(NULL, "test-decode", 1, | 182 | static const arg_def_t recontest = ARG_DEF_ENUM( |
| 183 | "Test encode/decode mismatch", | 183 | NULL, "test-decode", 1, "Test encode/decode mismatch", test_decode_enum); |
| 184 | test_decode_enum); | 184 | static const arg_def_t framerate = ARG_DEF( |
| 185 | static const arg_def_t framerate = ARG_DEF(NULL, "fps", 1, | 185 | NULL, "fps", 1, "Stream frame rate (rate/scale)"); |
| 186 | "Stream frame rate (rate/scale)"); | 186 | static const arg_def_t use_ivf = ARG_DEF( |
| 187 | static const arg_def_t use_ivf = ARG_DEF(NULL, "ivf", 0, | 187 | NULL, "ivf", 0, "Output IVF (default is WebM if WebM IO is enabled)"); |
| 188 | "Output IVF (default is WebM if WebM IO is enabled)"); | 188 | static const arg_def_t out_part = ARG_DEF( |
| 189 | static const arg_def_t out_part = ARG_DEF("P", "output-partitions", 0, | 189 | "P", "output-partitions", 0, |
| 190 | "Makes encoder output partitions. Requires IVF output!"); | 190 | "Makes encoder output partitions. Requires IVF output!"); |
| 191 | static const arg_def_t q_hist_n = ARG_DEF(NULL, "q-hist", 1, | 191 | static const arg_def_t q_hist_n = ARG_DEF( |
| 192 | "Show quantizer histogram (n-buckets)"); | 192 | NULL, "q-hist", 1, "Show quantizer histogram (n-buckets)"); |
| 193 | static const arg_def_t rate_hist_n = ARG_DEF(NULL, "rate-hist", 1, | 193 | static const arg_def_t rate_hist_n = ARG_DEF( |
| 194 | "Show rate histogram (n-buckets)"); | 194 | NULL, "rate-hist", 1, "Show rate histogram (n-buckets)"); |
| 195 | static const arg_def_t disable_warnings = | 195 | static const arg_def_t disable_warnings = ARG_DEF( |
| 196 | ARG_DEF(NULL, "disable-warnings", 0, | 196 | NULL, "disable-warnings", 0, |
| 197 | "Disable warnings about potentially incorrect encode settings."); | 197 | "Disable warnings about potentially incorrect encode settings."); |
| 198 | static const arg_def_t disable_warning_prompt = | 198 | static const arg_def_t disable_warning_prompt = ARG_DEF( |
| 199 | ARG_DEF("y", "disable-warning-prompt", 0, | 199 | "y", "disable-warning-prompt", 0, |
| 200 | "Display warnings, but do not prompt user to continue."); | 200 | "Display warnings, but do not prompt user to continue."); |
| 201 | | 201 | |
| 202 | #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH | 202 | #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH |
| 203 | static const arg_def_t test16bitinternalarg = ARG_DEF( | 203 | static const arg_def_t test16bitinternalarg = ARG_DEF( |
| @@ -213,16 +213,14 @@ static const arg_def_t *main_args[] = { · 9 unmodified lines |
| 213 | NULL | 213 | NULL |
| 214 | }; | 214 | }; |
| 215 | | 215 | |
| 216 | static const arg_def_t usage = ARG_DEF("u", "usage", 1, | 216 | static const arg_def_t usage = ARG_DEF( |
| 217 | "Usage profile number to use"); | 217 | "u", "usage", 1, "Usage profile number to use"); |
| 218 | static const arg_def_t threads = ARG_DEF("t", "threads", 1, | 218 | static const arg_def_t threads = ARG_DEF( |
| 219 | "Max number of threads to use"); | 219 | "t", "threads", 1, "Max number of threads to use"); |
| 220 | static const arg_def_t profile = ARG_DEF(NULL, "profile", 1, | 220 | static const arg_def_t profile = ARG_DEF( |
| 221 | "Bitstream profile number to use"); | 221 | NULL, "profile", 1, "Bitstream profile number to use"); |
| 222 | static const arg_def_t width = ARG_DEF("w", "width", 1, | 222 | static const arg_def_t width = ARG_DEF("w", "width", 1, "Frame width"); |
| 223 | "Frame width"); | 223 | static const arg_def_t height = ARG_DEF("h", "height", 1, "Frame height"); |
| 224 | static const arg_def_t height = ARG_DEF("h", "height", 1, | | |
| 225 | "Frame height"); | | |
| 226 | #if CONFIG_WEBM_IO | 224 | #if CONFIG_WEBM_IO |
| 227 | static const struct arg_enum_list stereo_mode_enum[] = { | 225 | static const struct arg_enum_list stereo_mode_enum[] = { |
| 228 | {"mono", STEREO_FORMAT_MONO}, | 226 | {"mono", STEREO_FORMAT_MONO}, |
| @@ -232,15 +230,15 @@ static const struct arg_enum_list stereo_mode_enum[] = { · 3 unmodified lines |
| 232 | {"right-left", STEREO_FORMAT_RIGHT_LEFT}, | 230 | {"right-left", STEREO_FORMAT_RIGHT_LEFT}, |
| 233 | {NULL, 0} | 231 | {NULL, 0} |
| 234 | }; | 232 | }; |
| 235 | static const arg_def_t stereo_mode = ARG_DEF_ENUM(NULL, "stereo-mode", 1, | 233 | static const arg_def_t stereo_mode = ARG_DEF_ENUM( |
| 236 | "Stereo 3D video format", stereo_mode_enum); | 234 | NULL, "stereo-mode", 1, "Stereo 3D video format", stereo_mode_enum); |
| 237 | #endif | 235 | #endif |
| 238 | static const arg_def_t timebase = ARG_DEF(NULL, "timebase", 1, | 236 | static const arg_def_t timebase = ARG_DEF( |
| 239 | "Output timestamp precision (fractional seconds)"); | 237 | NULL, "timebase", 1, "Output timestamp precision (fractional seconds)"); |
| 240 | static const arg_def_t error_resilient = ARG_DEF(NULL, "error-resilient", 1, | 238 | static const arg_def_t error_resilient = ARG_DEF( |
| 241 | "Enable error resiliency features"); | 239 | NULL, "error-resilient", 1, "Enable error resiliency features"); |
| 242 | static const arg_def_t lag_in_frames = ARG_DEF(NULL, "lag-in-frames", 1, | 240 | static const arg_def_t lag_in_frames = ARG_DEF( |
| 243 | "Max number of frames to lag"); | 241 | NULL, "lag-in-frames", 1, "Max number of frames to lag"); |
| 244 | | 242 | |
| 245 | static const arg_def_t *global_args[] = { | 243 | static const arg_def_t *global_args[] = { |
| 246 | &use_yv12, &use_i420, &use_i422, &use_i444, &use_i440, | 244 | &use_yv12, &use_i420, &use_i422, &use_i444, &use_i440, |
| @@ -257,18 +255,18 @@ static const arg_def_t *global_args[] = { · 10 unmodified lines |
| 257 | &lag_in_frames, NULL | 255 | &lag_in_frames, NULL |
| 258 | }; | 256 | }; |
| 259 | | 257 | |
| 260 | static const arg_def_t dropframe_thresh = ARG_DEF(NULL, "drop-frame", 1, | 258 | static const arg_def_t dropframe_thresh = ARG_DEF( |
| 261 | "Temporal resampling threshold (buf %)"); | 259 | NULL, "drop-frame", 1, "Temporal resampling threshold (buf %)"); |
| 262 | static const arg_def_t resize_allowed = ARG_DEF(NULL, "resize-allowed", 1, | 260 | static const arg_def_t resize_allowed = ARG_DEF( |
| 263 | "Spatial resampling enabled (bool)"); | 261 | NULL, "resize-allowed", 1, "Spatial resampling enabled (bool)"); |
| 264 | static const arg_def_t resize_width = ARG_DEF(NULL, "resize-width", 1, | 262 | static const arg_def_t resize_width = ARG_DEF( |
| 265 | "Width of encoded frame"); | 263 | NULL, "resize-width", 1, "Width of encoded frame"); |
| 266 | static const arg_def_t resize_height = ARG_DEF(NULL, "resize-height", 1, | 264 | static const arg_def_t resize_height = ARG_DEF( |
| 267 | "Height of encoded frame"); | 265 | NULL, "resize-height", 1, "Height of encoded frame"); |
| 268 | static const arg_def_t resize_up_thresh = ARG_DEF(NULL, "resize-up", 1, | 266 | static const arg_def_t resize_up_thresh = ARG_DEF( |
| 269 | "Upscale threshold (buf %)"); | 267 | NULL, "resize-up", 1, "Upscale threshold (buf %)"); |
| 270 | static const arg_def_t resize_down_thresh = ARG_DEF(NULL, "resize-down", 1, | 268 | static const arg_def_t resize_down_thresh = ARG_DEF( |
| 271 | "Downscale threshold (buf %)"); | 269 | NULL, "resize-down", 1, "Downscale threshold (buf %)"); |
| 272 | static const struct arg_enum_list end_usage_enum[] = { | 270 | static const struct arg_enum_list end_usage_enum[] = { |
| 273 | {"vbr", VPX_VBR}, | 271 | {"vbr", VPX_VBR}, |
| 274 | {"cbr", VPX_CBR}, | 272 | {"cbr", VPX_CBR}, |
| @@ -276,24 +274,24 @@ static const struct arg_enum_list end_usage_enum[] = { · 1 unmodified line |
| 276 | {"q", VPX_Q}, | 274 | {"q", VPX_Q}, |
| 277 | {NULL, 0} | 275 | {NULL, 0} |
| 278 | }; | 276 | }; |
| 279 | static const arg_def_t end_usage = ARG_DEF_ENUM(NULL, "end-usage", 1, | 277 | static const arg_def_t end_usage = ARG_DEF_ENUM( |
| 280 | "Rate control mode", end_usage_enum); | 278 | NULL, "end-usage", 1, "Rate control mode", end_usage_enum); |
| 281 | static const arg_def_t target_bitrate = ARG_DEF(NULL, "target-bitrate", 1, | 279 | static const arg_def_t target_bitrate = ARG_DEF( |
| 282 | "Bitrate (kbps)"); | 280 | NULL, "target-bitrate", 1, "Bitrate (kbps)"); |
| 283 | static const arg_def_t min_quantizer = ARG_DEF(NULL, "min-q", 1, | 281 | static const arg_def_t min_quantizer = ARG_DEF( |
| 284 | "Minimum (best) quantizer"); | 282 | NULL, "min-q", 1, "Minimum (best) quantizer"); |
| 285 | static const arg_def_t max_quantizer = ARG_DEF(NULL, "max-q", 1, | 283 | static const arg_def_t max_quantizer = ARG_DEF( |
| 286 | "Maximum (worst) quantizer"); | 284 | NULL, "max-q", 1, "Maximum (worst) quantizer"); |
| 287 | static const arg_def_t undershoot_pct = ARG_DEF(NULL, "undershoot-pct", 1, | 285 | static const arg_def_t undershoot_pct = ARG_DEF( |
| 288 | "Datarate undershoot (min) target (%)"); | 286 | NULL, "undershoot-pct", 1, "Datarate undershoot (min) target (%)"); |
| 289 | static const arg_def_t overshoot_pct = ARG_DEF(NULL, "overshoot-pct", 1, | 287 | static const arg_def_t overshoot_pct = ARG_DEF( |
| 290 | "Datarate overshoot (max) target (%)"); | 288 | NULL, "overshoot-pct", 1, "Datarate overshoot (max) target (%)"); |
| 291 | static const arg_def_t buf_sz = ARG_DEF(NULL, "buf-sz", 1, | 289 | static const arg_def_t buf_sz = ARG_DEF( |
| 292 | "Client buffer size (ms)"); | 290 | NULL, "buf-sz", 1, "Client buffer size (ms)"); |
| 293 | static const arg_def_t buf_initial_sz = ARG_DEF(NULL, "buf-initial-sz", 1, | 291 | static const arg_def_t buf_initial_sz = ARG_DEF( |
| 294 | "Client initial buffer size (ms)"); | 292 | NULL, "buf-initial-sz", 1, "Client initial buffer size (ms)"); |
| 295 | static const arg_def_t buf_optimal_sz = ARG_DEF(NULL, "buf-optimal-sz", 1, | 293 | static const arg_def_t buf_optimal_sz = ARG_DEF( |
| 296 | "Client optimal buffer size (ms)"); | 294 | NULL, "buf-optimal-sz", 1, "Client optimal buffer size (ms)"); |
| 297 | static const arg_def_t *rc_args[] = { | 295 | static const arg_def_t *rc_args[] = { |
| 298 | &dropframe_thresh, &resize_allowed, &resize_width, &resize_height, | 296 | &dropframe_thresh, &resize_allowed, &resize_width, &resize_height, |
| 299 | &resize_up_thresh, &resize_down_thresh, &end_usage, &target_bitrate, | 297 | &resize_up_thresh, &resize_down_thresh, &end_usage, &target_bitrate, |
| @@ -302,59 +300,59 @@ static const arg_def_t *rc_args[] = { · 2 unmodified lines |
| 302 | }; | 300 | }; |
| 303 | | 301 | |
| 304 | | 302 | |
| 305 | static const arg_def_t bias_pct = ARG_DEF(NULL, "bias-pct", 1, | 303 | static const arg_def_t bias_pct = ARG_DEF( |
| 306 | "CBR/VBR bias (0=CBR, 100=VBR)"); | 304 | NULL, "bias-pct", 1, "CBR/VBR bias (0=CBR, 100=VBR)"); |
| 307 | static const arg_def_t minsection_pct = ARG_DEF(NULL, "minsection-pct", 1, | 305 | static const arg_def_t minsection_pct = ARG_DEF( |
| 308 | "GOP min bitrate (% of target)"); | 306 | NULL, "minsection-pct", 1, "GOP min bitrate (% of target)"); |
| 309 | static const arg_def_t maxsection_pct = ARG_DEF(NULL, "maxsection-pct", 1, | 307 | static const arg_def_t maxsection_pct = ARG_DEF( |
| 310 | "GOP max bitrate (% of target)"); | 308 | NULL, "maxsection-pct", 1, "GOP max bitrate (% of target)"); |
| 311 | static const arg_def_t *rc_twopass_args[] = { | 309 | static const arg_def_t *rc_twopass_args[] = { |
| 312 | &bias_pct, &minsection_pct, &maxsection_pct, NULL | 310 | &bias_pct, &minsection_pct, &maxsection_pct, NULL |
| 313 | }; | 311 | }; |
| 314 | | 312 | |
| 315 | | 313 | |
| 316 | static const arg_def_t kf_min_dist = ARG_DEF(NULL, "kf-min-dist", 1, | 314 | static const arg_def_t kf_min_dist = ARG_DEF( |
| 317 | "Minimum keyframe interval (frames)"); | 315 | NULL, "kf-min-dist", 1, "Minimum keyframe interval (frames)"); |
| 318 | static const arg_def_t kf_max_dist = ARG_DEF(NULL, "kf-max-dist", 1, | 316 | static const arg_def_t kf_max_dist = ARG_DEF( |
| 319 | "Maximum keyframe interval (frames)"); | 317 | NULL, "kf-max-dist", 1, "Maximum keyframe interval (frames)"); |
| 320 | static const arg_def_t kf_disabled = ARG_DEF(NULL, "disable-kf", 0, | 318 | static const arg_def_t kf_disabled = ARG_DEF( |
| 321 | "Disable keyframe placement"); | 319 | NULL, "disable-kf", 0, "Disable keyframe placement"); |
| 322 | static const arg_def_t *kf_args[] = { | 320 | static const arg_def_t *kf_args[] = { |
| 323 | &kf_min_dist, &kf_max_dist, &kf_disabled, NULL | 321 | &kf_min_dist, &kf_max_dist, &kf_disabled, NULL |
| 324 | }; | 322 | }; |
| 325 | | 323 | |
| 326 | | 324 | |
| 327 | static const arg_def_t noise_sens = ARG_DEF(NULL, "noise-sensitivity", 1, | 325 | static const arg_def_t noise_sens = ARG_DEF( |
| 328 | "Noise sensitivity (frames to blur)"); | 326 | NULL, "noise-sensitivity", 1, "Noise sensitivity (frames to blur)"); |
| 329 | static const arg_def_t sharpness = ARG_DEF(NULL, "sharpness", 1, | 327 | static const arg_def_t sharpness = ARG_DEF( |
| 330 | "Loop filter sharpness (0..7)"); | 328 | NULL, "sharpness", 1, "Loop filter sharpness (0..7)"); |
| 331 | static const arg_def_t static_thresh = ARG_DEF(NULL, "static-thresh", 1, | 329 | static const arg_def_t static_thresh = ARG_DEF( |
| 332 | "Motion detection threshold"); | 330 | NULL, "static-thresh", 1, "Motion detection threshold"); |
| 333 | static const arg_def_t cpu_used = ARG_DEF(NULL, "cpu-used", 1, | 331 | static const arg_def_t cpu_used = ARG_DEF( |
| 334 | "CPU Used (-16..16)"); | 332 | NULL, "cpu-used", 1, "CPU Used (-16..16)"); |
| 335 | static const arg_def_t auto_altref = ARG_DEF(NULL, "auto-alt-ref", 1, | 333 | static const arg_def_t auto_altref = ARG_DEF( |
| 336 | "Enable automatic alt reference frames"); | 334 | NULL, "auto-alt-ref", 1, "Enable automatic alt reference frames"); |
| 337 | static const arg_def_t arnr_maxframes = ARG_DEF(NULL, "arnr-maxframes", 1, | 335 | static const arg_def_t arnr_maxframes = ARG_DEF( |
| 338 | "AltRef max frames (0..15)"); | 336 | NULL, "arnr-maxframes", 1, "AltRef max frames (0..15)"); |
| 339 | static const arg_def_t arnr_strength = ARG_DEF(NULL, "arnr-strength", 1, | 337 | static const arg_def_t arnr_strength = ARG_DEF( |
| 340 | "AltRef filter strength (0..6)"); | 338 | NULL, "arnr-strength", 1, "AltRef filter strength (0..6)"); |
| 341 | static const arg_def_t arnr_type = ARG_DEF(NULL, "arnr-type", 1, | 339 | static const arg_def_t arnr_type = ARG_DEF( |
| 342 | "AltRef type"); | 340 | NULL, "arnr-type", 1, "AltRef type"); |
| 343 | static const struct arg_enum_list tuning_enum[] = { | 341 | static const struct arg_enum_list tuning_enum[] = { |
| 344 | {"psnr", VP8_TUNE_PSNR}, | 342 | {"psnr", VP8_TUNE_PSNR}, |
| 345 | {"ssim", VP8_TUNE_SSIM}, | 343 | {"ssim", VP8_TUNE_SSIM}, |
| 346 | {NULL, 0} | 344 | {NULL, 0} |
| 347 | }; | 345 | }; |
| 348 | static const arg_def_t tune_ssim = ARG_DEF_ENUM(NULL, "tune", 1, | 346 | static const arg_def_t tune_ssim = ARG_DEF_ENUM( |
| 349 | "Material to favor", tuning_enum); | 347 | NULL, "tune", 1, "Material to favor", tuning_enum); |
| 350 | static const arg_def_t cq_level = ARG_DEF(NULL, "cq-level", 1, | 348 | static const arg_def_t cq_level = ARG_DEF( |
| 351 | "Constant/Constrained Quality level"); | 349 | NULL, "cq-level", 1, "Constant/Constrained Quality level"); |
| 352 | static const arg_def_t max_intra_rate_pct = ARG_DEF(NULL, "max-intra-rate", 1, | 350 | static const arg_def_t max_intra_rate_pct = ARG_DEF( |
| 353 | "Max I-frame bitrate (pct)"); | 351 | NULL, "max-intra-rate", 1, "Max I-frame bitrate (pct)"); |
| 354 | | 352 | |
| 355 | #if CONFIG_VP8_ENCODER | 353 | #if CONFIG_VP8_ENCODER |
| 356 | static const arg_def_t token_parts = | 354 | static const arg_def_t token_parts = ARG_DEF( |
| 357 | ARG_DEF(NULL, "token-parts", 1, "Number of token partitions to use, log2"); | 355 | NULL, "token-parts", 1, "Number of token partitions to use, log2"); |
| 358 | static const arg_def_t *vp8_args[] = { | 356 | static const arg_def_t *vp8_args[] = { |
| 359 | &cpu_used, &auto_altref, &noise_sens, &sharpness, &static_thresh, | 357 | &cpu_used, &auto_altref, &noise_sens, &sharpness, &static_thresh, |
| 360 | &token_parts, &arnr_maxframes, &arnr_strength, &arnr_type, | 358 | &token_parts, &arnr_maxframes, &arnr_strength, &arnr_type, |
| @@ -372,11 +370,12 @@ static const int vp8_arg_ctrl_map[] = { · 11 unmodified lines |
| 372 | #endif | 370 | #endif |
| 373 | | 371 | |
| 374 | #if CONFIG_VP9_ENCODER | 372 | #if CONFIG_VP9_ENCODER |
| 375 | static const arg_def_t tile_cols = | 373 | static const arg_def_t tile_cols = ARG_DEF( |
| 376 | ARG_DEF(NULL, "tile-columns", 1, "Number of tile columns to use, log2"); | 374 | NULL, "tile-columns", 1, "Number of tile columns to use, log2"); |
| 377 | static const arg_def_t tile_rows = | 375 | static const arg_def_t tile_rows = ARG_DEF( |
| 378 | ARG_DEF(NULL, "tile-rows", 1, "Number of tile rows to use, log2"); | 376 | NULL, "tile-rows", 1, "Number of tile rows to use, log2"); |
| 379 | static const arg_def_t lossless = ARG_DEF(NULL, "lossless", 1, "Lossless mode"); | 377 | static const arg_def_t lossless = ARG_DEF( |
| | 378 | NULL, "lossless", 1, "Lossless mode"); |
| 380 | static const arg_def_t frame_parallel_decoding = ARG_DEF( | 379 | static const arg_def_t frame_parallel_decoding = ARG_DEF( |
| 381 | NULL, "frame-parallel", 1, "Enable frame parallel decodability features"); | 380 | NULL, "frame-parallel", 1, "Enable frame parallel decodability features"); |
| 382 | static const arg_def_t aq_mode = ARG_DEF( | 381 | static const arg_def_t aq_mode = ARG_DEF( |
| @@ -395,13 +394,12 @@ static const struct arg_enum_list bitdepth_enum[] = { · 12 unmodified lines |
| 395 | {NULL, 0} | 394 | {NULL, 0} |
| 396 | }; | 395 | }; |
| 397 | | 396 | |
| 398 | static const arg_def_t bitdeptharg = ARG_DEF_ENUM("b", "bit-depth", 1, | 397 | static const arg_def_t bitdeptharg = ARG_DEF_ENUM( |
| 399 | "Bit depth for codec " | 398 | "b", "bit-depth", 1, |
| 400 | "(8 for version <=1, " | 399 | "Bit depth for codec (8 for version <=1, 10 or 12 for version 2)", |
| 401 | "10 or 12 for version 2)", | 400 | bitdepth_enum); |
| 402 | bitdepth_enum); | 401 | static const arg_def_t inbitdeptharg = ARG_DEF( |
| 403 | static const arg_def_t inbitdeptharg = ARG_DEF(NULL, "input-bit-depth", 1, | 402 | NULL, "input-bit-depth", 1, "Bit depth of input"); |
| 404 | "Bit depth of input"); | | |
| 405 | #endif | 403 | #endif |
| 406 | | 404 | |
| 407 | static const struct arg_enum_list tune_content_enum[] = { | 405 | static const struct arg_enum_list tune_content_enum[] = { |
| @@ -1161,7 +1159,6 @@ static int parse_stream_params(struct VpxEncoderConfig *global, · 753 unmodified lines |
| 1161 | if (j == config->arg_ctrl_cnt) | 1159 | if (j == config->arg_ctrl_cnt) |
| 1162 | config->arg_ctrl_cnt++; | 1160 | config->arg_ctrl_cnt++; |
| 1163 | } | 1161 | } |
| 1164 | | | |
| 1165 | } | 1162 | } |
| 1166 | } | 1163 | } |
| 1167 | if (!match) | 1164 | if (!match) |
| @@ -1917,14 +1914,15 @@ int main(int argc, const char **argv_) { · 749 unmodified lines |
| 1917 | /* If the input file doesn't specify its w/h (raw files), try to get | 1914 | /* If the input file doesn't specify its w/h (raw files), try to get |
| 1918 | * the data from the first stream's configuration. | 1915 | * the data from the first stream's configuration. |
| 1919 | */ | 1916 | */ |
| 1920 | if (!input.width || !input.height) | 1917 | if (!input.width || !input.height) { |
| 1921 | FOREACH_STREAM( { | 1918 | FOREACH_STREAM({ |
| 1922 | if (stream->config.cfg.g_w && stream->config.cfg.g_h) { | 1919 | if (stream->config.cfg.g_w && stream->config.cfg.g_h) { |
| 1923 | input.width = stream->config.cfg.g_w; | 1920 | input.width = stream->config.cfg.g_w; |
| 1924 | input.height = stream->config.cfg.g_h; | 1921 | input.height = stream->config.cfg.g_h; |
| 1925 | break; | 1922 | break; |
| 1926 | } | 1923 | } |
| 1927 | }); | 1924 | }); |
| | 1925 | } |
| 1928 | | 1926 | |
| 1929 | /* Update stream configurations from the input file's parameters */ | 1927 | /* Update stream configurations from the input file's parameters */ |
| 1930 | if (!input.width || !input.height) | 1928 | if (!input.width || !input.height) |