Commit: 726ed738aa8ff43ec7208d190d45dfb66bb0f1e7
Parent: 294d5ba945cb5b8cc057ad8f8da20729d6e731a9
Author: Randy Palamar
Date: Mon, 9 Dec 2024 19:21:07 -0700
allow non power of 2/multiple of 12 image dimensions to pass through
This can be used when implementing traditional/non-bias encoded
RCA imaging schemes.
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/util.c b/util.c
@@ -419,10 +419,14 @@ static void
fill_hadamard_transpose(i32 *out, i32 *tmp, u32 dim)
{
ASSERT(dim);
- b32 power_of_2 = ISPOWEROF2(dim);
+ b32 power_of_2 = ISPOWEROF2(dim);
+ b32 multiple_of_12 = dim % 12 == 0;
+
+ if (!power_of_2 && !multiple_of_12)
+ return;
if (!power_of_2) {
- ASSERT(dim % 12 == 0);
+ ASSERT(multiple_of_12);
dim /= 12;
}