Commit 796d4e29 authored by Yushin Cho's avatar Yushin Cho

[dist-8x8] Remove asserts for sub8x8 distortions

Remove the asserts in rd_pick_partition(), which check
whether the sum of distortions of sub8x8 partitions matches to
the 8x8 distortion measured in final reconstructed 8x8 pixels,
because the sum of the sub8x8 distortions returned from rd_pick_sb_modes()
is sometimes different from what is measured with final reconstructed 8x8 pixels.

The asserts have been provided for the purpose of sanity check with PSNR
and triggered with "--enable-dist-8x8=1" encoder option.

Change-Id: I08e331900b19077cbb325ef5117688f05095dcc7
parent 60db3c95
...@@ -2520,12 +2520,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td, ...@@ -2520,12 +2520,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#if CONFIG_DIST_8X8 #if CONFIG_DIST_8X8
if (x->using_dist_8x8 && reached_last_index && if (x->using_dist_8x8 && reached_last_index &&
sum_rdc.rdcost != INT64_MAX && bsize == BLOCK_8X8) { sum_rdc.rdcost != INT64_MAX && bsize == BLOCK_8X8) {
int64_t dist_8x8; sum_rdc.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
dist_8x8 = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_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);
sum_rdc.dist = dist_8x8;
sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist); sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist);
} }
#endif // CONFIG_DIST_8X8 #endif // CONFIG_DIST_8X8
...@@ -2609,12 +2604,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td, ...@@ -2609,12 +2604,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#if CONFIG_DIST_8X8 #if CONFIG_DIST_8X8
if (x->using_dist_8x8 && sum_rdc.rdcost != INT64_MAX && if (x->using_dist_8x8 && sum_rdc.rdcost != INT64_MAX &&
bsize == BLOCK_8X8) { bsize == BLOCK_8X8) {
int64_t dist_8x8; sum_rdc.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
dist_8x8 = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_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);
sum_rdc.dist = dist_8x8;
sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist); sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist);
} }
#endif // CONFIG_DIST_8X8 #endif // CONFIG_DIST_8X8
...@@ -2695,12 +2685,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td, ...@@ -2695,12 +2685,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#if CONFIG_DIST_8X8 #if CONFIG_DIST_8X8
if (x->using_dist_8x8 && sum_rdc.rdcost != INT64_MAX && if (x->using_dist_8x8 && sum_rdc.rdcost != INT64_MAX &&
bsize == BLOCK_8X8) { bsize == BLOCK_8X8) {
int64_t dist_8x8; sum_rdc.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8);
dist_8x8 = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_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);
sum_rdc.dist = dist_8x8;
sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist); sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist);
} }
#endif // CONFIG_DIST_8X8 #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