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