8x8 adst one-off
coefficients in aom (non-transposed) notation:
static const short cf[] = {
0, 0, -4575, -915, 915, 0, 915, 915,
-915, -1830, -915, 4575, -1830, -915, 915, 0,
915, -915, -32768, 0, -6405, 915, -2745, -915,
-16470, 915, 915, -915, -5490, 915, 1830, 915,
-915, 1830, 1830, 915, 5490, -915, -915, 32767,
0, -915, 0, -915, 0, 915, 0, 0,
-915, -2745, 0, 2745, 915, 915, 915, 0,
-3660, 915, -915, 915, -11895, 0, 0, 0,
};
output for us:
ff 00 ff 00 a1 00 ff 00
38 00 00 00 ff ff 00 00
00 52 00 ff 00 ff ff 00
ff ff 00 c4 ff ff ff ff
ff 90 ff 00 00 00 8f ff
ff ff 00 00 00 00 00 ff
00 ff 00 ff 00 ff 00 00
ee 00 7d ff ff ff ff 00
output for aom:
ff 00 ff 00 a1 00 ff 00
38 00 00 00 ff ff 00 00
00 52 00 ff 00 ff ff 00
ff ff 00 c4 ff ff ff ff
ff 8f ff 00 00 00 8f ff
ff ff 00 00 00 00 00 ff
00 ff 00 ff 00 ff 00 00
ee 00 7d ff ff ff ff 00
note the one-off in x=1,y=4.
To reproduce, use this code:
$ cat test.c
#include <stdint.h>
#define BITDEPTH 8
#include "common/dump.h"
#include <itx.h>
//#include <av1/common/enums.h>
void av1_inv_txfm2d_add_8x8_c(const int32_t *input, uint16_t *output,
int stride, int tx_type, int bd) ;
int main() {
static const short cf[] = {
0, 0, -4575, -915, 915, 0, 915, 915,
-915, -1830, -915, 4575, -1830, -915, 915, 0,
915, -915, -32768, 0, -6405, 915, -2745, -915,
-16470, 915, 915, -915, -5490, 915, 1830, 915,
-915, 1830, 1830, 915, 5490, -915, -915, 32767,
0, -915, 0, -915, 0, 915, 0, 0,
-915, -2745, 0, 2745, 915, 915, 915, 0,
-3660, 915, -915, 915, -11895, 0, 0, 0,
};
short cf_cp[8*8];
for (int i = 0; i < 64; i++)
cf_cp[(i>>3) | ((i & 7) << 3)] = cf[i];
uint8_t px[8*8];
memset(px, 0x92, 8*8);
Dav1dInvTxfmDSPContext c;
dav1d_itx_dsp_init_8bpc(&c);
c.itxfm_add[1][3](px, 8, cf_cp, 63);
hex_dump(px, 8, 8, 8, "dst");
int cf_cp2[8*8];
for (int i = 0; i < 64; i++) cf_cp2[i] = cf[i];
uint16_t px2[8*8];
for (int i = 0; i < 64; i++) px2[i] = 0x92;
av1_inv_txfm2d_add_8x8_c(cf_cp2, px2, 8, ADST_ADST, 8);
for (int y = 0; y < 8; y++) {
for (int x = 0; x < 8; x++) {
printf("%02x ", px2[y*8+x]);
}
printf("\n");
}
}
Compile like this against C-only builds of libaom/dav1d:
$ gcc -c -o test.o test.c -I ~/Projects/dav1d/src/ -I ~/Projects/dav1d/include -I ~/Projects/dav1d
bash-4.4$ gcc -o test test.o ~/Projects/dav1d/build/src/25a6634\@\@dav1d_bitdepth_8\@sta/itx_tmpl.c.o \
~/Projects/aom/x86-64/CMakeFiles/aom_av1_common.dir/av1/common/av1_inv_txfm2d.c.o \
~/Projects/aom/x86-64/CMakeFiles/aom_av1_common.dir/av1/common/av1_inv_txfm1d.c.o \
~/Projects/aom/x86-64/CMakeFiles/aom_av1_common.dir/av1/common/av1_txfm.c.o \
./src/25a6634@@dav1d@sha/itx_1d.c.o
$ ./test