1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution.
For more information about licensing, please refer to
http://www.ghostscript.com/licensing/. For information on
commercial licensing, go to http://www.artifex.com/licensing/ or
contact Artifex Software, Inc., 101 Lucas Valley Road #110,
San Rafael, CA 94903, U.S.A., +1(415)492-9861.
*/
/* $Id$ */
/* DCTDecode filter parameter setting and reading */
#include "std.h"
#include "jpeglib_.h"
#include "gserror.h"
#include "gserrors.h"
#include "gstypes.h"
#include "gsmemory.h"
#include "gsparam.h"
#include "strimpl.h" /* sdct.h requires this */
#include "sdct.h"
#include "sdcparam.h"
#include "sjpeg.h"
/* ================ Get parameters ================ */
stream_state_proc_get_params(s_DCTD_get_params, stream_DCT_state); /* check */
int
s_DCTD_get_params(gs_param_list * plist, const stream_DCT_state * ss, bool all)
{
stream_DCT_state dcts_defaults;
const stream_DCT_state *defaults;
if (all)
defaults = 0;
else {
(*s_DCTE_template.set_defaults) ((stream_state *) & dcts_defaults);
defaults = &dcts_defaults;
}
/****** NYI ******/
return s_DCT_get_params(plist, ss, defaults);
}
/* ================ Put parameters ================ */
stream_state_proc_put_params(s_DCTD_put_params, stream_DCT_state); /* check */
int
s_DCTD_put_params(gs_param_list * plist, stream_DCT_state * pdct)
{
int code;
if ((code = s_DCT_put_params(plist, pdct)) < 0 ||
/*
* DCTDecode accepts quantization and huffman tables
* in case these tables have been omitted from the datastream.
*/
(code = s_DCT_put_huffman_tables(plist, pdct, false)) < 0 ||
(code = s_DCT_put_quantization_tables(plist, pdct, false)) < 0
)
DO_NOTHING;
return code;
}
|