home *** CD-ROM | disk | FTP | other *** search
/ Compressed Image File Formats / CompressedImageFileFormatsJohnMiano.iso / pc / Library / include / jpencobk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-17  |  1.1 KB  |  47 lines

  1. #ifndef __JPENCOBK_H
  2. #define __JPENCOBK_H
  3. //
  4. // Copyright (c) 1997,1998 Colosseum Builders, Inc.
  5. // All rights reserved.
  6. //
  7. // Colosseum Builders, Inc. makes no warranty, expressed or implied
  8. // with regards to this software. It is provided as is.
  9. //
  10. // See the README.TXT file that came with this software for restrictions
  11. // on the use and redistribution of this file or send E-mail to
  12. // info@colosseumbuilders.com
  13. //
  14.  
  15. //
  16. //  Title:  JpegEncoderCoefficientBlock class definition
  17. //
  18. //  Author:  John M. Miano  miano@colosseumbuilders.com
  19. //
  20. //  Description:
  21. //
  22. //    This class is used to store DCT coefficients within component object.
  23. //
  24.  
  25. #include "jpeg.h"
  26.  
  27. class JpegEncoderCoefficientBlock
  28. {
  29. public:
  30.   BYTE2 *operator[](unsigned int index) ;
  31.   BYTE2 &ZigZagInput (unsigned int index) ;
  32. private:
  33.   BYTE2 data [JpegSampleWidth][JpegSampleWidth] ;
  34. } ;
  35.  
  36. inline BYTE2 *JpegEncoderCoefficientBlock::operator[](unsigned int index)
  37. {
  38.   return data [index] ;
  39. }
  40.  
  41. inline BYTE2 &JpegEncoderCoefficientBlock::ZigZagInput (unsigned int index)
  42. {
  43.   return ((BYTE2 *) data) [JpegZigZagInputOrder (index)] ;
  44. }
  45.  
  46. #endif
  47.