[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
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index 24a3741..a23f4ae 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c
@@ -2520,12 +2520,7 @@ #if CONFIG_DIST_8X8 if (x->using_dist_8x8 && reached_last_index && sum_rdc.rdcost != INT64_MAX && bsize == BLOCK_8X8) { - int64_t dist_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.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8); sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist); } #endif // CONFIG_DIST_8X8 @@ -2609,12 +2604,7 @@ #if CONFIG_DIST_8X8 if (x->using_dist_8x8 && sum_rdc.rdcost != INT64_MAX && bsize == BLOCK_8X8) { - int64_t dist_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.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8); sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist); } #endif // CONFIG_DIST_8X8 @@ -2695,12 +2685,7 @@ #if CONFIG_DIST_8X8 if (x->using_dist_8x8 && sum_rdc.rdcost != INT64_MAX && bsize == BLOCK_8X8) { - int64_t dist_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.dist = dist_8x8_yuv(cpi, x, src_plane_8x8, dst_plane_8x8); sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, sum_rdc.dist); } #endif // CONFIG_DIST_8X8