aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cdjpeg.h72
-rw-r--r--coderules.txt53
-rw-r--r--configure.ac3
-rw-r--r--jcapimin.c2
-rw-r--r--jccoefct.c6
-rw-r--r--jcdctmgr.c31
-rw-r--r--jchuff.c11
-rw-r--r--jchuff.h6
-rw-r--r--jcmainct.c8
-rw-r--r--jconfig.h.in3
-rw-r--r--jconfig.txt5
-rw-r--r--jcphuff.c20
-rw-r--r--jcsample.c7
-rw-r--r--jctrans.c4
-rw-r--r--jdapistd.c2
-rw-r--r--jdatadst-tj.c4
-rw-r--r--jdatadst.c4
-rw-r--r--jdcoefct.c8
-rw-r--r--jdct.h78
-rw-r--r--jdhuff.h12
-rw-r--r--jdinput.c2
-rw-r--r--jdmainct.c12
-rw-r--r--jdmerge.c5
-rw-r--r--jdphuff.c16
-rw-r--r--jdpostct.c27
-rw-r--r--jdsample.c7
-rw-r--r--jdtrans.c2
-rw-r--r--jmemmgr.c2
-rw-r--r--jmemnobs.c4
-rw-r--r--jmemsys.h47
-rw-r--r--jmorecfg.h20
-rw-r--r--jpegint.h262
-rw-r--r--jpeglib.h271
-rw-r--r--jsimd.h85
-rw-r--r--jsimddct.h119
-rw-r--r--rdtarga.c5
-rw-r--r--simd/jsimd.h1156
-rw-r--r--transupp.h25
-rw-r--r--turbojpeg.c4
-rw-r--r--win/jconfig.h.in1
-rw-r--r--wrbmp.c4
-rw-r--r--wrrle.c4
42 files changed, 1082 insertions, 1337 deletions
diff --git a/cdjpeg.h b/cdjpeg.h
index 6eec62f..400cb69 100644
--- a/cdjpeg.h
+++ b/cdjpeg.h
@@ -24,12 +24,9 @@
typedef struct cjpeg_source_struct * cjpeg_source_ptr;
struct cjpeg_source_struct {
- JMETHOD(void, start_input, (j_compress_ptr cinfo,
- cjpeg_source_ptr sinfo));
- JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
- cjpeg_source_ptr sinfo));
- JMETHOD(void, finish_input, (j_compress_ptr cinfo,
- cjpeg_source_ptr sinfo));
+ void (*start_input) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
+ JDIMENSION (*get_pixel_rows) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
+ void (*finish_input) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
FILE *input_file;
@@ -48,15 +45,12 @@ struct djpeg_dest_struct {
/* start_output is called after jpeg_start_decompress finishes.
* The color map will be ready at this time, if one is needed.
*/
- JMETHOD(void, start_output, (j_decompress_ptr cinfo,
- djpeg_dest_ptr dinfo));
+ void (*start_output) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo);
/* Emit the specified number of pixel rows from the buffer. */
- JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
- djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied));
+ void (*put_pixel_rows) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
+ JDIMENSION rows_supplied);
/* Finish up at the end of the image. */
- JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
- djpeg_dest_ptr dinfo));
+ void (*finish_output) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo);
/* Target file spec; filled in by djpeg.c after object is created. */
FILE * output_file;
@@ -91,41 +85,41 @@ typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
/* Module selection routines for I/O modules. */
-EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
- boolean is_os2));
-EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
+EXTERN(cjpeg_source_ptr) jinit_read_bmp (j_compress_ptr cinfo);
+EXTERN(djpeg_dest_ptr) jinit_write_bmp (j_decompress_ptr cinfo,
+ boolean is_os2);
+EXTERN(cjpeg_source_ptr) jinit_read_gif (j_compress_ptr cinfo);
+EXTERN(djpeg_dest_ptr) jinit_write_gif (j_decompress_ptr cinfo);
+EXTERN(cjpeg_source_ptr) jinit_read_ppm (j_compress_ptr cinfo);
+EXTERN(djpeg_dest_ptr) jinit_write_ppm (j_decompress_ptr cinfo);
+EXTERN(cjpeg_source_ptr) jinit_read_rle (j_compress_ptr cinfo);
+EXTERN(djpeg_dest_ptr) jinit_write_rle (j_decompress_ptr cinfo);
+EXTERN(cjpeg_source_ptr) jinit_read_targa (j_compress_ptr cinfo);
+EXTERN(djpeg_dest_ptr) jinit_write_targa (j_decompress_ptr cinfo);
/* cjpeg support routines (in rdswitch.c) */
-EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
- boolean force_baseline));
-EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
-EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg,
- boolean force_baseline));
-EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
-EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
+EXTERN(boolean) read_quant_tables (j_compress_ptr cinfo, char * filename,
+ boolean force_baseline);
+EXTERN(boolean) read_scan_script (j_compress_ptr cinfo, char * filename);
+EXTERN(boolean) set_quality_ratings (j_compress_ptr cinfo, char *arg,
+ boolean force_baseline);
+EXTERN(boolean) set_quant_slots (j_compress_ptr cinfo, char *arg);
+EXTERN(boolean) set_sample_factors (j_compress_ptr cinfo, char *arg);
/* djpeg support routines (in rdcolmap.c) */
-EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
+EXTERN(void) read_color_map (j_decompress_ptr cinfo, FILE * infile);
/* common support routines (in cdjpeg.c) */
-EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
-EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
- cd_progress_ptr progress));
-EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
-EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
-EXTERN(FILE *) read_stdin JPP((void));
-EXTERN(FILE *) write_stdout JPP((void));
+EXTERN(void) enable_signal_catcher (j_common_ptr cinfo);
+EXTERN(void) start_progress_monitor (j_common_ptr cinfo,
+ cd_progress_ptr progress);
+EXTERN(void) end_progress_monitor (j_common_ptr cinfo);
+EXTERN(boolean) keymatch (char * arg, const char * keyword, int minchars);
+EXTERN(FILE *) read_stdin (void);
+EXTERN(FILE *) write_stdout (void);
/* miscellaneous useful macros */
diff --git a/coderules.txt b/coderules.txt
index 6ee7f5e..f36d5f8 100644
--- a/coderules.txt
+++ b/coderules.txt
@@ -1,7 +1,11 @@
+
+
IJG JPEG LIBRARY: CODING RULES
Copyright (C) 1991-1996, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
+This file was part of the Independent JPEG Group's software.
+It was modified by The libjpeg-turbo Project to include only information
+relevant to libjpeg-turbo.
For conditions of distribution and use, see the accompanying README file.
@@ -32,22 +36,7 @@ handled automatically by GNU Emacs and many other text editors.)
Multi-word names should be written in lower case with underscores, e.g.,
multi_word_name (not multiWordName). Preprocessor symbols and enum constants
are similar but upper case (MULTI_WORD_NAME). Names should be unique within
-the first fifteen characters. (On some older systems, global names must be
-unique within six characters. We accommodate this without cluttering the
-source code by using macros to substitute shorter names.)
-
-We use function prototypes everywhere; we rely on automatic source code
-transformation to feed prototype-less C compilers. Transformation is done
-by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
-ansi2knr is not very bright, so it imposes a format requirement on function
-declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
-should be written in the following style:
-
-LOCAL(int *)
-function_name (int a, char *b)
-{
- code...
-}
+the first fifteen characters.
Note that each function definition must begin with GLOBAL(type), LOCAL(type),
or METHODDEF(type). These macros expand to "static type" or just "type" as
@@ -55,27 +44,8 @@ appropriate. They provide a readable indication of the routine's usage and
can readily be changed for special needs. (For instance, special linkage
keywords can be inserted for use in Windows DLLs.)
-ansi2knr does not transform method declarations (function pointers in
-structs). We handle these with a macro JMETHOD, defined as
- #ifdef HAVE_PROTOTYPES
- #define JMETHOD(type,methodname,arglist) type (*methodname) arglist
- #else
- #define JMETHOD(type,methodname,arglist) type (*methodname) ()
- #endif
-which is used like this:
- struct function_pointers {
- JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
- JMETHOD(void, term_entropy_encoder, (void));
- };
-Note the set of parentheses surrounding the parameter list.
-
-A similar solution is used for forward and external function declarations
-(see the EXTERN and JPP macros).
-
-If the code is to work on non-ANSI compilers, we cannot rely on a prototype
-declaration to coerce actual parameters into the right types. Therefore, use
-explicit casts on actual parameters whenever the actual parameter type is not
-identical to the formal parameter. Beware of implicit conversions to "int".
+A similar solution is used for external function declarations (see the EXTERN
+macro.)
It seems there are some non-ANSI compilers in which the sizeof() operator
is defined to return int, yet size_t is defined as long. Needless to say,
@@ -105,10 +75,9 @@ the system architecture document, structure.txt).
5. Source file names should begin with "j" for files that are part of the
library proper; source files that are not part of the library, such as cjpeg.c
-and djpeg.c, do not begin with "j". Keep source file names to eight
-characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
-compression and decompression code in separate source files --- some
-applications may want only one half of the library.
+and djpeg.c, do not begin with "j". Keep compression and decompression code in
+separate source files --- some applications may want only one half of the
+library.
Note: these rules (particularly #4) are not followed religiously in the
modules that are used in cjpeg/djpeg but are not part of the JPEG library
diff --git a/configure.ac b/configure.ac
index 12724f7..53f7e30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,9 +8,6 @@ BUILD=`date +%Y%m%d`
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
AC_PREFIX_DEFAULT(/opt/libjpeg-turbo)
-# Always build with prototypes
-AC_DEFINE([HAVE_PROTOTYPES], 1, [Define if your compiler supports prototypes])
-
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Checks for programs.
diff --git a/jcapimin.c b/jcapimin.c
index 601bb71..cbd9bd2 100644
--- a/jcapimin.c
+++ b/jcapimin.c
@@ -204,7 +204,7 @@ GLOBAL(void)
jpeg_write_marker (j_compress_ptr cinfo, int marker,
const JOCTET *dataptr, unsigned int datalen)
{
- JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));
+ void (*write_marker_byte) (j_compress_ptr info, int val);
if (cinfo->next_scanline != 0 ||
(cinfo->global_state != CSTATE_SCANNING &&
diff --git a/jccoefct.c b/jccoefct.c
index ffc9b7e..faca94e 100644
--- a/jccoefct.c
+++ b/jccoefct.c
@@ -59,12 +59,12 @@ typedef my_coef_controller * my_coef_ptr;
/* Forward declarations */
METHODDEF(boolean) compress_data
- JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
+ (j_compress_ptr cinfo, JSAMPIMAGE input_buf);
#ifdef FULL_COEF_BUFFER_SUPPORTED
METHODDEF(boolean) compress_first_pass
- JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
+ (j_compress_ptr cinfo, JSAMPIMAGE input_buf);
METHODDEF(boolean) compress_output
- JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
+ (j_compress_ptr cinfo, JSAMPIMAGE input_buf);
#endif
diff --git a/jcdctmgr.c b/jcdctmgr.c
index bf40ff7..3066d52 100644
--- a/jcdctmgr.c
+++ b/jcdctmgr.c
@@ -24,22 +24,21 @@
/* Private subobject for this module */
-typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));
-typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));
-
-typedef JMETHOD(void, convsamp_method_ptr,
- (JSAMPARRAY sample_data, JDIMENSION start_col,
- DCTELEM * workspace));
-typedef JMETHOD(void, float_convsamp_method_ptr,
- (JSAMPARRAY sample_data, JDIMENSION start_col,
- FAST_FLOAT *workspace));
-
-typedef JMETHOD(void, quantize_method_ptr,
- (JCOEFPTR coef_block, DCTELEM * divisors,
- DCTELEM * workspace));
-typedef JMETHOD(void, float_quantize_method_ptr,
- (JCOEFPTR coef_block, FAST_FLOAT * divisors,
- FAST_FLOAT * workspace));
+typedef void (*forward_DCT_method_ptr) (DCTELEM * data);
+typedef void (*float_DCT_method_ptr) (FAST_FLOAT * data);
+
+typedef void (*convsamp_method_ptr) (JSAMPARRAY sample_data,
+ JDIMENSION start_col,
+ DCTELEM * workspace);
+typedef void (*float_convsamp_method_ptr) (JSAMPARRAY sample_data,
+ JDIMENSION start_col,
+ FAST_FLOAT *workspace);
+
+typedef void (*quantize_method_ptr) (JCOEFPTR coef_block, DCTELEM * divisors,
+ DCTELEM * workspace);
+typedef void (*float_quantize_method_ptr) (JCOEFPTR coef_block,
+ FAST_FLOAT * divisors,
+ FAST_FLOAT * workspace);
METHODDEF(void) quantize (JCOEFPTR, DCTELEM *, DCTELEM *);
diff --git a/jchuff.c b/jchuff.c
index b205cf9..e316f73 100644
--- a/jchuff.c
+++ b/jchuff.c
@@ -123,13 +123,12 @@ typedef struct {
/* Forward declarations */
-METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));
+METHODDEF(boolean) encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data);
+METHODDEF(void) finish_pass_huff (j_compress_ptr cinfo);
#ifdef ENTROPY_OPT_SUPPORTED
-METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
+METHODDEF(boolean) encode_mcu_gather (j_compress_ptr cinfo,
+ JBLOCKROW *MCU_data);
+METHODDEF(void) finish_pass_gather (j_compress_ptr cinfo);
#endif
diff --git a/jchuff.h b/jchuff.h
index c419923..c247e6f 100644
--- a/jchuff.h
+++ b/jchuff.h
@@ -32,9 +32,9 @@ typedef struct {
/* Expand a Huffman table definition into the derived format */
EXTERN(void) jpeg_make_c_derived_tbl
- JPP((j_compress_ptr cinfo, boolean isDC, int tblno,
- c_derived_tbl ** pdtbl));
+ (j_compress_ptr cinfo, boolean isDC, int tblno,
+ c_derived_tbl ** pdtbl);
/* Generate an optimal table definition given the specified counts */
EXTERN(void) jpeg_gen_optimal_table
- JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]));
+ (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]);
diff --git a/jcmainct.c b/jcmainct.c
index 5a0549a..62f13c9 100644
--- a/jcmainct.c
+++ b/jcmainct.c
@@ -52,12 +52,12 @@ typedef my_main_controller * my_main_ptr;
/* Forward declarations */
METHODDEF(void) process_data_simple_main
- JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
- JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
+ (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+ JDIMENSION in_rows_avail);
#ifdef FULL_MAIN_BUFFER_SUPPORTED
METHODDEF(void) process_data_buffer_main
- JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
- JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
+ (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
+ JDIMENSION in_rows_avail);
#endif
diff --git a/jconfig.h.in b/jconfig.h.in
index 73a523d..cdca01f 100644
--- a/jconfig.h.in
+++ b/jconfig.h.in
@@ -15,9 +15,6 @@
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
-/* Define if your compiler supports prototypes */
-#undef HAVE_PROTOTYPES
-
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
diff --git a/jconfig.txt b/jconfig.txt
index 631c7a0..bf89a83 100644
--- a/jconfig.txt
+++ b/jconfig.txt
@@ -23,11 +23,6 @@
* #define the symbol if yes, #undef it if no.
*/
-/* Does your compiler support function prototypes?
- * (If not, you also need to use ansi2knr, see install.txt)
- */
-#define HAVE_PROTOTYPES
-
/* Does your compiler support the declaration "unsigned char" ?
* How about "unsigned short" ?
*/
diff --git a/jcphuff.c b/jcphuff.c
index b764b65..a95e94c 100644
--- a/jcphuff.c
+++ b/jcphuff.c
@@ -86,16 +86,16 @@ typedef phuff_entropy_encoder * phuff_entropy_ptr;
#endif
/* Forward declarations */
-METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo));
-METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
+METHODDEF(boolean) encode_mcu_DC_first (j_compress_ptr cinfo,
+ JBLOCKROW *MCU_data);
+METHODDEF(boolean) encode_mcu_AC_first (j_compress_ptr cinfo,
+ JBLOCKROW *MCU_data);
+METHODDEF(boolean) encode_mcu_DC_refine (j_compress_ptr cinfo,
+ JBLOCKROW *MCU_data);
+METHODDEF(boolean) encode_mcu_AC_refine (j_compress_ptr cinfo,
+ JBLOCKROW *MCU_data);
+METHODDEF(void) finish_pass_phuff (j_compress_ptr cinfo);
+METHODDEF(void) finish_pass_gather_phuff (j_compress_ptr cinfo);
/*
diff --git a/jcsample.c b/jcsample.c
index e1b45e7..4bc2b23 100644
--- a/jcsample.c
+++ b/jcsample.c
@@ -53,9 +53,10 @@
/* Pointer to routine to downsample a single component */
-typedef JMETHOD(void, downsample1_ptr,
- (j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+typedef void (*downsample1_ptr) (j_compress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JSAMPARRAY input_data,
+ JSAMPARRAY output_data);
/* Private subobject */
diff --git a/jctrans.c b/jctrans.c
index c353293..62d4396 100644
--- a/jctrans.c
+++ b/jctrans.c
@@ -18,9 +18,9 @@
/* Forward declarations */
LOCAL(void) transencode_master_selection
- JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
+ (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays);
LOCAL(void) transencode_coef_controller
- JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
+ (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays);
/*
diff --git a/jdapistd.c b/jdapistd.c
index f4ac50d..3be527c 100644
--- a/jdapistd.c
+++ b/jdapistd.c
@@ -23,7 +23,7 @@
/* Forward declarations */
-LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
+LOCAL(boolean) output_pass_setup (j_decompress_ptr cinfo);
/*
diff --git a/jdatadst-tj.c b/jdatadst-tj.c
index 95d9823..786a752 100644
--- a/jdatadst-tj.c
+++ b/jdatadst-tj.c
@@ -23,8 +23,8 @@
#include "jerror.h"
#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
+extern void * malloc (size_t size);
+extern void free (void *ptr);
#endif
diff --git a/jdatadst.c b/jdatadst.c
index 3fbc449..436e663 100644
--- a/jdatadst.c
+++ b/jdatadst.c
@@ -23,8 +23,8 @@
#include "jerror.h"
#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
+extern void * malloc (size_t size);
+extern void free (void *ptr);
#endif
diff --git a/jdcoefct.c b/jdcoefct.c
index 1d18a74..775bcdf 100644
--- a/jdcoefct.c
+++ b/jdcoefct.c
@@ -69,15 +69,15 @@ typedef my_coef_controller * my_coef_ptr;
/* Forward declarations */
METHODDEF(int) decompress_onepass
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
+ (j_decompress_ptr cinfo, JSAMPIMAGE output_buf);
#ifdef D_MULTISCAN_FILES_SUPPORTED
METHODDEF(int) decompress_data
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
+ (j_decompress_ptr cinfo, JSAMPIMAGE output_buf);
#endif
#ifdef BLOCK_SMOOTHING_SUPPORTED
-LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
+LOCAL(boolean) smoothing_ok (j_decompress_ptr cinfo);
METHODDEF(int) decompress_smooth_data
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
+ (j_decompress_ptr cinfo, JSAMPIMAGE output_buf);
#endif
diff --git a/jdct.h b/jdct.h
index b8d6e9c..0c70c5b 100644
--- a/jdct.h
+++ b/jdct.h
@@ -88,64 +88,64 @@ typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
/* Extern declarations for the forward and inverse DCT routines. */
-EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data));
+EXTERN(void) jpeg_fdct_islow (DCTELEM * data);
+EXTERN(void) jpeg_fdct_ifast (DCTELEM * data);
+EXTERN(void) jpeg_fdct_float (FAST_FLOAT * data);
EXTERN(void) jpeg_idct_islow
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_ifast
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_float
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_7x7
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_6x6
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_5x5
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_4x4
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_3x3
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_2x2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_1x1
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_9x9
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_10x10
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_11x11
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_12x12
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_13x13
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_14x14
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_15x15
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
EXTERN(void) jpeg_idct_16x16
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col);
/*
diff --git a/jdhuff.h b/jdhuff.h
index 18fdcb8..788f36d 100644
--- a/jdhuff.h
+++ b/jdhuff.h
@@ -45,8 +45,8 @@ typedef struct {
/* Expand a Huffman table definition into the derived format */
EXTERN(void) jpeg_make_d_derived_tbl
- JPP((j_decompress_ptr cinfo, boolean isDC, int tblno,
- d_derived_tbl ** pdtbl));
+ (j_decompress_ptr cinfo, boolean isDC, int tblno,
+ d_derived_tbl ** pdtbl);
/*
@@ -159,8 +159,8 @@ typedef struct { /* Bitreading working state within an MCU */
/* Load up the bit buffer to a depth of at least nbits */
EXTERN(boolean) jpeg_fill_bit_buffer
- JPP((bitread_working_state * state, register bit_buf_type get_buffer,
- register int bits_left, int nbits));
+ (bitread_working_state * state, register bit_buf_type get_buffer,
+ register int bits_left, int nbits);
/*
@@ -223,5 +223,5 @@ slowlabel: \
/* Out-of-line case for Huffman code fetching */
EXTERN(int) jpeg_huff_decode
- JPP((bitread_working_state * state, register bit_buf_type get_buffer,
- register int bits_left, d_derived_tbl * htbl, int min_bits));
+ (bitread_working_state * state, register bit_buf_type get_buffer,
+ register int bits_left, d_derived_tbl * htbl, int min_bits);
diff --git a/jdinput.c b/jdinput.c
index 4afb074..e3df0c1 100644
--- a/jdinput.c
+++ b/jdinput.c
@@ -31,7 +31,7 @@ typedef my_input_controller * my_inputctl_ptr;
/* Forward declarations */
-METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo));
+METHODDEF(int) consume_markers (j_decompress_ptr cinfo);
/*
diff --git a/jdmainct.c b/jdmainct.c
index 922f649..b4d4a22 100644
--- a/jdmainct.c
+++ b/jdmainct.c
@@ -144,15 +144,15 @@ typedef my_main_controller * my_main_ptr;
/* Forward declarations */
METHODDEF(void) process_data_simple_main
- JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
- JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
+ (j_decompress_ptr cinfo, JSAMPARRAY output_buf,
+ JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail);
METHODDEF(void) process_data_context_main
- JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
- JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
+ (j_decompress_ptr cinfo, JSAMPARRAY output_buf,
+ JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail);
#ifdef QUANT_2PASS_SUPPORTED
METHODDEF(void) process_data_crank_post
- JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
- JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
+ (j_decompress_ptr cinfo, JSAMPARRAY output_buf,
+ JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail);
#endif
diff --git a/jdmerge.c b/jdmerge.c
index b82fe47..60d0f5c 100644
--- a/jdmerge.c
+++ b/jdmerge.c
@@ -83,9 +83,8 @@ typedef struct {
struct jpeg_upsampler pub; /* public fields */
/* Pointer to routine to do actual upsampling/conversion of one row group */
- JMETHOD(void, upmethod, (j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
- JSAMPARRAY output_buf));
+ void (*upmethod) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
/* Private state for YCC->RGB conversion */
int * Cr_r_tab; /* => table for Cr to R conversion */
diff --git a/jdphuff.c b/jdphuff.c
index 783d8a8..cd8f0b2 100644
--- a/jdphuff.c
+++ b/jdphuff.c
@@ -74,14 +74,14 @@ typedef struct {
typedef phuff_entropy_decoder * phuff_entropy_ptr;
/* Forward declarations */
-METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
-METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
+METHODDEF(boolean) decode_mcu_DC_first (j_decompress_ptr cinfo,
+ JBLOCKROW *MCU_data);
+METHODDEF(boolean) decode_mcu_AC_first (j_decompress_ptr cinfo,
+ JBLOCKROW *MCU_data);
+METHODDEF(boolean) decode_mcu_DC_refine (j_decompress_ptr cinfo,
+ JBLOCKROW *MCU_data);
+METHODDEF(boolean) decode_mcu_AC_refine (j_decompress_ptr cinfo,
+ JBLOCKROW *MCU_data);
/*
diff --git a/jdpostct.c b/jdpostct.c
index aa2af07..2e8f28c 100644
--- a/jdpostct.c
+++ b/jdpostct.c
@@ -44,24 +44,21 @@ typedef my_post_controller * my_post_ptr;
/* Forward declarations */
METHODDEF(void) post_process_1pass
- JPP((j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
- JDIMENSION in_row_groups_avail,
- JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
- JDIMENSION out_rows_avail));
+ (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail,
+ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+ JDIMENSION out_rows_avail);
#ifdef QUANT_2PASS_SUPPORTED
METHODDEF(void) post_process_prepass
- JPP((j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
- JDIMENSION in_row_groups_avail,
- JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
- JDIMENSION out_rows_avail));
+ (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail,
+ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+ JDIMENSION out_rows_avail);
METHODDEF(void) post_process_2pass
- JPP((j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
- JDIMENSION in_row_groups_avail,
- JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
- JDIMENSION out_rows_avail));
+ (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail,
+ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+ JDIMENSION out_rows_avail);
#endif
diff --git a/jdsample.c b/jdsample.c
index 3da1d06..a1d19e7 100644
--- a/jdsample.c
+++ b/jdsample.c
@@ -29,9 +29,10 @@
/* Pointer to routine to upsample a single component */
-typedef JMETHOD(void, upsample1_ptr,
- (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+typedef void (*upsample1_ptr) (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr);
/* Private subobject */
diff --git a/jdtrans.c b/jdtrans.c
index 0a163c0..85b60b8 100644
--- a/jdtrans.c
+++ b/jdtrans.c
@@ -16,7 +16,7 @@
/* Forward declarations */
-LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo));
+LOCAL(void) transdecode_master_selection (j_decompress_ptr cinfo);
/*
diff --git a/jmemmgr.c b/jmemmgr.c
index 15b6325..8e33318 100644
--- a/jmemmgr.c
+++ b/jmemmgr.c
@@ -32,7 +32,7 @@
#ifndef NO_GETENV
#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare getenv() */
-extern char * getenv JPP((const char * name));
+extern char * getenv (const char * name);
#endif
#endif
diff --git a/jmemnobs.c b/jmemnobs.c
index 2e4de09..e81b016 100644
--- a/jmemnobs.c
+++ b/jmemnobs.c
@@ -21,8 +21,8 @@
#include "jmemsys.h" /* import the system-dependent declarations */
#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
+extern void * malloc (size_t size);
+extern void free (void *ptr);
#endif
diff --git a/jmemsys.h b/jmemsys.h
index 2a8c469..b32f80c 100644
--- a/jmemsys.h
+++ b/jmemsys.h
@@ -30,9 +30,9 @@
* On an 80x86 machine using small-data memory model, these manage near heap.
*/
-EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
-EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
- size_t sizeofobject));
+EXTERN(void *) jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject);
+EXTERN(void) jpeg_free_small (j_common_ptr cinfo, void * object,
+ size_t sizeofobject);
/*
* These two functions are used to allocate and release large chunks of
@@ -43,10 +43,9 @@ EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
* in case a different allocation strategy is desirable for large chunks.
*/
-EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
- size_t sizeofobject));
-EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
- size_t sizeofobject));
+EXTERN(void FAR *) jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject);
+EXTERN(void) jpeg_free_large (j_common_ptr cinfo, void FAR * object,
+ size_t sizeofobject);
/*
* The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may
@@ -86,10 +85,9 @@ EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
* Conversely, zero may be returned to always use the minimum amount of memory.
*/
-EXTERN(size_t) jpeg_mem_available JPP((j_common_ptr cinfo,
- size_t min_bytes_needed,
- size_t max_bytes_needed,
- size_t already_allocated));
+EXTERN(size_t) jpeg_mem_available (j_common_ptr cinfo, size_t min_bytes_needed,
+ size_t max_bytes_needed,
+ size_t already_allocated);
/*
@@ -124,16 +122,13 @@ typedef struct backing_store_struct * backing_store_ptr;
typedef struct backing_store_struct {
/* Methods for reading/writing/closing this backing-store object */
- JMETHOD(void, read_backing_store, (j_common_ptr cinfo,
- backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count));
- JMETHOD(void, write_backing_store, (j_common_ptr cinfo,
- backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count));
- JMETHOD(void, close_backing_store, (j_common_ptr cinfo,
- backing_store_ptr info));
+ void (*read_backing_store) (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address, long file_offset,
+ long byte_count);
+ void (*write_backing_store) (j_common_ptr cinfo, backing_store_ptr info,
+ void FAR * buffer_address, long file_offset,
+ long byte_count);
+ void (*close_backing_store) (j_common_ptr cinfo, backing_store_ptr info);
/* Private fields for system-dependent backing-store management */
#ifdef USE_MSDOS_MEMMGR
@@ -163,9 +158,9 @@ typedef struct backing_store_struct {
* just take an error exit.)
*/
-EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
- backing_store_ptr info,
- long total_bytes_needed));
+EXTERN(void) jpeg_open_backing_store (j_common_ptr cinfo,
+ backing_store_ptr info,
+ long total_bytes_needed);
/*
@@ -180,5 +175,5 @@ EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
* all opened backing-store objects have been closed.
*/
-EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
-EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));
+EXTERN(long) jpeg_mem_init (j_common_ptr cinfo);
+EXTERN(void) jpeg_mem_term (j_common_ptr cinfo);
diff --git a/jmorecfg.h b/jmorecfg.h
index 1894e0f..11307b4 100644
--- a/jmorecfg.h
+++ b/jmorecfg.h
@@ -192,19 +192,6 @@ typedef unsigned int JDIMENSION;
#define EXTERN(type) extern type
-/* This macro is used to declare a "method", that is, a function pointer.
- * We want to supply prototype parameters if the compiler can cope.
- * Note that the arglist parameter must be parenthesized!
- * Again, you can customize this if you need special linkage keywords.
- */
-
-#ifdef HAVE_PROTOTYPES
-#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
-#else
-#define JMETHOD(type,methodname,arglist) type (*methodname) ()
-#endif
-
-
/* Here is the pseudo-keyword for declaring pointers that must be "far"
* on 80x86 machines. Most of the specialized coding for 80x86 is handled
* by just saying "FAR *" where such a pointer is needed. In a few places
@@ -402,17 +389,10 @@ static const int rgb_pixelsize[JPEG_NUMCS] = {
/* FAST_FLOAT should be either float or double, whichever is done faster
* by your compiler. (Note that this type is only used in the floating point
* DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
- * Typically, float is faster in ANSI C compilers, while double is faster in
- * pre-ANSI compilers (because they insist on converting to double anyway).
- * The code below therefore chooses float if we have ANSI-style prototypes.
*/
#ifndef FAST_FLOAT
-#ifdef HAVE_PROTOTYPES
#define FAST_FLOAT float
-#else
-#define FAST_FLOAT double
-#endif
#endif
#endif /* JPEG_INTERNAL_OPTIONS */
diff --git a/jpegint.h b/jpegint.h
index cfb5956..51c11c3 100644
--- a/jpegint.h
+++ b/jpegint.h
@@ -44,9 +44,9 @@ typedef enum { /* Operating modes for buffer controllers */
/* Master control module */
struct jpeg_comp_master {
- JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
- JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
- JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
+ void (*prepare_for_pass) (j_compress_ptr cinfo);
+ void (*pass_startup) (j_compress_ptr cinfo);
+ void (*finish_pass) (j_compress_ptr cinfo);
/* State variables made visible to other modules */
boolean call_pass_startup; /* True if pass_startup must be called */
@@ -55,80 +55,74 @@ struct jpeg_comp_master {
/* Main buffer control (downsampled-data buffer) */
struct jpeg_c_main_controller {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(void, process_data, (j_compress_ptr cinfo,
- JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
- JDIMENSION in_rows_avail));
+ void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode);
+ void (*process_data) (j_compress_ptr cinfo, JSAMPARRAY input_buf,
+ JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail);
};
/* Compression preprocessing (downsampling input buffer control) */
struct jpeg_c_prep_controller {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
- JSAMPARRAY input_buf,
- JDIMENSION *in_row_ctr,
- JDIMENSION in_rows_avail,
- JSAMPIMAGE output_buf,
- JDIMENSION *out_row_group_ctr,
- JDIMENSION out_row_groups_avail));
+ void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode);
+ void (*pre_process_data) (j_compress_ptr cinfo, JSAMPARRAY input_buf,
+ JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail,
+ JSAMPIMAGE output_buf,
+ JDIMENSION *out_row_group_ctr,
+ JDIMENSION out_row_groups_avail);
};
/* Coefficient buffer control */
struct jpeg_c_coef_controller {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
- JSAMPIMAGE input_buf));
+ void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode);
+ boolean (*compress_data) (j_compress_ptr cinfo, JSAMPIMAGE input_buf);
};
/* Colorspace conversion */
struct jpeg_color_converter {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo));
- JMETHOD(void, color_convert, (j_compress_ptr cinfo,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ void (*start_pass) (j_compress_ptr cinfo);
+ void (*color_convert) (j_compress_ptr cinfo, JSAMPARRAY input_buf,
+ JSAMPIMAGE output_buf, JDIMENSION output_row,
+ int num_rows);
};
/* Downsampling */
struct jpeg_downsampler {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo));
- JMETHOD(void, downsample, (j_compress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION in_row_index,
- JSAMPIMAGE output_buf,
- JDIMENSION out_row_group_index));
+ void (*start_pass) (j_compress_ptr cinfo);
+ void (*downsample) (j_compress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_index, JSAMPIMAGE output_buf,
+ JDIMENSION out_row_group_index);
boolean need_context_rows; /* TRUE if need rows above & below */
};
/* Forward DCT (also controls coefficient quantization) */
struct jpeg_forward_dct {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+ void (*start_pass) (j_compress_ptr cinfo);
/* perhaps this should be an array??? */
- JMETHOD(void, forward_DCT, (j_compress_ptr cinfo,
- jpeg_component_info * compptr,
- JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
- JDIMENSION start_row, JDIMENSION start_col,
- JDIMENSION num_blocks));
+ void (*forward_DCT) (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
+ JDIMENSION start_row, JDIMENSION start_col,
+ JDIMENSION num_blocks);
};
/* Entropy encoding */
struct jpeg_entropy_encoder {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
- JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
- JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
+ void (*start_pass) (j_compress_ptr cinfo, boolean gather_statistics);
+ boolean (*encode_mcu) (j_compress_ptr cinfo, JBLOCKROW *MCU_data);
+ void (*finish_pass) (j_compress_ptr cinfo);
};
/* Marker writing */
struct jpeg_marker_writer {
- JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
- JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
- JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
- JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
- JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
+ void (*write_file_header) (j_compress_ptr cinfo);
+ void (*write_frame_header) (j_compress_ptr cinfo);
+ void (*write_scan_header) (j_compress_ptr cinfo);
+ void (*write_file_trailer) (j_compress_ptr cinfo);
+ void (*write_tables_only) (j_compress_ptr cinfo);
/* These routines are exported to allow insertion of extra markers */
/* Probably only COM and APPn markers should be written this way */
- JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
- unsigned int datalen));
- JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
+ void (*write_marker_header) (j_compress_ptr cinfo, int marker,
+ unsigned int datalen);
+ void (*write_marker_byte) (j_compress_ptr cinfo, int val);
};
@@ -136,8 +130,8 @@ struct jpeg_marker_writer {
/* Master control module */
struct jpeg_decomp_master {
- JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
+ void (*prepare_for_output_pass) (j_decompress_ptr cinfo);
+ void (*finish_output_pass) (j_decompress_ptr cinfo);
/* State variables made visible to other modules */
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
@@ -145,10 +139,10 @@ struct jpeg_decomp_master {
/* Input control module */
struct jpeg_input_controller {
- JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
- JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
- JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
+ int (*consume_input) (j_decompress_ptr cinfo);
+ void (*reset_input_controller) (j_decompress_ptr cinfo);
+ void (*start_input_pass) (j_decompress_ptr cinfo);
+ void (*finish_input_pass) (j_decompress_ptr cinfo);
/* State variables made visible to other modules */
boolean has_multiple_scans; /* True if file has multiple scans */
@@ -157,43 +151,39 @@ struct jpeg_input_controller {
/* Main buffer control (downsampled-data buffer) */
struct jpeg_d_main_controller {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(void, process_data, (j_decompress_ptr cinfo,
- JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
- JDIMENSION out_rows_avail));
+ void (*start_pass) (j_decompress_ptr cinfo, J_BUF_MODE pass_mode);
+ void (*process_data) (j_decompress_ptr cinfo, JSAMPARRAY output_buf,
+ JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail);
};
/* Coefficient buffer control */
struct jpeg_d_coef_controller {
- JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
- JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
- JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
- JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
- JSAMPIMAGE output_buf));
+ void (*start_input_pass) (j_decompress_ptr cinfo);
+ int (*consume_data) (j_decompress_ptr cinfo);
+ void (*start_output_pass) (j_decompress_ptr cinfo);
+ int (*decompress_data) (j_decompress_ptr cinfo, JSAMPIMAGE output_buf);
/* Pointer to array of coefficient virtual arrays, or NULL if none */
jvirt_barray_ptr *coef_arrays;
};
/* Decompression postprocessing (color quantization buffer control) */
struct jpeg_d_post_controller {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf,
- JDIMENSION *in_row_group_ctr,
- JDIMENSION in_row_groups_avail,
- JSAMPARRAY output_buf,
- JDIMENSION *out_row_ctr,
- JDIMENSION out_rows_avail));
+ void (*start_pass) (j_decompress_ptr cinfo, J_BUF_MODE pass_mode);
+ void (*post_process_data) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION *in_row_group_ctr,
+ JDIMENSION in_row_groups_avail,
+ JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
+ JDIMENSION out_rows_avail);
};
/* Marker reading & parsing */
struct jpeg_marker_reader {
- JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
+ void (*reset_marker_reader) (j_decompress_ptr cinfo);
/* Read markers until SOS or EOI.
* Returns same codes as are defined for jpeg_consume_input:
* JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
*/
- JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
+ int (*read_markers) (j_decompress_ptr cinfo);
/* Read a restart marker --- exported for use by entropy decoder only */
jpeg_marker_parser_method read_restart_marker;
@@ -208,9 +198,8 @@ struct jpeg_marker_reader {
/* Entropy decoding */
struct jpeg_entropy_decoder {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
- JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
- JBLOCKROW *MCU_data));
+ void (*start_pass) (j_decompress_ptr cinfo);
+ boolean (*decode_mcu) (j_decompress_ptr cinfo, JBLOCKROW *MCU_data);
/* This is here to share code between baseline and progressive decoders; */
/* other modules probably should not use it */
@@ -218,47 +207,44 @@ struct jpeg_entropy_decoder {
};
/* Inverse DCT (also performs dequantization) */
-typedef JMETHOD(void, inverse_DCT_method_ptr,
- (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf, JDIMENSION output_col));
+typedef void (*inverse_DCT_method_ptr) (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf,
+ JDIMENSION output_col);
struct jpeg_inverse_dct {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+ void (*start_pass) (j_decompress_ptr cinfo);
/* It is useful to allow each component to have a separate IDCT method. */
inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
};
/* Upsampling (note that upsampler must also call color converter) */
struct jpeg_upsampler {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, upsample, (j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf,
- JDIMENSION *in_row_group_ctr,
- JDIMENSION in_row_groups_avail,
- JSAMPARRAY output_buf,
- JDIMENSION *out_row_ctr,
- JDIMENSION out_rows_avail));
+ void (*start_pass) (j_decompress_ptr cinfo);
+ void (*upsample) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION *in_row_group_ctr,
+ JDIMENSION in_row_groups_avail, JSAMPARRAY output_buf,
+ JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail);
boolean need_context_rows; /* TRUE if need rows above & below */
};
/* Colorspace conversion */
struct jpeg_color_deconverter {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ void (*start_pass) (j_decompress_ptr cinfo);
+ void (*color_convert) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION input_row, JSAMPARRAY output_buf,
+ int num_rows);
};
/* Color quantization or color precision reduction */
struct jpeg_color_quantizer {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
- JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
- JSAMPARRAY input_buf, JSAMPARRAY output_buf,
- int num_rows));
- JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
+ void (*start_pass) (j_decompress_ptr cinfo, boolean is_pre_scan);
+ void (*color_quantize) (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+ JSAMPARRAY output_buf, int num_rows);
+ void (*finish_pass) (j_decompress_ptr cinfo);
+ void (*new_color_map) (j_decompress_ptr cinfo);
};
@@ -293,53 +279,53 @@ struct jpeg_color_quantizer {
/* Compression module initialization routines */
-EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
- boolean transcode_only));
-EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
- boolean need_full_buffer));
-EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
- boolean need_full_buffer));
-EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
- boolean need_full_buffer));
-EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
+EXTERN(void) jinit_compress_master (j_compress_ptr cinfo);
+EXTERN(void) jinit_c_master_control (j_compress_ptr cinfo,
+ boolean transcode_only);
+EXTERN(void) jinit_c_main_controller (j_compress_ptr cinfo,
+ boolean need_full_buffer);
+EXTERN(void) jinit_c_prep_controller (j_compress_ptr cinfo,
+ boolean need_full_buffer);
+EXTERN(void) jinit_c_coef_controller (j_compress_ptr cinfo,
+ boolean need_full_buffer);
+EXTERN(void) jinit_color_converter (j_compress_ptr cinfo);
+EXTERN(void) jinit_downsampler (j_compress_ptr cinfo);
+EXTERN(void) jinit_forward_dct (j_compress_ptr cinfo);
+EXTERN(void) jinit_huff_encoder (j_compress_ptr cinfo);
+EXTERN(void) jinit_phuff_encoder (j_compress_ptr cinfo);
+EXTERN(void) jinit_arith_encoder (j_compress_ptr cinfo);
+EXTERN(void) jinit_marker_writer (j_compress_ptr cinfo);
/* Decompression module initialization routines */
-EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
- boolean need_full_buffer));
-EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
- boolean need_full_buffer));
-EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
- boolean need_full_buffer));
-EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
+EXTERN(void) jinit_master_decompress (j_decompress_ptr cinfo);
+EXTERN(void) jinit_d_main_controller (j_decompress_ptr cinfo,
+ boolean need_full_buffer);
+EXTERN(void) jinit_d_coef_controller (j_decompress_ptr cinfo,
+ boolean need_full_buffer);
+EXTERN(void) jinit_d_post_controller (j_decompress_ptr cinfo,
+ boolean need_full_buffer);
+EXTERN(void) jinit_input_controller (j_decompress_ptr cinfo);
+EXTERN(void) jinit_marker_reader (j_decompress_ptr cinfo);
+EXTERN(void) jinit_huff_decoder (j_decompress_ptr cinfo);
+EXTERN(void) jinit_phuff_decoder (j_decompress_ptr cinfo);
+EXTERN(void) jinit_arith_decoder (j_decompress_ptr cinfo);
+EXTERN(void) jinit_inverse_dct (j_decompress_ptr cinfo);
+EXTERN(void) jinit_upsampler (j_decompress_ptr cinfo);
+EXTERN(void) jinit_color_deconverter (j_decompress_ptr cinfo);
+EXTERN(void) jinit_1pass_quantizer (j_decompress_ptr cinfo);
+EXTERN(void) jinit_2pass_quantizer (j_decompress_ptr cinfo);
+EXTERN(void) jinit_merged_upsampler (j_decompress_ptr cinfo);
/* Memory manager initialization */
-EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
+EXTERN(void) jinit_memory_mgr (j_common_ptr cinfo);
/* Utility routines in jutils.c */
-EXTERN(long) jdiv_round_up JPP((long a, long b));
-EXTERN(long) jround_up JPP((long a, long b));
-EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
- JSAMPARRAY output_array, int dest_row,
- int num_rows, JDIMENSION num_cols));
-EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
- JDIMENSION num_blocks));
-EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
+EXTERN(long) jdiv_round_up (long a, long b);
+EXTERN(long) jround_up (long a, long b);
+EXTERN(void) jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
+ JSAMPARRAY output_array, int dest_row,
+ int num_rows, JDIMENSION num_cols);
+EXTERN(void) jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
+ JDIMENSION num_blocks);
+EXTERN(void) jzero_far (void FAR * target, size_t bytestozero);
/* Constant tables in jutils.c */
#if 0 /* This table is not actually needed in v6a */
extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
diff --git a/jpeglib.h b/jpeglib.h
index 612f74a..437d65e 100644
--- a/jpeglib.h
+++ b/jpeglib.h
@@ -719,16 +719,16 @@ struct jpeg_decompress_struct {
struct jpeg_error_mgr {
/* Error exit handler: does not return to caller */
- JMETHOD(void, error_exit, (j_common_ptr cinfo));
+ void (*error_exit) (j_common_ptr cinfo);
/* Conditionally emit a trace or warning message */
- JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));
+ void (*emit_message) (j_common_ptr cinfo, int msg_level);
/* Routine that actually outputs a trace or error message */
- JMETHOD(void, output_message, (j_common_ptr cinfo));
+ void (*output_message) (j_common_ptr cinfo);
/* Format a message string for the most recent JPEG error or message */
- JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));
+ void (*format_message) (j_common_ptr cinfo, char * buffer);
#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */
/* Reset error state variables at start of a new image */
- JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));
+ void (*reset_error_mgr) (j_common_ptr cinfo);
/* The message ID code and any parameters are saved here.
* A message can have one string parameter or up to 8 int parameters.
@@ -776,7 +776,7 @@ struct jpeg_error_mgr {
/* Progress monitor object */
struct jpeg_progress_mgr {
- JMETHOD(void, progress_monitor, (j_common_ptr cinfo));
+ void (*progress_monitor) (j_common_ptr cinfo);
long pass_counter; /* work units completed in this pass */
long pass_limit; /* total number of work units in this pass */
@@ -791,9 +791,9 @@ struct jpeg_destination_mgr {
JOCTET * next_output_byte; /* => next byte to write in buffer */
size_t free_in_buffer; /* # of byte spaces remaining in buffer */
- JMETHOD(void, init_destination, (j_compress_ptr cinfo));
- JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
- JMETHOD(void, term_destination, (j_compress_ptr cinfo));
+ void (*init_destination) (j_compress_ptr cinfo);
+ boolean (*empty_output_buffer) (j_compress_ptr cinfo);
+ void (*term_destination) (j_compress_ptr cinfo);
};
@@ -803,11 +803,11 @@ struct jpeg_source_mgr {
const JOCTET * next_input_byte; /* => next byte to read from buffer */
size_t bytes_in_buffer; /* # of bytes remaining in buffer */
- JMETHOD(void, init_source, (j_decompress_ptr cinfo));
- JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
- JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
- JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
- JMETHOD(void, term_source, (j_decompress_ptr cinfo));
+ void (*init_source) (j_decompress_ptr cinfo);
+ boolean (*fill_input_buffer) (j_decompress_ptr cinfo);
+ void (*skip_input_data) (j_decompress_ptr cinfo, long num_bytes);
+ boolean (*resync_to_restart) (j_decompress_ptr cinfo, int desired);
+ void (*term_source) (j_decompress_ptr cinfo);
};
@@ -832,41 +832,32 @@ typedef struct jvirt_barray_control * jvirt_barray_ptr;
struct jpeg_memory_mgr {
/* Method pointers */
- JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
- size_t sizeofobject));
- JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,
- size_t sizeofobject));
- JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,
- JDIMENSION samplesperrow,
- JDIMENSION numrows));
- JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
- JDIMENSION blocksperrow,
- JDIMENSION numrows));
- JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
- int pool_id,
- boolean pre_zero,
- JDIMENSION samplesperrow,
- JDIMENSION numrows,
- JDIMENSION maxaccess));
- JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
- int pool_id,
- boolean pre_zero,
- JDIMENSION blocksperrow,
- JDIMENSION numrows,
- JDIMENSION maxaccess));
- JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));
- JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,
- jvirt_sarray_ptr ptr,
- JDIMENSION start_row,
- JDIMENSION num_rows,
- boolean writable));
- JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
- jvirt_barray_ptr ptr,
- JDIMENSION start_row,
- JDIMENSION num_rows,
- boolean writable));
- JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
- JMETHOD(void, self_destruct, (j_common_ptr cinfo));
+ void * (*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject);
+ void FAR * (*alloc_large) (j_common_ptr cinfo, int pool_id,
+ size_t sizeofobject);
+ JSAMPARRAY (*alloc_sarray) (j_common_ptr cinfo, int pool_id,
+ JDIMENSION samplesperrow, JDIMENSION numrows);
+ JBLOCKARRAY (*alloc_barray) (j_common_ptr cinfo, int pool_id,
+ JDIMENSION blocksperrow, JDIMENSION numrows);
+ jvirt_sarray_ptr (*request_virt_sarray) (j_common_ptr cinfo, int pool_id,
+ boolean pre_zero,
+ JDIMENSION samplesperrow,
+ JDIMENSION numrows,
+ JDIMENSION maxaccess);
+ jvirt_barray_ptr (*request_virt_barray) (j_common_ptr cinfo, int pool_id,
+ boolean pre_zero,
+ JDIMENSION blocksperrow,
+ JDIMENSION numrows,
+ JDIMENSION maxaccess);
+ void (*realize_virt_arrays) (j_common_ptr cinfo);
+ JSAMPARRAY (*access_virt_sarray) (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
+ JDIMENSION start_row, JDIMENSION num_rows,
+ boolean writable);
+ JBLOCKARRAY (*access_virt_barray) (j_common_ptr cinfo, jvirt_barray_ptr ptr,
+ JDIMENSION start_row, JDIMENSION num_rows,
+ boolean writable);
+ void (*free_pool) (j_common_ptr cinfo, int pool_id);
+ void (*self_destruct) (j_common_ptr cinfo);
/* Limit on memory allocation for this JPEG object. (Note that this is
* merely advisory, not a guaranteed maximum; it only affects the space
@@ -883,24 +874,11 @@ struct jpeg_memory_mgr {
/* Routine signature for application-supplied marker processing methods.
* Need not pass marker code since it is stored in cinfo->unread_marker.
*/
-typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
-
-
-/* Declarations for routines called by application.
- * The JPP macro hides prototype parameters from compilers that can't cope.
- * Note JPP requires double parentheses.
- */
-
-#ifdef HAVE_PROTOTYPES
-#define JPP(arglist) arglist
-#else
-#define JPP(arglist) ()
-#endif
+typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo);
/* Default error-management setup */
-EXTERN(struct jpeg_error_mgr *) jpeg_std_error
- JPP((struct jpeg_error_mgr * err));
+EXTERN(struct jpeg_error_mgr *) jpeg_std_error (struct jpeg_error_mgr * err);
/* Initialization of JPEG compression objects.
* jpeg_create_compress() and jpeg_create_decompress() are the exported
@@ -915,89 +893,80 @@ EXTERN(struct jpeg_error_mgr *) jpeg_std_error
#define jpeg_create_decompress(cinfo) \
jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
(size_t) sizeof(struct jpeg_decompress_struct))
-EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
- int version, size_t structsize));
-EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
- int version, size_t structsize));
+EXTERN(void) jpeg_CreateCompress (j_compress_ptr cinfo, int version,
+ size_t structsize);
+EXTERN(void) jpeg_CreateDecompress (j_decompress_ptr cinfo, int version,
+ size_t structsize);
/* Destruction of JPEG compression objects */
-EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_destroy_compress (j_compress_ptr cinfo);
+EXTERN(void) jpeg_destroy_decompress (j_decompress_ptr cinfo);
/* Standard data source and destination managers: stdio streams. */
/* Caller is responsible for opening the file before and closing after. */
-EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
-EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
+EXTERN(void) jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile);
+EXTERN(void) jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile);
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
/* Data source and destination managers: memory buffers. */
-EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
- unsigned char ** outbuffer,
- unsigned long * outsize));
-EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
- unsigned char * inbuffer,
- unsigned long insize));
+EXTERN(void) jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
+ unsigned long * outsize);
+EXTERN(void) jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * inbuffer,
+ unsigned long insize);
#endif
/* Default parameter setup for compression */
-EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_set_defaults (j_compress_ptr cinfo);
/* Compression parameter setup aids */
-EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
- J_COLOR_SPACE colorspace));
-EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
- boolean force_baseline));
-EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
- int scale_factor,
- boolean force_baseline));
+EXTERN(void) jpeg_set_colorspace (j_compress_ptr cinfo,
+ J_COLOR_SPACE colorspace);
+EXTERN(void) jpeg_default_colorspace (j_compress_ptr cinfo);
+EXTERN(void) jpeg_set_quality (j_compress_ptr cinfo, int quality,
+ boolean force_baseline);
+EXTERN(void) jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
+ boolean force_baseline);
#if JPEG_LIB_VERSION >= 70
-EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
- boolean force_baseline));
+EXTERN(void) jpeg_default_qtables (j_compress_ptr cinfo,
+ boolean force_baseline);
#endif
-EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
- const unsigned int *basic_table,
- int scale_factor,
- boolean force_baseline));
-EXTERN(int) jpeg_quality_scaling JPP((int quality));
-EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
- boolean suppress));
-EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
-EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
+EXTERN(void) jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
+ const unsigned int *basic_table,
+ int scale_factor, boolean force_baseline);
+EXTERN(int) jpeg_quality_scaling (int quality);
+EXTERN(void) jpeg_simple_progression (j_compress_ptr cinfo);
+EXTERN(void) jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress);
+EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table (j_common_ptr cinfo);
+EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table (j_common_ptr cinfo);
/* Main entry points for compression */
-EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
- boolean write_all_tables));
-EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
- JSAMPARRAY scanlines,
- JDIMENSION num_lines));
-EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_start_compress (j_compress_ptr cinfo,
+ boolean write_all_tables);
+EXTERN(JDIMENSION) jpeg_write_scanlines (j_compress_ptr cinfo,
+ JSAMPARRAY scanlines,
+ JDIMENSION num_lines);
+EXTERN(void) jpeg_finish_compress (j_compress_ptr cinfo);
#if JPEG_LIB_VERSION >= 70
/* Precalculate JPEG dimensions for current compression parameters. */
-EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo);
#endif
/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
-EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
- JSAMPIMAGE data,
- JDIMENSION num_lines));
+EXTERN(JDIMENSION) jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
+ JDIMENSION num_lines);
/* Write a special marker. See libjpeg.txt concerning safe usage. */
-EXTERN(void) jpeg_write_marker
- JPP((j_compress_ptr cinfo, int marker,
- const JOCTET * dataptr, unsigned int datalen));
+EXTERN(void) jpeg_write_marker (j_compress_ptr cinfo, int marker,
+ const JOCTET * dataptr, unsigned int datalen);
/* Same, but piecemeal. */
-EXTERN(void) jpeg_write_m_header
- JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
-EXTERN(void) jpeg_write_m_byte
- JPP((j_compress_ptr cinfo, int val));
+EXTERN(void) jpeg_write_m_header (j_compress_ptr cinfo, int marker,
+ unsigned int datalen);
+EXTERN(void) jpeg_write_m_byte (j_compress_ptr cinfo, int val);
/* Alternate compression function: just write an abbreviated table file */
-EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
+EXTERN(void) jpeg_write_tables (j_compress_ptr cinfo);
/* Decompression startup: read start of JPEG datastream to see what's there */
-EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
- boolean require_image));
+EXTERN(int) jpeg_read_header (j_decompress_ptr cinfo, boolean require_image);
/* Return value is one of: */
#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */
#define JPEG_HEADER_OK 1 /* Found valid image datastream */
@@ -1009,25 +978,23 @@ EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
*/
/* Main entry points for decompression */
-EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
-EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
- JSAMPARRAY scanlines,
- JDIMENSION max_lines));
-EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
+EXTERN(boolean) jpeg_start_decompress (j_decompress_ptr cinfo);
+EXTERN(JDIMENSION) jpeg_read_scanlines (j_decompress_ptr cinfo,
+ JSAMPARRAY scanlines,
+ JDIMENSION max_lines);
+EXTERN(boolean) jpeg_finish_decompress (j_decompress_ptr cinfo);
/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
-EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
- JSAMPIMAGE data,
- JDIMENSION max_lines));
+EXTERN(JDIMENSION) jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
+ JDIMENSION max_lines);
/* Additional entry points for buffered-image mode. */
-EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
-EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
- int scan_number));
-EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
-EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
-EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
+EXTERN(boolean) jpeg_has_multiple_scans (j_decompress_ptr cinfo);
+EXTERN(boolean) jpeg_start_output (j_decompress_ptr cinfo, int scan_number);
+EXTERN(boolean) jpeg_finish_output (j_decompress_ptr cinfo);
+EXTERN(boolean) jpeg_input_complete (j_decompress_ptr cinfo);
+EXTERN(void) jpeg_new_colormap (j_decompress_ptr cinfo);
+EXTERN(int) jpeg_consume_input (j_decompress_ptr cinfo);
/* Return value is one of: */
/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */
#define JPEG_REACHED_SOS 1 /* Reached start of new scan */
@@ -1037,26 +1004,25 @@ EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
/* Precalculate output dimensions for current decompression parameters. */
#if JPEG_LIB_VERSION >= 80
-EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_core_output_dimensions (j_decompress_ptr cinfo);
#endif
-EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_calc_output_dimensions (j_decompress_ptr cinfo);
/* Control saving of COM and APPn markers into marker_list. */
-EXTERN(void) jpeg_save_markers
- JPP((j_decompress_ptr cinfo, int marker_code,
- unsigned int length_limit));
+EXTERN(void) jpeg_save_markers (j_decompress_ptr cinfo, int marker_code,
+ unsigned int length_limit);
/* Install a special processing method for COM or APPn markers. */
-EXTERN(void) jpeg_set_marker_processor
- JPP((j_decompress_ptr cinfo, int marker_code,
- jpeg_marker_parser_method routine));
+EXTERN(void) jpeg_set_marker_processor (j_decompress_ptr cinfo,
+ int marker_code,
+ jpeg_marker_parser_method routine);
/* Read or write raw DCT coefficients --- useful for lossless transcoding. */
-EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
- jvirt_barray_ptr * coef_arrays));
-EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
- j_compress_ptr dstinfo));
+EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients (j_decompress_ptr cinfo);
+EXTERN(void) jpeg_write_coefficients (j_compress_ptr cinfo,
+ jvirt_barray_ptr * coef_arrays);
+EXTERN(void) jpeg_copy_critical_parameters (j_decompress_ptr srcinfo,
+ j_compress_ptr dstinfo);
/* If you choose to abort compression or decompression before completing
* jpeg_finish_(de)compress, then you need to clean up to release memory,
@@ -1064,18 +1030,17 @@ EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
* if you're done with the JPEG object, but if you want to clean it up and
* reuse it, call this:
*/
-EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
+EXTERN(void) jpeg_abort_compress (j_compress_ptr cinfo);
+EXTERN(void) jpeg_abort_decompress (j_decompress_ptr cinfo);
/* Generic versions of jpeg_abort and jpeg_destroy that work on either
* flavor of JPEG object. These may be more convenient in some places.
*/
-EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
-EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
+EXTERN(void) jpeg_abort (j_common_ptr cinfo);
+EXTERN(void) jpeg_destroy (j_common_ptr cinfo);
/* Default restart-marker-resync procedure for use by data source modules */
-EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
- int desired));
+EXTERN(boolean) jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired);
/* These marker codes are exported since applications and data source modules
diff --git a/jsimd.h b/jsimd.h
index 80bc20b..663c969 100644
--- a/jsimd.h
+++ b/jsimd.h
@@ -10,74 +10,67 @@
*
*/
-EXTERN(int) jsimd_can_rgb_ycc JPP((void));
-EXTERN(int) jsimd_can_rgb_gray JPP((void));
-EXTERN(int) jsimd_can_ycc_rgb JPP((void));
-EXTERN(int) jsimd_c_can_null_convert JPP((void));
+EXTERN(int) jsimd_can_rgb_ycc (void);
+EXTERN(int) jsimd_can_rgb_gray (void);
+EXTERN(int) jsimd_can_ycc_rgb (void);
+EXTERN(int) jsimd_c_can_null_convert (void);
EXTERN(void) jsimd_rgb_ycc_convert
- JPP((j_compress_ptr cinfo,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_rgb_gray_convert
- JPP((j_compress_ptr cinfo,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_ycc_rgb_convert
- JPP((j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_c_null_convert
- JPP((j_compress_ptr cinfo,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
-EXTERN(int) jsimd_can_h2v2_downsample JPP((void));
-EXTERN(int) jsimd_can_h2v1_downsample JPP((void));
+EXTERN(int) jsimd_can_h2v2_downsample (void);
+EXTERN(int) jsimd_can_h2v1_downsample (void);
EXTERN(void) jsimd_h2v2_downsample
- JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+ (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
-EXTERN(int) jsimd_can_h2v2_smooth_downsample JPP((void));
+EXTERN(int) jsimd_can_h2v2_smooth_downsample (void);
EXTERN(void) jsimd_h2v2_smooth_downsample
- JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+ (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v1_downsample
- JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+ (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
-EXTERN(int) jsimd_can_h2v2_upsample JPP((void));
-EXTERN(int) jsimd_can_h2v1_upsample JPP((void));
+EXTERN(int) jsimd_can_h2v2_upsample (void);
+EXTERN(int) jsimd_can_h2v1_upsample (void);
EXTERN(void) jsimd_h2v2_upsample
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
EXTERN(void) jsimd_h2v1_upsample
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
-EXTERN(int) jsimd_can_h2v2_fancy_upsample JPP((void));
-EXTERN(int) jsimd_can_h2v1_fancy_upsample JPP((void));
+EXTERN(int) jsimd_can_h2v2_fancy_upsample (void);
+EXTERN(int) jsimd_can_h2v1_fancy_upsample (void);
EXTERN(void) jsimd_h2v2_fancy_upsample
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
EXTERN(void) jsimd_h2v1_fancy_upsample
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+ (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
-EXTERN(int) jsimd_can_h2v2_merged_upsample JPP((void));
-EXTERN(int) jsimd_can_h2v1_merged_upsample JPP((void));
+EXTERN(int) jsimd_can_h2v2_merged_upsample (void);
+EXTERN(int) jsimd_can_h2v1_merged_upsample (void);
EXTERN(void) jsimd_h2v2_merged_upsample
- JPP((j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
- JSAMPARRAY output_buf));
+ (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_merged_upsample
- JPP((j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
- JSAMPARRAY output_buf));
-
+ (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
diff --git a/jsimddct.h b/jsimddct.h
index 928d6d3..aa421fb 100644
--- a/jsimddct.h
+++ b/jsimddct.h
@@ -9,77 +9,66 @@
*
*/
-EXTERN(int) jsimd_can_convsamp JPP((void));
-EXTERN(int) jsimd_can_convsamp_float JPP((void));
+EXTERN(int) jsimd_can_convsamp (void);
+EXTERN(int) jsimd_can_convsamp_float (void);
-EXTERN(void) jsimd_convsamp JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- DCTELEM * workspace));
-EXTERN(void) jsimd_convsamp_float JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- FAST_FLOAT * workspace));
+EXTERN(void) jsimd_convsamp (JSAMPARRAY sample_data, JDIMENSION start_col,
+ DCTELEM * workspace);
+EXTERN(void) jsimd_convsamp_float (JSAMPARRAY sample_data,
+ JDIMENSION start_col,
+ FAST_FLOAT * workspace);
-EXTERN(int) jsimd_can_fdct_islow JPP((void));
-EXTERN(int) jsimd_can_fdct_ifast JPP((void));
-EXTERN(int) jsimd_can_fdct_float JPP((void));
+EXTERN(int) jsimd_can_fdct_islow (void);
+EXTERN(int) jsimd_can_fdct_ifast (void);
+EXTERN(int) jsimd_can_fdct_float (void);
-EXTERN(void) jsimd_fdct_islow JPP((DCTELEM * data));
-EXTERN(void) jsimd_fdct_ifast JPP((DCTELEM * data));
-EXTERN(void) jsimd_fdct_float JPP((FAST_FLOAT * data));
+EXTERN(void) jsimd_fdct_islow (DCTELEM * data);
+EXTERN(void) jsimd_fdct_ifast (DCTELEM * data);
+EXTERN(void) jsimd_fdct_float (FAST_FLOAT * data);
-EXTERN(int) jsimd_can_quantize JPP((void));
-EXTERN(int) jsimd_can_quantize_float JPP((void));
+EXTERN(int) jsimd_can_quantize (void);
+EXTERN(int) jsimd_can_quantize_float (void);
-EXTERN(void) jsimd_quantize JPP((JCOEFPTR coef_block,
- DCTELEM * divisors,
- DCTELEM * workspace));
-EXTERN(void) jsimd_quantize_float JPP((JCOEFPTR coef_block,
- FAST_FLOAT * divisors,
- FAST_FLOAT * workspace));
+EXTERN(void) jsimd_quantize (JCOEFPTR coef_block, DCTELEM * divisors,
+ DCTELEM * workspace);
+EXTERN(void) jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors,
+ FAST_FLOAT * workspace);
-EXTERN(int) jsimd_can_idct_2x2 JPP((void));
-EXTERN(int) jsimd_can_idct_4x4 JPP((void));
-EXTERN(int) jsimd_can_idct_6x6 JPP((void));
-EXTERN(int) jsimd_can_idct_12x12 JPP((void));
+EXTERN(int) jsimd_can_idct_2x2 (void);
+EXTERN(int) jsimd_can_idct_4x4 (void);
+EXTERN(int) jsimd_can_idct_6x6 (void);
+EXTERN(int) jsimd_can_idct_12x12 (void);
-EXTERN(void) jsimd_idct_2x2 JPP((j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_4x4 JPP((j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_6x6 JPP((j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_12x12 JPP((j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
+EXTERN(void) jsimd_idct_2x2 (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_4x4 (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_6x6 (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_12x12 (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
-EXTERN(int) jsimd_can_idct_islow JPP((void));
-EXTERN(int) jsimd_can_idct_ifast JPP((void));
-EXTERN(int) jsimd_can_idct_float JPP((void));
-
-EXTERN(void) jsimd_idct_islow JPP((j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_ifast JPP((j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_float JPP((j_decompress_ptr cinfo,
- jpeg_component_info * compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
+EXTERN(int) jsimd_can_idct_islow (void);
+EXTERN(int) jsimd_can_idct_ifast (void);
+EXTERN(int) jsimd_can_idct_float (void);
+EXTERN(void) jsimd_idct_islow (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_ifast (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_float (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
diff --git a/rdtarga.c b/rdtarga.c
index e8bbaf6..38c8514 100644
--- a/rdtarga.c
+++ b/rdtarga.c
@@ -56,7 +56,7 @@ typedef struct _tga_source_struct {
JDIMENSION current_row; /* Current logical row number to read */
/* Pointer to routine to extract next Targa pixel from input file */
- JMETHOD(void, read_pixel, (tga_source_ptr sinfo));
+ void (*read_pixel) (tga_source_ptr sinfo);
/* Result of read_pixel is delivered here: */
U_CHAR tga_pixel[4];
@@ -68,8 +68,7 @@ typedef struct _tga_source_struct {
int dup_pixel_count; /* # of times to duplicate previous pixel */
/* This saves the correct pixel-row-expansion method for preload_image */
- JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
- cjpeg_source_ptr sinfo));
+ JDIMENSION (*get_pixel_rows) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
} tga_source_struct;
diff --git a/simd/jsimd.h b/simd/jsimd.h
index 572da81..8cd4473 100644
--- a/simd/jsimd.h
+++ b/simd/jsimd.h
@@ -22,751 +22,645 @@
#define JSIMD_MIPS_DSPR2 0x20
/* SIMD Ext: retrieve SIMD/CPU information */
-EXTERN(unsigned int) jpeg_simd_cpu_support JPP((void));
+EXTERN(unsigned int) jpeg_simd_cpu_support (void);
-/* SIMD Color Space Conversion */
+/* RGB & extended RGB --> YCC Colorspace Conversion */
EXTERN(void) jsimd_rgb_ycc_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extrgb_ycc_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extrgbx_ycc_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extbgr_ycc_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extbgrx_ycc_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extxbgr_ycc_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extxrgb_ycc_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-
-EXTERN(void) jsimd_rgb_gray_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extrgb_gray_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extrgbx_gray_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extbgr_gray_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extbgrx_gray_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extxbgr_gray_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extxrgb_gray_convert_mmx
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-
-EXTERN(void) jsimd_ycc_rgb_convert_mmx
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-EXTERN(void) jsimd_ycc_extrgb_convert_mmx
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-EXTERN(void) jsimd_ycc_extrgbx_convert_mmx
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-EXTERN(void) jsimd_ycc_extbgr_convert_mmx
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-EXTERN(void) jsimd_ycc_extbgrx_convert_mmx
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-EXTERN(void) jsimd_ycc_extxbgr_convert_mmx
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-EXTERN(void) jsimd_ycc_extxrgb_convert_mmx
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
extern const int jconst_rgb_ycc_convert_sse2[];
EXTERN(void) jsimd_rgb_ycc_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extrgb_ycc_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extrgbx_ycc_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extbgr_ycc_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extbgrx_ycc_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extxbgr_ycc_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extxrgb_ycc_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+
+EXTERN(void) jsimd_rgb_ycc_convert_neon
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extrgb_ycc_convert_neon
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extrgbx_ycc_convert_neon
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extbgr_ycc_convert_neon
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extbgrx_ycc_convert_neon
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extxbgr_ycc_convert_neon
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extxrgb_ycc_convert_neon
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+
+EXTERN(void) jsimd_rgb_ycc_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extrgb_ycc_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extrgbx_ycc_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extbgr_ycc_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extbgrx_ycc_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extxbgr_ycc_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extxrgb_ycc_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+
+/* RGB & extended RGB --> Grayscale Colorspace Conversion */
+EXTERN(void) jsimd_rgb_gray_convert_mmx
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extrgb_gray_convert_mmx
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extrgbx_gray_convert_mmx
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extbgr_gray_convert_mmx
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extbgrx_gray_convert_mmx
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extxbgr_gray_convert_mmx
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extxrgb_gray_convert_mmx
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
extern const int jconst_rgb_gray_convert_sse2[];
EXTERN(void) jsimd_rgb_gray_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extrgb_gray_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extrgbx_gray_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extbgr_gray_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extbgrx_gray_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extxbgr_gray_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
EXTERN(void) jsimd_extxrgb_gray_convert_sse2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+
+EXTERN(void) jsimd_rgb_gray_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extrgb_gray_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extrgbx_gray_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extbgr_gray_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extbgrx_gray_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extxbgr_gray_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+EXTERN(void) jsimd_extxrgb_gray_convert_mips_dspr2
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows);
+
+/* YCC --> RGB & extended RGB Colorspace Conversion */
+EXTERN(void) jsimd_ycc_rgb_convert_mmx
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
+EXTERN(void) jsimd_ycc_extrgb_convert_mmx
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
+EXTERN(void) jsimd_ycc_extrgbx_convert_mmx
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
+EXTERN(void) jsimd_ycc_extbgr_convert_mmx
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
+EXTERN(void) jsimd_ycc_extbgrx_convert_mmx
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
+EXTERN(void) jsimd_ycc_extxbgr_convert_mmx
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
+EXTERN(void) jsimd_ycc_extxrgb_convert_mmx
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
extern const int jconst_ycc_rgb_convert_sse2[];
EXTERN(void) jsimd_ycc_rgb_convert_sse2
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extrgb_convert_sse2
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extrgbx_convert_sse2
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extbgr_convert_sse2
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extbgrx_convert_sse2
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extxbgr_convert_sse2
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extxrgb_convert_sse2
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-
-EXTERN(void) jsimd_rgb_ycc_convert_neon
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extrgb_ycc_convert_neon
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extrgbx_ycc_convert_neon
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extbgr_ycc_convert_neon
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extbgrx_ycc_convert_neon
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extxbgr_ycc_convert_neon
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extxrgb_ycc_convert_neon
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_rgb_convert_neon
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extrgb_convert_neon
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extrgbx_convert_neon
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extbgr_convert_neon
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extbgrx_convert_neon
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extxbgr_convert_neon
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extxrgb_convert_neon
- JPP((JDIMENSION out_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
-EXTERN(void) jsimd_rgb_ycc_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extrgb_ycc_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extrgbx_ycc_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extbgr_ycc_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extbgrx_ycc_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extxbgr_ycc_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extxrgb_ycc_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-
-EXTERN(void) jsimd_rgb_gray_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extrgb_gray_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extrgbx_gray_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extbgr_gray_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extbgrx_gray_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extxbgr_gray_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jsimd_extxrgb_gray_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-
-EXTERN (void) jsimd_ycc_rgb_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+EXTERN(void) jsimd_ycc_rgb_convert_mips_dspr2
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extrgb_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extrgbx_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extbgr_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extbgrx_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extxbgr_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
EXTERN(void) jsimd_ycc_extxrgb_convert_mips_dspr2
- JPP((JDIMENSION img_width,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
+ (JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows);
+/* NULL Colorspace Conversion */
EXTERN(void) jsimd_c_null_convert_mips_dspr2
- JPP((JDIMENSION img_width, JSAMPARRAY input_buf,
- JSAMPIMAGE output_buf, JDIMENSION output_row,
- int num_rows, int num_components));
+ (JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows, int num_components);
-/* SIMD Downsample */
-EXTERN(void) jsimd_h2v2_downsample_mmx
- JPP((JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+/* h2v1 Downsampling */
EXTERN(void) jsimd_h2v1_downsample_mmx
- JPP((JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+ (JDIMENSION image_width, int max_v_samp_factor,
+ JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
-EXTERN(void) jsimd_h2v2_downsample_sse2
- JPP((JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
EXTERN(void) jsimd_h2v1_downsample_sse2
- JPP((JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+ (JDIMENSION image_width, int max_v_samp_factor,
+ JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
+
+EXTERN(void) jsimd_h2v1_downsample_mips_dspr2
+ (JDIMENSION image_width, int max_v_samp_factor,
+ JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
+
+/* h2v2 Downsampling */
+EXTERN(void) jsimd_h2v2_downsample_mmx
+ (JDIMENSION image_width, int max_v_samp_factor,
+ JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
+
+EXTERN(void) jsimd_h2v2_downsample_sse2
+ (JDIMENSION image_width, int max_v_samp_factor,
+ JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v2_downsample_mips_dspr2
- JPP((JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+ (JDIMENSION image_width, int max_v_samp_factor,
+ JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
+
+/* h2v2 Smooth Downsampling */
EXTERN(void) jsimd_h2v2_smooth_downsample_mips_dspr2
- JPP((JSAMPARRAY input_data, JSAMPARRAY output_data,
- JDIMENSION v_samp_factor, int max_v_samp_factor,
- int smoothing_factor, JDIMENSION width_blocks,
- JDIMENSION image_width));
-EXTERN(void) jsimd_h2v1_downsample_mips_dspr2
- JPP((JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
+ (JDIMENSION image_width, int max_v_samp_factor,
+ JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JSAMPARRAY input_data, JSAMPARRAY output_data);
-/* SIMD Upsample */
-EXTERN(void) jsimd_h2v2_upsample_mmx
- JPP((int max_v_samp_factor, JDIMENSION output_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+/* Upsampling */
EXTERN(void) jsimd_h2v1_upsample_mmx
- JPP((int max_v_samp_factor, JDIMENSION output_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+ (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr);
+EXTERN(void) jsimd_h2v2_upsample_mmx
+ (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr);
-EXTERN(void) jsimd_h2v2_fancy_upsample_mmx
- JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+EXTERN(void) jsimd_h2v1_upsample_sse2
+ (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr);
+EXTERN(void) jsimd_h2v2_upsample_sse2
+ (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr);
+
+EXTERN(void) jsimd_h2v1_upsample_mips_dspr2
+ (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr);
+EXTERN(void) jsimd_h2v2_upsample_mips_dspr2
+ (int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr);
+
+/* Fancy Upsampling */
EXTERN(void) jsimd_h2v1_fancy_upsample_mmx
- JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+ (int max_v_samp_factor, JDIMENSION downsampled_width,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
+EXTERN(void) jsimd_h2v2_fancy_upsample_mmx
+ (int max_v_samp_factor, JDIMENSION downsampled_width,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
-EXTERN(void) jsimd_h2v2_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+extern const int jconst_fancy_upsample_sse2[];
+EXTERN(void) jsimd_h2v1_fancy_upsample_sse2
+ (int max_v_samp_factor, JDIMENSION downsampled_width,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
+EXTERN(void) jsimd_h2v2_fancy_upsample_sse2
+ (int max_v_samp_factor, JDIMENSION downsampled_width,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
+
+EXTERN(void) jsimd_h2v1_fancy_upsample_neon
+ (int max_v_samp_factor, JDIMENSION downsampled_width,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
+
+EXTERN(void) jsimd_h2v1_fancy_upsample_mips_dspr2
+ (int max_v_samp_factor, JDIMENSION downsampled_width,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
+EXTERN(void) jsimd_h2v2_fancy_upsample_mips_dspr2
+ (int max_v_samp_factor, JDIMENSION downsampled_width,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr);
+
+/* Merged Upsampling */
EXTERN(void) jsimd_h2v1_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mmx
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-
-EXTERN(void) jsimd_h2v2_upsample_sse2
- JPP((int max_v_samp_factor, JDIMENSION output_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jsimd_h2v1_upsample_sse2
- JPP((int max_v_samp_factor, JDIMENSION output_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
-extern const int jconst_fancy_upsample_sse2[];
-EXTERN(void) jsimd_h2v2_fancy_upsample_sse2
- JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jsimd_h2v1_fancy_upsample_sse2
- JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+EXTERN(void) jsimd_h2v2_merged_upsample_mmx
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mmx
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mmx
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mmx
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mmx
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mmx
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mmx
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
extern const int jconst_merged_upsample_sse2[];
-EXTERN(void) jsimd_h2v2_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
EXTERN(void) jsimd_h2v1_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_sse2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
-EXTERN(void) jsimd_h2v1_fancy_upsample_neon
- JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+EXTERN(void) jsimd_h2v2_merged_upsample_sse2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_sse2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_sse2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_sse2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_sse2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_sse2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
+EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_sse2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
-EXTERN(void) jsimd_h2v1_fancy_upsample_mips_dspr2
- JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jsimd_h2v2_fancy_upsample_mips_dspr2
- JPP((int max_v_samp_factor, JDIMENSION downsampled_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+EXTERN(void) jsimd_h2v1_merged_upsample_mips_dspr2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
+EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mips_dspr2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
+EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mips_dspr2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
+EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mips_dspr2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
+EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mips_dspr2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
+EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mips_dspr2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
+EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mips_dspr2
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
EXTERN(void) jsimd_h2v2_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
-EXTERN(void) jsimd_h2v1_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
-EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
-EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
-EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
-EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
-EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
-EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mips_dspr2
- JPP((JDIMENSION output_width, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf,
- JSAMPLE* range));
+ (JDIMENSION output_width, JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v2_upsample_mips_dspr2
- JPP((int max_v_samp_factor, JDIMENSION output_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jsimd_h2v1_upsample_mips_dspr2
- JPP((int max_v_samp_factor, JDIMENSION output_width,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+/* Sample Conversion */
+EXTERN(void) jsimd_convsamp_mmx
+ (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
+
+EXTERN(void) jsimd_convsamp_sse2
+ (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
-/* SIMD Sample Conversion */
-EXTERN(void) jsimd_convsamp_mmx JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- DCTELEM * workspace));
+EXTERN(void) jsimd_convsamp_neon
+ (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
-EXTERN(void) jsimd_convsamp_sse2 JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- DCTELEM * workspace));
+EXTERN(void) jsimd_convsamp_mips_dspr2
+ (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace);
-EXTERN(void) jsimd_convsamp_neon JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- DCTELEM * workspace));
+/* Floating Point Sample Conversion */
+EXTERN(void) jsimd_convsamp_float_3dnow
+ (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace);
-EXTERN(void) jsimd_convsamp_mips_dspr2 JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- DCTELEM * workspace));
+EXTERN(void) jsimd_convsamp_float_sse
+ (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace);
-EXTERN(void) jsimd_convsamp_float_3dnow JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- FAST_FLOAT * workspace));
+EXTERN(void) jsimd_convsamp_float_sse2
+ (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace);
-EXTERN(void) jsimd_convsamp_float_sse JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- FAST_FLOAT * workspace));
+EXTERN(void) jsimd_convsamp_float_mips_dspr2
+ (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace);
-EXTERN(void) jsimd_convsamp_float_sse2 JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- FAST_FLOAT * workspace));
+/* Slow Integer Forward DCT */
+EXTERN(void) jsimd_fdct_islow_mmx (DCTELEM * data);
-EXTERN(void) jsimd_convsamp_float_mips_dspr2 JPP((JSAMPARRAY sample_data,
- JDIMENSION start_col,
- FAST_FLOAT * workspace));
+extern const int jconst_fdct_islow_sse2[];
+EXTERN(void) jsimd_fdct_islow_sse2 (DCTELEM * data);
-/* SIMD Forward DCT */
-EXTERN(void) jsimd_fdct_islow_mmx JPP((DCTELEM * data));
-EXTERN(void) jsimd_fdct_ifast_mmx JPP((DCTELEM * data));
+EXTERN(void) jsimd_fdct_islow_mips_dspr2 (DCTELEM * data);
+
+/* Fast Integer Forward DCT */
+EXTERN(void) jsimd_fdct_ifast_mmx (DCTELEM * data);
extern const int jconst_fdct_ifast_sse2[];
-EXTERN(void) jsimd_fdct_islow_sse2 JPP((DCTELEM * data));
-extern const int jconst_fdct_islow_sse2[];
-EXTERN(void) jsimd_fdct_ifast_sse2 JPP((DCTELEM * data));
+EXTERN(void) jsimd_fdct_ifast_sse2 (DCTELEM * data);
-EXTERN(void) jsimd_fdct_ifast_neon JPP((DCTELEM * data));
+EXTERN(void) jsimd_fdct_ifast_neon (DCTELEM * data);
-EXTERN(void) jsimd_fdct_islow_mips_dspr2 JPP((DCTELEM * data));
-EXTERN(void) jsimd_fdct_ifast_mips_dspr2 JPP((DCTELEM * data));
+EXTERN(void) jsimd_fdct_ifast_mips_dspr2 (DCTELEM * data);
-EXTERN(void) jsimd_fdct_float_3dnow JPP((FAST_FLOAT * data));
+/* Floating Point Forward DCT */
+EXTERN(void) jsimd_fdct_float_3dnow (FAST_FLOAT * data);
extern const int jconst_fdct_float_sse[];
-EXTERN(void) jsimd_fdct_float_sse JPP((FAST_FLOAT * data));
-
-/* SIMD Quantization */
-EXTERN(void) jsimd_quantize_mmx JPP((JCOEFPTR coef_block,
- DCTELEM * divisors,
- DCTELEM * workspace));
-
-EXTERN(void) jsimd_quantize_sse2 JPP((JCOEFPTR coef_block,
- DCTELEM * divisors,
- DCTELEM * workspace));
-
-EXTERN(void) jsimd_quantize_neon JPP((JCOEFPTR coef_block,
- DCTELEM * divisors,
- DCTELEM * workspace));
-
-EXTERN(void) jsimd_quantize_mips_dspr2 JPP((JCOEFPTR coef_block,
- DCTELEM * divisors,
- DCTELEM * workspace));
-
-EXTERN(void) jsimd_quantize_float_3dnow JPP((JCOEFPTR coef_block,
- FAST_FLOAT * divisors,
- FAST_FLOAT * workspace));
-
-EXTERN(void) jsimd_quantize_float_sse JPP((JCOEFPTR coef_block,
- FAST_FLOAT * divisors,
- FAST_FLOAT * workspace));
-
-EXTERN(void) jsimd_quantize_float_sse2 JPP((JCOEFPTR coef_block,
- FAST_FLOAT * divisors,
- FAST_FLOAT * workspace));
-
-EXTERN(void) jsimd_quantize_float_mips_dspr2 JPP((JCOEFPTR coef_block,
- FAST_FLOAT * divisors,
- FAST_FLOAT * workspace));
-
-/* SIMD Reduced Inverse DCT */
-EXTERN(void) jsimd_idct_2x2_mmx JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_4x4_mmx JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
+EXTERN(void) jsimd_fdct_float_sse (FAST_FLOAT * data);
+
+/* Quantization */
+EXTERN(void) jsimd_quantize_mmx
+ (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
+
+EXTERN(void) jsimd_quantize_sse2
+ (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
+
+EXTERN(void) jsimd_quantize_neon
+ (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
+
+EXTERN(void) jsimd_quantize_mips_dspr2
+ (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace);
+
+/* Floating Point Quantization */
+EXTERN(void) jsimd_quantize_float_3dnow
+ (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace);
+
+EXTERN(void) jsimd_quantize_float_sse
+ (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace);
+
+EXTERN(void) jsimd_quantize_float_sse2
+ (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace);
+
+EXTERN(void) jsimd_quantize_float_mips_dspr2
+ (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace);
+
+/* Scaled Inverse DCT */
+EXTERN(void) jsimd_idct_2x2_mmx
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_4x4_mmx
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
extern const int jconst_idct_red_sse2[];
-EXTERN(void) jsimd_idct_2x2_sse2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_4x4_sse2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-
-EXTERN(void) jsimd_idct_2x2_neon JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_4x4_neon JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-
-EXTERN(void) jsimd_idct_2x2_mips_dspr2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_4x4_mips_dspr2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col,
- int * workspace));
-EXTERN(void) jsimd_idct_6x6_mips_dspr2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_12x12_pass1_mips_dspr2 JPP((JCOEFPTR coef_block,
- void * dct_table,
- int * workspace));
-EXTERN(void) jsimd_idct_12x12_pass2_mips_dspr2 JPP((int * workspace,
- int * output));
-
-/* SIMD Inverse DCT */
-EXTERN(void) jsimd_idct_islow_mmx JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_ifast_mmx JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
+EXTERN(void) jsimd_idct_2x2_sse2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_4x4_sse2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+
+EXTERN(void) jsimd_idct_2x2_neon
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_4x4_neon
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+
+EXTERN(void) jsimd_idct_2x2_mips_dspr2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_4x4_mips_dspr2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col, int * workspace);
+EXTERN(void) jsimd_idct_6x6_mips_dspr2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+EXTERN(void) jsimd_idct_12x12_pass1_mips_dspr2
+ (JCOEFPTR coef_block, void * dct_table, int * workspace);
+EXTERN(void) jsimd_idct_12x12_pass2_mips_dspr2
+ (int * workspace, int * output);
+
+/* Slow Integer Inverse DCT */
+EXTERN(void) jsimd_idct_islow_mmx
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
extern const int jconst_idct_islow_sse2[];
-EXTERN(void) jsimd_idct_islow_sse2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
+EXTERN(void) jsimd_idct_islow_sse2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+
+EXTERN(void) jsimd_idct_islow_neon
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+
+EXTERN(void) jsimd_idct_islow_mips_dspr2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+
+/* Fast Integer Inverse DCT */
+EXTERN(void) jsimd_idct_ifast_mmx
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+
extern const int jconst_idct_ifast_sse2[];
-EXTERN(void) jsimd_idct_ifast_sse2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-
-EXTERN(void) jsimd_idct_islow_neon JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-EXTERN(void) jsimd_idct_ifast_neon JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-
-EXTERN(void) jsimd_idct_islow_mips_dspr2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- int * output_buf,
- JSAMPLE * output_col));
-EXTERN(void) jsimd_idct_ifast_cols_mips_dspr2 JPP((JCOEF * inptr,
- IFAST_MULT_TYPE * quantptr,
- DCTELEM * wsptr,
- const int * idct_coefs));
-EXTERN(void) jsimd_idct_ifast_rows_mips_dspr2 JPP((DCTELEM * wsptr,
- JSAMPARRAY output_buf,
- JDIMENSION output_col,
- const int * idct_coefs));
-
-EXTERN(void) jsimd_idct_float_3dnow JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
+EXTERN(void) jsimd_idct_ifast_sse2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+
+EXTERN(void) jsimd_idct_ifast_neon
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
+
+EXTERN(void) jsimd_idct_ifast_cols_mips_dspr2
+ (JCOEF * inptr, IFAST_MULT_TYPE * quantptr, DCTELEM * wsptr,
+ const int * idct_coefs);
+EXTERN(void) jsimd_idct_ifast_rows_mips_dspr2
+ (DCTELEM * wsptr, JSAMPARRAY output_buf, JDIMENSION output_col,
+ const int * idct_coefs);
+
+/* Floating Point Inverse DCT */
+EXTERN(void) jsimd_idct_float_3dnow
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
extern const int jconst_idct_float_sse[];
-EXTERN(void) jsimd_idct_float_sse JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
+EXTERN(void) jsimd_idct_float_sse
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
extern const int jconst_idct_float_sse2[];
-EXTERN(void) jsimd_idct_float_sse2 JPP((void * dct_table,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf,
- JDIMENSION output_col));
-
+EXTERN(void) jsimd_idct_float_sse2
+ (void * dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col);
diff --git a/transupp.h b/transupp.h
index 19a7cff..c5bfa91 100644
--- a/transupp.h
+++ b/transupp.h
@@ -154,27 +154,24 @@ typedef struct {
/* Parse a crop specification (written in X11 geometry style) */
EXTERN(boolean) jtransform_parse_crop_spec
- JPP((jpeg_transform_info *info, const char *spec));
+ (jpeg_transform_info *info, const char *spec);
/* Request any required workspace */
EXTERN(boolean) jtransform_request_workspace
- JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
+ (j_decompress_ptr srcinfo, jpeg_transform_info *info);
/* Adjust output image parameters */
EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jpeg_transform_info *info));
+ (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info *info);
/* Execute the actual transformation, if any */
EXTERN(void) jtransform_execute_transform
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jpeg_transform_info *info));
+ (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info *info);
/* Determine whether lossless transformation is perfectly
* possible for a specified image and transformation.
*/
EXTERN(boolean) jtransform_perfect_transform
- JPP((JDIMENSION image_width, JDIMENSION image_height,
- int MCU_width, int MCU_height,
- JXFORM_CODE transform));
+ (JDIMENSION image_width, JDIMENSION image_height, int MCU_width,
+ int MCU_height, JXFORM_CODE transform);
/* jtransform_execute_transform used to be called
* jtransform_execute_transformation, but some compilers complain about
@@ -200,8 +197,8 @@ typedef enum {
/* Setup decompression object to save desired markers in memory */
EXTERN(void) jcopy_markers_setup
- JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option));
+ (j_decompress_ptr srcinfo, JCOPY_OPTION option);
/* Copy markers saved in the given source object to the destination object */
EXTERN(void) jcopy_markers_execute
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- JCOPY_OPTION option));
+ (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+ JCOPY_OPTION option);
diff --git a/turbojpeg.c b/turbojpeg.c
index 648744c..6e86e26 100644
--- a/turbojpeg.c
+++ b/turbojpeg.c
@@ -1311,8 +1311,8 @@ DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, unsigned char *srcBuf,
unsigned char *rgbBuf=NULL;
unsigned char *_dstBuf=NULL; int _pitch=0;
#endif
- JMETHOD(int, old_read_markers, (j_decompress_ptr));
- JMETHOD(void, old_reset_marker_reader, (j_decompress_ptr));
+ int (*old_read_markers)(j_decompress_ptr);
+ void (*old_reset_marker_reader)(j_decompress_ptr);
getdinstance(handle);
diff --git a/win/jconfig.h.in b/win/jconfig.h.in
index f87bef5..6865faf 100644
--- a/win/jconfig.h.in
+++ b/win/jconfig.h.in
@@ -7,7 +7,6 @@
#cmakedefine D_ARITH_CODING_SUPPORTED
#cmakedefine MEM_SRCDST_SUPPORTED
-#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
#define HAVE_UNSIGNED_SHORT
/* #define void char */
diff --git a/wrbmp.c b/wrbmp.c
index d769404..a82824d 100644
--- a/wrbmp.c
+++ b/wrbmp.c
@@ -60,8 +60,8 @@ typedef bmp_dest_struct * bmp_dest_ptr;
/* Forward declarations */
LOCAL(void) write_colormap
- JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest,
- int map_colors, int map_entry_size));
+ (j_decompress_ptr cinfo, bmp_dest_ptr dest, int map_colors,
+ int map_entry_size);
/*
diff --git a/wrrle.c b/wrrle.c
index 4fdf372..fbc2fb0 100644
--- a/wrrle.c
+++ b/wrrle.c
@@ -63,8 +63,8 @@ typedef rle_dest_struct * rle_dest_ptr;
/* Forward declarations */
METHODDEF(void) rle_put_pixel_rows
- JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied));
+ (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
+ JDIMENSION rows_supplied);
/*