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:
authorRonald S. Bultje <rsbultje@gmail.com>2020-03-25 20:42:40 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2020-03-26 00:39:28 +0300
commita02ed9c64cf7c69cc53739357e3ca0c981125c0e (patch)
tree32c85ad20a1dd328ce1f18a279624c7711a653b3 /tests
parent6b85daf042d3c7d88c6e3be8a273a6ed1fcbf1a2 (diff)
checkasm: add proper restrictions for h/w_pad in ipred.cfl_ac[444/422]
h_pad and w_pad can only be even if ss_ver=0 or ss_hor=0, respectively. This means certain special cases don't need to be implemented in SIMD while still guaranteeing correct decoding, and thus we don't want to test for these special cases in the checkasm test either.
Diffstat (limited to 'tests')
-rw-r--r--tests/checkasm/ipred.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/checkasm/ipred.c b/tests/checkasm/ipred.c
index d5955d2..65edcdc 100644
--- a/tests/checkasm/ipred.c
+++ b/tests/checkasm/ipred.c
@@ -142,14 +142,21 @@ static void check_cfl_ac(Dav1dIntraPredDSPContext *const c) {
for (int layout = 1; layout <= DAV1D_PIXEL_LAYOUT_I444; layout++) {
const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
+ const int h_step = 2 >> ss_hor, v_step = 2 >> ss_ver;
for (int w = 4; w <= (32 >> ss_hor); w <<= 1)
if (check_func(c->cfl_ac[layout - 1], "cfl_ac_%s_w%d_%dbpc",
cfl_ac_names[layout - 1], w, BITDEPTH))
{
- for (int h = imax(w / 4, 4); h <= imin(w * 4, (32 >> ss_ver)); h <<= 1) {
+ for (int h = imax(w / 4, 4);
+ h <= imin(w * 4, (32 >> ss_ver)); h <<= 1)
+ {
const ptrdiff_t stride = 32 * sizeof(pixel);
- for (int w_pad = (w >> 2) - 1; w_pad >= 0; w_pad--) {
- for (int h_pad = (h >> 2) - 1; h_pad >= 0; h_pad--) {
+ for (int w_pad = imax((w >> 2) - h_step, 0);
+ w_pad >= 0; w_pad -= h_step)
+ {
+ for (int h_pad = imax((h >> 2) - v_step, 0);
+ h_pad >= 0; h_pad -= v_step)
+ {
#if BITDEPTH == 16
const int bitdepth_max = rnd() & 1 ? 0x3ff : 0xfff;
#else