OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 die("Failed to get config: %s\n", vpx_codec_err_to_string(res)); | 143 die("Failed to get config: %s\n", vpx_codec_err_to_string(res)); |
144 } | 144 } |
145 // update enc_cfg with app default values | 145 // update enc_cfg with app default values |
146 enc_cfg->g_w = default_width; | 146 enc_cfg->g_w = default_width; |
147 enc_cfg->g_h = default_height; | 147 enc_cfg->g_h = default_height; |
148 enc_cfg->g_timebase.num = default_timebase_num; | 148 enc_cfg->g_timebase.num = default_timebase_num; |
149 enc_cfg->g_timebase.den = default_timebase_den; | 149 enc_cfg->g_timebase.den = default_timebase_den; |
150 enc_cfg->rc_target_bitrate = default_bitrate; | 150 enc_cfg->rc_target_bitrate = default_bitrate; |
151 enc_cfg->kf_min_dist = default_kf_dist; | 151 enc_cfg->kf_min_dist = default_kf_dist; |
152 enc_cfg->kf_max_dist = default_kf_dist; | 152 enc_cfg->kf_max_dist = default_kf_dist; |
| 153 enc_cfg->rc_end_usage = VPX_CQ; |
153 | 154 |
154 // initialize AppInput with default values | 155 // initialize AppInput with default values |
155 app_input->frames_to_code = default_frames_to_code; | 156 app_input->frames_to_code = default_frames_to_code; |
156 app_input->frames_to_skip = default_frames_to_skip; | 157 app_input->frames_to_skip = default_frames_to_skip; |
157 | 158 |
158 // process command line options | 159 // process command line options |
159 argv = argv_dup(argc - 1, argv_ + 1); | 160 argv = argv_dup(argc - 1, argv_ + 1); |
160 for (argi = argj = argv; (*argj = *argi); argi += arg.argv_step) { | 161 for (argi = argj = argv; (*argj = *argi); argi += arg.argv_step) { |
161 arg.argv_step = 1; | 162 arg.argv_step = 1; |
162 | 163 |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 383 |
383 vpx_img_free(&raw); | 384 vpx_img_free(&raw); |
384 | 385 |
385 // display average size, psnr | 386 // display average size, psnr |
386 printf("%s", vpx_svc_dump_statistics(&svc_ctx)); | 387 printf("%s", vpx_svc_dump_statistics(&svc_ctx)); |
387 | 388 |
388 vpx_svc_release(&svc_ctx); | 389 vpx_svc_release(&svc_ctx); |
389 | 390 |
390 return EXIT_SUCCESS; | 391 return EXIT_SUCCESS; |
391 } | 392 } |
OLD | NEW |