summaryrefslogtreecommitdiff
path: root/vp8/encoder
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2011-03-11 14:51:40 +0000
committerJohn Koleszar <jkoleszar@google.com>2011-03-11 11:06:51 -0500
commit6e737484926c123d057f075a3cd385fb926a0372 (patch)
treeaae3e406d6dae6a075745375de94cb5072742adb /vp8/encoder
parent170b87390ea6bfa2a4de57bf0babd75857d0ab2b (diff)
downloadlibvpx-6e737484926c123d057f075a3cd385fb926a0372.tar
libvpx-6e737484926c123d057f075a3cd385fb926a0372.tar.gz
libvpx-6e737484926c123d057f075a3cd385fb926a0372.tar.bz2
libvpx-6e737484926c123d057f075a3cd385fb926a0372.zip
Clean up of vp8_init_config()
Clean up vp8_init_config() a bit and remove null pointer case, as this code can't be called any more and is not an adequate trap anyway, as a null pointer would cause exceptions before hitting the test. Change-Id: I937c00167cc039b3aa3f645f29c319d58ae8d3ee
Diffstat (limited to 'vp8/encoder')
-rw-r--r--vp8/encoder/onyx_if.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index ce262b1f4..8965634fe 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1458,8 +1458,7 @@ void vp8_init_config(VP8_PTR ptr, VP8_CONFIG *oxcf)
VP8_COMP *cpi = (VP8_COMP *)(ptr);
VP8_COMMON *cm = &cpi->common;
- if (!cpi)
- return;
+ cpi->oxcf = *oxcf;
cpi->auto_gold = 1;
cpi->auto_adjust_gold_quantizer = 1;
@@ -1471,47 +1470,6 @@ void vp8_init_config(VP8_PTR ptr, VP8_CONFIG *oxcf)
cm->version = oxcf->Version;
vp8_setup_version(cm);
- if (oxcf == 0)
- {
- cpi->pass = 0;
-
- cpi->auto_worst_q = 0;
- cpi->oxcf.best_allowed_q = MINQ;
- cpi->oxcf.worst_allowed_q = MAXQ;
- cpi->oxcf.cq_level = MINQ;
-
- cpi->oxcf.end_usage = USAGE_STREAM_FROM_SERVER;
- cpi->oxcf.starting_buffer_level = 4000;
- cpi->oxcf.optimal_buffer_level = 5000;
- cpi->oxcf.maximum_buffer_size = 6000;
- cpi->oxcf.under_shoot_pct = 90;
- cpi->oxcf.allow_df = 0;
- cpi->oxcf.drop_frames_water_mark = 20;
-
- cpi->oxcf.allow_spatial_resampling = 0;
- cpi->oxcf.resample_down_water_mark = 40;
- cpi->oxcf.resample_up_water_mark = 60;
-
- cpi->oxcf.fixed_q = cpi->interquantizer;
-
- cpi->filter_type = NORMAL_LOOPFILTER;
-
- if (cm->simpler_lpf)
- cpi->filter_type = SIMPLE_LOOPFILTER;
-
- cpi->compressor_speed = 1;
- cpi->horiz_scale = 0;
- cpi->vert_scale = 0;
- cpi->oxcf.two_pass_vbrbias = 50;
- cpi->oxcf.two_pass_vbrmax_section = 400;
- cpi->oxcf.two_pass_vbrmin_section = 0;
-
- cpi->oxcf.Sharpness = 0;
- cpi->oxcf.noise_sensitivity = 0;
- }
- else
- cpi->oxcf = *oxcf;
-
// change includes all joint functionality
vp8_change_config(ptr, oxcf);
@@ -1537,7 +1495,6 @@ void vp8_init_config(VP8_PTR ptr, VP8_CONFIG *oxcf)
cpi->total_target_vs_actual = 0;
#if VP8_TEMPORAL_ALT_REF
-
{
int i;