#undef init_intra_pred
}
-#define itxfm_wrapper(type_a, type_b, sz, bits) \
+#define itxfm_wrapper(type_a, type_b, sz, bits, has_dconly) \
static void \
type_a ## _ ## type_b ## _ ## sz ## x ## sz ## _add_c(uint8_t *dst, \
ptrdiff_t stride, \
{ \
int i, j; \
int16_t tmp[sz * sz], out[sz]; \
+ \
+ if (has_dconly && eob == 1) { \
+ const int t = (((block[0] * 11585 + (1 << 13)) >> 14) \
+ * 11585 + (1 << 13)) >> 14; \
+ block[0] = 0; \
+ for (i = 0; i < sz; i++) { \
+ for (j = 0; j < sz; j++) \
+ dst[j * stride] = \
+ av_clip_uint8(dst[j * stride] + \
+ (bits ? (t + (1 << (bits - 1))) >> bits \
+ : t)); \
+ dst++; \
+ } \
+ return; \
+ } \
+ \
for (i = 0; i < sz; i++) \
type_a ## sz ## _1d(tmp + i * sz, block + i, sz, 0); \
memset(block, 0, sz * sz * sizeof(*block)); \
} \
}
-#define itxfm_wrap(sz, bits) \
- itxfm_wrapper(idct, idct, sz, bits) \
- itxfm_wrapper(iadst, idct, sz, bits) \
- itxfm_wrapper(idct, iadst, sz, bits) \
- itxfm_wrapper(iadst, iadst, sz, bits)
+#define itxfm_wrap(sz, bits) \
+ itxfm_wrapper(idct, idct, sz, bits, 1) \
+ itxfm_wrapper(iadst, idct, sz, bits, 0) \
+ itxfm_wrapper(idct, iadst, sz, bits, 0) \
+ itxfm_wrapper(iadst, iadst, sz, bits, 0)
#define IN(x) in[x * stride]
out[31] = t0 - t31;
}
-itxfm_wrapper(idct, idct, 32, 6)
+itxfm_wrapper(idct, idct, 32, 6, 1)
static av_always_inline void iwht4_1d(int16_t *out, const int16_t *in,
ptrdiff_t stride, int pass)
out[3] = t3;
}
-itxfm_wrapper(iwht, iwht, 4, 0)
+itxfm_wrapper(iwht, iwht, 4, 0, 0)
#undef IN
#undef itxfm_wrapper