Skip to content
Snippets Groups Projects
Commit 5b5f3d50 authored by Cheng Chen's avatar Cheng Chen
Browse files

Fix a bug in jnt_comp

(1). index may go out side of range
(2). when d0 <= d1, comparison is invalid.

Performance impact on Google lowres testset:
Turn on jnt_comp vs baseline,
Without fix: -0.211% gain
With fix: -0.357% gain

BUG=aomedia:1239

Change-Id: I761522bba8396bba0d4108d710030b472939cf32
parent 26ac0478
No related branches found
No related tags found
No related merge requests found
......@@ -905,10 +905,12 @@ void av1_jnt_comp_weight_assign(const AV1_COMMON *cm, const MB_MODE_INFO *mbmi,
}
int i;
for (i = 0; i < 4; ++i) {
for (i = 0; i < 3; ++i) {
int c0 = quant_dist_weight[i][order];
int c1 = quant_dist_weight[i][!order];
if (d0 * c0 < d1 * c1) break;
int d0_c0 = d0 * c0;
int d1_c1 = d1 * c1;
if ((d0 > d1 && d0_c0 < d1_c1) || (d0 <= d1 && d0_c0 > d1_c1)) break;
}
*fwd_offset = quant_dist_lookup_table[order_idx][i][order];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment