Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2021-06-07 11:38:01 +0300
committerMartin Storsjö <martin@martin.st>2021-06-07 11:39:14 +0300
commit185194be2f4daf907c76ad8fdd763a701d3d4005 (patch)
treef0a75fb67653025bdb613a5863b1c0c6c29f3c6a /tests
parente00e7411619ca8988621349292b736e288a5e8d7 (diff)
checkasm: Make sure that all pixels are in range before benchmarking
The pixel data as initialized by the test above only have proper pixels up to whatever random 'w' it used last.
Diffstat (limited to 'tests')
-rw-r--r--tests/checkasm/filmgrain.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/checkasm/filmgrain.c b/tests/checkasm/filmgrain.c
index 8db3246..385caea 100644
--- a/tests/checkasm/filmgrain.c
+++ b/tests/checkasm/filmgrain.c
@@ -229,6 +229,11 @@ static void check_fgy_sbrow(const Dav1dFilmGrainDSPContext *const dsp) {
}
}
fg_data[0].overlap_flag = 1;
+ for (int y = 0; y < 32; y++) {
+ // Make sure all pixels are in range
+ for (int x = 0; x < 128; x++)
+ src[y * PXSTRIDE(stride) + x] &= bitdepth_max;
+ }
bench_new(a_dst, src, stride, fg_data, 64, scaling, grain_lut, 32,
1 HIGHBD_TAIL_SUFFIX);
}
@@ -368,6 +373,13 @@ static void check_fguv_sbrow(const Dav1dFilmGrainDSPContext *const dsp) {
}
fg_data[0].overlap_flag = 1;
+ for (int y = 0; y < 32; y++) {
+ // Make sure all pixels are in range
+ for (int x = 0; x < 128; x++) {
+ src[y * PXSTRIDE(stride) + x] &= bitdepth_max;
+ luma_src[y * PXSTRIDE(lstride) + x] &= bitdepth_max;
+ }
+ }
bench_new(a_dst, src, stride, fg_data, 32, scaling, grain_lut[1], 16,
1, luma_src, lstride, uv_pl, is_identity HIGHBD_TAIL_SUFFIX);
}