]> git.ipfire.org Git - thirdparty/cups.git/blame - pstoraster/sddparam.c
Copyright update...
[thirdparty/cups.git] / pstoraster / sddparam.c
CommitLineData
c153bcda 1/*
efb2f309 2 Copyright 1993-2002 by Easy Software Products.
c153bcda 3 Copyright 1998 Aladdin Enterprises. All rights reserved.
caddbb58 4
5 This file is part of GNU Ghostscript.
6
7 GNU Ghostscript is distributed in the hope that it will be useful, but
8 WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
9 to anyone for the consequences of using it or for whether it serves any
10 particular purpose or works at all, unless he says so in writing. Refer
11 to the GNU General Public License for full details.
12
13 Everyone is granted permission to copy, modify and redistribute GNU
14 Ghostscript, but only under the conditions described in the GNU General
15 Public License. A copy of this license is supposed to have been given
16 to you along with GNU Ghostscript so you can know your rights and
17 responsibilities. It should be in a file named COPYING. Among other
18 things, the copyright notice and this notice must be preserved on all
19 copies.
20
21 Aladdin Enterprises supports the work of the GNU Project, but is not
22 affiliated with the Free Software Foundation or the GNU Project. GNU
23 Ghostscript, as distributed by Aladdin Enterprises, does not require any
24 GNU software to build or run it.
25*/
26
c153bcda 27#include <config.h>
28#ifdef HAVE_LIBJPEG
efb2f309 29/*$Id: sddparam.c,v 1.4 2002/01/02 17:59:12 mike Exp $ */
caddbb58 30/* DCTDecode filter parameter setting and reading */
31#include "std.h"
32#include "jpeglib.h"
33#include "gserror.h"
34#include "gserrors.h"
35#include "gstypes.h"
36#include "gsmemory.h"
37#include "gsparam.h"
38#include "strimpl.h" /* sdct.h requires this */
39#include "sdct.h"
40#include "sdcparam.h"
41#include "sjpeg.h"
42
43/* ================ Get parameters ================ */
44
45stream_state_proc_get_params(s_DCTD_get_params, stream_DCT_state); /* check */
46
47int
48s_DCTD_get_params(gs_param_list * plist, const stream_DCT_state * ss, bool all)
49{
50 stream_DCT_state dcts_defaults;
51 const stream_DCT_state *defaults;
52
53 if (all)
54 defaults = 0;
55 else {
56 (*s_DCTE_template.set_defaults) ((stream_state *) & dcts_defaults);
57 defaults = &dcts_defaults;
58 }
59/****** NYI ******/
60 return s_DCT_get_params(plist, ss, defaults);
61}
62
63/* ================ Put parameters ================ */
64
65stream_state_proc_put_params(s_DCTD_put_params, stream_DCT_state); /* check */
66
67int
68s_DCTD_put_params(gs_param_list * plist, stream_DCT_state * pdct)
69{
70 int code;
71
72 if ((code = s_DCT_put_params(plist, pdct)) < 0 ||
73 /*
74 * DCTDecode accepts quantization and huffman tables
75 * in case these tables have been omitted from the datastream.
76 */
77 (code = s_DCT_put_huffman_tables(plist, pdct, false)) < 0 ||
78 (code = s_DCT_put_quantization_tables(plist, pdct, false)) < 0
79 )
80 DO_NOTHING;
81 return code;
82}
c153bcda 83#endif /* HAVE_LIBJPEG */