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 15 matching lines...) Expand all Loading... |
26 unsigned int noise_sensitivity; | 26 unsigned int noise_sensitivity; |
27 unsigned int sharpness; | 27 unsigned int sharpness; |
28 unsigned int static_thresh; | 28 unsigned int static_thresh; |
29 unsigned int tile_columns; | 29 unsigned int tile_columns; |
30 unsigned int tile_rows; | 30 unsigned int tile_rows; |
31 unsigned int arnr_max_frames; | 31 unsigned int arnr_max_frames; |
32 unsigned int arnr_strength; | 32 unsigned int arnr_strength; |
33 vp8e_tuning tuning; | 33 vp8e_tuning tuning; |
34 unsigned int cq_level; // constrained quality level | 34 unsigned int cq_level; // constrained quality level |
35 unsigned int rc_max_intra_bitrate_pct; | 35 unsigned int rc_max_intra_bitrate_pct; |
| 36 unsigned int rc_max_inter_bitrate_pct; |
| 37 unsigned int gf_cbr_boost_pct; |
36 unsigned int lossless; | 38 unsigned int lossless; |
37 unsigned int frame_parallel_decoding_mode; | 39 unsigned int frame_parallel_decoding_mode; |
38 AQ_MODE aq_mode; | 40 AQ_MODE aq_mode; |
39 unsigned int frame_periodic_boost; | 41 unsigned int frame_periodic_boost; |
40 vpx_bit_depth_t bit_depth; | 42 vpx_bit_depth_t bit_depth; |
41 vp9e_tune_content content; | 43 vp9e_tune_content content; |
42 }; | 44 }; |
43 | 45 |
44 static struct vp9_extracfg default_extra_cfg = { | 46 static struct vp9_extracfg default_extra_cfg = { |
45 0, // cpu_used | 47 0, // cpu_used |
46 1, // enable_auto_alt_ref | 48 1, // enable_auto_alt_ref |
47 0, // noise_sensitivity | 49 0, // noise_sensitivity |
48 0, // sharpness | 50 0, // sharpness |
49 0, // static_thresh | 51 0, // static_thresh |
50 0, // tile_columns | 52 0, // tile_columns |
51 0, // tile_rows | 53 0, // tile_rows |
52 7, // arnr_max_frames | 54 7, // arnr_max_frames |
53 5, // arnr_strength | 55 5, // arnr_strength |
54 VP8_TUNE_PSNR, // tuning | 56 VP8_TUNE_PSNR, // tuning |
55 10, // cq_level | 57 10, // cq_level |
56 0, // rc_max_intra_bitrate_pct | 58 0, // rc_max_intra_bitrate_pct |
| 59 0, // rc_max_inter_bitrate_pct |
| 60 0, // gf_cbr_boost_pct |
57 0, // lossless | 61 0, // lossless |
58 0, // frame_parallel_decoding_mode | 62 0, // frame_parallel_decoding_mode |
59 NO_AQ, // aq_mode | 63 NO_AQ, // aq_mode |
60 0, // frame_periodic_delta_q | 64 0, // frame_periodic_delta_q |
61 VPX_BITS_8, // Bit depth | 65 VPX_BITS_8, // Bit depth |
62 VP9E_CONTENT_DEFAULT // content | 66 VP9E_CONTENT_DEFAULT // content |
63 }; | 67 }; |
64 | 68 |
65 struct vpx_codec_alg_priv { | 69 struct vpx_codec_alg_priv { |
66 vpx_codec_priv_t base; | 70 vpx_codec_priv_t base; |
67 vpx_codec_enc_cfg_t cfg; | 71 vpx_codec_enc_cfg_t cfg; |
68 struct vp9_extracfg extra_cfg; | 72 struct vp9_extracfg extra_cfg; |
69 VP9EncoderConfig oxcf; | 73 VP9EncoderConfig oxcf; |
70 VP9_COMP *cpi; | 74 VP9_COMP *cpi; |
71 unsigned char *cx_data; | 75 unsigned char *cx_data; |
72 size_t cx_data_sz; | 76 size_t cx_data_sz; |
73 unsigned char *pending_cx_data; | 77 unsigned char *pending_cx_data; |
74 size_t pending_cx_data_sz; | 78 size_t pending_cx_data_sz; |
75 int pending_frame_count; | 79 int pending_frame_count; |
76 size_t pending_frame_sizes[8]; | 80 size_t pending_frame_sizes[8]; |
77 size_t pending_frame_magnitude; | 81 size_t pending_frame_magnitude; |
78 vpx_image_t preview_img; | 82 vpx_image_t preview_img; |
79 vp8_postproc_cfg_t preview_ppcfg; | 83 vp8_postproc_cfg_t preview_ppcfg; |
80 vpx_codec_pkt_list_decl(256) pkt_list; | 84 vpx_codec_pkt_list_decl(256) pkt_list; |
81 unsigned int fixed_kf_cntr; | 85 unsigned int fixed_kf_cntr; |
| 86 vpx_codec_priv_output_cx_pkt_cb_pair_t output_cx_pkt_cb; |
82 }; | 87 }; |
83 | 88 |
84 static VP9_REFFRAME ref_frame_to_vp9_reframe(vpx_ref_frame_type_t frame) { | 89 static VP9_REFFRAME ref_frame_to_vp9_reframe(vpx_ref_frame_type_t frame) { |
85 switch (frame) { | 90 switch (frame) { |
86 case VP8_LAST_FRAME: | 91 case VP8_LAST_FRAME: |
87 return VP9_LAST_FLAG; | 92 return VP9_LAST_FLAG; |
88 case VP8_GOLD_FRAME: | 93 case VP8_GOLD_FRAME: |
89 return VP9_GOLD_FLAG; | 94 return VP9_GOLD_FLAG; |
90 case VP8_ALTR_FRAME: | 95 case VP8_ALTR_FRAME: |
91 return VP9_ALT_FLAG; | 96 return VP9_ALT_FLAG; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 RANGE_CHECK_HI(cfg, rc_overshoot_pct, 1000); | 156 RANGE_CHECK_HI(cfg, rc_overshoot_pct, 1000); |
152 RANGE_CHECK_HI(cfg, rc_2pass_vbr_bias_pct, 100); | 157 RANGE_CHECK_HI(cfg, rc_2pass_vbr_bias_pct, 100); |
153 RANGE_CHECK(cfg, kf_mode, VPX_KF_DISABLED, VPX_KF_AUTO); | 158 RANGE_CHECK(cfg, kf_mode, VPX_KF_DISABLED, VPX_KF_AUTO); |
154 RANGE_CHECK_BOOL(cfg, rc_resize_allowed); | 159 RANGE_CHECK_BOOL(cfg, rc_resize_allowed); |
155 RANGE_CHECK_HI(cfg, rc_dropframe_thresh, 100); | 160 RANGE_CHECK_HI(cfg, rc_dropframe_thresh, 100); |
156 RANGE_CHECK_HI(cfg, rc_resize_up_thresh, 100); | 161 RANGE_CHECK_HI(cfg, rc_resize_up_thresh, 100); |
157 RANGE_CHECK_HI(cfg, rc_resize_down_thresh, 100); | 162 RANGE_CHECK_HI(cfg, rc_resize_down_thresh, 100); |
158 RANGE_CHECK(cfg, g_pass, VPX_RC_ONE_PASS, VPX_RC_LAST_PASS); | 163 RANGE_CHECK(cfg, g_pass, VPX_RC_ONE_PASS, VPX_RC_LAST_PASS); |
159 | 164 |
160 if (cfg->rc_resize_allowed == 1) { | 165 if (cfg->rc_resize_allowed == 1) { |
161 RANGE_CHECK(cfg, rc_scaled_width, 1, cfg->g_w); | 166 RANGE_CHECK(cfg, rc_scaled_width, 0, cfg->g_w); |
162 RANGE_CHECK(cfg, rc_scaled_height, 1, cfg->g_h); | 167 RANGE_CHECK(cfg, rc_scaled_height, 0, cfg->g_h); |
163 } | 168 } |
164 | 169 |
165 RANGE_CHECK(cfg, ss_number_layers, 1, VPX_SS_MAX_LAYERS); | 170 RANGE_CHECK(cfg, ss_number_layers, 1, VPX_SS_MAX_LAYERS); |
166 RANGE_CHECK(cfg, ts_number_layers, 1, VPX_TS_MAX_LAYERS); | 171 RANGE_CHECK(cfg, ts_number_layers, 1, VPX_TS_MAX_LAYERS); |
167 | 172 |
168 if (cfg->ts_number_layers > 1) { | 173 if (cfg->ts_number_layers > 1) { |
169 unsigned int i; | 174 unsigned int i; |
170 for (i = 1; i < cfg->ts_number_layers; ++i) | 175 for (i = 1; i < cfg->ts_number_layers; ++i) |
171 if (cfg->ts_target_bitrate[i] < cfg->ts_target_bitrate[i - 1]) | 176 if (cfg->ts_target_bitrate[i] < cfg->ts_target_bitrate[i - 1]) |
172 ERROR("ts_target_bitrate entries are not increasing"); | 177 ERROR("ts_target_bitrate entries are not increasing"); |
(...skipping 22 matching lines...) Expand all Loading... |
195 #endif | 200 #endif |
196 | 201 |
197 // VP9 does not support a lower bound on the keyframe interval in | 202 // VP9 does not support a lower bound on the keyframe interval in |
198 // automatic keyframe placement mode. | 203 // automatic keyframe placement mode. |
199 if (cfg->kf_mode != VPX_KF_DISABLED && | 204 if (cfg->kf_mode != VPX_KF_DISABLED && |
200 cfg->kf_min_dist != cfg->kf_max_dist && | 205 cfg->kf_min_dist != cfg->kf_max_dist && |
201 cfg->kf_min_dist > 0) | 206 cfg->kf_min_dist > 0) |
202 ERROR("kf_min_dist not supported in auto mode, use 0 " | 207 ERROR("kf_min_dist not supported in auto mode, use 0 " |
203 "or kf_max_dist instead."); | 208 "or kf_max_dist instead."); |
204 | 209 |
205 RANGE_CHECK_BOOL(extra_cfg, enable_auto_alt_ref); | 210 RANGE_CHECK(extra_cfg, enable_auto_alt_ref, 0, 2); |
206 RANGE_CHECK(extra_cfg, cpu_used, -16, 16); | 211 RANGE_CHECK(extra_cfg, cpu_used, -16, 16); |
207 RANGE_CHECK_HI(extra_cfg, noise_sensitivity, 6); | 212 RANGE_CHECK_HI(extra_cfg, noise_sensitivity, 6); |
208 RANGE_CHECK(extra_cfg, tile_columns, 0, 6); | 213 RANGE_CHECK(extra_cfg, tile_columns, 0, 6); |
209 RANGE_CHECK(extra_cfg, tile_rows, 0, 2); | 214 RANGE_CHECK(extra_cfg, tile_rows, 0, 2); |
210 RANGE_CHECK_HI(extra_cfg, sharpness, 7); | 215 RANGE_CHECK_HI(extra_cfg, sharpness, 7); |
211 RANGE_CHECK(extra_cfg, arnr_max_frames, 0, 15); | 216 RANGE_CHECK(extra_cfg, arnr_max_frames, 0, 15); |
212 RANGE_CHECK_HI(extra_cfg, arnr_strength, 6); | 217 RANGE_CHECK_HI(extra_cfg, arnr_strength, 6); |
213 RANGE_CHECK(extra_cfg, cq_level, 0, 63); | 218 RANGE_CHECK(extra_cfg, cq_level, 0, 63); |
214 RANGE_CHECK(cfg, g_bit_depth, VPX_BITS_8, VPX_BITS_12); | 219 RANGE_CHECK(cfg, g_bit_depth, VPX_BITS_8, VPX_BITS_12); |
215 RANGE_CHECK(cfg, g_input_bit_depth, 8, 12); | 220 RANGE_CHECK(cfg, g_input_bit_depth, 8, 12); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 break; | 378 break; |
374 } | 379 } |
375 | 380 |
376 oxcf->lag_in_frames = cfg->g_pass == VPX_RC_FIRST_PASS ? 0 | 381 oxcf->lag_in_frames = cfg->g_pass == VPX_RC_FIRST_PASS ? 0 |
377 : cfg->g_lag_in_frames; | 382 : cfg->g_lag_in_frames; |
378 oxcf->rc_mode = cfg->rc_end_usage; | 383 oxcf->rc_mode = cfg->rc_end_usage; |
379 | 384 |
380 // Convert target bandwidth from Kbit/s to Bit/s | 385 // Convert target bandwidth from Kbit/s to Bit/s |
381 oxcf->target_bandwidth = 1000 * cfg->rc_target_bitrate; | 386 oxcf->target_bandwidth = 1000 * cfg->rc_target_bitrate; |
382 oxcf->rc_max_intra_bitrate_pct = extra_cfg->rc_max_intra_bitrate_pct; | 387 oxcf->rc_max_intra_bitrate_pct = extra_cfg->rc_max_intra_bitrate_pct; |
| 388 oxcf->rc_max_inter_bitrate_pct = extra_cfg->rc_max_inter_bitrate_pct; |
| 389 oxcf->gf_cbr_boost_pct = extra_cfg->gf_cbr_boost_pct; |
383 | 390 |
384 oxcf->best_allowed_q = | 391 oxcf->best_allowed_q = |
385 extra_cfg->lossless ? 0 : vp9_quantizer_to_qindex(cfg->rc_min_quantizer); | 392 extra_cfg->lossless ? 0 : vp9_quantizer_to_qindex(cfg->rc_min_quantizer); |
386 oxcf->worst_allowed_q = | 393 oxcf->worst_allowed_q = |
387 extra_cfg->lossless ? 0 : vp9_quantizer_to_qindex(cfg->rc_max_quantizer); | 394 extra_cfg->lossless ? 0 : vp9_quantizer_to_qindex(cfg->rc_max_quantizer); |
388 oxcf->cq_level = vp9_quantizer_to_qindex(extra_cfg->cq_level); | 395 oxcf->cq_level = vp9_quantizer_to_qindex(extra_cfg->cq_level); |
389 oxcf->fixed_q = -1; | 396 oxcf->fixed_q = -1; |
390 | 397 |
391 oxcf->under_shoot_pct = cfg->rc_undershoot_pct; | 398 oxcf->under_shoot_pct = cfg->rc_undershoot_pct; |
392 oxcf->over_shoot_pct = cfg->rc_overshoot_pct; | 399 oxcf->over_shoot_pct = cfg->rc_overshoot_pct; |
393 | 400 |
394 oxcf->allow_spatial_resampling = cfg->rc_resize_allowed; | 401 oxcf->scaled_frame_width = cfg->rc_scaled_width; |
395 oxcf->scaled_frame_width = cfg->rc_scaled_width; | 402 oxcf->scaled_frame_height = cfg->rc_scaled_height; |
396 oxcf->scaled_frame_height = cfg->rc_scaled_height; | 403 if (cfg->rc_resize_allowed == 1) { |
| 404 oxcf->resize_mode = |
| 405 (oxcf->scaled_frame_width == 0 || oxcf->scaled_frame_height == 0) ? |
| 406 RESIZE_DYNAMIC : RESIZE_FIXED; |
| 407 } else { |
| 408 oxcf->resize_mode = RESIZE_NONE; |
| 409 } |
397 | 410 |
398 oxcf->maximum_buffer_size_ms = is_vbr ? 240000 : cfg->rc_buf_sz; | 411 oxcf->maximum_buffer_size_ms = is_vbr ? 240000 : cfg->rc_buf_sz; |
399 oxcf->starting_buffer_level_ms = is_vbr ? 60000 : cfg->rc_buf_initial_sz; | 412 oxcf->starting_buffer_level_ms = is_vbr ? 60000 : cfg->rc_buf_initial_sz; |
400 oxcf->optimal_buffer_level_ms = is_vbr ? 60000 : cfg->rc_buf_optimal_sz; | 413 oxcf->optimal_buffer_level_ms = is_vbr ? 60000 : cfg->rc_buf_optimal_sz; |
401 | 414 |
402 oxcf->drop_frames_water_mark = cfg->rc_dropframe_thresh; | 415 oxcf->drop_frames_water_mark = cfg->rc_dropframe_thresh; |
403 | 416 |
404 oxcf->two_pass_vbrbias = cfg->rc_2pass_vbr_bias_pct; | 417 oxcf->two_pass_vbrbias = cfg->rc_2pass_vbr_bias_pct; |
405 oxcf->two_pass_vbrmin_section = cfg->rc_2pass_vbr_minsection_pct; | 418 oxcf->two_pass_vbrmin_section = cfg->rc_2pass_vbr_minsection_pct; |
406 oxcf->two_pass_vbrmax_section = cfg->rc_2pass_vbr_maxsection_pct; | 419 oxcf->two_pass_vbrmax_section = cfg->rc_2pass_vbr_maxsection_pct; |
407 | 420 |
408 oxcf->auto_key = cfg->kf_mode == VPX_KF_AUTO && | 421 oxcf->auto_key = cfg->kf_mode == VPX_KF_AUTO && |
409 cfg->kf_min_dist != cfg->kf_max_dist; | 422 cfg->kf_min_dist != cfg->kf_max_dist; |
410 | 423 |
411 oxcf->key_freq = cfg->kf_max_dist; | 424 oxcf->key_freq = cfg->kf_max_dist; |
412 | 425 |
413 oxcf->speed = abs(extra_cfg->cpu_used); | 426 oxcf->speed = abs(extra_cfg->cpu_used); |
414 oxcf->encode_breakout = extra_cfg->static_thresh; | 427 oxcf->encode_breakout = extra_cfg->static_thresh; |
415 oxcf->play_alternate = extra_cfg->enable_auto_alt_ref; | 428 oxcf->enable_auto_arf = extra_cfg->enable_auto_alt_ref; |
416 oxcf->noise_sensitivity = extra_cfg->noise_sensitivity; | 429 oxcf->noise_sensitivity = extra_cfg->noise_sensitivity; |
417 oxcf->sharpness = extra_cfg->sharpness; | 430 oxcf->sharpness = extra_cfg->sharpness; |
418 | 431 |
419 oxcf->two_pass_stats_in = cfg->rc_twopass_stats_in; | 432 oxcf->two_pass_stats_in = cfg->rc_twopass_stats_in; |
420 | 433 |
421 #if CONFIG_FP_MB_STATS | 434 #if CONFIG_FP_MB_STATS |
422 oxcf->firstpass_mb_stats_in = cfg->rc_firstpass_mb_stats_in; | 435 oxcf->firstpass_mb_stats_in = cfg->rc_firstpass_mb_stats_in; |
423 #endif | 436 #endif |
424 | 437 |
425 oxcf->arnr_max_frames = extra_cfg->arnr_max_frames; | 438 oxcf->arnr_max_frames = extra_cfg->arnr_max_frames; |
(...skipping 12 matching lines...) Expand all Loading... |
438 | 451 |
439 oxcf->frame_periodic_boost = extra_cfg->frame_periodic_boost; | 452 oxcf->frame_periodic_boost = extra_cfg->frame_periodic_boost; |
440 | 453 |
441 oxcf->ss_number_layers = cfg->ss_number_layers; | 454 oxcf->ss_number_layers = cfg->ss_number_layers; |
442 | 455 |
443 if (oxcf->ss_number_layers > 1) { | 456 if (oxcf->ss_number_layers > 1) { |
444 int i; | 457 int i; |
445 for (i = 0; i < VPX_SS_MAX_LAYERS; ++i) { | 458 for (i = 0; i < VPX_SS_MAX_LAYERS; ++i) { |
446 oxcf->ss_target_bitrate[i] = 1000 * cfg->ss_target_bitrate[i]; | 459 oxcf->ss_target_bitrate[i] = 1000 * cfg->ss_target_bitrate[i]; |
447 #if CONFIG_SPATIAL_SVC | 460 #if CONFIG_SPATIAL_SVC |
448 oxcf->ss_play_alternate[i] = cfg->ss_enable_auto_alt_ref[i]; | 461 oxcf->ss_enable_auto_arf[i] = cfg->ss_enable_auto_alt_ref[i]; |
449 #endif | 462 #endif |
450 } | 463 } |
451 } else if (oxcf->ss_number_layers == 1) { | 464 } else if (oxcf->ss_number_layers == 1) { |
452 oxcf->ss_target_bitrate[0] = (int)oxcf->target_bandwidth; | 465 oxcf->ss_target_bitrate[0] = (int)oxcf->target_bandwidth; |
453 #if CONFIG_SPATIAL_SVC | 466 #if CONFIG_SPATIAL_SVC |
454 oxcf->ss_play_alternate[0] = extra_cfg->enable_auto_alt_ref; | 467 oxcf->ss_enable_auto_arf[0] = extra_cfg->enable_auto_alt_ref; |
455 #endif | 468 #endif |
456 } | 469 } |
457 | 470 |
458 oxcf->ts_number_layers = cfg->ts_number_layers; | 471 oxcf->ts_number_layers = cfg->ts_number_layers; |
459 | 472 |
460 if (oxcf->ts_number_layers > 1) { | 473 if (oxcf->ts_number_layers > 1) { |
461 int i; | 474 int i; |
462 for (i = 0; i < VPX_TS_MAX_LAYERS; ++i) { | 475 for (i = 0; i < VPX_TS_MAX_LAYERS; ++i) { |
463 oxcf->ts_target_bitrate[i] = 1000 * cfg->ts_target_bitrate[i]; | 476 oxcf->ts_target_bitrate[i] = 1000 * cfg->ts_target_bitrate[i]; |
464 oxcf->ts_rate_decimator[i] = cfg->ts_rate_decimator[i]; | 477 oxcf->ts_rate_decimator[i] = cfg->ts_rate_decimator[i]; |
(...skipping 21 matching lines...) Expand all Loading... |
486 printf("fixed_q: %d\n", oxcf->fixed_q); | 499 printf("fixed_q: %d\n", oxcf->fixed_q); |
487 printf("worst_allowed_q: %d\n", oxcf->worst_allowed_q); | 500 printf("worst_allowed_q: %d\n", oxcf->worst_allowed_q); |
488 printf("best_allowed_q: %d\n", oxcf->best_allowed_q); | 501 printf("best_allowed_q: %d\n", oxcf->best_allowed_q); |
489 printf("allow_spatial_resampling: %d\n", oxcf->allow_spatial_resampling); | 502 printf("allow_spatial_resampling: %d\n", oxcf->allow_spatial_resampling); |
490 printf("scaled_frame_width: %d\n", oxcf->scaled_frame_width); | 503 printf("scaled_frame_width: %d\n", oxcf->scaled_frame_width); |
491 printf("scaled_frame_height: %d\n", oxcf->scaled_frame_height); | 504 printf("scaled_frame_height: %d\n", oxcf->scaled_frame_height); |
492 printf("two_pass_vbrbias: %d\n", oxcf->two_pass_vbrbias); | 505 printf("two_pass_vbrbias: %d\n", oxcf->two_pass_vbrbias); |
493 printf("two_pass_vbrmin_section: %d\n", oxcf->two_pass_vbrmin_section); | 506 printf("two_pass_vbrmin_section: %d\n", oxcf->two_pass_vbrmin_section); |
494 printf("two_pass_vbrmax_section: %d\n", oxcf->two_pass_vbrmax_section); | 507 printf("two_pass_vbrmax_section: %d\n", oxcf->two_pass_vbrmax_section); |
495 printf("lag_in_frames: %d\n", oxcf->lag_in_frames); | 508 printf("lag_in_frames: %d\n", oxcf->lag_in_frames); |
496 printf("play_alternate: %d\n", oxcf->play_alternate); | 509 printf("enable_auto_arf: %d\n", oxcf->enable_auto_arf); |
497 printf("Version: %d\n", oxcf->Version); | 510 printf("Version: %d\n", oxcf->Version); |
498 printf("encode_breakout: %d\n", oxcf->encode_breakout); | 511 printf("encode_breakout: %d\n", oxcf->encode_breakout); |
499 printf("error resilient: %d\n", oxcf->error_resilient_mode); | 512 printf("error resilient: %d\n", oxcf->error_resilient_mode); |
500 printf("frame parallel detokenization: %d\n", | 513 printf("frame parallel detokenization: %d\n", |
501 oxcf->frame_parallel_decoding_mode); | 514 oxcf->frame_parallel_decoding_mode); |
502 */ | 515 */ |
503 return VPX_CODEC_OK; | 516 return VPX_CODEC_OK; |
504 } | 517 } |
505 | 518 |
506 static vpx_codec_err_t encoder_set_config(vpx_codec_alg_priv_t *ctx, | 519 static vpx_codec_err_t encoder_set_config(vpx_codec_alg_priv_t *ctx, |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 } | 655 } |
643 | 656 |
644 static vpx_codec_err_t ctrl_set_rc_max_intra_bitrate_pct( | 657 static vpx_codec_err_t ctrl_set_rc_max_intra_bitrate_pct( |
645 vpx_codec_alg_priv_t *ctx, va_list args) { | 658 vpx_codec_alg_priv_t *ctx, va_list args) { |
646 struct vp9_extracfg extra_cfg = ctx->extra_cfg; | 659 struct vp9_extracfg extra_cfg = ctx->extra_cfg; |
647 extra_cfg.rc_max_intra_bitrate_pct = | 660 extra_cfg.rc_max_intra_bitrate_pct = |
648 CAST(VP8E_SET_MAX_INTRA_BITRATE_PCT, args); | 661 CAST(VP8E_SET_MAX_INTRA_BITRATE_PCT, args); |
649 return update_extra_cfg(ctx, &extra_cfg); | 662 return update_extra_cfg(ctx, &extra_cfg); |
650 } | 663 } |
651 | 664 |
| 665 static vpx_codec_err_t ctrl_set_rc_max_inter_bitrate_pct( |
| 666 vpx_codec_alg_priv_t *ctx, va_list args) { |
| 667 struct vp9_extracfg extra_cfg = ctx->extra_cfg; |
| 668 extra_cfg.rc_max_inter_bitrate_pct = |
| 669 CAST(VP8E_SET_MAX_INTER_BITRATE_PCT, args); |
| 670 return update_extra_cfg(ctx, &extra_cfg); |
| 671 } |
| 672 |
| 673 static vpx_codec_err_t ctrl_set_rc_gf_cbr_boost_pct( |
| 674 vpx_codec_alg_priv_t *ctx, va_list args) { |
| 675 struct vp9_extracfg extra_cfg = ctx->extra_cfg; |
| 676 extra_cfg.gf_cbr_boost_pct = |
| 677 CAST(VP8E_SET_GF_CBR_BOOST_PCT, args); |
| 678 return update_extra_cfg(ctx, &extra_cfg); |
| 679 } |
| 680 |
652 static vpx_codec_err_t ctrl_set_lossless(vpx_codec_alg_priv_t *ctx, | 681 static vpx_codec_err_t ctrl_set_lossless(vpx_codec_alg_priv_t *ctx, |
653 va_list args) { | 682 va_list args) { |
654 struct vp9_extracfg extra_cfg = ctx->extra_cfg; | 683 struct vp9_extracfg extra_cfg = ctx->extra_cfg; |
655 extra_cfg.lossless = CAST(VP9E_SET_LOSSLESS, args); | 684 extra_cfg.lossless = CAST(VP9E_SET_LOSSLESS, args); |
656 return update_extra_cfg(ctx, &extra_cfg); | 685 return update_extra_cfg(ctx, &extra_cfg); |
657 } | 686 } |
658 | 687 |
659 static vpx_codec_err_t ctrl_set_frame_parallel_decoding_mode( | 688 static vpx_codec_err_t ctrl_set_frame_parallel_decoding_mode( |
660 vpx_codec_alg_priv_t *ctx, va_list args) { | 689 vpx_codec_alg_priv_t *ctx, va_list args) { |
661 struct vp9_extracfg extra_cfg = ctx->extra_cfg; | 690 struct vp9_extracfg extra_cfg = ctx->extra_cfg; |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 cpi->svc.spatial_layer_id < cpi->svc.number_spatial_layers - 1) | 994 cpi->svc.spatial_layer_id < cpi->svc.number_spatial_layers - 1) |
966 #endif | 995 #endif |
967 ) { | 996 ) { |
968 if (ctx->pending_cx_data == 0) | 997 if (ctx->pending_cx_data == 0) |
969 ctx->pending_cx_data = cx_data; | 998 ctx->pending_cx_data = cx_data; |
970 ctx->pending_cx_data_sz += size; | 999 ctx->pending_cx_data_sz += size; |
971 ctx->pending_frame_sizes[ctx->pending_frame_count++] = size; | 1000 ctx->pending_frame_sizes[ctx->pending_frame_count++] = size; |
972 ctx->pending_frame_magnitude |= size; | 1001 ctx->pending_frame_magnitude |= size; |
973 cx_data += size; | 1002 cx_data += size; |
974 cx_data_sz -= size; | 1003 cx_data_sz -= size; |
| 1004 |
| 1005 if (ctx->output_cx_pkt_cb.output_cx_pkt) { |
| 1006 pkt.kind = VPX_CODEC_CX_FRAME_PKT; |
| 1007 pkt.data.frame.pts = ticks_to_timebase_units(timebase, |
| 1008 dst_time_stamp); |
| 1009 pkt.data.frame.duration = |
| 1010 (unsigned long)ticks_to_timebase_units(timebase, |
| 1011 dst_end_time_stamp - dst_time_stamp); |
| 1012 pkt.data.frame.flags = get_frame_pkt_flags(cpi, lib_flags); |
| 1013 pkt.data.frame.buf = ctx->pending_cx_data; |
| 1014 pkt.data.frame.sz = size; |
| 1015 ctx->pending_cx_data = NULL; |
| 1016 ctx->pending_cx_data_sz = 0; |
| 1017 ctx->pending_frame_count = 0; |
| 1018 ctx->pending_frame_magnitude = 0; |
| 1019 ctx->output_cx_pkt_cb.output_cx_pkt( |
| 1020 &pkt, ctx->output_cx_pkt_cb.user_priv); |
| 1021 } |
975 continue; | 1022 continue; |
976 } | 1023 } |
977 | 1024 |
978 // Add the frame packet to the list of returned packets. | 1025 // Add the frame packet to the list of returned packets. |
979 pkt.kind = VPX_CODEC_CX_FRAME_PKT; | 1026 pkt.kind = VPX_CODEC_CX_FRAME_PKT; |
980 pkt.data.frame.pts = ticks_to_timebase_units(timebase, dst_time_stamp); | 1027 pkt.data.frame.pts = ticks_to_timebase_units(timebase, dst_time_stamp); |
981 pkt.data.frame.duration = | 1028 pkt.data.frame.duration = |
982 (unsigned long)ticks_to_timebase_units(timebase, | 1029 (unsigned long)ticks_to_timebase_units(timebase, |
983 dst_end_time_stamp - dst_time_stamp); | 1030 dst_end_time_stamp - dst_time_stamp); |
984 pkt.data.frame.flags = get_frame_pkt_flags(cpi, lib_flags); | 1031 pkt.data.frame.flags = get_frame_pkt_flags(cpi, lib_flags); |
985 | 1032 |
986 if (ctx->pending_cx_data) { | 1033 if (ctx->pending_cx_data) { |
987 ctx->pending_frame_sizes[ctx->pending_frame_count++] = size; | 1034 ctx->pending_frame_sizes[ctx->pending_frame_count++] = size; |
988 ctx->pending_frame_magnitude |= size; | 1035 ctx->pending_frame_magnitude |= size; |
989 ctx->pending_cx_data_sz += size; | 1036 ctx->pending_cx_data_sz += size; |
990 size += write_superframe_index(ctx); | 1037 // write the superframe only for the case when |
| 1038 if (!ctx->output_cx_pkt_cb.output_cx_pkt) |
| 1039 size += write_superframe_index(ctx); |
991 pkt.data.frame.buf = ctx->pending_cx_data; | 1040 pkt.data.frame.buf = ctx->pending_cx_data; |
992 pkt.data.frame.sz = ctx->pending_cx_data_sz; | 1041 pkt.data.frame.sz = ctx->pending_cx_data_sz; |
993 ctx->pending_cx_data = NULL; | 1042 ctx->pending_cx_data = NULL; |
994 ctx->pending_cx_data_sz = 0; | 1043 ctx->pending_cx_data_sz = 0; |
995 ctx->pending_frame_count = 0; | 1044 ctx->pending_frame_count = 0; |
996 ctx->pending_frame_magnitude = 0; | 1045 ctx->pending_frame_magnitude = 0; |
997 } else { | 1046 } else { |
998 pkt.data.frame.buf = cx_data; | 1047 pkt.data.frame.buf = cx_data; |
999 pkt.data.frame.sz = size; | 1048 pkt.data.frame.sz = size; |
1000 } | 1049 } |
1001 pkt.data.frame.partition_id = -1; | 1050 pkt.data.frame.partition_id = -1; |
1002 vpx_codec_pkt_list_add(&ctx->pkt_list.head, &pkt); | 1051 |
| 1052 if(ctx->output_cx_pkt_cb.output_cx_pkt) |
| 1053 ctx->output_cx_pkt_cb.output_cx_pkt(&pkt, ctx->output_cx_pkt_cb.user_p
riv); |
| 1054 else |
| 1055 vpx_codec_pkt_list_add(&ctx->pkt_list.head, &pkt); |
| 1056 |
1003 cx_data += size; | 1057 cx_data += size; |
1004 cx_data_sz -= size; | 1058 cx_data_sz -= size; |
1005 #if CONFIG_SPATIAL_SVC | 1059 #if CONFIG_SPATIAL_SVC |
1006 if (is_two_pass_svc(cpi)) { | 1060 if (is_two_pass_svc(cpi) && !ctx->output_cx_pkt_cb.output_cx_pkt) { |
1007 vpx_codec_cx_pkt_t pkt_sizes, pkt_psnr; | 1061 vpx_codec_cx_pkt_t pkt_sizes, pkt_psnr; |
1008 int i; | 1062 int i; |
1009 vp9_zero(pkt_sizes); | 1063 vp9_zero(pkt_sizes); |
1010 vp9_zero(pkt_psnr); | 1064 vp9_zero(pkt_psnr); |
1011 pkt_sizes.kind = VPX_CODEC_SPATIAL_SVC_LAYER_SIZES; | 1065 pkt_sizes.kind = VPX_CODEC_SPATIAL_SVC_LAYER_SIZES; |
1012 pkt_psnr.kind = VPX_CODEC_SPATIAL_SVC_LAYER_PSNR; | 1066 pkt_psnr.kind = VPX_CODEC_SPATIAL_SVC_LAYER_PSNR; |
1013 for (i = 0; i < cpi->svc.number_spatial_layers; ++i) { | 1067 for (i = 0; i < cpi->svc.number_spatial_layers; ++i) { |
1014 LAYER_CONTEXT *lc = &cpi->svc.layer_context[i]; | 1068 LAYER_CONTEXT *lc = &cpi->svc.layer_context[i]; |
1015 pkt_sizes.data.layer_sizes[i] = lc->layer_size; | 1069 pkt_sizes.data.layer_sizes[i] = lc->layer_size; |
1016 pkt_psnr.data.layer_psnr[i] = lc->psnr_pkt; | 1070 pkt_psnr.data.layer_psnr[i] = lc->psnr_pkt; |
1017 lc->layer_size = 0; | 1071 lc->layer_size = 0; |
1018 } | 1072 } |
| 1073 |
1019 vpx_codec_pkt_list_add(&ctx->pkt_list.head, &pkt_sizes); | 1074 vpx_codec_pkt_list_add(&ctx->pkt_list.head, &pkt_sizes); |
| 1075 |
1020 vpx_codec_pkt_list_add(&ctx->pkt_list.head, &pkt_psnr); | 1076 vpx_codec_pkt_list_add(&ctx->pkt_list.head, &pkt_psnr); |
1021 } | 1077 } |
1022 #endif | 1078 #endif |
1023 } | 1079 } |
1024 } | 1080 } |
1025 } | 1081 } |
1026 | 1082 |
1027 return res; | 1083 return res; |
1028 } | 1084 } |
1029 | 1085 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 svc->temporal_layer_id >= (int)ctx->cfg.ts_number_layers) { | 1266 svc->temporal_layer_id >= (int)ctx->cfg.ts_number_layers) { |
1211 return VPX_CODEC_INVALID_PARAM; | 1267 return VPX_CODEC_INVALID_PARAM; |
1212 } | 1268 } |
1213 if (svc->spatial_layer_id < 0 || | 1269 if (svc->spatial_layer_id < 0 || |
1214 svc->spatial_layer_id >= (int)ctx->cfg.ss_number_layers) { | 1270 svc->spatial_layer_id >= (int)ctx->cfg.ss_number_layers) { |
1215 return VPX_CODEC_INVALID_PARAM; | 1271 return VPX_CODEC_INVALID_PARAM; |
1216 } | 1272 } |
1217 return VPX_CODEC_OK; | 1273 return VPX_CODEC_OK; |
1218 } | 1274 } |
1219 | 1275 |
| 1276 static vpx_codec_err_t ctrl_get_svc_layer_id(vpx_codec_alg_priv_t *ctx, |
| 1277 va_list args) { |
| 1278 vpx_svc_layer_id_t *data = va_arg(args, vpx_svc_layer_id_t *); |
| 1279 VP9_COMP *const cpi = (VP9_COMP *)ctx->cpi; |
| 1280 SVC *const svc = &cpi->svc; |
| 1281 |
| 1282 data->spatial_layer_id = svc->spatial_layer_id; |
| 1283 data->temporal_layer_id = svc->temporal_layer_id; |
| 1284 |
| 1285 return VPX_CODEC_OK; |
| 1286 } |
| 1287 |
1220 static vpx_codec_err_t ctrl_set_svc_parameters(vpx_codec_alg_priv_t *ctx, | 1288 static vpx_codec_err_t ctrl_set_svc_parameters(vpx_codec_alg_priv_t *ctx, |
1221 va_list args) { | 1289 va_list args) { |
1222 VP9_COMP *const cpi = ctx->cpi; | 1290 VP9_COMP *const cpi = ctx->cpi; |
1223 vpx_svc_extra_cfg_t *const params = va_arg(args, vpx_svc_extra_cfg_t *); | 1291 vpx_svc_extra_cfg_t *const params = va_arg(args, vpx_svc_extra_cfg_t *); |
1224 int i; | 1292 int i; |
1225 | 1293 |
1226 for (i = 0; i < cpi->svc.number_spatial_layers; ++i) { | 1294 for (i = 0; i < cpi->svc.number_spatial_layers; ++i) { |
1227 LAYER_CONTEXT *lc = &cpi->svc.layer_context[i]; | 1295 LAYER_CONTEXT *lc = &cpi->svc.layer_context[i]; |
1228 | 1296 |
1229 lc->max_q = params->max_quantizers[i]; | 1297 lc->max_q = params->max_quantizers[i]; |
1230 lc->min_q = params->min_quantizers[i]; | 1298 lc->min_q = params->min_quantizers[i]; |
1231 lc->scaling_factor_num = params->scaling_factor_num[i]; | 1299 lc->scaling_factor_num = params->scaling_factor_num[i]; |
1232 lc->scaling_factor_den = params->scaling_factor_den[i]; | 1300 lc->scaling_factor_den = params->scaling_factor_den[i]; |
1233 } | 1301 } |
1234 | 1302 |
1235 return VPX_CODEC_OK; | 1303 return VPX_CODEC_OK; |
1236 } | 1304 } |
1237 | 1305 |
| 1306 static vpx_codec_err_t ctrl_register_cx_callback(vpx_codec_alg_priv_t *ctx, |
| 1307 va_list args) { |
| 1308 vpx_codec_priv_output_cx_pkt_cb_pair_t *cbp = |
| 1309 (vpx_codec_priv_output_cx_pkt_cb_pair_t *)va_arg(args, void *); |
| 1310 ctx->output_cx_pkt_cb.output_cx_pkt = cbp->output_cx_pkt; |
| 1311 ctx->output_cx_pkt_cb.user_priv = cbp->user_priv; |
| 1312 |
| 1313 return VPX_CODEC_OK; |
| 1314 } |
| 1315 |
1238 static vpx_codec_err_t ctrl_set_tune_content(vpx_codec_alg_priv_t *ctx, | 1316 static vpx_codec_err_t ctrl_set_tune_content(vpx_codec_alg_priv_t *ctx, |
1239 va_list args) { | 1317 va_list args) { |
1240 struct vp9_extracfg extra_cfg = ctx->extra_cfg; | 1318 struct vp9_extracfg extra_cfg = ctx->extra_cfg; |
1241 extra_cfg.content = CAST(VP9E_SET_TUNE_CONTENT, args); | 1319 extra_cfg.content = CAST(VP9E_SET_TUNE_CONTENT, args); |
1242 return update_extra_cfg(ctx, &extra_cfg); | 1320 return update_extra_cfg(ctx, &extra_cfg); |
1243 } | 1321 } |
1244 | 1322 |
1245 static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { | 1323 static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { |
1246 {VP8_COPY_REFERENCE, ctrl_copy_reference}, | 1324 {VP8_COPY_REFERENCE, ctrl_copy_reference}, |
1247 {VP8E_UPD_ENTROPY, ctrl_update_entropy}, | 1325 {VP8E_UPD_ENTROPY, ctrl_update_entropy}, |
(...skipping 11 matching lines...) Expand all Loading... |
1259 {VP8E_SET_SHARPNESS, ctrl_set_sharpness}, | 1337 {VP8E_SET_SHARPNESS, ctrl_set_sharpness}, |
1260 {VP8E_SET_STATIC_THRESHOLD, ctrl_set_static_thresh}, | 1338 {VP8E_SET_STATIC_THRESHOLD, ctrl_set_static_thresh}, |
1261 {VP9E_SET_TILE_COLUMNS, ctrl_set_tile_columns}, | 1339 {VP9E_SET_TILE_COLUMNS, ctrl_set_tile_columns}, |
1262 {VP9E_SET_TILE_ROWS, ctrl_set_tile_rows}, | 1340 {VP9E_SET_TILE_ROWS, ctrl_set_tile_rows}, |
1263 {VP8E_SET_ARNR_MAXFRAMES, ctrl_set_arnr_max_frames}, | 1341 {VP8E_SET_ARNR_MAXFRAMES, ctrl_set_arnr_max_frames}, |
1264 {VP8E_SET_ARNR_STRENGTH, ctrl_set_arnr_strength}, | 1342 {VP8E_SET_ARNR_STRENGTH, ctrl_set_arnr_strength}, |
1265 {VP8E_SET_ARNR_TYPE, ctrl_set_arnr_type}, | 1343 {VP8E_SET_ARNR_TYPE, ctrl_set_arnr_type}, |
1266 {VP8E_SET_TUNING, ctrl_set_tuning}, | 1344 {VP8E_SET_TUNING, ctrl_set_tuning}, |
1267 {VP8E_SET_CQ_LEVEL, ctrl_set_cq_level}, | 1345 {VP8E_SET_CQ_LEVEL, ctrl_set_cq_level}, |
1268 {VP8E_SET_MAX_INTRA_BITRATE_PCT, ctrl_set_rc_max_intra_bitrate_pct}, | 1346 {VP8E_SET_MAX_INTRA_BITRATE_PCT, ctrl_set_rc_max_intra_bitrate_pct}, |
| 1347 {VP8E_SET_MAX_INTER_BITRATE_PCT, ctrl_set_rc_max_inter_bitrate_pct}, |
| 1348 {VP8E_SET_GF_CBR_BOOST_PCT, ctrl_set_rc_gf_cbr_boost_pct}, |
1269 {VP9E_SET_LOSSLESS, ctrl_set_lossless}, | 1349 {VP9E_SET_LOSSLESS, ctrl_set_lossless}, |
1270 {VP9E_SET_FRAME_PARALLEL_DECODING, ctrl_set_frame_parallel_decoding_mode}, | 1350 {VP9E_SET_FRAME_PARALLEL_DECODING, ctrl_set_frame_parallel_decoding_mode}, |
1271 {VP9E_SET_AQ_MODE, ctrl_set_aq_mode}, | 1351 {VP9E_SET_AQ_MODE, ctrl_set_aq_mode}, |
1272 {VP9E_SET_FRAME_PERIODIC_BOOST, ctrl_set_frame_periodic_boost}, | 1352 {VP9E_SET_FRAME_PERIODIC_BOOST, ctrl_set_frame_periodic_boost}, |
1273 {VP9E_SET_SVC, ctrl_set_svc}, | 1353 {VP9E_SET_SVC, ctrl_set_svc}, |
1274 {VP9E_SET_SVC_PARAMETERS, ctrl_set_svc_parameters}, | 1354 {VP9E_SET_SVC_PARAMETERS, ctrl_set_svc_parameters}, |
| 1355 {VP9E_REGISTER_CX_CALLBACK, ctrl_register_cx_callback}, |
1275 {VP9E_SET_SVC_LAYER_ID, ctrl_set_svc_layer_id}, | 1356 {VP9E_SET_SVC_LAYER_ID, ctrl_set_svc_layer_id}, |
1276 {VP9E_SET_TUNE_CONTENT, ctrl_set_tune_content}, | 1357 {VP9E_SET_TUNE_CONTENT, ctrl_set_tune_content}, |
1277 {VP9E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity}, | 1358 {VP9E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity}, |
1278 | 1359 |
1279 // Getters | 1360 // Getters |
1280 {VP8E_GET_LAST_QUANTIZER, ctrl_get_quantizer}, | 1361 {VP8E_GET_LAST_QUANTIZER, ctrl_get_quantizer}, |
1281 {VP8E_GET_LAST_QUANTIZER_64, ctrl_get_quantizer64}, | 1362 {VP8E_GET_LAST_QUANTIZER_64, ctrl_get_quantizer64}, |
1282 {VP9_GET_REFERENCE, ctrl_get_reference}, | 1363 {VP9_GET_REFERENCE, ctrl_get_reference}, |
| 1364 {VP9E_GET_SVC_LAYER_ID, ctrl_get_svc_layer_id}, |
1283 | 1365 |
1284 { -1, NULL}, | 1366 { -1, NULL}, |
1285 }; | 1367 }; |
1286 | 1368 |
1287 static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { | 1369 static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { |
1288 { | 1370 { |
1289 0, | 1371 0, |
1290 { // NOLINT | 1372 { // NOLINT |
1291 0, // g_usage | 1373 0, // g_usage |
1292 0, // g_threads | 1374 0, // g_threads |
1293 0, // g_profile | 1375 0, // g_profile |
1294 | 1376 |
1295 320, // g_width | 1377 320, // g_width |
1296 240, // g_height | 1378 240, // g_height |
1297 VPX_BITS_8, // g_bit_depth | 1379 VPX_BITS_8, // g_bit_depth |
1298 8, // g_input_bit_depth | 1380 8, // g_input_bit_depth |
1299 | 1381 |
1300 {1, 30}, // g_timebase | 1382 {1, 30}, // g_timebase |
1301 | 1383 |
1302 0, // g_error_resilient | 1384 0, // g_error_resilient |
1303 | 1385 |
1304 VPX_RC_ONE_PASS, // g_pass | 1386 VPX_RC_ONE_PASS, // g_pass |
1305 | 1387 |
1306 25, // g_lag_in_frames | 1388 25, // g_lag_in_frames |
1307 | 1389 |
1308 0, // rc_dropframe_thresh | 1390 0, // rc_dropframe_thresh |
1309 0, // rc_resize_allowed | 1391 0, // rc_resize_allowed |
1310 1, // rc_scaled_width | 1392 0, // rc_scaled_width |
1311 1, // rc_scaled_height | 1393 0, // rc_scaled_height |
1312 60, // rc_resize_down_thresold | 1394 60, // rc_resize_down_thresold |
1313 30, // rc_resize_up_thresold | 1395 30, // rc_resize_up_thresold |
1314 | 1396 |
1315 VPX_VBR, // rc_end_usage | 1397 VPX_VBR, // rc_end_usage |
1316 #if VPX_ENCODER_ABI_VERSION > (1 + VPX_CODEC_ABI_VERSION) | 1398 #if VPX_ENCODER_ABI_VERSION > (1 + VPX_CODEC_ABI_VERSION) |
1317 {NULL, 0}, // rc_twopass_stats_in | 1399 {NULL, 0}, // rc_twopass_stats_in |
1318 {NULL, 0}, // rc_firstpass_mb_stats_in | 1400 {NULL, 0}, // rc_firstpass_mb_stats_in |
1319 #endif | 1401 #endif |
1320 256, // rc_target_bandwidth | 1402 256, // rc_target_bandwidth |
1321 0, // rc_min_quantizer | 1403 0, // rc_min_quantizer |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 1, // 1 cfg map | 1457 1, // 1 cfg map |
1376 encoder_usage_cfg_map, // vpx_codec_enc_cfg_map_t | 1458 encoder_usage_cfg_map, // vpx_codec_enc_cfg_map_t |
1377 encoder_encode, // vpx_codec_encode_fn_t | 1459 encoder_encode, // vpx_codec_encode_fn_t |
1378 encoder_get_cxdata, // vpx_codec_get_cx_data_fn_t | 1460 encoder_get_cxdata, // vpx_codec_get_cx_data_fn_t |
1379 encoder_set_config, // vpx_codec_enc_config_set_fn_t | 1461 encoder_set_config, // vpx_codec_enc_config_set_fn_t |
1380 NULL, // vpx_codec_get_global_headers_fn_t | 1462 NULL, // vpx_codec_get_global_headers_fn_t |
1381 encoder_get_preview, // vpx_codec_get_preview_frame_fn_t | 1463 encoder_get_preview, // vpx_codec_get_preview_frame_fn_t |
1382 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t | 1464 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t |
1383 } | 1465 } |
1384 }; | 1466 }; |
OLD | NEW |