home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / compresn / jpegv3sr / jdarith.c < prev    next >
C/C++ Source or Header  |  1992-01-17  |  1KB  |  43 lines

  1. /*
  2.  * jdarith.c
  3.  *
  4.  * Copyright (C) 1991, 1992, Thomas G. Lane.
  5.  * This file is part of the Independent JPEG Group's software.
  6.  * For conditions of distribution and use, see the accompanying README file.
  7.  *
  8.  * This file contains arithmetic entropy decoding routines.
  9.  * These routines are invoked via the methods entropy_decode
  10.  * and entropy_decoder_init/term.
  11.  */
  12.  
  13. #include "jinclude.h"
  14.  
  15. #ifdef ARITH_CODING_SUPPORTED
  16.  
  17.  
  18. /*
  19.  * The arithmetic coding option of the JPEG standard specifies Q-coding,
  20.  * which is covered by patents held by IBM (and possibly AT&T and Mitsubishi).
  21.  * At this time it does not appear to be legal for the Independent JPEG
  22.  * Group to distribute software that implements arithmetic coding.
  23.  * We have therefore removed arithmetic coding support from the
  24.  * distributed source code.
  25.  *
  26.  * We're not happy about it either.
  27.  */
  28.  
  29.  
  30. /*
  31.  * The method selection routine for arithmetic entropy decoding.
  32.  */
  33.  
  34. GLOBAL void
  35. jseldarithmetic (decompress_info_ptr cinfo)
  36. {
  37.   if (cinfo->arith_code) {
  38.     ERREXIT(cinfo->emethods, "Sorry, there are legal restrictions on arithmetic coding");
  39.   }
  40. }
  41.  
  42. #endif /* ARITH_CODING_SUPPORTED */
  43.