SoCRocket
Transaction-Level Modeling Framework for Space Applications
#include <math.h>#include <stdio.h>Macros | |
| #define | SHORT_BENCH |
| #define | ncols 40 |
| #define | nrows 40 |
| #define | EOB 0x00 |
| #define | ZRL 0xF0 |
| #define | ONE 1L |
| #define | LG2_DCT_SCALE 16 |
| #define | RIGHT_SHIFT(_x, _shft) ((_x) >> (_shft)) |
| #define | DCT_SCALE (ONE << LG2_DCT_SCALE) |
| #define | LG2_OVERSCALE 2 |
| #define | OVERSCALE (ONE << LG2_OVERSCALE) |
| #define | UNFIX(x) RIGHT_SHIFT((x) + (ONE << (LG2_DCT_SCALE-1)), LG2_DCT_SCALE) |
| #define | UNFIXH(x) RIGHT_SHIFT((x) + (ONE << LG2_DCT_SCALE), LG2_DCT_SCALE+1) |
| #define | UNFIXO(x) RIGHT_SHIFT((x) + (ONE << (LG2_DCT_SCALE-1-LG2_OVERSCALE)), LG2_DCT_SCALE-LG2_OVERSCALE) |
| #define | OVERSH(x) ((x) << LG2_OVERSCALE) |
| #define | SIN_1_4 46341 |
| #define | COS_1_4 46341 |
| #define | SIN_1_8 25080 |
| #define | COS_1_8 60547 |
| #define | SIN_3_8 60547 |
| #define | COS_3_8 25080 |
| #define | SIN_1_16 12785 |
| #define | COS_1_16 64277 |
| #define | SIN_7_16 64277 |
| #define | COS_7_16 12785 |
| #define | SIN_3_16 36410 |
| #define | COS_3_16 54491 |
| #define | SIN_5_16 54491 |
| #define | COS_5_16 36410 |
| #define | OSIN_1_4 11585 |
| #define | OCOS_1_4 11585 |
| #define | OSIN_1_8 6270 |
| #define | OCOS_1_8 15137 |
| #define | OSIN_3_8 15137 |
| #define | OCOS_3_8 6270 |
| #define | OSIN_1_16 3196 |
| #define | OCOS_1_16 16069 |
| #define | OSIN_7_16 16069 |
| #define | OCOS_7_16 3196 |
| #define | OSIN_3_16 9102 |
| #define | OCOS_3_16 13623 |
| #define | OSIN_5_16 13623 |
| #define | OCOS_5_16 9102 |
| #define | DCTSIZE 8 |
| #define | INT32 int |
| #define | DCTSIZE 8 |
| #define | BLKSIZE 64 |
| #define | NBLKS ((ncols*nrows)/BLKSIZE) |
Functions | |
| int | getbit () |
| void | huff_dc_dec (int *retval) |
| void | huff_ac_dec (short *data) |
| void | fast_idct_8 (short *in, int stride) |
| void | j_rev_dct (short *data) |
| void | dquantz_lum (short *data) |
| int | main () |
Variables | |
| unsigned long | huffbits [] |
| unsigned char | val_dc_lum [] |
| unsigned char | val_ac_lum [] |
| unsigned char | zz_tbl [32] |
| int | mincode_dc [] |
| int | maxcode_dc [] |
| unsigned char | valptr_dc [] |
| int | mincode_ac [] |
| int | maxcode_ac [] |
| unsigned char | valptr_ac [] |
| unsigned char | qtbl_lum [] |
| #define BLKSIZE 64 |
Referenced by main().
| #define COS_1_16 64277 |
| #define COS_1_4 46341 |
Referenced by fast_idct_8().
| #define COS_1_8 60547 |
Referenced by fast_idct_8().
| #define COS_3_16 54491 |
| #define COS_3_8 25080 |
| #define COS_5_16 36410 |
| #define COS_7_16 12785 |
| #define DCT_SCALE (ONE << LG2_DCT_SCALE) |
| #define DCTSIZE 8 |
Referenced by dquantz_lum(), j_rev_dct(), and main().
| #define DCTSIZE 8 |
| #define EOB 0x00 |
Referenced by huff_ac_dec().
| #define INT32 int |
Referenced by fast_idct_8().
| #define LG2_DCT_SCALE 16 |
| #define LG2_OVERSCALE 2 |
| #define ncols 40 |
Referenced by main().
| #define nrows 40 |
| #define OCOS_1_16 16069 |
Referenced by fast_idct_8().
| #define OCOS_1_4 11585 |
| #define OCOS_1_8 15137 |
| #define OCOS_3_16 13623 |
| #define OCOS_3_8 6270 |
| #define OCOS_5_16 9102 |
Referenced by fast_idct_8().
| #define OCOS_7_16 3196 |
| #define ONE 1L |
| #define OSIN_1_16 3196 |
Referenced by fast_idct_8().
| #define OSIN_1_4 11585 |
| #define OSIN_1_8 6270 |
| #define OSIN_3_16 9102 |
| #define OSIN_3_8 15137 |
| #define OSIN_5_16 13623 |
Referenced by fast_idct_8().
| #define OSIN_7_16 16069 |
| #define OVERSCALE (ONE << LG2_OVERSCALE) |
| #define OVERSH | ( | x | ) | ((x) << LG2_OVERSCALE) |
Referenced by fast_idct_8().
| #define RIGHT_SHIFT | ( | _x, | |
| _shft | |||
| ) | ((_x) >> (_shft)) |
| #define SHORT_BENCH |
| #define SIN_1_16 12785 |
| #define SIN_1_4 46341 |
| #define SIN_1_8 25080 |
Referenced by fast_idct_8().
| #define SIN_3_16 36410 |
| #define SIN_3_8 60547 |
| #define SIN_5_16 54491 |
| #define SIN_7_16 64277 |
| #define UNFIX | ( | x | ) | RIGHT_SHIFT((x) + (ONE << (LG2_DCT_SCALE-1)), LG2_DCT_SCALE) |
| #define UNFIXH | ( | x | ) | RIGHT_SHIFT((x) + (ONE << LG2_DCT_SCALE), LG2_DCT_SCALE+1) |
Referenced by fast_idct_8().
| #define UNFIXO | ( | x | ) | RIGHT_SHIFT((x) + (ONE << (LG2_DCT_SCALE-1-LG2_OVERSCALE)), LG2_DCT_SCALE-LG2_OVERSCALE) |
Referenced by fast_idct_8().
| #define ZRL 0xF0 |
Referenced by huff_ac_dec().
| void fast_idct_8 | ( | short * | in, |
| int | stride | ||
| ) |
| int getbit | ( | ) |
References huffbits.
Referenced by huff_ac_dec(), and huff_dc_dec().
| void huff_ac_dec | ( | short * | data | ) |
| void huff_dc_dec | ( | int * | retval | ) |
| void j_rev_dct | ( | short * | data | ) |
References DCTSIZE, fast_idct_8(), and i.
Referenced by main().
| int main | ( | void | ) |
References BLKSIZE, DCTSIZE, dquantz_lum(), huff_ac_dec(), huff_dc_dec(), huffbits, i, j_rev_dct(), NBLKS, and ncols.
| int maxcode_ac[] |
| int maxcode_dc[] |
| int mincode_ac[] |
| int mincode_dc[] |
| unsigned char qtbl_lum[] |
| unsigned char val_ac_lum[] |
| unsigned char val_dc_lum[] |
| unsigned char valptr_ac[] |
| unsigned char valptr_dc[] |
| unsigned char zz_tbl[32] |