Commit 5574c604 authored by Yushin Cho's avatar Yushin Cho

[dist-8x8] Restore removed asserts

Reverts the commit 796d4e29.
Then, put them behind DEBUG_DIST_8X8 compile time flag.

Change-Id: I8729abeca83a664d86188e21998d8d60b00120db
parent 45b65afc
......@@ -3073,7 +3073,14 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#if CONFIG_DIST_8X8
if (x->using_dist_8x8 && reached_last_index &&
sum_rdc.rdcost != INT64_MAX && bsize == BLOCK_8X8) {
sum_rdc.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
int64_t dist_8x8;
dist_8x8 = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
#ifdef DEBUG_DIST_8X8
// TODO(anyone): Fix dist-8x8 assert failure here when CFL is enabled
if (x->tune_metric == AOM_TUNE_PSNR && xd->bd == 8 && !CONFIG_CFL)
assert(sum_rdc.dist == dist_8x8);
#endif // DEBUG_DIST_8X8
sum_rdc.dist = dist_8x8;
sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist);
}
#endif // CONFIG_DIST_8X8
......@@ -3168,7 +3175,14 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#if CONFIG_DIST_8X8
if (x->using_dist_8x8 && sum_rdc.rdcost != INT64_MAX &&
bsize == BLOCK_8X8) {
sum_rdc.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
int64_t dist_8x8;
dist_8x8 = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
#ifdef DEBUG_DIST_8X8
// TODO(anyone): Fix dist-8x8 assert failure here when CFL is enabled
if (x->tune_metric == AOM_TUNE_PSNR && xd->bd == 8 && !CONFIG_CFL)
assert(sum_rdc.dist == dist_8x8);
#endif // DEBUG_DIST_8X8
sum_rdc.dist = dist_8x8;
sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist);
}
#endif // CONFIG_DIST_8X8
......@@ -3261,7 +3275,14 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#if CONFIG_DIST_8X8
if (x->using_dist_8x8 && sum_rdc.rdcost != INT64_MAX &&
bsize == BLOCK_8X8) {
sum_rdc.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
int64_t dist_8x8;
dist_8x8 = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
#ifdef DEBUG_DIST_8X8
// TODO(anyone): Fix dist-8x8 assert failure here when CFL is enabled
if (x->tune_metric == AOM_TUNE_PSNR && xd->bd == 8 && !CONFIG_CFL)
assert(sum_rdc.dist == dist_8x8);
#endif // DEBUG_DIST_8X8
sum_rdc.dist = dist_8x8;
sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist);
}
#endif // CONFIG_DIST_8X8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment