Commit b0ef7643 authored by Martin Storsjö's avatar Martin Storsjö Committed by Janne Grunau

checkasm: cdef: Don't use uninitialized buffer contents for the test

This makes sure the test actually is deterministic based on the
seed value.
parent 29cae604
Pipeline #4370 passed with stages
in 8 minutes and 35 seconds
......@@ -53,9 +53,6 @@ static void check_cdef_filter(const cdef_fn fn, const int w, const int h,
if (check_func(fn, "%s_%dbpc", name, BITDEPTH)) {
for (int dir = 0; dir < 8; dir++) {
for (enum CdefEdgeFlags edges = 0; edges <= 0xf; edges++) {
memcpy(a_src, src, (10 * 16 + 8) * sizeof(pixel));
memcpy(c_src, src, (10 * 16 + 8) * sizeof(pixel));
#if BITDEPTH == 16
const int bitdepth_max = rnd() & 1 ? 0x3ff : 0xfff;
#else
......@@ -66,6 +63,9 @@ static void check_cdef_filter(const cdef_fn fn, const int w, const int h,
init_tmp(top, 16 * 2 + 8, bitdepth_max);
init_tmp((pixel *) left,8 * 2, bitdepth_max);
memcpy(a_src, src, (10 * 16 + 8) * sizeof(pixel));
memcpy(c_src, src, (10 * 16 + 8) * sizeof(pixel));
const int lvl = 1 + (rnd() % 62);
const int damping = 3 + (rnd() & 3) + bitdepth_min_8;
const int pri_strength = (lvl >> 2) << bitdepth_min_8;
......
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