home *** CD-ROM | disk | FTP | other *** search
/ MPEG Toolkit / MPEG Toolkit.iso / os2 / mpegenc / src / headers / mtypes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-01  |  2.9 KB  |  115 lines

  1. /*===========================================================================*
  2.  * mtypes.h                                     *
  3.  *                                         *
  4.  *    MPEG data types                                 *
  5.  *                                         *
  6.  *===========================================================================*/
  7.  
  8. /*
  9.  * Copyright (c) 1993 The Regents of the University of California.
  10.  * All rights reserved.
  11.  *
  12.  * Permission to use, copy, modify, and distribute this software and its
  13.  * documentation for any purpose, without fee, and without written agreement is
  14.  * hereby granted, provided that the above copyright notice and the following
  15.  * two paragraphs appear in all copies of this software.
  16.  *
  17.  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
  18.  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  19.  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  20.  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  21.  *
  22.  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  23.  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  24.  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  25.  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  26.  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  27.  */
  28.  
  29. /*  
  30.  *  $Header: /n/picasso/users/keving/encode/src/headers/RCS/mtypes.h,v 1.8 1993/07/22 22:24:23 keving Exp keving $
  31.  *  $Log: mtypes.h,v $
  32.  * Revision 1.8  1993/07/22  22:24:23  keving
  33.  * nothing
  34.  *
  35.  * Revision 1.7  1993/07/09  00:17:23  keving
  36.  * nothing
  37.  *
  38.  * Revision 1.6  1993/06/03  21:08:53  keving
  39.  * nothing
  40.  *
  41.  * Revision 1.5  1993/02/17  23:18:20  dwallach
  42.  * checkin prior to keving's joining the project
  43.  *
  44.  * Revision 1.4  1993/01/18  10:20:02  dwallach
  45.  * *** empty log message ***
  46.  *
  47.  * Revision 1.3  1993/01/18  10:17:29  dwallach
  48.  * RCS headers installed, code indented uniformly
  49.  *
  50.  * Revision 1.3  1993/01/18  10:17:29  dwallach
  51.  * RCS headers installed, code indented uniformly
  52.  *
  53.  */
  54.  
  55.  
  56. #ifndef MTYPES_INCLUDED
  57. #define MTYPES_INCLUDED
  58.  
  59.  
  60. /*==============*
  61.  * HEADER FILES *
  62.  *==============*/
  63.  
  64. #include <pbmplus.h>
  65. #include <pnm.h>
  66. #include "general.h"
  67. #include "dct.h"
  68.  
  69.  
  70. /*===========*
  71.  * CONSTANTS *
  72.  *===========*/
  73.  
  74. #define TYPE_BOGUS    0   /* for the header of the circular list */
  75. #define TYPE_VIRGIN    1
  76.  
  77. #define STATUS_EMPTY    0
  78. #define STATUS_LOADED    1
  79. #define STATUS_WRITTEN    2
  80.  
  81.  
  82. /*==================*
  83.  * TYPE DEFINITIONS *
  84.  *==================*/
  85.  
  86. /*  
  87.  *  your basic Block type
  88.  */
  89. typedef int16 Block[DCTSIZE][DCTSIZE];
  90. typedef int16 FlatBlock[DCTSIZE_SQ];
  91. typedef        int32   LumBlock[2*DCTSIZE][2*DCTSIZE];
  92.  
  93.  
  94. /*========*
  95.  * MACROS *
  96.  *========*/
  97.  
  98. #ifdef ABS
  99. #undef ABS
  100. #endif
  101.  
  102. #define ABS(x) (((x)<0)?-(x):(x))
  103.  
  104. #ifdef HEINOUS_DEBUG_MODE
  105. #define DBG_PRINT(x) {printf x; fflush(stdout);}
  106. #else
  107. #define DBG_PRINT(x)
  108. #endif
  109.  
  110. #define ERRCHK(bool, str) {if(!(bool)) {perror(str); exit(1);}}
  111.  
  112.  
  113.  
  114. #endif /* MTYPES_INCLUDED */
  115.