Back port partition rate cost estimate fix to VP9
This commit back ports the fix from https://chromium-review.googlesource.com/#/c/326940 It corrects the block partition context fetching in rate-distortion optimization. It improves the average coding performance of speed 0: derf 0.098% hevcmr 0.102% stdhd 0.282% Change-Id: I8bcc6fe40ba5c6b50a6136daac116dcc738937ec
This commit is contained in:
parent
1ff2935ebf
commit
8d006a16c5
@ -2439,7 +2439,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;
|
||||
@ -2587,7 +2588,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);
|
||||
@ -2706,7 +2706,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);
|
||||
@ -2772,7 +2771,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) {
|
||||
@ -2824,7 +2822,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user