1991-10-06 20:00:00 -04:00
|
|
|
/*
|
|
|
|
* jdarith.c
|
|
|
|
*
|
1992-03-16 19:00:00 -05:00
|
|
|
* Copyright (C) 1991, 1992, Thomas G. Lane.
|
1991-10-06 20:00:00 -04:00
|
|
|
* This file is part of the Independent JPEG Group's software.
|
|
|
|
* For conditions of distribution and use, see the accompanying README file.
|
|
|
|
*
|
|
|
|
* This file contains arithmetic entropy decoding routines.
|
|
|
|
* These routines are invoked via the methods entropy_decode
|
1992-12-09 19:00:00 -05:00
|
|
|
* and entropy_decode_init/term.
|
1991-10-06 20:00:00 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "jinclude.h"
|
|
|
|
|
1992-12-09 19:00:00 -05:00
|
|
|
#ifdef D_ARITH_CODING_SUPPORTED
|
1991-10-06 20:00:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The arithmetic coding option of the JPEG standard specifies Q-coding,
|
|
|
|
* which is covered by patents held by IBM (and possibly AT&T and Mitsubishi).
|
|
|
|
* At this time it does not appear to be legal for the Independent JPEG
|
|
|
|
* Group to distribute software that implements arithmetic coding.
|
|
|
|
* We have therefore removed arithmetic coding support from the
|
|
|
|
* distributed source code.
|
|
|
|
*
|
|
|
|
* We're not happy about it either.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The method selection routine for arithmetic entropy decoding.
|
|
|
|
*/
|
|
|
|
|
|
|
|
GLOBAL void
|
|
|
|
jseldarithmetic (decompress_info_ptr cinfo)
|
|
|
|
{
|
|
|
|
if (cinfo->arith_code) {
|
|
|
|
ERREXIT(cinfo->emethods, "Sorry, there are legal restrictions on arithmetic coding");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1992-12-09 19:00:00 -05:00
|
|
|
#endif /* D_ARITH_CODING_SUPPORTED */
|