1 /* Copyright (C) 1994, 1998, 1999 Aladdin Enterprises. All rights reserved.
2
3 This software is provided AS-IS with no warranty, either express or
4 implied.
5
6 This software is distributed under license and may not be copied,
7 modified or distributed except as expressly authorized under the terms
8 of the license contained in the file LICENSE in this distribution.
9
10 For more information about licensing, please refer to
11 http://www.ghostscript.com/licensing/. For information on
12 commercial licensing, go to http://www.artifex.com/licensing/ or
13 contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14 San Rafael, CA 94903, U.S.A., +1(415)492-9861.
15 */
16
17 /* $Id: sdctc.c,v 1.6 2004/08/19 19:33:09 stefan Exp $ */
18 /* Code common to DCT encoding and decoding streams */
19 #include "stdio_.h"
20 #include "jpeglib_.h"
21 #include "gsmemory.h"
22 #include "gsmalloc.h"
23 #include "strimpl.h"
24 #include "sdct.h"
25
26 public_st_DCT_state();
27
28 /* Set the defaults for the DCT filters. */
29 void
s_DCT_set_defaults(stream_state * st)30 s_DCT_set_defaults(stream_state * st)
31 {
32 stream_DCT_state *const ss = (stream_DCT_state *) st;
33
34 ss->jpeg_memory = (gs_memory_t *)gs_lib_ctx_get_non_gc_memory_t(); /* cast away const */
35 ss->data.common = 0;
36 /****************
37 ss->data.common->Picky = 0;
38 ss->data.common->Relax = 0;
39 ****************/
40 ss->ColorTransform = -1;
41 ss->QFactor = 1.0;
42 /* Clear pointers */
43 ss->Markers.data = 0;
44 ss->Markers.size = 0;
45 }
46