summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
Diffstat (limited to 'vp8')
-rw-r--r--vp8/encoder/onyx_if.c15
-rw-r--r--vp8/encoder/rdopt.c42
2 files changed, 30 insertions, 27 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index aad326ca2..a003828b0 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -3837,17 +3837,16 @@ static void encode_frame_to_data_rate
vp8_compute_frame_size_bounds(cpi, &frame_under_shoot_limit, &frame_over_shoot_limit);
- // Limit Q range for the adaptive loop (Values not clipped to range 20-60 as in VP8).
+ // 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;
vp8_save_coding_context(cpi);
loop_count = 0;
- q_low = cpi->best_quality;
- q_high = cpi->worst_quality;
-
scale_and_extend_source(cpi->un_scaled_source, cpi);
#if !(CONFIG_REALTIME_ONLY) && CONFIG_POSTPROC
@@ -4029,15 +4028,13 @@ static void encode_frame_to_data_rate
Q = vp8_regulate_q(cpi, cpi->this_frame_target);
- q_low = cpi->best_quality;
- q_high = cpi->worst_quality;
-
vp8_compute_frame_size_bounds(cpi, &frame_under_shoot_limit, &frame_over_shoot_limit);
- // Limit Q range for the adaptive loop (Values not clipped to range 20-60 as in VP8).
+ // 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;
loop_count++;
Loop = TRUE;
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c
index bc5fd40ac..9b8b3b326 100644
--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -1642,8 +1642,6 @@ int vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
//int intermodecost[MAX_MODES];
MB_PREDICTION_MODE uv_intra_mode;
- int sse;
- int sum;
int uvintra_eob = 0;
int tteob = 0;
int force_no_skip = 0;
@@ -2238,36 +2236,44 @@ int vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int
vp8_set_mbmode_and_mvs(x, this_mode, &mode_mv[this_mode]);
vp8_build_inter_predictors_mby(&x->e_mbd);
- if(x->encode_breakout)
- VARIANCE_INVOKE(&cpi->rtcd.variance, get16x16var)(x->src.y_buffer, x->src.y_stride, x->e_mbd.predictor, 16, (unsigned int *)(&sse), &sum);
if (cpi->active_map_enabled && x->active_ptr[0] == 0) {
x->skip = 1;
}
- else if (sse < x->encode_breakout)
+ else if (x->encode_breakout)
{
- // Check u and v to make sure skip is ok
- int sse2 = 0;
+ int sum, sse;
- // add dc check
- if (abs(sum) < (cpi->common.Y2dequant[0][0] << 2))
+ VARIANCE_INVOKE(&cpi->rtcd.variance, get16x16var)
+ (x->src.y_buffer, x->src.y_stride,
+ x->e_mbd.predictor, 16, (unsigned int *)(&sse), &sum);
+
+ if (sse < x->encode_breakout)
{
- sse2 = VP8_UVSSE(x, IF_RTCD(&cpi->rtcd.variance));
+ // Check u and v to make sure skip is ok
+ int sse2 = 0;
- if (sse2 * 2 < x->encode_breakout)
+ // add dc check
+ if (abs(sum) < (cpi->common.Y2dequant[0][0] << 2))
{
- x->skip = 1;
- distortion2 = sse;
- rate2 = 500;
- disable_skip = 1;
- this_rd = RDFUNC(x->rdmult, x->rddiv, rate2,
- distortion2, cpi->target_bits_per_mb);
+ sse2 = VP8_UVSSE(x, IF_RTCD(&cpi->rtcd.variance));
- break;
+ if (sse2 * 2 < x->encode_breakout)
+ {
+ x->skip = 1;
+ distortion2 = sse;
+ rate2 = 500;
+ disable_skip = 1;
+ this_rd = RDFUNC(x->rdmult, x->rddiv, rate2,
+ distortion2, cpi->target_bits_per_mb);
+
+ break;
+ }
}
}
}
+
//intermodecost[mode_index] = vp8_cost_mv_ref(this_mode, mdcounts); // Experimental debug code
// Add in the Mv/mode cost