Commit 0d2abe30 authored by Adrian Grange's avatar Adrian Grange Committed by Code Review
Browse files

Merge "Fix usage of value returned by vp8_pick_intra4x4mby_modes"

Showing with 9 additions and 4 deletions
...@@ -642,10 +642,10 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int re ...@@ -642,10 +642,10 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int re
switch (this_mode) switch (this_mode)
{ {
case B_PRED: case B_PRED:
distortion2 = *returndistortion; // Best so far passed in as breakout value to vp8_pick_intra4x4mby_modes // Pass best so far to vp8_pick_intra4x4mby_modes to use as breakout
vp8_pick_intra4x4mby_modes(IF_RTCD(&cpi->rtcd), x, &rate, &distortion2); distortion2 = *returndistortion;
rate2 += rate; vp8_pick_intra4x4mby_modes(IF_RTCD(&cpi->rtcd), x,
distortion2 = VARIANCE_INVOKE(&cpi->rtcd.variance, get16x16prederror)(x->src.y_buffer, x->src.y_stride, x->e_mbd.predictor, 16, 0x7fffffff); &rate, &distortion2);
if (distortion2 == INT_MAX) if (distortion2 == INT_MAX)
{ {
...@@ -653,6 +653,11 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int re ...@@ -653,6 +653,11 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int re
} }
else else
{ {
rate2 += rate;
distortion2 = VARIANCE_INVOKE
(&cpi->rtcd.variance, get16x16prederror)(
x->src.y_buffer, x->src.y_stride,
x->e_mbd.predictor, 16, 0x7fffffff);
this_rd = RDCOST(x->rdmult, x->rddiv, rate2, distortion2); this_rd = RDCOST(x->rdmult, x->rddiv, rate2, distortion2);
if (this_rd < best_intra_rd) if (this_rd < best_intra_rd)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment