diff options
author | Jingning Han <jingning@google.com> | 2016-03-01 22:31:29 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-03-01 22:31:30 +0000 |
commit | 405fe6b78c3b13d2d1921f7ee745b08ce8605ed0 (patch) | |
tree | 451cd8f392364e112712ee6a3dca42b5ed4f093a | |
parent | 76b5a3371cf769d547b02b3d3c6576a017fb794c (diff) | |
parent | 8d006a16c53e10d481d1df148140ee7c2561460e (diff) | |
download | libvpx-405fe6b78c3b13d2d1921f7ee745b08ce8605ed0.tar libvpx-405fe6b78c3b13d2d1921f7ee745b08ce8605ed0.tar.gz libvpx-405fe6b78c3b13d2d1921f7ee745b08ce8605ed0.tar.bz2 libvpx-405fe6b78c3b13d2d1921f7ee745b08ce8605ed0.zip |
Merge "Back port partition rate cost estimate fix to VP9"
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 0314a7929..8953f0f32 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -2440,7 +2440,8 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td, PARTITION_CONTEXT sl[8], sa[8]; TOKENEXTRA *tp_orig = *tp; PICK_MODE_CONTEXT *ctx = &pc_tree->none; - int i, pl; + int i; + const int pl = partition_plane_context(xd, mi_row, mi_col, bsize); BLOCK_SIZE subsize; RD_COST this_rdc, sum_rdc, best_rdc; int do_split = bsize >= BLOCK_8X8; @@ -2588,7 +2589,6 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td, &this_rdc, bsize, ctx, best_rdc.rdcost); if (this_rdc.rate != INT_MAX) { if (bsize >= BLOCK_8X8) { - pl = partition_plane_context(xd, mi_row, mi_col, bsize); this_rdc.rate += cpi->partition_cost[pl][PARTITION_NONE]; this_rdc.rdcost = RDCOST(x->rdmult, x->rddiv, this_rdc.rate, this_rdc.dist); @@ -2707,7 +2707,6 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td, } if (sum_rdc.rdcost < best_rdc.rdcost && i == 4) { - pl = partition_plane_context(xd, mi_row, mi_col, bsize); sum_rdc.rate += cpi->partition_cost[pl][PARTITION_SPLIT]; sum_rdc.rdcost = RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist); @@ -2773,7 +2772,6 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td, } if (sum_rdc.rdcost < best_rdc.rdcost) { - pl = partition_plane_context(xd, mi_row, mi_col, bsize); sum_rdc.rate += cpi->partition_cost[pl][PARTITION_HORZ]; sum_rdc.rdcost = RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist); if (sum_rdc.rdcost < best_rdc.rdcost) { @@ -2825,7 +2823,6 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td, } if (sum_rdc.rdcost < best_rdc.rdcost) { - pl = partition_plane_context(xd, mi_row, mi_col, bsize); sum_rdc.rate += cpi->partition_cost[pl][PARTITION_VERT]; sum_rdc.rdcost = RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist); |