diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2005-04-04 21:33:37 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2005-04-04 21:33:37 (GMT) |
commit | c0b7547e14925222153a9a1998defc692c117a2d (patch) | |
tree | 3c12cb51a44c3fe235b43b8177c60024385338d0 | |
parent | 0692fd3ae8c1219b81098de4fa7a8d7a90422afe (diff) | |
download | 5kk53-c0b7547e14925222153a9a1998defc692c117a2d.zip 5kk53-c0b7547e14925222153a9a1998defc692c117a2d.tar.gz 5kk53-c0b7547e14925222153a9a1998defc692c117a2d.tar.bz2 |
Added some comment to main.c and some file open stuff
-rw-r--r-- | src/main.c | 59 |
1 files changed, 54 insertions, 5 deletions
@@ -1,14 +1,63 @@ #include <stdio.h> - #include "dct.h" -int main(void) { +#define ENCODE 0 +#define DECODE 1 + +int main(int argc, char argv[]) { int retval; int workspace[DCTSIZE_BLOCK]; + int type; + char *fileIn, *fileOut; + FILE *fI, *fO; + + + fI = fopen(fileIn,"rb"); + if (fI == NULL) { + printf("unable to open the file",fileIn); + return 0; + } + fO = fopen(fileOut,"wb"); + if (fO == NULL) { + printf("unable to open the file",fileOut); + return 0; + } + retval = 0; - - fdct(workspace); - + type = ENCODE; + + switch(type) { + case ENCODE: + // RGB -> YUV + + // Convert to 8x8 + + // DCT + fdct(workspace); + + // ZZ + + // Q + + // VLC (huffman) + + break; + case DECODE: + // VLD (huffman) + + // IQ + + // ZZ + + // IDCT + //idct(workspace); + // Convert 8x8 to lines + + // YUV -> RGB + + break; + } + return retval; } |