diff options
Diffstat (limited to 'include/dct.h')
-rw-r--r-- | include/dct.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/dct.h b/include/dct.h new file mode 100644 index 0000000..d202de5 --- /dev/null +++ b/include/dct.h @@ -0,0 +1,11 @@ +#define CONST_BITS 8 +#define DCTSIZE 8 +#define DCTSIZE_BLOCK (DCTSIZE * DCTSIZE) + +#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) + +#define DESCALE(x,n) RIGHT_SHIFT((x) + (1 << ((n)-1)), n) + +#define MULTIPLY(var,constant) (DESCALE((var) * (constant), CONST_BITS)) + +void fdct(int *data); |