From 675e8b2d83daf218439935565e5e62dc88561da4 Mon Sep 17 00:00:00 2001 From: siivonek Date: Sun, 28 Nov 2021 22:05:18 +0200 Subject: [PATCH] [mrl] Fix extra reference length in LCU bottom edge. Disable trace origins in valgrind test. --- src/intra.c | 5 +++-- tests/util.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/intra.c b/src/intra.c index 70709391..83dda6fc 100644 --- a/src/intra.c +++ b/src/intra.c @@ -1025,8 +1025,9 @@ static void intra_recon_tb_leaf( // Copy extra ref lines, including ref line 1 and top left corner. for (int i = 0; i < MAX_REF_LINE_IDX; ++i) { int height = (LCU_WIDTH >> depth) * 2 + MAX_REF_LINE_IDX; - height = MIN(height, pic_px.y - (y - MAX_REF_LINE_IDX)); - kvz_pixels_blit(&frame->rec->y[(y - MAX_REF_LINE_IDX) * frame->rec->stride + x - (1 + i)], + height = MIN(height, (LCU_WIDTH - lcu_px.y + MAX_REF_LINE_IDX)); // Cut short if on bottom LCU edge. Cannot take references from below since they don't exist. + height = MIN(height, pic_px.y - luma_px.y + MAX_REF_LINE_IDX); + kvz_pixels_blit(&frame->rec->y[(luma_px.y - MAX_REF_LINE_IDX) * frame->rec->stride + luma_px.x - (1 + i)], &extra_refs[i * 128], 1, height, frame->rec->stride, 1); diff --git a/tests/util.sh b/tests/util.sh index 4d16770d..9658837a 100644 --- a/tests/util.sh +++ b/tests/util.sh @@ -39,7 +39,7 @@ valgrind_test() { # If $KVZ_TEST_VALGRIND is defined and equal to "1", run the test with # valgrind. Otherwise, run without valgrind. if [ "${KVZ_TEST_VALGRIND:-0}" = '1' ]; then - valgrind='valgrind --leak-check=full --track-origins=yes --error-exitcode=1 --' + valgrind='valgrind --leak-check=full --error-exitcode=1 --' else valgrind='' fi