Commit 9552fa88 authored by ROOL's avatar ROOL 🤖

Update cjpeg and djpeg to later versions

Detail:
  Using the IJG8d code for these disc based utilities gains all of the more recent JPEG extensions including arithmetic coding, when ChangeFSI falls back to using djpeg if the SpriteExtend based decoder can't cope.
  Makefile and jconfig.h updated to build on RISC OS.
Admin:
  Submission for the JPEG bounty.

Version 1.57. Tagged as 'ChangeFSI-1_57'
parent 7d856590
/*
* jconfig.h
*
* Copyright (C) 1991, 1992, Thomas G. Lane.
* Copyright (C) 1991-1994, Thomas G. Lane.
* 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 preprocessor declarations that help customize
* the JPEG software for a particular application, machine, or compiler.
* Edit these declarations as needed (or add -D flags to the Makefile).
*/
/*
* These symbols indicate the properties of your machine or compiler.
* The conditional definitions given may do the right thing already,
* but you'd best look them over closely, especially if your compiler
* does not handle full ANSI C. An ANSI-compliant C compiler should
* provide all the necessary features; __STDC__ is supposed to be
* predefined by such compilers.
* #define the symbol if yes, #undef it if no.
*/
/*
* HAVE_STDC is tested below to see whether ANSI features are available.
* We avoid testing __STDC__ directly for arcane reasons of portability.
* (On some compilers, __STDC__ is only defined if a switch is given,
* but the switch also disables machine-specific features we need to get at.
* In that case, -DHAVE_STDC in the Makefile is a convenient solution.)
/* Does your compiler support function prototypes?
* (If not, you also need to use ansi2knr, see install.txt)
*/
#define HAVE_PROTOTYPES
#ifdef __STDC__ /* if compiler claims to be ANSI, believe it */
#define HAVE_STDC
#endif
/* Does your compiler support function prototypes? */
/* (If not, you also need to use ansi2knr, see SETUP) */
#ifdef HAVE_STDC /* ANSI C compilers always have prototypes */
#define PROTO
#else
#ifdef __cplusplus /* So do C++ compilers */
#define PROTO
#endif
#endif
/* Does your compiler support the declaration "unsigned char" ? */
/* How about "unsigned short" ? */
#ifdef HAVE_STDC /* ANSI C compilers must support both */
/* Does your compiler support the declaration "unsigned char" ?
* How about "unsigned short" ?
*/
#define HAVE_UNSIGNED_CHAR
#define HAVE_UNSIGNED_SHORT
#endif
/* Define this if an ordinary "char" type is unsigned.
* If you're not sure, leaving it undefined will work at some cost in speed.
* If you defined HAVE_UNSIGNED_CHAR then it doesn't matter very much.
/* Define "void" as "char" if your compiler doesn't know about type void.
* NOTE: be sure to define void such that "void *" represents the most general
* pointer type, e.g., that returned by malloc().
*/
/* #define void char */
/* #define CHAR_IS_UNSIGNED */
/* Define this if your compiler implements ">>" on signed values as a logical
* (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
* which is the normal and rational definition.
/* Define "const" as empty if your compiler doesn't know the "const" keyword.
*/
/* #define const */
/* #define RIGHT_SHIFT_IS_UNSIGNED */
/* Define this if an ordinary "char" type is unsigned.
* If you're not sure, leaving it undefined will work at some cost in speed.
* If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
*/
#undef CHAR_IS_UNSIGNED
/* Define "void" as "char" if your compiler doesn't know about type void.
* NOTE: be sure to define void such that "void *" represents the most general
* pointer type, e.g., that returned by malloc().
/* Define this if your system has an ANSI-conforming <stddef.h> file.
*/
#define HAVE_STDDEF_H
/* #define void char */
/* Define this if your system has an ANSI-conforming <stdlib.h> file.
*/
#define HAVE_STDLIB_H
/* Define const as empty if your compiler doesn't know the "const" keyword. */
/* (Even if it does, defining const as empty won't break anything.) */
/* Define this if your system does not have an ANSI/SysV <string.h>,
* but does have a BSD-style <strings.h>.
*/
#undef NEED_BSD_STRINGS
#ifndef HAVE_STDC /* ANSI C and C++ compilers should know it. */
#ifndef __cplusplus
#define const
#endif
#endif
/* Define this if your system does not provide typedef size_t in any of the
* ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in
* <sys/types.h> instead.
*/
#undef NEED_SYS_TYPES_H
/* For 80x86 machines, you need to define NEED_FAR_POINTERS,
* unless you are using a large-data memory model or 80386 flat-memory mode.
......@@ -88,132 +65,90 @@
* (Defining this symbol causes large data structures to be referenced through
* "far" pointers and to be allocated with a special version of malloc.)
*/
#undef NEED_FAR_POINTERS
#ifdef MSDOS
#define NEED_FAR_POINTERS
#endif
/* The next three symbols only affect the system-dependent user interface
* modules (jcmain.c, jdmain.c). You can ignore these if you are supplying
* your own user interface code.
/* Define this if your linker needs global names to be unique in less
* than the first 15 characters.
*/
#undef NEED_SHORT_EXTERNAL_NAMES
/* Define this if you want to name both input and output files on the command
* line, rather than using stdout and optionally stdin. You MUST do this if
* your system can't cope with binary I/O to stdin/stdout. See comments at
* head of jcmain.c or jdmain.c.
/* Although a real ANSI C compiler can deal perfectly well with pointers to
* unspecified structures (see "incomplete types" in the spec), a few pre-ANSI
* and pseudo-ANSI compilers get confused. To keep one of these bozos happy,
* define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you
* actually get "missing structure definition" warnings or errors while
* compiling the JPEG code.
*/
#undef INCOMPLETE_TYPES_BROKEN
#ifdef MSDOS /* two-file style is needed for PCs */
#ifndef USE_SETMODE /* unless you have setmode() */
#define TWO_FILE_COMMANDLINE
/* Define "boolean" as unsigned char, not int, on Windows systems.
*/
#ifdef _WIN32
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
#endif
#define TWO_FILE_COMMANDLINE
/* Define this if your system needs explicit cleanup of temporary files.
* This is crucial under MS-DOS, where the temporary "files" may be areas
* of extended memory; on most other systems it's not as important.
/*
* The following options affect code selection within the JPEG library,
* but they don't need to be visible to applications using the library.
* To minimize application namespace pollution, the symbols won't be
* defined unless JPEG_INTERNALS has been defined.
*/
#ifdef MSDOS
#define NEED_SIGNAL_CATCHER
#endif
#ifdef JPEG_INTERNALS
/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb").
* This is necessary on systems that distinguish text files from binary files,
* and is harmless on most systems that don't. If you have one of the rare
* systems that complains about the "b" spec, define this symbol.
/* Define this if your compiler implements ">>" on signed values as a logical
* (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
* which is the normal and rational definition.
*/
/* #define DONT_USE_B_MODE */
#undef RIGHT_SHIFT_IS_UNSIGNED
/* If you're getting bored, that's the end of the symbols you HAVE to
* worry about. Go fix the makefile and compile.
*/
#endif /* JPEG_INTERNALS */
/* If your compiler supports inline functions, define INLINE
* as the inline keyword; otherwise define it as empty.
/*
* The remaining options do not affect the JPEG library proper,
* but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).
* Other applications can ignore these.
*/
#ifdef __GNUC__ /* for instance, GNU C knows about inline */
#define INLINE __inline__
#endif
#ifndef INLINE /* default is to define it as empty */
#define INLINE
#endif
#ifdef JPEG_CJPEG_DJPEG
/* On a few systems, type boolean and/or macros FALSE, TRUE may appear
* in standard header files. Or you may have conflicts with application-
* specific header files that you want to include together with these files.
* In that case you need only comment out these definitions.
*/
/* These defines indicate which image (non-JPEG) file formats are allowed. */
typedef int boolean;
#undef FALSE /* in case these macros already exist */
#undef TRUE
#define FALSE 0 /* values of boolean */
#define TRUE 1
#define BMP_SUPPORTED /* BMP image file format */
#undef GIF_SUPPORTED /* GIF image file format */
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
#undef RLE_SUPPORTED /* Utah RLE image file format */
#define TARGA_SUPPORTED /* Targa image file format */
/* This defines the size of the I/O buffers for entropy compression
* and decompression; you could reduce it if memory is tight.
/* Define this if you want to name both input and output files on the command
* line, rather than using stdout and optionally stdin. You MUST do this if
* your system can't cope with binary I/O to stdin/stdout. See comments at
* head of cjpeg.c or djpeg.c.
*/
#define TWO_FILE_COMMANDLINE
#define JPEG_BUF_SIZE 4096 /* bytes */
/* Define this if your system needs explicit cleanup of temporary files.
* This is crucial under MS-DOS, where the temporary "files" may be areas
* of extended memory; on most other systems it's not as important.
*/
#undef NEED_SIGNAL_CATCHER
/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb").
* This is necessary on systems that distinguish text files from binary files,
* and is harmless on most systems that don't. If you have one of the rare
* systems that complains about the "b" spec, define this symbol.
*/
#undef DONT_USE_B_MODE
/* These symbols determine the JPEG functionality supported. */
/* Define this if you want percent-done progress reports from cjpeg/djpeg.
*/
#undef PROGRESS_REPORT
/*
* These defines indicate whether to include various optional functions.
* Undefining some of these symbols will produce a smaller but less capable
* program file. Note that you can leave certain source files out of the
* compilation/linking process if you've #undef'd the corresponding symbols.
* (You may HAVE to do that if your compiler doesn't like null source files.)
*/
/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */
/* Encoder capability options: */
#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#undef C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? (NYI) */
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
/* Decoder capability options: */
#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing during decoding? */
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
/* these defines indicate which JPEG file formats are allowed */
#define JFIF_SUPPORTED /* JFIF or "raw JPEG" files */
#undef JTIFF_SUPPORTED /* JPEG-in-TIFF (not yet implemented) */
/* these defines indicate which image (non-JPEG) file formats are allowed */
#define GIF_SUPPORTED /* GIF image file format */
/* #define RLE_SUPPORTED */ /* RLE image file format (by default, no) */
#define PPM_SUPPORTED /* PPM/PGM image file format */
#define TARGA_SUPPORTED /* Targa image file format */
#undef TIFF_SUPPORTED /* TIFF image file format (not yet impl.) */
/*extern char sprite_name_store[256],*sprite_filename;*/
#define BMP_SUPPORTED /* BMP image file format */
/* more capability options later, no doubt */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
#define HAVE_UNSIGNED_SHORT
#define CHAR_IS_UNSIGNED
#define HAVE_STDDEF_H
#define HAVE_STDLIB_H
#undef NEED_BSD_STRINGS
#undef NEED_SYS_TYPES_H
#undef NEED_FAR_POINTERS
#undef NEED_SHORT_EXTERNAL_NAMES
#undef INCOMPLETE_TYPES_BROKEN
#ifdef JPEG_INTERNALS
#undef RIGHT_SHIFT_IS_UNSIGNED
#endif /* JPEG_INTERNALS */
#undef DONT_USE_B_MODE
#endif /* JPEG_CJPEG_DJPEG */
......@@ -14,22 +14,6 @@
#
# Makefile for ChangeFSI
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 30-Sep-94 AMcC Made suitable for Black build (incorporates JPEG directory)
# 29-Oct-94 AMcC Use crunch.ChangeFSI to do the crunching (bascrunch was unreliable)
# 02-Nov-94 MS Add JPEGprint
# 18-Jan-95 GPS Changed to use IJG release 5 software.
# 01-Mar-95 GPS Changed to include new documentation.
# 23-Jun-99 JRF Changed to use IJG release 6 software.
# 03-Nov-02 RPS Messages generated by awk script from VersionNum file
# 11-Nov-02 RPS Adds hpcdtoppm generated from source
# 09-Jan-03 RPS Adds btpc generated from source
# 17-Oct-08 JDL Use shared awk script for version number copying
#
#
# Program specific options:
......@@ -40,7 +24,7 @@ DDIR = DataFiles
LDIR = ${LOCALE}
SDIR = source
CFSIDIR = ${INSTDIR}.${APP}
VPATH = @ JPEG6b hpcdtoppm btpc
VPATH = @ JPEG hpcdtoppm btpc
MSGS = ${DDIR}.Messages
include StdTools
......@@ -101,18 +85,18 @@ FILES =\
# object files common to cjpeg and djpeg
COMOBJS =\
cdjpeg.o\
jaricom.o\
jcomapi.o\
jutils.o\
jerror.o\
jmemmgr.o\
jmemnobs.o\
jcomapi.o
jmemnobs.o
# compression objects
CLIBOBJS =\
jcapimin.o\
jcapistd.o\
jcinit.o\
jcphuff.o\
jcparam.o\
jdatadst.o\
jcmaster.o\
......@@ -124,6 +108,7 @@ CLIBOBJS =\
jcsample.o\
jchuff.o\
jcdctmgr.o\
jcarith.o\
jfdctfst.o\
jfdctflt.o\
jfdctint.o\
......@@ -140,7 +125,6 @@ DLIBOBJS =\
jdapimin.o\
jdapistd.o\
jdinput.o\
jdphuff.o\
jdatasrc.o\
jdmaster.o\
jdmarker.o\
......@@ -151,8 +135,8 @@ DLIBOBJS =\
jidctfst.o\
jidctflt.o\
jidctint.o\
jidctred.o \
jdhuff.o\
jdarith.o\
jdsample.o\
jdcolor.o\
jquant1.o\
......
/* (1.56)
/* (1.57)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.56
#define Module_MajorVersion_CMHG 1.57
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Oct 2015
#define Module_Date_CMHG 06 Feb 2016
#define Module_MajorVersion "1.56"
#define Module_Version 156
#define Module_MajorVersion "1.57"
#define Module_Version 157
#define Module_MinorVersion ""
#define Module_Date "06 Oct 2015"
#define Module_Date "06 Feb 2016"
#define Module_ApplicationDate "06-Oct-15"
#define Module_ApplicationDate "06-Feb-16"
#define Module_ComponentName "ChangeFSI"
#define Module_ComponentPath "mixed/RiscOS/Sources/Apps/ChangeFSI"
#define Module_FullVersion "1.56"
#define Module_HelpVersion "1.56 (06 Oct 2015)"
#define Module_LibraryVersionInfo "1:56"
#define Module_FullVersion "1.57"
#define Module_HelpVersion "1.57 (06 Feb 2016)"
#define Module_LibraryVersionInfo "1:57"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment