sdctc.c 1.4 KB

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