Doxygen Source Code Documentation
qtest.c File Reference
#include <stdio.h>#include "mtypes.h"#include "mproto.h"Go to the source code of this file.
Functions | |
| main () | |
Function Documentation
|
|
Definition at line 55 of file qtest.c. References a, Block, FlatBlock, i, mp_quant_zig_block(), mp_rle_huff_block(), and _BitBucket::totalbits.
00056 {
00057 Block a;
00058 FlatBlock b;
00059 BitBucket *bb;
00060 int i, j;
00061
00062 bb = new_bitbucket();
00063
00064 for (i = 0; i < 8; i++)
00065 for (j = 0; j < 8; j++)
00066 a[i][j] = random() % 100;
00067 mp_quant_zig_block(a, b, 1, 1);
00068 for (i = 0; i < 64; i++)
00069 printf("%6d ", b[i]);
00070 printf("\n");
00071
00072 mp_rle_huff_block(b, bb); /* intuititve names, huh? */
00073
00074 printf("Huffman output is %d bits\n", bb->totalbits);
00075 }
|