OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 static const arg_def_t frame_parallel_decoding = ARG_DEF( | 371 static const arg_def_t frame_parallel_decoding = ARG_DEF( |
372 NULL, "frame-parallel", 1, "Enable frame parallel decodability features"); | 372 NULL, "frame-parallel", 1, "Enable frame parallel decodability features"); |
373 static const arg_def_t aq_mode = ARG_DEF( | 373 static const arg_def_t aq_mode = ARG_DEF( |
374 NULL, "aq-mode", 1, | 374 NULL, "aq-mode", 1, |
375 "Adaptive quantization mode (0: off (default), 1: variance 2: complexity, " | 375 "Adaptive quantization mode (0: off (default), 1: variance 2: complexity, " |
376 "3: cyclic refresh)"); | 376 "3: cyclic refresh)"); |
377 static const arg_def_t frame_periodic_boost = ARG_DEF( | 377 static const arg_def_t frame_periodic_boost = ARG_DEF( |
378 NULL, "frame_boost", 1, | 378 NULL, "frame_boost", 1, |
379 "Enable frame periodic boost (0: off (default), 1: on)"); | 379 "Enable frame periodic boost (0: off (default), 1: on)"); |
380 | 380 |
| 381 static const struct arg_enum_list tune_content_enum[] = { |
| 382 {"default", VP9E_CONTENT_DEFAULT}, |
| 383 {"screen", VP9E_CONTENT_SCREEN}, |
| 384 {NULL, 0} |
| 385 }; |
| 386 |
| 387 static const arg_def_t tune_content = ARG_DEF_ENUM( |
| 388 NULL, "tune-content", 1, "Tune content type", tune_content_enum); |
| 389 |
381 static const arg_def_t *vp9_args[] = { | 390 static const arg_def_t *vp9_args[] = { |
382 &cpu_used, &auto_altref, &noise_sens, &sharpness, &static_thresh, | 391 &cpu_used, &auto_altref, &noise_sens, &sharpness, &static_thresh, |
383 &tile_cols, &tile_rows, &arnr_maxframes, &arnr_strength, &arnr_type, | 392 &tile_cols, &tile_rows, &arnr_maxframes, &arnr_strength, &arnr_type, |
384 &tune_ssim, &cq_level, &max_intra_rate_pct, &lossless, | 393 &tune_ssim, &cq_level, &max_intra_rate_pct, &lossless, |
385 &frame_parallel_decoding, &aq_mode, &frame_periodic_boost, | 394 &frame_parallel_decoding, &aq_mode, &frame_periodic_boost, &tune_content, |
386 NULL | 395 NULL |
387 }; | 396 }; |
388 static const int vp9_arg_ctrl_map[] = { | 397 static const int vp9_arg_ctrl_map[] = { |
389 VP8E_SET_CPUUSED, VP8E_SET_ENABLEAUTOALTREF, | 398 VP8E_SET_CPUUSED, VP8E_SET_ENABLEAUTOALTREF, |
390 VP8E_SET_NOISE_SENSITIVITY, VP8E_SET_SHARPNESS, VP8E_SET_STATIC_THRESHOLD, | 399 VP8E_SET_NOISE_SENSITIVITY, VP8E_SET_SHARPNESS, VP8E_SET_STATIC_THRESHOLD, |
391 VP9E_SET_TILE_COLUMNS, VP9E_SET_TILE_ROWS, | 400 VP9E_SET_TILE_COLUMNS, VP9E_SET_TILE_ROWS, |
392 VP8E_SET_ARNR_MAXFRAMES, VP8E_SET_ARNR_STRENGTH, VP8E_SET_ARNR_TYPE, | 401 VP8E_SET_ARNR_MAXFRAMES, VP8E_SET_ARNR_STRENGTH, VP8E_SET_ARNR_TYPE, |
393 VP8E_SET_TUNING, VP8E_SET_CQ_LEVEL, VP8E_SET_MAX_INTRA_BITRATE_PCT, | 402 VP8E_SET_TUNING, VP8E_SET_CQ_LEVEL, VP8E_SET_MAX_INTRA_BITRATE_PCT, |
394 VP9E_SET_LOSSLESS, VP9E_SET_FRAME_PARALLEL_DECODING, VP9E_SET_AQ_MODE, | 403 VP9E_SET_LOSSLESS, VP9E_SET_FRAME_PARALLEL_DECODING, VP9E_SET_AQ_MODE, |
395 VP9E_SET_FRAME_PERIODIC_BOOST, | 404 VP9E_SET_FRAME_PERIODIC_BOOST, VP9E_SET_TUNE_CONTENT, |
396 0 | 405 0 |
397 }; | 406 }; |
398 #endif | 407 #endif |
399 | 408 |
400 static const arg_def_t *no_args[] = { NULL }; | 409 static const arg_def_t *no_args[] = { NULL }; |
401 | 410 |
402 void usage_exit() { | 411 void usage_exit() { |
403 int i; | 412 int i; |
404 | 413 |
405 fprintf(stderr, "Usage: %s <options> -o dst_filename src_filename \n", | 414 fprintf(stderr, "Usage: %s <options> -o dst_filename src_filename \n", |
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 } | 1891 } |
1883 fclose(f); | 1892 fclose(f); |
1884 }); | 1893 }); |
1885 #endif | 1894 #endif |
1886 | 1895 |
1887 vpx_img_free(&raw); | 1896 vpx_img_free(&raw); |
1888 free(argv); | 1897 free(argv); |
1889 free(streams); | 1898 free(streams); |
1890 return res ? EXIT_FAILURE : EXIT_SUCCESS; | 1899 return res ? EXIT_FAILURE : EXIT_SUCCESS; |
1891 } | 1900 } |
OLD | NEW |