Small speed up for super_block_uvrd Eearly termination if U plane RD cost is large enough. No notable compression performance changes. Change-Id: Ieeefc5859cb55d94391b502b4bd840bc8bcb2578
diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c index 6543b33..63163d7 100644 --- a/vp10/encoder/rdopt.c +++ b/vp10/encoder/rdopt.c
@@ -3496,6 +3496,11 @@ *distortion += pndist; *sse += pnsse; *skippable &= pnskip; + if (RDCOST(x->rdmult, x->rddiv, *rate, *distortion) > ref_best_rd && + RDCOST(x->rdmult, x->rddiv, 0, *sse) > ref_best_rd) { + is_cost_valid = 0; + break; + } } if (!is_cost_valid) { @@ -9424,6 +9429,8 @@ distortion2 += distortion_uv; skippable = skippable && uv_skippable; total_sse += uv_sse; + } else { + continue; } }