home *** CD-ROM | disk | FTP | other *** search
- /* header file for loco.c
-
- Copyright (C) 2003 Mohammad Rezaei
-
- Author: Mohammad Rezaei
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
- #ifndef _LOCO_H
- #define _LOCO_H
-
- #define LOC __LINE__, __FILE__
-
- struct prediction_info {
- unsigned char *buffer;
- unsigned char *currentLine;
- unsigned char *prevLine;
- unsigned char bit_buffer; /* bits that haven't yet been written */
- unsigned int num_bits_in_buf; /* the number of these */
- int effectiveHeight, effectiveWidth;
- int xStep;
- int yStride;
- int mean;
- int num_err;
- int abs_err;
- int max_loss;
- int run_length;
- int saved_bits;
- int decode_run_length;
- short *coded_error;
- short *abs_error;
- };
-
-
- extern unsigned char * loco_codec_compress(unsigned char *inBuffer, unsigned char *outBuffer, int height, int width, int xOffset,
- int xStep, int yOffset, int yStep);
-
- extern unsigned char * loco_codec_compress_lossy(unsigned char *inBuffer, unsigned char *outBuffer, int height, int width, int xOffset,
- int xStep, int yOffset, int yStep, int maxLoss);
-
- extern unsigned char * loco_codec_decompress(unsigned char *inBuffer, unsigned char *outBuffer, int height, int width, int xOffset,
- int xStep, int yOffset, int yStep, int maxLoss);
-
- #endif
-