Index: source/libvpx/vp8/vp8_cx_iface.c |
=================================================================== |
--- source/libvpx/vp8/vp8_cx_iface.c (revision 223100) |
+++ source/libvpx/vp8/vp8_cx_iface.c (working copy) |
@@ -153,7 +153,7 @@ |
#else |
RANGE_CHECK_HI(cfg, g_lag_in_frames, 25); |
#endif |
- RANGE_CHECK(cfg, rc_end_usage, VPX_VBR, VPX_CQ); |
+ RANGE_CHECK(cfg, rc_end_usage, VPX_VBR, VPX_Q); |
RANGE_CHECK_HI(cfg, rc_undershoot_pct, 1000); |
RANGE_CHECK_HI(cfg, rc_overshoot_pct, 1000); |
RANGE_CHECK_HI(cfg, rc_2pass_vbr_bias_pct, 100); |
@@ -204,7 +204,7 @@ |
RANGE_CHECK_HI(vp8_cfg, arnr_strength, 6); |
RANGE_CHECK(vp8_cfg, arnr_type, 1, 3); |
RANGE_CHECK(vp8_cfg, cq_level, 0, 63); |
- if(finalize && cfg->rc_end_usage == VPX_CQ) |
+ if (finalize && (cfg->rc_end_usage == VPX_CQ || cfg->rc_end_usage == VPX_Q)) |
RANGE_CHECK(vp8_cfg, cq_level, |
cfg->rc_min_quantizer, cfg->rc_max_quantizer); |
@@ -327,18 +327,15 @@ |
oxcf->resample_up_water_mark = cfg.rc_resize_up_thresh; |
oxcf->resample_down_water_mark = cfg.rc_resize_down_thresh; |
- if (cfg.rc_end_usage == VPX_VBR) |
- { |
- oxcf->end_usage = USAGE_LOCAL_FILE_PLAYBACK; |
+ if (cfg.rc_end_usage == VPX_VBR) { |
+ oxcf->end_usage = USAGE_LOCAL_FILE_PLAYBACK; |
+ } else if (cfg.rc_end_usage == VPX_CBR) { |
+ oxcf->end_usage = USAGE_STREAM_FROM_SERVER; |
+ } else if (cfg.rc_end_usage == VPX_CQ) { |
+ oxcf->end_usage = USAGE_CONSTRAINED_QUALITY; |
+ } else if (cfg.rc_end_usage == VPX_Q) { |
+ oxcf->end_usage = USAGE_CONSTANT_QUALITY; |
} |
- else if (cfg.rc_end_usage == VPX_CBR) |
- { |
- oxcf->end_usage = USAGE_STREAM_FROM_SERVER; |
- } |
- else if (cfg.rc_end_usage == VPX_CQ) |
- { |
- oxcf->end_usage = USAGE_CONSTRAINED_QUALITY; |
- } |
oxcf->target_bandwidth = cfg.rc_target_bitrate; |
oxcf->rc_max_intra_bitrate_pct = vp8_cfg.rc_max_intra_bitrate_pct; |
@@ -1272,7 +1269,7 @@ |
1, /* g_delete_first_pass_file */ |
"vp8.fpf" /* first pass filename */ |
#endif |
- |
+ VPX_SS_DEFAULT_LAYERS, /* ss_number_layers */ |
1, /* ts_number_layers */ |
{0}, /* ts_target_bitrate */ |
{0}, /* ts_rate_decimator */ |