Fix rd_pick_partition search loop for 4x4 blocks
The partition search for 4x4 blocks takes unnecessary steps to reconstruct pixels and an extra partition type update. This commit removes such operations. No visible compression/speed difference. Thanks to Yue (yuec@) for finding this issue. Change-Id: I3f83824aa3fd3717d63be0b280fa57258939a70a
This commit is contained in:
Родитель
53844275e9
Коммит
84af0486f9
|
@ -2015,17 +2015,10 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
|
||||||
ctx->mic.mbmi.interp_filter;
|
ctx->mic.mbmi.interp_filter;
|
||||||
rd_pick_sb_modes(cpi, tile, mi_row, mi_col, &sum_rate, &sum_dist, subsize,
|
rd_pick_sb_modes(cpi, tile, mi_row, mi_col, &sum_rate, &sum_dist, subsize,
|
||||||
pc_tree->leaf_split[0], best_rd, 0);
|
pc_tree->leaf_split[0], best_rd, 0);
|
||||||
if (sum_rate == INT_MAX) {
|
if (sum_rate == INT_MAX)
|
||||||
sum_rd = INT64_MAX;
|
sum_rd = INT64_MAX;
|
||||||
} else {
|
else
|
||||||
sum_rd = RDCOST(x->rdmult, x->rddiv, sum_rate, sum_dist);
|
sum_rd = RDCOST(x->rdmult, x->rddiv, sum_rate, sum_dist);
|
||||||
if (sum_rd < best_rd) {
|
|
||||||
update_state(cpi, pc_tree->leaf_split[0], mi_row, mi_col, subsize, 0);
|
|
||||||
encode_superblock(cpi, tp, 0, mi_row, mi_col, subsize,
|
|
||||||
pc_tree->leaf_split[0]);
|
|
||||||
update_partition_context(xd, mi_row, mi_col, subsize, bsize);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < 4 && sum_rd < best_rd; ++i) {
|
for (i = 0; i < 4 && sum_rd < best_rd; ++i) {
|
||||||
const int x_idx = (i & 1) * mi_step;
|
const int x_idx = (i & 1) * mi_step;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче