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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 oxcf->tuning = vp8_cfg.tuning; | 408 oxcf->tuning = vp8_cfg.tuning; |
409 | 409 |
410 /* | 410 /* |
411 printf("Current VP8 Settings: \n"); | 411 printf("Current VP8 Settings: \n"); |
412 printf("target_bandwidth: %d\n", oxcf->target_bandwidth); | 412 printf("target_bandwidth: %d\n", oxcf->target_bandwidth); |
413 printf("noise_sensitivity: %d\n", oxcf->noise_sensitivity); | 413 printf("noise_sensitivity: %d\n", oxcf->noise_sensitivity); |
414 printf("Sharpness: %d\n", oxcf->Sharpness); | 414 printf("Sharpness: %d\n", oxcf->Sharpness); |
415 printf("cpu_used: %d\n", oxcf->cpu_used); | 415 printf("cpu_used: %d\n", oxcf->cpu_used); |
416 printf("Mode: %d\n", oxcf->Mode); | 416 printf("Mode: %d\n", oxcf->Mode); |
417 printf("delete_first_pass_file: %d\n", oxcf->delete_first_pass_file); | |
418 printf("auto_key: %d\n", oxcf->auto_key); | 417 printf("auto_key: %d\n", oxcf->auto_key); |
419 printf("key_freq: %d\n", oxcf->key_freq); | 418 printf("key_freq: %d\n", oxcf->key_freq); |
420 printf("end_usage: %d\n", oxcf->end_usage); | 419 printf("end_usage: %d\n", oxcf->end_usage); |
421 printf("under_shoot_pct: %d\n", oxcf->under_shoot_pct); | 420 printf("under_shoot_pct: %d\n", oxcf->under_shoot_pct); |
422 printf("over_shoot_pct: %d\n", oxcf->over_shoot_pct); | 421 printf("over_shoot_pct: %d\n", oxcf->over_shoot_pct); |
423 printf("starting_buffer_level: %d\n", oxcf->starting_buffer_level); | 422 printf("starting_buffer_level: %d\n", oxcf->starting_buffer_level); |
424 printf("optimal_buffer_level: %d\n", oxcf->optimal_buffer_level); | 423 printf("optimal_buffer_level: %d\n", oxcf->optimal_buffer_level); |
425 printf("maximum_buffer_size: %d\n", oxcf->maximum_buffer_size); | 424 printf("maximum_buffer_size: %d\n", oxcf->maximum_buffer_size); |
426 printf("fixed_q: %d\n", oxcf->fixed_q); | 425 printf("fixed_q: %d\n", oxcf->fixed_q); |
427 printf("worst_allowed_q: %d\n", oxcf->worst_allowed_q); | 426 printf("worst_allowed_q: %d\n", oxcf->worst_allowed_q); |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 vpx_codec_pts_t pts, | 743 vpx_codec_pts_t pts, |
745 unsigned long duration, | 744 unsigned long duration, |
746 vpx_enc_frame_flags_t flags, | 745 vpx_enc_frame_flags_t flags, |
747 unsigned long deadline) | 746 unsigned long deadline) |
748 { | 747 { |
749 vpx_codec_err_t res = VPX_CODEC_OK; | 748 vpx_codec_err_t res = VPX_CODEC_OK; |
750 | 749 |
751 if (!ctx->cfg.rc_target_bitrate) | 750 if (!ctx->cfg.rc_target_bitrate) |
752 return res; | 751 return res; |
753 | 752 |
754 if (!ctx->cfg.rc_target_bitrate) | |
755 return res; | |
756 | |
757 if (img) | 753 if (img) |
758 res = validate_img(ctx, img); | 754 res = validate_img(ctx, img); |
759 | 755 |
760 if (!res) | 756 if (!res) |
761 res = validate_config(ctx, &ctx->cfg, &ctx->vp8_cfg, 1); | 757 res = validate_config(ctx, &ctx->cfg, &ctx->vp8_cfg, 1); |
762 | 758 |
763 pick_quickcompress_mode(ctx, duration, deadline); | 759 pick_quickcompress_mode(ctx, duration, deadline); |
764 vpx_codec_pkt_list_init(&ctx->pkt_list); | 760 vpx_codec_pkt_list_init(&ctx->pkt_list); |
765 | 761 |
766 /* Handle Flags */ | 762 /* Handle Flags */ |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 50, /* rc_two_pass_vbrbias */ | 1255 50, /* rc_two_pass_vbrbias */ |
1260 0, /* rc_two_pass_vbrmin_section */ | 1256 0, /* rc_two_pass_vbrmin_section */ |
1261 400, /* rc_two_pass_vbrmax_section */ | 1257 400, /* rc_two_pass_vbrmax_section */ |
1262 | 1258 |
1263 /* keyframing settings (kf) */ | 1259 /* keyframing settings (kf) */ |
1264 VPX_KF_AUTO, /* g_kfmode*/ | 1260 VPX_KF_AUTO, /* g_kfmode*/ |
1265 0, /* kf_min_dist */ | 1261 0, /* kf_min_dist */ |
1266 128, /* kf_max_dist */ | 1262 128, /* kf_max_dist */ |
1267 | 1263 |
1268 #if VPX_ENCODER_ABI_VERSION == (1 + VPX_CODEC_ABI_VERSION) | 1264 #if VPX_ENCODER_ABI_VERSION == (1 + VPX_CODEC_ABI_VERSION) |
1269 1, /* g_delete_first_pass_file */ | |
1270 "vp8.fpf" /* first pass filename */ | 1265 "vp8.fpf" /* first pass filename */ |
1271 #endif | 1266 #endif |
1272 VPX_SS_DEFAULT_LAYERS, /* ss_number_layers */ | 1267 VPX_SS_DEFAULT_LAYERS, /* ss_number_layers */ |
1273 1, /* ts_number_layers */ | 1268 1, /* ts_number_layers */ |
1274 {0}, /* ts_target_bitrate */ | 1269 {0}, /* ts_target_bitrate */ |
1275 {0}, /* ts_rate_decimator */ | 1270 {0}, /* ts_rate_decimator */ |
1276 0, /* ts_periodicity */ | 1271 0, /* ts_periodicity */ |
1277 {0}, /* ts_layer_id */ | 1272 {0}, /* ts_layer_id */ |
1278 }}, | 1273 }}, |
1279 { -1, {NOT_IMPLEMENTED}} | 1274 { -1, {NOT_IMPLEMENTED}} |
(...skipping 24 matching lines...) Expand all Loading... |
1304 { | 1299 { |
1305 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */ | 1300 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */ |
1306 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ | 1301 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ |
1307 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */ | 1302 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */ |
1308 vp8e_set_config, | 1303 vp8e_set_config, |
1309 NOT_IMPLEMENTED, | 1304 NOT_IMPLEMENTED, |
1310 vp8e_get_preview, | 1305 vp8e_get_preview, |
1311 vp8e_mr_alloc_mem, | 1306 vp8e_mr_alloc_mem, |
1312 } /* encoder functions */ | 1307 } /* encoder functions */ |
1313 }; | 1308 }; |
OLD | NEW |