From: Ronald S. Bultje Date: Fri, 3 May 2013 04:03:38 +0000 (-0700) Subject: Fix use of wrong rate/distortion variables in 16x8 r/d check. X-Git-Tag: v1.3.0~1106^2~72 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=034928843fb29182dfd5bd5fe02d1603058439a9;p=platform%2Fupstream%2Flibvpx.git Fix use of wrong rate/distortion variables in 16x8 r/d check. Change-Id: Ib5961b4c8ca84d54c84b2651a4e0317c72fe7da4 --- diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 3b10aa7..3537e27 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1134,8 +1134,8 @@ static void encode_sb_row(VP9_COMP *cpi, r2 += x->partition_cost[pl][PARTITION_VERT]; if (RDCOST(x->rdmult, x->rddiv, r2, d2) < RDCOST(x->rdmult, x->rddiv, mb16_rate, mb16_dist)) { - mb16_rate = r; - mb16_dist = d; + mb16_rate = r2; + mb16_dist = d2; mb_partitioning[i][j] = BLOCK_SIZE_SB8X16; } for (p = 0; p < MAX_MB_PLANE; p++) { @@ -1179,8 +1179,8 @@ static void encode_sb_row(VP9_COMP *cpi, r2 += x->partition_cost[pl][PARTITION_HORZ]; if (RDCOST(x->rdmult, x->rddiv, r2, d2) < RDCOST(x->rdmult, x->rddiv, mb16_rate, mb16_dist)) { - mb16_rate = r; - mb16_dist = d; + mb16_rate = r2; + mb16_dist = d2; mb_partitioning[i][j] = BLOCK_SIZE_SB16X8; } for (p = 0; p < MAX_MB_PLANE; p++) {