summaryrefslogtreecommitdiff
path: root/vp8/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/encoder')
-rw-r--r--vp8/encoder/arm/neon/picklpf_arm.c2
-rw-r--r--vp8/encoder/bitstream.c3
-rw-r--r--vp8/encoder/firstpass.c6
-rw-r--r--vp8/encoder/onyx_if.c35
-rw-r--r--vp8/encoder/picklpf.c2
-rw-r--r--vp8/encoder/temporal_filter.c7
6 files changed, 23 insertions, 32 deletions
diff --git a/vp8/encoder/arm/neon/picklpf_arm.c b/vp8/encoder/arm/neon/picklpf_arm.c
index 6610d2dc2..ec8071e88 100644
--- a/vp8/encoder/arm/neon/picklpf_arm.c
+++ b/vp8/encoder/arm/neon/picklpf_arm.c
@@ -22,11 +22,9 @@ void vp8_yv12_copy_partial_frame_neon(YV12_BUFFER_CONFIG *src_ybc,
unsigned char *src_y, *dst_y;
int yheight;
int ystride;
- int border;
int yoffset;
int linestocopy;
- border = src_ybc->border;
yheight = src_ybc->y_height;
ystride = src_ybc->y_stride;
diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c
index af00f7c8c..7cbeb5dab 100644
--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -521,12 +521,11 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
const MV_CONTEXT *mvc = pc->fc.mvc;
- MODE_INFO *m = pc->mi, *ms;
+ MODE_INFO *m = pc->mi;
const int mis = pc->mode_info_stride;
int mb_row = -1;
int prob_skip_false = 0;
- ms = pc->mi - 1;
cpi->mb.partition_info = cpi->mb.pi;
diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c
index ac83622d5..4f6afc997 100644
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -2313,12 +2313,9 @@ void vp8_second_pass(VP8_COMP *cpi)
FIRSTPASS_STATS this_frame = {0};
FIRSTPASS_STATS this_frame_copy;
- double this_frame_error;
double this_frame_intra_error;
double this_frame_coded_error;
- FIRSTPASS_STATS *start_pos;
-
int overhead_bits;
if (!cpi->twopass.stats_in)
@@ -2331,12 +2328,9 @@ void vp8_second_pass(VP8_COMP *cpi)
if (EOF == input_stats(cpi, &this_frame))
return;
- this_frame_error = this_frame.ssim_weighted_pred_err;
this_frame_intra_error = this_frame.intra_error;
this_frame_coded_error = this_frame.coded_error;
- start_pos = cpi->twopass.stats_in;
-
// keyframe and section processing !
if (cpi->twopass.frames_to_key == 0)
{
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 43caf2023..b4429cdc5 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1030,8 +1030,10 @@ void vp8_set_speed_features(VP8_COMP *cpi)
static void alloc_raw_frame_buffers(VP8_COMP *cpi)
{
+#if VP8_TEMPORAL_ALT_REF
int width = (cpi->oxcf.Width + 15) & ~15;
int height = (cpi->oxcf.Height + 15) & ~15;
+#endif
cpi->lookahead = vp8_lookahead_init(cpi->oxcf.Width, cpi->oxcf.Height,
cpi->oxcf.lag_in_frames);
@@ -3180,20 +3182,21 @@ static void encode_frame_to_data_rate
int Loop = 0;
int loop_count;
- int this_q;
- int last_zbin_oq;
+ VP8_COMMON *cm = &cpi->common;
+ int active_worst_qchanged = 0;
+
+#if !(CONFIG_REALTIME_ONLY)
int q_low;
int q_high;
int zbin_oq_high;
int zbin_oq_low = 0;
int top_index;
int bottom_index;
- VP8_COMMON *cm = &cpi->common;
- int active_worst_qchanged = 0;
-
int overshoot_seen = 0;
int undershoot_seen = 0;
+#endif
+
int drop_mark = cpi->oxcf.drop_frames_water_mark * cpi->oxcf.optimal_buffer_level / 100;
int drop_mark75 = drop_mark * 2 / 3;
int drop_mark50 = drop_mark / 4;
@@ -3353,7 +3356,6 @@ static void encode_frame_to_data_rate
{
cpi->decimation_factor = 1;
}
-
//vpx_log("Encoder: Decimation Factor: %d \n",cpi->decimation_factor);
}
@@ -3595,7 +3597,8 @@ static void encode_frame_to_data_rate
// Determine initial Q to try
Q = vp8_regulate_q(cpi, cpi->this_frame_target);
- last_zbin_oq = cpi->zbin_over_quant;
+
+#if !(CONFIG_REALTIME_ONLY)
// Set highest allowed value for Zbin over quant
if (cm->frame_type == KEY_FRAME)
@@ -3607,6 +3610,7 @@ static void encode_frame_to_data_rate
}
else
zbin_oq_high = ZBIN_OQ_MAX;
+#endif
// Setup background Q adjustment for error resilient mode.
// For multi-layer encodes only enable this for the base layer.
@@ -3615,18 +3619,20 @@ static void encode_frame_to_data_rate
vp8_compute_frame_size_bounds(cpi, &frame_under_shoot_limit, &frame_over_shoot_limit);
+#if !(CONFIG_REALTIME_ONLY)
// Limit Q range for the adaptive loop.
bottom_index = cpi->active_best_quality;
top_index = cpi->active_worst_quality;
q_low = cpi->active_best_quality;
q_high = cpi->active_worst_quality;
+#endif
vp8_save_coding_context(cpi);
loop_count = 0;
-
scale_and_extend_source(cpi->un_scaled_source, cpi);
+
#if !(CONFIG_REALTIME_ONLY) && CONFIG_POSTPROC && !(CONFIG_TEMPORAL_DENOISING)
if (cpi->oxcf.noise_sensitivity > 0)
@@ -3690,7 +3696,6 @@ static void encode_frame_to_data_rate
*/
vp8_set_quantizer(cpi, Q);
- this_q = Q;
// setup skip prob for costing in mode/mv decision
if (cpi->common.mb_no_coeff_skip)
@@ -3813,9 +3818,10 @@ static void encode_frame_to_data_rate
if (cpi->compressor_speed == 2)
{
/* we don't do re-encoding in realtime mode
- * if key frame is decided than we force it on next frame */
+ * if key frame is decided then we force it on next frame */
cpi->force_next_frame_intra = key_frame_decision;
}
+#if !(CONFIG_REALTIME_ONLY)
else if (key_frame_decision)
{
// Reset all our sizing numbers and recode
@@ -3853,6 +3859,7 @@ static void encode_frame_to_data_rate
continue;
}
+#endif
}
vp8_clear_system_state();
@@ -3872,10 +3879,12 @@ static void encode_frame_to_data_rate
while ((cpi->active_worst_quality < cpi->worst_quality) && (over_size_percent > 0))
{
cpi->active_worst_quality++;
- top_index = cpi->active_worst_quality;
+
over_size_percent = (int)(over_size_percent * 0.96); // Assume 1 qstep = about 4% on frame size.
}
-
+#if !(CONFIG_REALTIME_ONLY)
+ top_index = cpi->active_worst_quality;
+#endif
// If we have updated the active max Q do not call vp8_update_rate_correction_factors() this loop.
active_worst_qchanged = 1;
}
@@ -4034,9 +4043,7 @@ static void encode_frame_to_data_rate
// Clamp cpi->zbin_over_quant
cpi->zbin_over_quant = (cpi->zbin_over_quant < zbin_oq_low) ? zbin_oq_low : (cpi->zbin_over_quant > zbin_oq_high) ? zbin_oq_high : cpi->zbin_over_quant;
- //Loop = (Q != last_q) || (last_zbin_oq != cpi->zbin_over_quant);
Loop = Q != last_q;
- last_zbin_oq = cpi->zbin_over_quant;
}
else
#endif
diff --git a/vp8/encoder/picklpf.c b/vp8/encoder/picklpf.c
index eb548191a..385c807b2 100644
--- a/vp8/encoder/picklpf.c
+++ b/vp8/encoder/picklpf.c
@@ -29,11 +29,9 @@ void vp8_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc,
unsigned char *src_y, *dst_y;
int yheight;
int ystride;
- int border;
int yoffset;
int linestocopy;
- border = src_ybc->border;
yheight = src_ybc->y_height;
ystride = src_ybc->y_stride;
diff --git a/vp8/encoder/temporal_filter.c b/vp8/encoder/temporal_filter.c
index 7e7def462..dfe8531b6 100644
--- a/vp8/encoder/temporal_filter.c
+++ b/vp8/encoder/temporal_filter.c
@@ -148,7 +148,6 @@ static int vp8_temporal_filter_find_matching_mb_c
{
MACROBLOCK *x = &cpi->mb;
int step_param;
- int further_steps;
int sadpb = x->sadperbit16;
int bestsme = INT_MAX;
@@ -184,15 +183,11 @@ static int vp8_temporal_filter_find_matching_mb_c
// Further step/diamond searches as necessary
if (cpi->Speed < 8)
{
- step_param = cpi->sf.first_step +
- (cpi->Speed > 5);
- further_steps =
- (cpi->sf.max_step_search_steps - 1)-step_param;
+ step_param = cpi->sf.first_step + (cpi->Speed > 5);
}
else
{
step_param = cpi->sf.first_step + 2;
- further_steps = 0;
}
/*cpi->sf.search_method == HEX*/