home *** CD-ROM | disk | FTP | other *** search
/ Spidla DivX / DivX.bin / LocoCodec / loco.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-04-27  |  1.9 KB  |  58 lines

  1. /* header file for loco.c
  2.  
  3.     Copyright (C) 2003  Mohammad Rezaei
  4.  
  5.     Author: Mohammad Rezaei
  6.  
  7.   This program is free software; you can redistribute it and/or
  8.   modify it under the terms of the GNU General Public License
  9.   as published by the Free Software Foundation; either version 2
  10.   of the License, or (at your option) any later version.
  11.  
  12.   This program is distributed in the hope that it will be useful,
  13.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.   GNU General Public License for more details.
  16.  
  17.   You should have received a copy of the GNU General Public License
  18.   along with this program; if not, write to the Free Software
  19.   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.   */
  21.  
  22. #ifndef _LOCO_H
  23. #define _LOCO_H
  24.  
  25. #define LOC __LINE__, __FILE__
  26.  
  27. struct prediction_info {
  28.   unsigned char *buffer;
  29.   unsigned char *currentLine;
  30.   unsigned char *prevLine;
  31.   unsigned char bit_buffer; /* bits that haven't yet been written */
  32.   unsigned int num_bits_in_buf; /* the number of these */
  33.   int effectiveHeight, effectiveWidth;
  34.   int xStep;
  35.   int yStride;
  36.   int mean;
  37.   int num_err;
  38.   int abs_err;
  39.   int max_loss;
  40.   int run_length;
  41.   int saved_bits;
  42.   int decode_run_length;
  43.   short *coded_error;
  44.   short *abs_error;
  45. };
  46.  
  47.  
  48. extern unsigned char * loco_codec_compress(unsigned char *inBuffer, unsigned char *outBuffer, int height, int width, int xOffset, 
  49.               int xStep, int yOffset, int yStep);
  50.  
  51. extern unsigned char * loco_codec_compress_lossy(unsigned char *inBuffer, unsigned char *outBuffer, int height, int width, int xOffset, 
  52.               int xStep, int yOffset, int yStep, int maxLoss);
  53.  
  54. extern unsigned char * loco_codec_decompress(unsigned char *inBuffer, unsigned char *outBuffer, int height, int width, int xOffset, 
  55.               int xStep, int yOffset, int yStep, int maxLoss);
  56.  
  57. #endif
  58.