Rename boolean to wxjpeg_boolean to avoid conflicts, e.g. with boolean
defined in the Windows headers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
82
configure
vendored
82
configure
vendored
@@ -11803,6 +11803,8 @@ if test "$wxUSE_WINE" = "yes"; then
|
|||||||
DEFAULT_DEFAULT_wxUSE_MOTIF=0
|
DEFAULT_DEFAULT_wxUSE_MOTIF=0
|
||||||
DEFAULT_DEFAULT_wxUSE_MSW=1
|
DEFAULT_DEFAULT_wxUSE_MSW=1
|
||||||
wxUSE_SHARED=no
|
wxUSE_SHARED=no
|
||||||
|
CC=${CC:-winegcc}
|
||||||
|
CXX=${CXX:-wineg++}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -16042,8 +16044,6 @@ esac
|
|||||||
|
|
||||||
if test "$wxUSE_WINE" = "yes"; then
|
if test "$wxUSE_WINE" = "yes"; then
|
||||||
wants_win32=1
|
wants_win32=1
|
||||||
CC=winegcc
|
|
||||||
CXX=wineg++
|
|
||||||
LDFLAGS_GUI="-mwindows"
|
LDFLAGS_GUI="-mwindows"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -27125,72 +27125,6 @@ _ACEOF
|
|||||||
|
|
||||||
WIN32INSTALL=win32install
|
WIN32INSTALL=win32install
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for boolean" >&5
|
|
||||||
echo $ECHO_N "checking for boolean... $ECHO_C" >&6
|
|
||||||
if test "${ac_cv_type_boolean+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
/* confdefs.h. */
|
|
||||||
_ACEOF
|
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
|
||||||
/* end confdefs.h. */
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
if ((boolean *) 0)
|
|
||||||
return 0;
|
|
||||||
if (sizeof (boolean))
|
|
||||||
return 0;
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
rm -f conftest.$ac_objext
|
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|
||||||
(eval $ac_compile) 2>conftest.er1
|
|
||||||
ac_status=$?
|
|
||||||
grep -v '^ *+' conftest.er1 >conftest.err
|
|
||||||
rm -f conftest.er1
|
|
||||||
cat conftest.err >&5
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); } &&
|
|
||||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; } &&
|
|
||||||
{ ac_try='test -s conftest.$ac_objext'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; }; then
|
|
||||||
ac_cv_type_boolean=yes
|
|
||||||
else
|
|
||||||
echo "$as_me: failed program was:" >&5
|
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
|
||||||
|
|
||||||
ac_cv_type_boolean=no
|
|
||||||
fi
|
|
||||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
echo "$as_me:$LINENO: result: $ac_cv_type_boolean" >&5
|
|
||||||
echo "${ECHO_T}$ac_cv_type_boolean" >&6
|
|
||||||
if test $ac_cv_type_boolean = yes; then
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define HAVE_BOOLEAN 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_header in pbt.h
|
for ac_header in pbt.h
|
||||||
do
|
do
|
||||||
@@ -29267,7 +29201,7 @@ _ACEOF
|
|||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Intrinsic.h>
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||||
@@ -29294,7 +29228,7 @@ else
|
|||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
for ac_dir in $ac_x_header_dirs; do
|
for ac_dir in $ac_x_header_dirs; do
|
||||||
if test -r "$ac_dir/X11/Xlib.h"; then
|
if test -r "$ac_dir/X11/Intrinsic.h"; then
|
||||||
ac_x_includes=$ac_dir
|
ac_x_includes=$ac_dir
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@@ -29308,18 +29242,18 @@ if test "$ac_x_libraries" = no; then
|
|||||||
# See if we find them without any special options.
|
# See if we find them without any special options.
|
||||||
# Don't add to $LIBS permanently.
|
# Don't add to $LIBS permanently.
|
||||||
ac_save_LIBS=$LIBS
|
ac_save_LIBS=$LIBS
|
||||||
LIBS="-lX11 $LIBS"
|
LIBS="-lXt $LIBS"
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
/* confdefs.h. */
|
/* confdefs.h. */
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Intrinsic.h>
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
XrmInitialize ()
|
XtMalloc (0)
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -29357,7 +29291,7 @@ for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
|
|||||||
do
|
do
|
||||||
# Don't even attempt the hair of trying to link an X program!
|
# Don't even attempt the hair of trying to link an X program!
|
||||||
for ac_extension in a so sl; do
|
for ac_extension in a so sl; do
|
||||||
if test -r $ac_dir/libX11.$ac_extension; then
|
if test -r $ac_dir/libXt.$ac_extension; then
|
||||||
ac_x_libraries=$ac_dir
|
ac_x_libraries=$ac_dir
|
||||||
break 2
|
break 2
|
||||||
fi
|
fi
|
||||||
|
@@ -2958,12 +2958,6 @@ if test "$USE_WIN32" = 1 ; then
|
|||||||
dnl install Win32-specific files in "make install"
|
dnl install Win32-specific files in "make install"
|
||||||
WIN32INSTALL=win32install
|
WIN32INSTALL=win32install
|
||||||
|
|
||||||
dnl the jpeg header jmorecfg.h delcares the type boolean, which conflicts
|
|
||||||
dnl on systems which declare it in the system headers. If HAVE_BOOLEAN is
|
|
||||||
dnl defined then jmorecfg.h doesn't declare it, so checking for it here
|
|
||||||
dnl solves the problem.
|
|
||||||
AC_CHECK_TYPES(boolean, [], [], [#include <windows.h>])
|
|
||||||
|
|
||||||
dnl pbt.h is missing on Wine at least
|
dnl pbt.h is missing on Wine at least
|
||||||
AC_CHECK_HEADERS(pbt.h, [], [AC_DEFINE(NEED_PBT_H)])
|
AC_CHECK_HEADERS(pbt.h, [], [AC_DEFINE(NEED_PBT_H)])
|
||||||
fi
|
fi
|
||||||
|
@@ -1161,10 +1161,6 @@
|
|||||||
*/
|
*/
|
||||||
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
|
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
|
||||||
|
|
||||||
/* Define if the system headers declare the type boolean (which will conflict
|
|
||||||
* with the jpeg headers unless HAVE_BOOLEAN is defined). */
|
|
||||||
#undef HAVE_BOOLEAN
|
|
||||||
|
|
||||||
/* Define if the header pbt.h is missing. */
|
/* Define if the header pbt.h is missing. */
|
||||||
#undef NEED_PBT_H
|
#undef NEED_PBT_H
|
||||||
|
|
||||||
|
@@ -1243,10 +1243,6 @@ typedef pid_t GPid;
|
|||||||
|
|
||||||
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
|
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
|
||||||
|
|
||||||
/* Define if the system headers declare the type boolean (which will conflict
|
|
||||||
* with the jpeg headers unless HAVE_BOOLEAN is defined). */
|
|
||||||
#undef HAVE_BOOLEAN
|
|
||||||
|
|
||||||
/* Define if the header pbt.h is missing. */
|
/* Define if the header pbt.h is missing. */
|
||||||
#undef NEED_PBT_H
|
#undef NEED_PBT_H
|
||||||
|
|
||||||
|
@@ -26,17 +26,6 @@
|
|||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// NB: Some compilers define boolean type in Windows headers
|
|
||||||
// (e.g. Watcom C++, but not some Open Watcom versions).
|
|
||||||
// This causes a conflict with jmorecfg.h header from libjpeg, so we have
|
|
||||||
// to make sure libjpeg won't try to define boolean itself. This is done by
|
|
||||||
// defining HAVE_BOOLEAN.
|
|
||||||
#if defined(__WXMSW__) && (defined(__MWERKS__) || defined(__DIGITALMARS__) || \
|
|
||||||
(defined(__WATCOMC__) && !wxONLY_WATCOM_EARLIER_THAN(1,6)))
|
|
||||||
#define HAVE_BOOLEAN
|
|
||||||
#include "wx/msw/wrapwin.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
@@ -45,6 +34,10 @@ extern "C"
|
|||||||
#include "jpeglib.h"
|
#include "jpeglib.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_WXJPEG_BOOLEAN
|
||||||
|
typedef boolean wxjpeg_boolean;
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/filefn.h"
|
#include "wx/filefn.h"
|
||||||
#include "wx/wfstream.h"
|
#include "wx/wfstream.h"
|
||||||
|
|
||||||
@@ -100,7 +93,7 @@ CPP_METHODDEF(void) wx_init_source ( j_decompress_ptr WXUNUSED(cinfo) )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CPP_METHODDEF(boolean) wx_fill_input_buffer ( j_decompress_ptr cinfo )
|
CPP_METHODDEF(wxjpeg_boolean) wx_fill_input_buffer ( j_decompress_ptr cinfo )
|
||||||
{
|
{
|
||||||
wx_src_ptr src = (wx_src_ptr) cinfo->src;
|
wx_src_ptr src = (wx_src_ptr) cinfo->src;
|
||||||
|
|
||||||
@@ -329,7 +322,7 @@ CPP_METHODDEF(void) wx_init_destination (j_compress_ptr cinfo)
|
|||||||
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
|
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPP_METHODDEF(boolean) wx_empty_output_buffer (j_compress_ptr cinfo)
|
CPP_METHODDEF(wxjpeg_boolean) wx_empty_output_buffer (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
wx_dest_ptr dest = (wx_dest_ptr) cinfo->dest;
|
wx_dest_ptr dest = (wx_dest_ptr) cinfo->dest;
|
||||||
|
|
||||||
|
@@ -116,7 +116,7 @@ jpeg_abort_compress (j_compress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress)
|
jpeg_suppress_tables (j_compress_ptr cinfo, wxjpeg_boolean suppress)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
JQUANT_TBL * qtbl;
|
JQUANT_TBL * qtbl;
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)
|
jpeg_start_compress (j_compress_ptr cinfo, wxjpeg_boolean write_all_tables)
|
||||||
{
|
{
|
||||||
if (cinfo->global_state != CSTATE_START)
|
if (cinfo->global_state != CSTATE_START)
|
||||||
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
||||||
|
@@ -58,12 +58,12 @@ typedef my_coef_controller * my_coef_ptr;
|
|||||||
|
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
METHODDEF(boolean) compress_data
|
METHODDEF(wxjpeg_boolean) compress_data
|
||||||
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
||||||
#ifdef FULL_COEF_BUFFER_SUPPORTED
|
#ifdef FULL_COEF_BUFFER_SUPPORTED
|
||||||
METHODDEF(boolean) compress_first_pass
|
METHODDEF(wxjpeg_boolean) compress_first_pass
|
||||||
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
||||||
METHODDEF(boolean) compress_output
|
METHODDEF(wxjpeg_boolean) compress_output
|
||||||
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
|
|||||||
* which we index according to the component's SOF position.
|
* which we index according to the component's SOF position.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||||
{
|
{
|
||||||
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
||||||
@@ -241,7 +241,7 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
* at the scan-dependent variables (MCU dimensions, etc).
|
* at the scan-dependent variables (MCU dimensions, etc).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||||
{
|
{
|
||||||
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
||||||
@@ -337,7 +337,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
* NB: input_buf is ignored; it is likely to be a NULL pointer.
|
* NB: input_buf is ignored; it is likely to be a NULL pointer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||||
{
|
{
|
||||||
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
||||||
@@ -402,7 +402,7 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
jinit_c_coef_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer)
|
||||||
{
|
{
|
||||||
my_coef_ptr coef;
|
my_coef_ptr coef;
|
||||||
|
|
||||||
|
@@ -86,11 +86,11 @@ typedef struct {
|
|||||||
|
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));
|
METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));
|
||||||
#ifdef ENTROPY_OPT_SUPPORTED
|
#ifdef ENTROPY_OPT_SUPPORTED
|
||||||
METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
|
METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
|
||||||
#endif
|
#endif
|
||||||
@@ -103,7 +103,7 @@ METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(void)
|
METHODDEF(void)
|
||||||
start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
|
start_pass_huff (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics)
|
||||||
{
|
{
|
||||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||||
int ci, dctbl, actbl;
|
int ci, dctbl, actbl;
|
||||||
@@ -176,7 +176,7 @@ start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
|
jpeg_make_c_derived_tbl (j_compress_ptr cinfo, wxjpeg_boolean isDC, int tblno,
|
||||||
c_derived_tbl ** pdtbl)
|
c_derived_tbl ** pdtbl)
|
||||||
{
|
{
|
||||||
JHUFF_TBL *htbl;
|
JHUFF_TBL *htbl;
|
||||||
@@ -274,7 +274,7 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
|
|||||||
{ action; } }
|
{ action; } }
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
dump_buffer (working_state * state)
|
dump_buffer (working_state * state)
|
||||||
/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */
|
/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */
|
||||||
{
|
{
|
||||||
@@ -298,7 +298,7 @@ dump_buffer (working_state * state)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
INLINE
|
INLINE
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
emit_bits (working_state * state, unsigned int code, int size)
|
emit_bits (working_state * state, unsigned int code, int size)
|
||||||
/* Emit some bits; return TRUE if successful, FALSE if must suspend */
|
/* Emit some bits; return TRUE if successful, FALSE if must suspend */
|
||||||
{
|
{
|
||||||
@@ -336,7 +336,7 @@ emit_bits (working_state * state, unsigned int code, int size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
flush_bits (working_state * state)
|
flush_bits (working_state * state)
|
||||||
{
|
{
|
||||||
if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */
|
if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */
|
||||||
@@ -349,7 +349,7 @@ flush_bits (working_state * state)
|
|||||||
|
|
||||||
/* Encode a single block's worth of coefficients */
|
/* Encode a single block's worth of coefficients */
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
|
encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
|
||||||
c_derived_tbl *dctbl, c_derived_tbl *actbl)
|
c_derived_tbl *dctbl, c_derived_tbl *actbl)
|
||||||
{
|
{
|
||||||
@@ -447,7 +447,7 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
|
|||||||
* Emit a restart marker & resynchronize predictions.
|
* Emit a restart marker & resynchronize predictions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
emit_restart (working_state * state, int restart_num)
|
emit_restart (working_state * state, int restart_num)
|
||||||
{
|
{
|
||||||
int ci;
|
int ci;
|
||||||
@@ -472,7 +472,7 @@ emit_restart (working_state * state, int restart_num)
|
|||||||
* Encode and output one MCU's worth of Huffman-compressed coefficients.
|
* Encode and output one MCU's worth of Huffman-compressed coefficients.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -641,7 +641,7 @@ htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
|
|||||||
* No data is actually output, so no suspension return is possible.
|
* No data is actually output, so no suspension return is possible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -849,8 +849,8 @@ finish_pass_gather (j_compress_ptr cinfo)
|
|||||||
int ci, dctbl, actbl;
|
int ci, dctbl, actbl;
|
||||||
jpeg_component_info * compptr;
|
jpeg_component_info * compptr;
|
||||||
JHUFF_TBL **htblptr;
|
JHUFF_TBL **htblptr;
|
||||||
boolean did_dc[NUM_HUFF_TBLS];
|
wxjpeg_boolean did_dc[NUM_HUFF_TBLS];
|
||||||
boolean did_ac[NUM_HUFF_TBLS];
|
wxjpeg_boolean did_ac[NUM_HUFF_TBLS];
|
||||||
|
|
||||||
/* It's important not to apply jpeg_gen_optimal_table more than once
|
/* It's important not to apply jpeg_gen_optimal_table more than once
|
||||||
* per table, because it clobbers the input frequency counts!
|
* per table, because it clobbers the input frequency counts!
|
||||||
|
@@ -39,7 +39,7 @@ typedef struct {
|
|||||||
|
|
||||||
/* Expand a Huffman table definition into the derived format */
|
/* Expand a Huffman table definition into the derived format */
|
||||||
EXTERN(void) jpeg_make_c_derived_tbl
|
EXTERN(void) jpeg_make_c_derived_tbl
|
||||||
JPP((j_compress_ptr cinfo, boolean isDC, int tblno,
|
JPP((j_compress_ptr cinfo, wxjpeg_boolean isDC, int tblno,
|
||||||
c_derived_tbl ** pdtbl));
|
c_derived_tbl ** pdtbl));
|
||||||
|
|
||||||
/* Generate an optimal table definition given the specified counts */
|
/* Generate an optimal table definition given the specified counts */
|
||||||
|
@@ -56,7 +56,7 @@ jinit_compress_master (j_compress_ptr cinfo)
|
|||||||
|
|
||||||
/* Need a full-image coefficient buffer in any multi-pass mode. */
|
/* Need a full-image coefficient buffer in any multi-pass mode. */
|
||||||
jinit_c_coef_controller(cinfo,
|
jinit_c_coef_controller(cinfo,
|
||||||
(boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
|
(wxjpeg_boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));
|
||||||
jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);
|
jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);
|
||||||
|
|
||||||
jinit_marker_writer(cinfo);
|
jinit_marker_writer(cinfo);
|
||||||
|
@@ -30,7 +30,7 @@ typedef struct {
|
|||||||
|
|
||||||
JDIMENSION cur_iMCU_row; /* number of current iMCU row */
|
JDIMENSION cur_iMCU_row; /* number of current iMCU row */
|
||||||
JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */
|
JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */
|
||||||
boolean suspended; /* remember if we suspended output */
|
wxjpeg_boolean suspended; /* remember if we suspended output */
|
||||||
J_BUF_MODE pass_mode; /* current operating mode */
|
J_BUF_MODE pass_mode; /* current operating mode */
|
||||||
|
|
||||||
/* If using just a strip buffer, this points to the entire set of buffers
|
/* If using just a strip buffer, this points to the entire set of buffers
|
||||||
@@ -173,7 +173,7 @@ process_data_buffer_main (j_compress_ptr cinfo,
|
|||||||
my_main_ptr mymain = (my_main_ptr) cinfo->main;
|
my_main_ptr mymain = (my_main_ptr) cinfo->main;
|
||||||
int ci;
|
int ci;
|
||||||
jpeg_component_info *compptr;
|
jpeg_component_info *compptr;
|
||||||
boolean writing = (mymain->pass_mode != JBUF_CRANK_DEST);
|
wxjpeg_boolean writing = (mymain->pass_mode != JBUF_CRANK_DEST);
|
||||||
|
|
||||||
while (mymain->cur_iMCU_row < cinfo->total_iMCU_rows) {
|
while (mymain->cur_iMCU_row < cinfo->total_iMCU_rows) {
|
||||||
/* Realign the virtual buffers if at the start of an iMCU row. */
|
/* Realign the virtual buffers if at the start of an iMCU row. */
|
||||||
@@ -242,7 +242,7 @@ process_data_buffer_main (j_compress_ptr cinfo,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
jinit_c_main_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer)
|
||||||
{
|
{
|
||||||
my_main_ptr mymain;
|
my_main_ptr mymain;
|
||||||
int ci;
|
int ci;
|
||||||
|
@@ -181,7 +181,7 @@ emit_dqt (j_compress_ptr cinfo, int index)
|
|||||||
|
|
||||||
|
|
||||||
LOCAL(void)
|
LOCAL(void)
|
||||||
emit_dht (j_compress_ptr cinfo, int index, boolean is_ac)
|
emit_dht (j_compress_ptr cinfo, int index, wxjpeg_boolean is_ac)
|
||||||
/* Emit a DHT marker */
|
/* Emit a DHT marker */
|
||||||
{
|
{
|
||||||
JHUFF_TBL * htbl;
|
JHUFF_TBL * htbl;
|
||||||
@@ -494,7 +494,7 @@ METHODDEF(void)
|
|||||||
write_frame_header (j_compress_ptr cinfo)
|
write_frame_header (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
int ci, prec;
|
int ci, prec;
|
||||||
boolean is_baseline;
|
wxjpeg_boolean is_baseline;
|
||||||
jpeg_component_info *compptr;
|
jpeg_component_info *compptr;
|
||||||
|
|
||||||
/* Emit DQT for each quantization table.
|
/* Emit DQT for each quantization table.
|
||||||
|
@@ -135,7 +135,7 @@ validate_script (j_compress_ptr cinfo)
|
|||||||
const jpeg_scan_info * scanptr;
|
const jpeg_scan_info * scanptr;
|
||||||
int scanno, ncomps, ci, coefi, thisi;
|
int scanno, ncomps, ci, coefi, thisi;
|
||||||
int Ss, Se, Ah, Al;
|
int Ss, Se, Ah, Al;
|
||||||
boolean component_sent[MAX_COMPONENTS];
|
wxjpeg_boolean component_sent[MAX_COMPONENTS];
|
||||||
#ifdef C_PROGRESSIVE_SUPPORTED
|
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||||
int * last_bitpos_ptr;
|
int * last_bitpos_ptr;
|
||||||
int last_bitpos[MAX_COMPONENTS][DCTSIZE2];
|
int last_bitpos[MAX_COMPONENTS][DCTSIZE2];
|
||||||
@@ -540,7 +540,7 @@ finish_pass_master (j_compress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
|
jinit_c_master_control (j_compress_ptr cinfo, wxjpeg_boolean transcode_only)
|
||||||
{
|
{
|
||||||
my_master_ptr master;
|
my_master_ptr master;
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
|
jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
|
||||||
const unsigned int *basic_table,
|
const unsigned int *basic_table,
|
||||||
int scale_factor, boolean force_baseline)
|
int scale_factor, wxjpeg_boolean force_baseline)
|
||||||
/* Define a quantization table equal to the basic_table times
|
/* Define a quantization table equal to the basic_table times
|
||||||
* a scale factor (given as a percentage).
|
* a scale factor (given as a percentage).
|
||||||
* If force_baseline is TRUE, the computed quantization table entries
|
* If force_baseline is TRUE, the computed quantization table entries
|
||||||
@@ -62,7 +62,7 @@ jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
|
|||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
|
jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
|
||||||
boolean force_baseline)
|
wxjpeg_boolean force_baseline)
|
||||||
/* Set or change the 'quality' (quantization) setting, using default tables
|
/* Set or change the 'quality' (quantization) setting, using default tables
|
||||||
* and a straight percentage-scaling quality scale. In most cases it's better
|
* and a straight percentage-scaling quality scale. In most cases it's better
|
||||||
* to use jpeg_set_quality (below); this entry point is provided for
|
* to use jpeg_set_quality (below); this entry point is provided for
|
||||||
@@ -129,7 +129,7 @@ jpeg_quality_scaling (int quality)
|
|||||||
|
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
|
jpeg_set_quality (j_compress_ptr cinfo, int quality, wxjpeg_boolean force_baseline)
|
||||||
/* Set or change the 'quality' (quantization) setting, using default tables.
|
/* Set or change the 'quality' (quantization) setting, using default tables.
|
||||||
* This is the standard quality-adjusting entry point for typical user
|
* This is the standard quality-adjusting entry point for typical user
|
||||||
* interfaces; only those who want detailed control over quantization tables
|
* interfaces; only those who want detailed control over quantization tables
|
||||||
|
@@ -25,7 +25,7 @@ typedef struct {
|
|||||||
struct jpeg_entropy_encoder pub; /* public fields */
|
struct jpeg_entropy_encoder pub; /* public fields */
|
||||||
|
|
||||||
/* Mode flag: TRUE for optimization, FALSE for actual data output */
|
/* Mode flag: TRUE for optimization, FALSE for actual data output */
|
||||||
boolean gather_statistics;
|
wxjpeg_boolean gather_statistics;
|
||||||
|
|
||||||
/* Bit-level coding status.
|
/* Bit-level coding status.
|
||||||
* next_output_byte/free_in_buffer are local copies of cinfo->dest fields.
|
* next_output_byte/free_in_buffer are local copies of cinfo->dest fields.
|
||||||
@@ -86,13 +86,13 @@ typedef phuff_entropy_encoder * phuff_entropy_ptr;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo));
|
METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo));
|
||||||
METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
|
METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
|
||||||
@@ -103,10 +103,10 @@ METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(void)
|
METHODDEF(void)
|
||||||
start_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics)
|
start_pass_phuff (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
boolean is_DC_band;
|
wxjpeg_boolean is_DC_band;
|
||||||
int ci, tbl;
|
int ci, tbl;
|
||||||
jpeg_component_info * compptr;
|
jpeg_component_info * compptr;
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@ emit_restart (phuff_entropy_ptr entropy, int restart_num)
|
|||||||
* or first pass of successive approximation).
|
* or first pass of successive approximation).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -460,7 +460,7 @@ encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
* or first pass of successive approximation).
|
* or first pass of successive approximation).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -567,7 +567,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
* is not very clear on the point.
|
* is not very clear on the point.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -614,7 +614,7 @@ encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
* MCU encoding for AC successive approximation refinement scan.
|
* MCU encoding for AC successive approximation refinement scan.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -767,11 +767,11 @@ METHODDEF(void)
|
|||||||
finish_pass_gather_phuff (j_compress_ptr cinfo)
|
finish_pass_gather_phuff (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
boolean is_DC_band;
|
wxjpeg_boolean is_DC_band;
|
||||||
int ci, tbl;
|
int ci, tbl;
|
||||||
jpeg_component_info * compptr;
|
jpeg_component_info * compptr;
|
||||||
JHUFF_TBL **htblptr;
|
JHUFF_TBL **htblptr;
|
||||||
boolean did[NUM_HUFF_TBLS];
|
wxjpeg_boolean did[NUM_HUFF_TBLS];
|
||||||
|
|
||||||
/* Flush out buffered data (all we care about is counting the EOB symbol) */
|
/* Flush out buffered data (all we care about is counting the EOB symbol) */
|
||||||
emit_eobrun(entropy);
|
emit_eobrun(entropy);
|
||||||
|
@@ -312,7 +312,7 @@ create_context_buffer (j_compress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
jinit_c_prep_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer)
|
||||||
{
|
{
|
||||||
my_prep_ptr prep;
|
my_prep_ptr prep;
|
||||||
int ci;
|
int ci;
|
||||||
|
@@ -466,7 +466,7 @@ jinit_downsampler (j_compress_ptr cinfo)
|
|||||||
my_downsample_ptr downsample;
|
my_downsample_ptr downsample;
|
||||||
int ci;
|
int ci;
|
||||||
jpeg_component_info * compptr;
|
jpeg_component_info * compptr;
|
||||||
boolean smoothok = TRUE;
|
wxjpeg_boolean smoothok = TRUE;
|
||||||
|
|
||||||
downsample = (my_downsample_ptr)
|
downsample = (my_downsample_ptr)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
|
@@ -279,7 +279,7 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
|
|||||||
* NB: input_buf is ignored; it is likely to be a NULL pointer.
|
* NB: input_buf is ignored; it is likely to be a NULL pointer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||||
{
|
{
|
||||||
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
||||||
|
@@ -238,7 +238,7 @@ default_decompress_parms (j_decompress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(int)
|
GLOBAL(int)
|
||||||
jpeg_read_header (j_decompress_ptr cinfo, boolean require_image)
|
jpeg_read_header (j_decompress_ptr cinfo, wxjpeg_boolean require_image)
|
||||||
{
|
{
|
||||||
int retcode;
|
int retcode;
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ jpeg_consume_input (j_decompress_ptr cinfo)
|
|||||||
* Have we finished reading the input file?
|
* Have we finished reading the input file?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(wxjpeg_boolean)
|
||||||
jpeg_input_complete (j_decompress_ptr cinfo)
|
jpeg_input_complete (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
/* Check for valid jpeg object */
|
/* Check for valid jpeg object */
|
||||||
@@ -345,7 +345,7 @@ jpeg_input_complete (j_decompress_ptr cinfo)
|
|||||||
* Is there more than one scan?
|
* Is there more than one scan?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(wxjpeg_boolean)
|
||||||
jpeg_has_multiple_scans (j_decompress_ptr cinfo)
|
jpeg_has_multiple_scans (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
/* Only valid after jpeg_read_header completes */
|
/* Only valid after jpeg_read_header completes */
|
||||||
@@ -365,7 +365,7 @@ jpeg_has_multiple_scans (j_decompress_ptr cinfo)
|
|||||||
* a suspending data source is used.
|
* a suspending data source is used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(wxjpeg_boolean)
|
||||||
jpeg_finish_decompress (j_decompress_ptr cinfo)
|
jpeg_finish_decompress (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
if ((cinfo->global_state == DSTATE_SCANNING ||
|
if ((cinfo->global_state == DSTATE_SCANNING ||
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
|
LOCAL(wxjpeg_boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -34,7 +34,7 @@ LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
|
|||||||
* a suspending data source is used.
|
* a suspending data source is used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(wxjpeg_boolean)
|
||||||
jpeg_start_decompress (j_decompress_ptr cinfo)
|
jpeg_start_decompress (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
if (cinfo->global_state == DSTATE_READY) {
|
if (cinfo->global_state == DSTATE_READY) {
|
||||||
@@ -91,7 +91,7 @@ jpeg_start_decompress (j_decompress_ptr cinfo)
|
|||||||
* If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.
|
* If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
output_pass_setup (j_decompress_ptr cinfo)
|
output_pass_setup (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
if (cinfo->global_state != DSTATE_PRESCAN) {
|
if (cinfo->global_state != DSTATE_PRESCAN) {
|
||||||
@@ -224,7 +224,7 @@ jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
|
|||||||
* Initialize for an output pass in buffered-image mode.
|
* Initialize for an output pass in buffered-image mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(wxjpeg_boolean)
|
||||||
jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
|
jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
|
||||||
{
|
{
|
||||||
if (cinfo->global_state != DSTATE_BUFIMAGE &&
|
if (cinfo->global_state != DSTATE_BUFIMAGE &&
|
||||||
@@ -249,7 +249,7 @@ jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
|
|||||||
* a suspending data source is used.
|
* a suspending data source is used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(wxjpeg_boolean)
|
||||||
jpeg_finish_output (j_decompress_ptr cinfo)
|
jpeg_finish_output (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
if ((cinfo->global_state == DSTATE_SCANNING ||
|
if ((cinfo->global_state == DSTATE_SCANNING ||
|
||||||
|
@@ -77,7 +77,7 @@ init_destination (j_compress_ptr cinfo)
|
|||||||
* write it out when emptying the buffer externally.
|
* write it out when emptying the buffer externally.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
empty_output_buffer (j_compress_ptr cinfo)
|
empty_output_buffer (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
|
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
|
||||||
|
@@ -27,7 +27,7 @@ typedef struct {
|
|||||||
|
|
||||||
FILE * infile; /* source stream */
|
FILE * infile; /* source stream */
|
||||||
JOCTET * buffer; /* start of buffer */
|
JOCTET * buffer; /* start of buffer */
|
||||||
boolean start_of_file; /* have we gotten any data yet? */
|
wxjpeg_boolean start_of_file; /* have we gotten any data yet? */
|
||||||
} my_source_mgr;
|
} my_source_mgr;
|
||||||
|
|
||||||
typedef my_source_mgr * my_src_ptr;
|
typedef my_source_mgr * my_src_ptr;
|
||||||
@@ -86,7 +86,7 @@ init_source (j_decompress_ptr cinfo)
|
|||||||
* the front of the buffer rather than discarding it.
|
* the front of the buffer rather than discarding it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
fill_input_buffer (j_decompress_ptr cinfo)
|
fill_input_buffer (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
my_src_ptr src = (my_src_ptr) cinfo->src;
|
my_src_ptr src = (my_src_ptr) cinfo->src;
|
||||||
|
@@ -69,7 +69,7 @@ METHODDEF(int) decompress_data
|
|||||||
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
|
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
|
||||||
#endif
|
#endif
|
||||||
#ifdef BLOCK_SMOOTHING_SUPPORTED
|
#ifdef BLOCK_SMOOTHING_SUPPORTED
|
||||||
LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
|
LOCAL(wxjpeg_boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
|
||||||
METHODDEF(int) decompress_smooth_data
|
METHODDEF(int) decompress_smooth_data
|
||||||
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
|
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
|
||||||
#endif
|
#endif
|
||||||
@@ -404,11 +404,11 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
|||||||
* more accurately than they really are.
|
* more accurately than they really are.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
smoothing_ok (j_decompress_ptr cinfo)
|
smoothing_ok (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
||||||
boolean smoothing_useful = FALSE;
|
wxjpeg_boolean smoothing_useful = FALSE;
|
||||||
int ci, coefi;
|
int ci, coefi;
|
||||||
jpeg_component_info *compptr;
|
jpeg_component_info *compptr;
|
||||||
JQUANT_TBL * qtable;
|
JQUANT_TBL * qtable;
|
||||||
@@ -473,7 +473,7 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
|||||||
JDIMENSION output_col;
|
JDIMENSION output_col;
|
||||||
jpeg_component_info *compptr;
|
jpeg_component_info *compptr;
|
||||||
inverse_DCT_method_ptr inverse_DCT;
|
inverse_DCT_method_ptr inverse_DCT;
|
||||||
boolean first_row, last_row;
|
wxjpeg_boolean first_row, last_row;
|
||||||
JBLOCK workspace;
|
JBLOCK workspace;
|
||||||
int *coef_bits;
|
int *coef_bits;
|
||||||
JQUANT_TBL *quanttbl;
|
JQUANT_TBL *quanttbl;
|
||||||
@@ -676,7 +676,7 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
|
jinit_d_coef_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer)
|
||||||
{
|
{
|
||||||
my_coef_ptr coef;
|
my_coef_ptr coef;
|
||||||
|
|
||||||
|
@@ -71,8 +71,8 @@ typedef struct {
|
|||||||
d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU];
|
d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU];
|
||||||
d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU];
|
d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU];
|
||||||
/* Whether we care about the DC and AC coefficient values for each block */
|
/* Whether we care about the DC and AC coefficient values for each block */
|
||||||
boolean dc_needed[D_MAX_BLOCKS_IN_MCU];
|
wxjpeg_boolean dc_needed[D_MAX_BLOCKS_IN_MCU];
|
||||||
boolean ac_needed[D_MAX_BLOCKS_IN_MCU];
|
wxjpeg_boolean ac_needed[D_MAX_BLOCKS_IN_MCU];
|
||||||
} huff_entropy_decoder;
|
} huff_entropy_decoder;
|
||||||
|
|
||||||
typedef huff_entropy_decoder * huff_entropy_ptr;
|
typedef huff_entropy_decoder * huff_entropy_ptr;
|
||||||
@@ -146,7 +146,7 @@ start_pass_huff_decoder (j_decompress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
|
jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, wxjpeg_boolean isDC, int tblno,
|
||||||
d_derived_tbl ** pdtbl)
|
d_derived_tbl ** pdtbl)
|
||||||
{
|
{
|
||||||
JHUFF_TBL *htbl;
|
JHUFF_TBL *htbl;
|
||||||
@@ -288,7 +288,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(wxjpeg_boolean)
|
||||||
jpeg_fill_bit_buffer (bitread_working_state * state,
|
jpeg_fill_bit_buffer (bitread_working_state * state,
|
||||||
register bit_buf_type get_buffer, register int bits_left,
|
register bit_buf_type get_buffer, register int bits_left,
|
||||||
int nbits)
|
int nbits)
|
||||||
@@ -464,7 +464,7 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
|
|||||||
* Returns FALSE if must suspend.
|
* Returns FALSE if must suspend.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
process_restart (j_decompress_ptr cinfo)
|
process_restart (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -513,7 +513,7 @@ process_restart (j_decompress_ptr cinfo)
|
|||||||
* this module, since we'll just re-assign them on the next call.)
|
* this module, since we'll just re-assign them on the next call.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||||
|
@@ -47,7 +47,7 @@ typedef struct {
|
|||||||
|
|
||||||
/* Expand a Huffman table definition into the derived format */
|
/* Expand a Huffman table definition into the derived format */
|
||||||
EXTERN(void) jpeg_make_d_derived_tbl
|
EXTERN(void) jpeg_make_d_derived_tbl
|
||||||
JPP((j_decompress_ptr cinfo, boolean isDC, int tblno,
|
JPP((j_decompress_ptr cinfo, wxjpeg_boolean isDC, int tblno,
|
||||||
d_derived_tbl ** pdtbl));
|
d_derived_tbl ** pdtbl));
|
||||||
|
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ typedef struct { /* Bitreading working state within an MCU */
|
|||||||
(bits_left -= (nbits))
|
(bits_left -= (nbits))
|
||||||
|
|
||||||
/* Load up the bit buffer to a depth of at least nbits */
|
/* Load up the bit buffer to a depth of at least nbits */
|
||||||
EXTERN(boolean) jpeg_fill_bit_buffer
|
EXTERN(wxjpeg_boolean) jpeg_fill_bit_buffer
|
||||||
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
|
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
|
||||||
register int bits_left, int nbits));
|
register int bits_left, int nbits));
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
struct jpeg_input_controller pub; /* public fields */
|
struct jpeg_input_controller pub; /* public fields */
|
||||||
|
|
||||||
boolean inheaders; /* TRUE until first SOS is reached */
|
wxjpeg_boolean inheaders; /* TRUE until first SOS is reached */
|
||||||
} my_input_controller;
|
} my_input_controller;
|
||||||
|
|
||||||
typedef my_input_controller * my_inputctl_ptr;
|
typedef my_input_controller * my_inputctl_ptr;
|
||||||
|
@@ -119,7 +119,7 @@ typedef struct {
|
|||||||
/* Pointer to allocated workspace (M or M+2 row groups). */
|
/* Pointer to allocated workspace (M or M+2 row groups). */
|
||||||
JSAMPARRAY buffer[MAX_COMPONENTS];
|
JSAMPARRAY buffer[MAX_COMPONENTS];
|
||||||
|
|
||||||
boolean buffer_full; /* Have we gotten an iMCU row from decoder? */
|
wxjpeg_boolean buffer_full; /* Have we gotten an iMCU row from decoder? */
|
||||||
JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */
|
JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */
|
||||||
|
|
||||||
/* Remaining fields are only used in the context case. */
|
/* Remaining fields are only used in the context case. */
|
||||||
@@ -481,7 +481,7 @@ process_data_crank_post (j_decompress_ptr cinfo,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
|
jinit_d_main_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer)
|
||||||
{
|
{
|
||||||
my_main_ptr main;
|
my_main_ptr main;
|
||||||
int ci, rgroup, ngroups;
|
int ci, rgroup, ngroups;
|
||||||
|
@@ -193,7 +193,7 @@ typedef my_marker_reader * my_marker_ptr;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
get_soi (j_decompress_ptr cinfo)
|
get_soi (j_decompress_ptr cinfo)
|
||||||
/* Process an SOI marker */
|
/* Process an SOI marker */
|
||||||
{
|
{
|
||||||
@@ -233,8 +233,8 @@ get_soi (j_decompress_ptr cinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
|
get_sof (j_decompress_ptr cinfo, wxjpeg_boolean is_prog, wxjpeg_boolean is_arith)
|
||||||
/* Process a SOFn marker */
|
/* Process a SOFn marker */
|
||||||
{
|
{
|
||||||
JPEG_INT32 length;
|
JPEG_INT32 length;
|
||||||
@@ -297,7 +297,7 @@ get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
get_sos (j_decompress_ptr cinfo)
|
get_sos (j_decompress_ptr cinfo)
|
||||||
/* Process a SOS marker */
|
/* Process a SOS marker */
|
||||||
{
|
{
|
||||||
@@ -369,7 +369,7 @@ get_sos (j_decompress_ptr cinfo)
|
|||||||
|
|
||||||
#ifdef D_ARITH_CODING_SUPPORTED
|
#ifdef D_ARITH_CODING_SUPPORTED
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
get_dac (j_decompress_ptr cinfo)
|
get_dac (j_decompress_ptr cinfo)
|
||||||
/* Process a DAC marker */
|
/* Process a DAC marker */
|
||||||
{
|
{
|
||||||
@@ -415,7 +415,7 @@ get_dac (j_decompress_ptr cinfo)
|
|||||||
#endif /* D_ARITH_CODING_SUPPORTED */
|
#endif /* D_ARITH_CODING_SUPPORTED */
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
get_dht (j_decompress_ptr cinfo)
|
get_dht (j_decompress_ptr cinfo)
|
||||||
/* Process a DHT marker */
|
/* Process a DHT marker */
|
||||||
{
|
{
|
||||||
@@ -486,7 +486,7 @@ get_dht (j_decompress_ptr cinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
get_dqt (j_decompress_ptr cinfo)
|
get_dqt (j_decompress_ptr cinfo)
|
||||||
/* Process a DQT marker */
|
/* Process a DQT marker */
|
||||||
{
|
{
|
||||||
@@ -544,7 +544,7 @@ get_dqt (j_decompress_ptr cinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
get_dri (j_decompress_ptr cinfo)
|
get_dri (j_decompress_ptr cinfo)
|
||||||
/* Process a DRI marker */
|
/* Process a DRI marker */
|
||||||
{
|
{
|
||||||
@@ -687,7 +687,7 @@ examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
get_interesting_appn (j_decompress_ptr cinfo)
|
get_interesting_appn (j_decompress_ptr cinfo)
|
||||||
/* Process an APP0 or APP14 marker without saving it */
|
/* Process an APP0 or APP14 marker without saving it */
|
||||||
{
|
{
|
||||||
@@ -735,7 +735,7 @@ get_interesting_appn (j_decompress_ptr cinfo)
|
|||||||
|
|
||||||
#ifdef SAVE_MARKERS_SUPPORTED
|
#ifdef SAVE_MARKERS_SUPPORTED
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
save_marker (j_decompress_ptr cinfo)
|
save_marker (j_decompress_ptr cinfo)
|
||||||
/* Save an APPn or COM marker into the marker list */
|
/* Save an APPn or COM marker into the marker list */
|
||||||
{
|
{
|
||||||
@@ -841,7 +841,7 @@ save_marker (j_decompress_ptr cinfo)
|
|||||||
#endif /* SAVE_MARKERS_SUPPORTED */
|
#endif /* SAVE_MARKERS_SUPPORTED */
|
||||||
|
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
skip_variable (j_decompress_ptr cinfo)
|
skip_variable (j_decompress_ptr cinfo)
|
||||||
/* Skip over an unknown or uninteresting variable-length marker */
|
/* Skip over an unknown or uninteresting variable-length marker */
|
||||||
{
|
{
|
||||||
@@ -870,7 +870,7 @@ skip_variable (j_decompress_ptr cinfo)
|
|||||||
* but it will never be 0 or FF.
|
* but it will never be 0 or FF.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
next_marker (j_decompress_ptr cinfo)
|
next_marker (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
@@ -917,7 +917,7 @@ next_marker (j_decompress_ptr cinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
first_marker (j_decompress_ptr cinfo)
|
first_marker (j_decompress_ptr cinfo)
|
||||||
/* Like next_marker, but used to obtain the initial SOI marker. */
|
/* Like next_marker, but used to obtain the initial SOI marker. */
|
||||||
/* For this marker, we do not allow preceding garbage or fill; otherwise,
|
/* For this marker, we do not allow preceding garbage or fill; otherwise,
|
||||||
@@ -1109,7 +1109,7 @@ read_markers (j_decompress_ptr cinfo)
|
|||||||
* it holds a marker which the decoder will be unable to read past.
|
* it holds a marker which the decoder will be unable to read past.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
read_restart_marker (j_decompress_ptr cinfo)
|
read_restart_marker (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
/* Obtain a marker unless we already did. */
|
/* Obtain a marker unless we already did. */
|
||||||
@@ -1188,7 +1188,7 @@ read_restart_marker (j_decompress_ptr cinfo)
|
|||||||
* any other marker would have to be bogus data in that case.
|
* any other marker would have to be bogus data in that case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(wxjpeg_boolean)
|
||||||
jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
|
jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
|
||||||
{
|
{
|
||||||
int marker = cinfo->unread_marker;
|
int marker = cinfo->unread_marker;
|
||||||
|
@@ -22,7 +22,7 @@ typedef struct {
|
|||||||
|
|
||||||
int pass_number; /* # of passes completed */
|
int pass_number; /* # of passes completed */
|
||||||
|
|
||||||
boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */
|
wxjpeg_boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */
|
||||||
|
|
||||||
/* Saved references to initialized quantizer modules,
|
/* Saved references to initialized quantizer modules,
|
||||||
* in case we need to switch modes.
|
* in case we need to switch modes.
|
||||||
@@ -39,7 +39,7 @@ typedef my_decomp_master * my_master_ptr;
|
|||||||
* CRUCIAL: this must match the actual capabilities of jdmerge.c!
|
* CRUCIAL: this must match the actual capabilities of jdmerge.c!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
use_merged_upsample (j_decompress_ptr cinfo)
|
use_merged_upsample (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
#ifdef UPSAMPLE_MERGING_SUPPORTED
|
#ifdef UPSAMPLE_MERGING_SUPPORTED
|
||||||
@@ -287,7 +287,7 @@ LOCAL(void)
|
|||||||
master_selection (j_decompress_ptr cinfo)
|
master_selection (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
my_master_ptr master = (my_master_ptr) cinfo->master;
|
my_master_ptr master = (my_master_ptr) cinfo->master;
|
||||||
boolean use_c_buffer;
|
wxjpeg_boolean use_c_buffer;
|
||||||
long samplesperrow;
|
long samplesperrow;
|
||||||
JDIMENSION jd_samplesperrow;
|
JDIMENSION jd_samplesperrow;
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ typedef struct {
|
|||||||
* to discard the dummy last row if the image height is odd.
|
* to discard the dummy last row if the image height is odd.
|
||||||
*/
|
*/
|
||||||
JSAMPROW spare_row;
|
JSAMPROW spare_row;
|
||||||
boolean spare_full; /* T if spare buffer is occupied */
|
wxjpeg_boolean spare_full; /* T if spare buffer is occupied */
|
||||||
|
|
||||||
JDIMENSION out_row_width; /* samples per output row */
|
JDIMENSION out_row_width; /* samples per output row */
|
||||||
JDIMENSION rows_to_go; /* counts rows remaining in image */
|
JDIMENSION rows_to_go; /* counts rows remaining in image */
|
||||||
|
@@ -74,13 +74,13 @@ typedef struct {
|
|||||||
typedef phuff_entropy_decoder * phuff_entropy_ptr;
|
typedef phuff_entropy_decoder * phuff_entropy_ptr;
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
|
METHODDEF(wxjpeg_boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
|
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ METHODDEF(void)
|
|||||||
start_pass_phuff_decoder (j_decompress_ptr cinfo)
|
start_pass_phuff_decoder (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
boolean is_DC_band, bad;
|
wxjpeg_boolean is_DC_band, bad;
|
||||||
int ci, coefi, tbl;
|
int ci, coefi, tbl;
|
||||||
int *coef_bit_ptr;
|
int *coef_bit_ptr;
|
||||||
jpeg_component_info * compptr;
|
jpeg_component_info * compptr;
|
||||||
@@ -224,7 +224,7 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
|
|||||||
* Returns FALSE if must suspend.
|
* Returns FALSE if must suspend.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
process_restart (j_decompress_ptr cinfo)
|
process_restart (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -282,7 +282,7 @@ process_restart (j_decompress_ptr cinfo)
|
|||||||
* or first pass of successive approximation).
|
* or first pass of successive approximation).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -353,7 +353,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
* or first pass of successive approximation).
|
* or first pass of successive approximation).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -438,7 +438,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
* is not very clear on the point.
|
* is not very clear on the point.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
@@ -487,7 +487,7 @@ decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
* MCU decoding for AC successive approximation refinement scan.
|
* MCU decoding for AC successive approximation refinement scan.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(boolean)
|
METHODDEF(wxjpeg_boolean)
|
||||||
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
{
|
{
|
||||||
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
|
||||||
|
@@ -247,7 +247,7 @@ post_process_2pass (j_decompress_ptr cinfo,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
|
jinit_d_post_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer)
|
||||||
{
|
{
|
||||||
my_post_ptr post;
|
my_post_ptr post;
|
||||||
|
|
||||||
|
@@ -401,7 +401,7 @@ jinit_upsampler (j_decompress_ptr cinfo)
|
|||||||
my_upsample_ptr upsample;
|
my_upsample_ptr upsample;
|
||||||
int ci;
|
int ci;
|
||||||
jpeg_component_info * compptr;
|
jpeg_component_info * compptr;
|
||||||
boolean need_buffer, do_fancy;
|
wxjpeg_boolean need_buffer, do_fancy;
|
||||||
int h_in_group, v_in_group, h_out_group, v_out_group;
|
int h_in_group, v_in_group, h_out_group, v_out_group;
|
||||||
|
|
||||||
upsample = (my_upsample_ptr)
|
upsample = (my_upsample_ptr)
|
||||||
|
@@ -161,7 +161,7 @@ format_message (j_common_ptr cinfo, char * buffer)
|
|||||||
const char * msgtext = NULL;
|
const char * msgtext = NULL;
|
||||||
const char * msgptr;
|
const char * msgptr;
|
||||||
char ch;
|
char ch;
|
||||||
boolean isstring;
|
wxjpeg_boolean isstring;
|
||||||
|
|
||||||
/* Look up message string in proper table */
|
/* Look up message string in proper table */
|
||||||
if (msg_code > 0 && msg_code <= err->last_jpeg_message) {
|
if (msg_code > 0 && msg_code <= err->last_jpeg_message) {
|
||||||
|
@@ -284,7 +284,7 @@ close_file_store (j_common_ptr cinfo, backing_store_ptr info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
open_file_store (j_common_ptr cinfo, backing_store_ptr info,
|
open_file_store (j_common_ptr cinfo, backing_store_ptr info,
|
||||||
long total_bytes_needed)
|
long total_bytes_needed)
|
||||||
{
|
{
|
||||||
@@ -410,7 +410,7 @@ close_xms_store (j_common_ptr cinfo, backing_store_ptr info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
|
open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
|
||||||
long total_bytes_needed)
|
long total_bytes_needed)
|
||||||
{
|
{
|
||||||
@@ -550,7 +550,7 @@ close_ems_store (j_common_ptr cinfo, backing_store_ptr info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL(boolean)
|
LOCAL(wxjpeg_boolean)
|
||||||
open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
|
open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
|
||||||
long total_bytes_needed)
|
long total_bytes_needed)
|
||||||
{
|
{
|
||||||
|
@@ -156,9 +156,9 @@ struct jvirt_sarray_control {
|
|||||||
JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */
|
JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */
|
||||||
JDIMENSION cur_start_row; /* first logical row # in the buffer */
|
JDIMENSION cur_start_row; /* first logical row # in the buffer */
|
||||||
JDIMENSION first_undef_row; /* row # of first uninitialized row */
|
JDIMENSION first_undef_row; /* row # of first uninitialized row */
|
||||||
boolean pre_zero; /* pre-zero mode requested? */
|
wxjpeg_boolean pre_zero; /* pre-zero mode requested? */
|
||||||
boolean dirty; /* do current buffer contents need written? */
|
wxjpeg_boolean dirty; /* do current buffer contents need written? */
|
||||||
boolean b_s_open; /* is backing-store data valid? */
|
wxjpeg_boolean b_s_open; /* is backing-store data valid? */
|
||||||
jvirt_sarray_ptr next; /* link to next virtual sarray control block */
|
jvirt_sarray_ptr next; /* link to next virtual sarray control block */
|
||||||
backing_store_info b_s_info; /* System-dependent control info */
|
backing_store_info b_s_info; /* System-dependent control info */
|
||||||
};
|
};
|
||||||
@@ -172,9 +172,9 @@ struct jvirt_barray_control {
|
|||||||
JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */
|
JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */
|
||||||
JDIMENSION cur_start_row; /* first logical row # in the buffer */
|
JDIMENSION cur_start_row; /* first logical row # in the buffer */
|
||||||
JDIMENSION first_undef_row; /* row # of first uninitialized row */
|
JDIMENSION first_undef_row; /* row # of first uninitialized row */
|
||||||
boolean pre_zero; /* pre-zero mode requested? */
|
wxjpeg_boolean pre_zero; /* pre-zero mode requested? */
|
||||||
boolean dirty; /* do current buffer contents need written? */
|
wxjpeg_boolean dirty; /* do current buffer contents need written? */
|
||||||
boolean b_s_open; /* is backing-store data valid? */
|
wxjpeg_boolean b_s_open; /* is backing-store data valid? */
|
||||||
jvirt_barray_ptr next; /* link to next virtual barray control block */
|
jvirt_barray_ptr next; /* link to next virtual barray control block */
|
||||||
backing_store_info b_s_info; /* System-dependent control info */
|
backing_store_info b_s_info; /* System-dependent control info */
|
||||||
};
|
};
|
||||||
@@ -520,7 +520,7 @@ alloc_barray (j_common_ptr cinfo, int pool_id,
|
|||||||
|
|
||||||
|
|
||||||
METHODDEF(jvirt_sarray_ptr)
|
METHODDEF(jvirt_sarray_ptr)
|
||||||
request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
|
request_virt_sarray (j_common_ptr cinfo, int pool_id, wxjpeg_boolean pre_zero,
|
||||||
JDIMENSION samplesperrow, JDIMENSION numrows,
|
JDIMENSION samplesperrow, JDIMENSION numrows,
|
||||||
JDIMENSION maxaccess)
|
JDIMENSION maxaccess)
|
||||||
/* Request a virtual 2-D sample array */
|
/* Request a virtual 2-D sample array */
|
||||||
@@ -550,7 +550,7 @@ request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
|
|||||||
|
|
||||||
|
|
||||||
METHODDEF(jvirt_barray_ptr)
|
METHODDEF(jvirt_barray_ptr)
|
||||||
request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
|
request_virt_barray (j_common_ptr cinfo, int pool_id, wxjpeg_boolean pre_zero,
|
||||||
JDIMENSION blocksperrow, JDIMENSION numrows,
|
JDIMENSION blocksperrow, JDIMENSION numrows,
|
||||||
JDIMENSION maxaccess)
|
JDIMENSION maxaccess)
|
||||||
/* Request a virtual 2-D coefficient-block array */
|
/* Request a virtual 2-D coefficient-block array */
|
||||||
@@ -687,7 +687,7 @@ realize_virt_arrays (j_common_ptr cinfo)
|
|||||||
|
|
||||||
|
|
||||||
LOCAL(void)
|
LOCAL(void)
|
||||||
do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
|
do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, wxjpeg_boolean writing)
|
||||||
/* Do backing store read or write of a virtual sample array */
|
/* Do backing store read or write of a virtual sample array */
|
||||||
{
|
{
|
||||||
long bytesperrow, file_offset, byte_count, rows, thisrow, i;
|
long bytesperrow, file_offset, byte_count, rows, thisrow, i;
|
||||||
@@ -720,7 +720,7 @@ do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
|
|||||||
|
|
||||||
|
|
||||||
LOCAL(void)
|
LOCAL(void)
|
||||||
do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
|
do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, wxjpeg_boolean writing)
|
||||||
/* Do backing store read or write of a virtual coefficient-block array */
|
/* Do backing store read or write of a virtual coefficient-block array */
|
||||||
{
|
{
|
||||||
long bytesperrow, file_offset, byte_count, rows, thisrow, i;
|
long bytesperrow, file_offset, byte_count, rows, thisrow, i;
|
||||||
@@ -755,7 +755,7 @@ do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
|
|||||||
METHODDEF(JSAMPARRAY)
|
METHODDEF(JSAMPARRAY)
|
||||||
access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
|
access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
|
||||||
JDIMENSION start_row, JDIMENSION num_rows,
|
JDIMENSION start_row, JDIMENSION num_rows,
|
||||||
boolean writable)
|
wxjpeg_boolean writable)
|
||||||
/* Access the part of a virtual sample array starting at start_row */
|
/* Access the part of a virtual sample array starting at start_row */
|
||||||
/* and extending for num_rows rows. writable is true if */
|
/* and extending for num_rows rows. writable is true if */
|
||||||
/* caller intends to modify the accessed area. */
|
/* caller intends to modify the accessed area. */
|
||||||
@@ -840,7 +840,7 @@ access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
|
|||||||
METHODDEF(JBLOCKARRAY)
|
METHODDEF(JBLOCKARRAY)
|
||||||
access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,
|
access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,
|
||||||
JDIMENSION start_row, JDIMENSION num_rows,
|
JDIMENSION start_row, JDIMENSION num_rows,
|
||||||
boolean writable)
|
wxjpeg_boolean writable)
|
||||||
/* Access the part of a virtual block array starting at start_row */
|
/* Access the part of a virtual block array starting at start_row */
|
||||||
/* and extending for num_rows rows. writable is true if */
|
/* and extending for num_rows rows. writable is true if */
|
||||||
/* caller intends to modify the accessed area. */
|
/* caller intends to modify the accessed area. */
|
||||||
|
@@ -260,9 +260,29 @@ typedef unsigned int JDIMENSION;
|
|||||||
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
#ifndef HAVE_BOOLEAN
|
#ifndef HAVE_BOOLEAN
|
||||||
typedef int boolean;
|
typedef int boolean;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Notes about boolean above:
|
||||||
|
*
|
||||||
|
* The main conflict we see is with the Windows headers of some compilers that
|
||||||
|
* have a different definition of boolean. Therefore boolean has been replaced
|
||||||
|
* with wxjpeg_boolean throughout the jpeg sources. The alternative would have
|
||||||
|
* been to make the definition here the same as the Windows definition. It's
|
||||||
|
* not enough to just define HAVE_BOOLEAN when using the jpeg library, the
|
||||||
|
* definition of boolean must match when the jpeg library is compiled too.
|
||||||
|
*
|
||||||
|
* System jepg libs won't have this type, of course, so to use test
|
||||||
|
* HAVE_WXJPEG_BOOLEAN and fall back to boolean when not defined.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef int wxjpeg_boolean;
|
||||||
|
#define HAVE_WXJPEG_BOOLEAN
|
||||||
|
|
||||||
#ifndef FALSE /* in case these macros already exist */
|
#ifndef FALSE /* in case these macros already exist */
|
||||||
#define FALSE 0 /* values of boolean */
|
#define FALSE 0 /* values of boolean */
|
||||||
#endif
|
#endif
|
||||||
|
@@ -48,8 +48,8 @@ struct jpeg_comp_master {
|
|||||||
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
||||||
|
|
||||||
/* State variables made visible to other modules */
|
/* State variables made visible to other modules */
|
||||||
boolean call_pass_startup; /* True if pass_startup must be called */
|
wxjpeg_boolean call_pass_startup; /* True if pass_startup must be called */
|
||||||
boolean is_last_pass; /* True during last pass */
|
wxjpeg_boolean is_last_pass; /* True during last pass */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Main buffer control (downsampled-data buffer) */
|
/* Main buffer control (downsampled-data buffer) */
|
||||||
@@ -75,7 +75,7 @@ struct jpeg_c_prep_controller {
|
|||||||
/* Coefficient buffer control */
|
/* Coefficient buffer control */
|
||||||
struct jpeg_c_coef_controller {
|
struct jpeg_c_coef_controller {
|
||||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
|
||||||
JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
|
JMETHOD(wxjpeg_boolean, compress_data, (j_compress_ptr cinfo,
|
||||||
JSAMPIMAGE input_buf));
|
JSAMPIMAGE input_buf));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ struct jpeg_downsampler {
|
|||||||
JSAMPIMAGE output_buf,
|
JSAMPIMAGE output_buf,
|
||||||
JDIMENSION out_row_group_index));
|
JDIMENSION out_row_group_index));
|
||||||
|
|
||||||
boolean need_context_rows; /* TRUE if need rows above & below */
|
wxjpeg_boolean need_context_rows; /* TRUE if need rows above & below */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Forward DCT (also controls coefficient quantization) */
|
/* Forward DCT (also controls coefficient quantization) */
|
||||||
@@ -111,8 +111,8 @@ struct jpeg_forward_dct {
|
|||||||
|
|
||||||
/* Entropy encoding */
|
/* Entropy encoding */
|
||||||
struct jpeg_entropy_encoder {
|
struct jpeg_entropy_encoder {
|
||||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
|
JMETHOD(void, start_pass, (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics));
|
||||||
JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
|
JMETHOD(wxjpeg_boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
|
||||||
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ struct jpeg_decomp_master {
|
|||||||
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
|
JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
|
||||||
|
|
||||||
/* State variables made visible to other modules */
|
/* State variables made visible to other modules */
|
||||||
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
|
wxjpeg_boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Input control module */
|
/* Input control module */
|
||||||
@@ -150,8 +150,8 @@ struct jpeg_input_controller {
|
|||||||
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
|
JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
|
||||||
|
|
||||||
/* State variables made visible to other modules */
|
/* State variables made visible to other modules */
|
||||||
boolean has_multiple_scans; /* True if file has multiple scans */
|
wxjpeg_boolean has_multiple_scans; /* True if file has multiple scans */
|
||||||
boolean eoi_reached; /* True when EOI has been consumed */
|
wxjpeg_boolean eoi_reached; /* True when EOI has been consumed */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Main buffer control (downsampled-data buffer) */
|
/* Main buffer control (downsampled-data buffer) */
|
||||||
@@ -207,8 +207,8 @@ struct jpeg_marker_reader {
|
|||||||
/* State of marker reader --- nominally internal, but applications
|
/* State of marker reader --- nominally internal, but applications
|
||||||
* supplying COM or APPn handlers might like to know the state.
|
* supplying COM or APPn handlers might like to know the state.
|
||||||
*/
|
*/
|
||||||
boolean saw_SOI; /* found SOI? */
|
wxjpeg_boolean saw_SOI; /* found SOI? */
|
||||||
boolean saw_SOF; /* found SOF? */
|
wxjpeg_boolean saw_SOF; /* found SOF? */
|
||||||
int next_restart_num; /* next restart number expected (0-7) */
|
int next_restart_num; /* next restart number expected (0-7) */
|
||||||
unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */
|
unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */
|
||||||
};
|
};
|
||||||
@@ -216,12 +216,12 @@ struct jpeg_marker_reader {
|
|||||||
/* Entropy decoding */
|
/* Entropy decoding */
|
||||||
struct jpeg_entropy_decoder {
|
struct jpeg_entropy_decoder {
|
||||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||||
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
|
JMETHOD(wxjpeg_boolean, decode_mcu, (j_decompress_ptr cinfo,
|
||||||
JBLOCKROW *MCU_data));
|
JBLOCKROW *MCU_data));
|
||||||
|
|
||||||
/* This is here to share code between baseline and progressive decoders; */
|
/* This is here to share code between baseline and progressive decoders; */
|
||||||
/* other modules probably should not use it */
|
/* other modules probably should not use it */
|
||||||
boolean insufficient_data; /* set TRUE after emitting warning */
|
wxjpeg_boolean insufficient_data; /* set TRUE after emitting warning */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Inverse DCT (also performs dequantization) */
|
/* Inverse DCT (also performs dequantization) */
|
||||||
@@ -247,7 +247,7 @@ struct jpeg_upsampler {
|
|||||||
JDIMENSION *out_row_ctr,
|
JDIMENSION *out_row_ctr,
|
||||||
JDIMENSION out_rows_avail));
|
JDIMENSION out_rows_avail));
|
||||||
|
|
||||||
boolean need_context_rows; /* TRUE if need rows above & below */
|
wxjpeg_boolean need_context_rows; /* TRUE if need rows above & below */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Colorspace conversion */
|
/* Colorspace conversion */
|
||||||
@@ -260,7 +260,7 @@ struct jpeg_color_deconverter {
|
|||||||
|
|
||||||
/* Color quantization or color precision reduction */
|
/* Color quantization or color precision reduction */
|
||||||
struct jpeg_color_quantizer {
|
struct jpeg_color_quantizer {
|
||||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
|
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan));
|
||||||
JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
|
JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
|
||||||
JSAMPARRAY input_buf, JSAMPARRAY output_buf,
|
JSAMPARRAY input_buf, JSAMPARRAY output_buf,
|
||||||
int num_rows));
|
int num_rows));
|
||||||
@@ -341,13 +341,13 @@ struct jpeg_color_quantizer {
|
|||||||
/* Compression module initialization routines */
|
/* Compression module initialization routines */
|
||||||
EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
|
EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
|
||||||
EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
|
EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
|
||||||
boolean transcode_only));
|
wxjpeg_boolean transcode_only));
|
||||||
EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
|
EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
|
||||||
boolean need_full_buffer));
|
wxjpeg_boolean need_full_buffer));
|
||||||
EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
|
EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
|
||||||
boolean need_full_buffer));
|
wxjpeg_boolean need_full_buffer));
|
||||||
EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
|
EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
|
||||||
boolean need_full_buffer));
|
wxjpeg_boolean need_full_buffer));
|
||||||
EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
|
EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
|
||||||
EXTERN(void) jinit_downsampler 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_forward_dct JPP((j_compress_ptr cinfo));
|
||||||
@@ -357,11 +357,11 @@ EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
|
|||||||
/* Decompression module initialization routines */
|
/* Decompression module initialization routines */
|
||||||
EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
|
EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
|
||||||
EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
|
EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
|
||||||
boolean need_full_buffer));
|
wxjpeg_boolean need_full_buffer));
|
||||||
EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
|
EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
|
||||||
boolean need_full_buffer));
|
wxjpeg_boolean need_full_buffer));
|
||||||
EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
|
EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
|
||||||
boolean need_full_buffer));
|
wxjpeg_boolean need_full_buffer));
|
||||||
EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
|
EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
|
||||||
EXTERN(void) jinit_marker_reader 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_huff_decoder JPP((j_decompress_ptr cinfo));
|
||||||
|
@@ -91,7 +91,7 @@ typedef struct {
|
|||||||
* You could suppress output of a table by setting this to TRUE.
|
* You could suppress output of a table by setting this to TRUE.
|
||||||
* (See jpeg_suppress_tables for an example.)
|
* (See jpeg_suppress_tables for an example.)
|
||||||
*/
|
*/
|
||||||
boolean sent_table; /* TRUE when table has been output */
|
wxjpeg_boolean sent_table; /* TRUE when table has been output */
|
||||||
} JQUANT_TBL;
|
} JQUANT_TBL;
|
||||||
|
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ typedef struct {
|
|||||||
* You could suppress output of a table by setting this to TRUE.
|
* You could suppress output of a table by setting this to TRUE.
|
||||||
* (See jpeg_suppress_tables for an example.)
|
* (See jpeg_suppress_tables for an example.)
|
||||||
*/
|
*/
|
||||||
boolean sent_table; /* TRUE when table has been output */
|
wxjpeg_boolean sent_table; /* TRUE when table has been output */
|
||||||
} JHUFF_TBL;
|
} JHUFF_TBL;
|
||||||
|
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ typedef struct {
|
|||||||
* components will be ignored (eg grayscale output from YCbCr image),
|
* components will be ignored (eg grayscale output from YCbCr image),
|
||||||
* we can skip most computations for the unused components.
|
* we can skip most computations for the unused components.
|
||||||
*/
|
*/
|
||||||
boolean component_needed; /* do we need the value of this component? */
|
wxjpeg_boolean component_needed; /* do we need the value of this component? */
|
||||||
|
|
||||||
/* These values are computed before starting a scan of the component. */
|
/* These values are computed before starting a scan of the component. */
|
||||||
/* The decompressor output side may not use these variables. */
|
/* The decompressor output side may not use these variables. */
|
||||||
@@ -243,7 +243,7 @@ typedef enum {
|
|||||||
struct jpeg_memory_mgr * mem; /* Memory manager module */\
|
struct jpeg_memory_mgr * mem; /* Memory manager module */\
|
||||||
struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
|
struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\
|
||||||
void * client_data; /* Available for use by application */\
|
void * client_data; /* Available for use by application */\
|
||||||
boolean is_decompressor; /* So common code can tell which is which */\
|
wxjpeg_boolean is_decompressor; /* So common code can tell which is which */\
|
||||||
int global_state /* For checking call sequence validity */
|
int global_state /* For checking call sequence validity */
|
||||||
|
|
||||||
/* Routines that are to be used by both halves of the library are declared
|
/* Routines that are to be used by both halves of the library are declared
|
||||||
@@ -317,10 +317,10 @@ struct jpeg_compress_struct {
|
|||||||
* set num_scans and scan_info to point to an array of scan definitions.
|
* set num_scans and scan_info to point to an array of scan definitions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
boolean raw_data_in; /* TRUE=caller supplies downsampled data */
|
wxjpeg_boolean raw_data_in; /* TRUE=caller supplies downsampled data */
|
||||||
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
|
wxjpeg_boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
|
||||||
boolean optimize_coding; /* TRUE=optimize entropy encoding parms */
|
wxjpeg_boolean optimize_coding; /* TRUE=optimize entropy encoding parms */
|
||||||
boolean CCIR601_sampling; /* TRUE=first samples are cosited */
|
wxjpeg_boolean CCIR601_sampling; /* TRUE=first samples are cosited */
|
||||||
int smoothing_factor; /* 1..100, or 0 for no input smoothing */
|
int smoothing_factor; /* 1..100, or 0 for no input smoothing */
|
||||||
J_DCT_METHOD dct_method; /* DCT algorithm selector */
|
J_DCT_METHOD dct_method; /* DCT algorithm selector */
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ struct jpeg_compress_struct {
|
|||||||
|
|
||||||
/* Parameters controlling emission of special markers. */
|
/* Parameters controlling emission of special markers. */
|
||||||
|
|
||||||
boolean write_JFIF_header; /* should a JFIF marker be written? */
|
wxjpeg_boolean write_JFIF_header; /* should a JFIF marker be written? */
|
||||||
UINT8 JFIF_major_version; /* What to write for the JFIF version number */
|
UINT8 JFIF_major_version; /* What to write for the JFIF version number */
|
||||||
UINT8 JFIF_minor_version;
|
UINT8 JFIF_minor_version;
|
||||||
/* These three values are not used by the JPEG code, merely copied */
|
/* These three values are not used by the JPEG code, merely copied */
|
||||||
@@ -344,7 +344,7 @@ struct jpeg_compress_struct {
|
|||||||
UINT8 density_unit; /* JFIF code for pixel size units */
|
UINT8 density_unit; /* JFIF code for pixel size units */
|
||||||
UINT16 X_density; /* Horizontal pixel density */
|
UINT16 X_density; /* Horizontal pixel density */
|
||||||
UINT16 Y_density; /* Vertical pixel density */
|
UINT16 Y_density; /* Vertical pixel density */
|
||||||
boolean write_Adobe_marker; /* should an Adobe marker be written? */
|
wxjpeg_boolean write_Adobe_marker; /* should an Adobe marker be written? */
|
||||||
|
|
||||||
/* State variable: index of next scanline to be written to
|
/* State variable: index of next scanline to be written to
|
||||||
* jpeg_write_scanlines(). Application may use this to control its
|
* jpeg_write_scanlines(). Application may use this to control its
|
||||||
@@ -360,7 +360,7 @@ struct jpeg_compress_struct {
|
|||||||
/*
|
/*
|
||||||
* These fields are computed during compression startup
|
* These fields are computed during compression startup
|
||||||
*/
|
*/
|
||||||
boolean progressive_mode; /* TRUE if scan script uses progressive mode */
|
wxjpeg_boolean progressive_mode; /* TRUE if scan script uses progressive mode */
|
||||||
int max_h_samp_factor; /* largest h_samp_factor */
|
int max_h_samp_factor; /* largest h_samp_factor */
|
||||||
int max_v_samp_factor; /* largest v_samp_factor */
|
int max_v_samp_factor; /* largest v_samp_factor */
|
||||||
|
|
||||||
@@ -433,22 +433,22 @@ struct jpeg_decompress_struct {
|
|||||||
|
|
||||||
double output_gamma; /* image gamma wanted in output */
|
double output_gamma; /* image gamma wanted in output */
|
||||||
|
|
||||||
boolean buffered_image; /* TRUE=multiple output passes */
|
wxjpeg_boolean buffered_image; /* TRUE=multiple output passes */
|
||||||
boolean raw_data_out; /* TRUE=downsampled data wanted */
|
wxjpeg_boolean raw_data_out; /* TRUE=downsampled data wanted */
|
||||||
|
|
||||||
J_DCT_METHOD dct_method; /* IDCT algorithm selector */
|
J_DCT_METHOD dct_method; /* IDCT algorithm selector */
|
||||||
boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */
|
wxjpeg_boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */
|
||||||
boolean do_block_smoothing; /* TRUE=apply interblock smoothing */
|
wxjpeg_boolean do_block_smoothing; /* TRUE=apply interblock smoothing */
|
||||||
|
|
||||||
boolean quantize_colors; /* TRUE=colormapped output wanted */
|
wxjpeg_boolean quantize_colors; /* TRUE=colormapped output wanted */
|
||||||
/* the following are ignored if not quantize_colors: */
|
/* the following are ignored if not quantize_colors: */
|
||||||
J_DITHER_MODE dither_mode; /* type of color dithering to use */
|
J_DITHER_MODE dither_mode; /* type of color dithering to use */
|
||||||
boolean two_pass_quantize; /* TRUE=use two-pass color quantization */
|
wxjpeg_boolean two_pass_quantize; /* TRUE=use two-pass color quantization */
|
||||||
int desired_number_of_colors; /* max # colors to use in created colormap */
|
int desired_number_of_colors; /* max # colors to use in created colormap */
|
||||||
/* these are significant only in buffered-image mode: */
|
/* these are significant only in buffered-image mode: */
|
||||||
boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */
|
wxjpeg_boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */
|
||||||
boolean enable_external_quant;/* enable future use of external colormap */
|
wxjpeg_boolean enable_external_quant;/* enable future use of external colormap */
|
||||||
boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */
|
wxjpeg_boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */
|
||||||
|
|
||||||
/* Description of actual output image that will be returned to application.
|
/* Description of actual output image that will be returned to application.
|
||||||
* These fields are computed by jpeg_start_decompress().
|
* These fields are computed by jpeg_start_decompress().
|
||||||
@@ -535,8 +535,8 @@ struct jpeg_decompress_struct {
|
|||||||
jpeg_component_info * comp_info;
|
jpeg_component_info * comp_info;
|
||||||
/* comp_info[i] describes component that appears i'th in SOF */
|
/* comp_info[i] describes component that appears i'th in SOF */
|
||||||
|
|
||||||
boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
|
wxjpeg_boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */
|
||||||
boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
|
wxjpeg_boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */
|
||||||
|
|
||||||
UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
|
UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
|
||||||
UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
|
UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
|
||||||
@@ -547,17 +547,17 @@ struct jpeg_decompress_struct {
|
|||||||
/* These fields record data obtained from optional markers recognized by
|
/* These fields record data obtained from optional markers recognized by
|
||||||
* the JPEG library.
|
* the JPEG library.
|
||||||
*/
|
*/
|
||||||
boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */
|
wxjpeg_boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */
|
||||||
/* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
|
/* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
|
||||||
UINT8 JFIF_major_version; /* JFIF version number */
|
UINT8 JFIF_major_version; /* JFIF version number */
|
||||||
UINT8 JFIF_minor_version;
|
UINT8 JFIF_minor_version;
|
||||||
UINT8 density_unit; /* JFIF code for pixel size units */
|
UINT8 density_unit; /* JFIF code for pixel size units */
|
||||||
UINT16 X_density; /* Horizontal pixel density */
|
UINT16 X_density; /* Horizontal pixel density */
|
||||||
UINT16 Y_density; /* Vertical pixel density */
|
UINT16 Y_density; /* Vertical pixel density */
|
||||||
boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */
|
wxjpeg_boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */
|
||||||
UINT8 Adobe_transform; /* Color transform code from Adobe marker */
|
UINT8 Adobe_transform; /* Color transform code from Adobe marker */
|
||||||
|
|
||||||
boolean CCIR601_sampling; /* TRUE=first samples are cosited */
|
wxjpeg_boolean CCIR601_sampling; /* TRUE=first samples are cosited */
|
||||||
|
|
||||||
/* Aside from the specific data retained from APPn markers known to the
|
/* Aside from the specific data retained from APPn markers known to the
|
||||||
* library, the uninterpreted contents of any or all APPn and COM markers
|
* library, the uninterpreted contents of any or all APPn and COM markers
|
||||||
@@ -715,7 +715,7 @@ struct jpeg_destination_mgr {
|
|||||||
size_t free_in_buffer; /* # of byte spaces remaining in buffer */
|
size_t free_in_buffer; /* # of byte spaces remaining in buffer */
|
||||||
|
|
||||||
JMETHOD(void, init_destination, (j_compress_ptr cinfo));
|
JMETHOD(void, init_destination, (j_compress_ptr cinfo));
|
||||||
JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
|
JMETHOD(wxjpeg_boolean, empty_output_buffer, (j_compress_ptr cinfo));
|
||||||
JMETHOD(void, term_destination, (j_compress_ptr cinfo));
|
JMETHOD(void, term_destination, (j_compress_ptr cinfo));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -727,9 +727,9 @@ struct jpeg_source_mgr {
|
|||||||
size_t bytes_in_buffer; /* # of bytes remaining in buffer */
|
size_t bytes_in_buffer; /* # of bytes remaining in buffer */
|
||||||
|
|
||||||
JMETHOD(void, init_source, (j_decompress_ptr cinfo));
|
JMETHOD(void, init_source, (j_decompress_ptr cinfo));
|
||||||
JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));
|
JMETHOD(wxjpeg_boolean, fill_input_buffer, (j_decompress_ptr cinfo));
|
||||||
JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
|
JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));
|
||||||
JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
|
JMETHOD(wxjpeg_boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));
|
||||||
JMETHOD(void, term_source, (j_decompress_ptr cinfo));
|
JMETHOD(void, term_source, (j_decompress_ptr cinfo));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -767,13 +767,13 @@ struct jpeg_memory_mgr {
|
|||||||
JDIMENSION numrows));
|
JDIMENSION numrows));
|
||||||
JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
|
JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
|
||||||
int pool_id,
|
int pool_id,
|
||||||
boolean pre_zero,
|
wxjpeg_boolean pre_zero,
|
||||||
JDIMENSION samplesperrow,
|
JDIMENSION samplesperrow,
|
||||||
JDIMENSION numrows,
|
JDIMENSION numrows,
|
||||||
JDIMENSION maxaccess));
|
JDIMENSION maxaccess));
|
||||||
JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
|
JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,
|
||||||
int pool_id,
|
int pool_id,
|
||||||
boolean pre_zero,
|
wxjpeg_boolean pre_zero,
|
||||||
JDIMENSION blocksperrow,
|
JDIMENSION blocksperrow,
|
||||||
JDIMENSION numrows,
|
JDIMENSION numrows,
|
||||||
JDIMENSION maxaccess));
|
JDIMENSION maxaccess));
|
||||||
@@ -782,12 +782,12 @@ struct jpeg_memory_mgr {
|
|||||||
jvirt_sarray_ptr ptr,
|
jvirt_sarray_ptr ptr,
|
||||||
JDIMENSION start_row,
|
JDIMENSION start_row,
|
||||||
JDIMENSION num_rows,
|
JDIMENSION num_rows,
|
||||||
boolean writable));
|
wxjpeg_boolean writable));
|
||||||
JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
|
JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,
|
||||||
jvirt_barray_ptr ptr,
|
jvirt_barray_ptr ptr,
|
||||||
JDIMENSION start_row,
|
JDIMENSION start_row,
|
||||||
JDIMENSION num_rows,
|
JDIMENSION num_rows,
|
||||||
boolean writable));
|
wxjpeg_boolean writable));
|
||||||
JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
|
JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));
|
||||||
JMETHOD(void, self_destruct, (j_common_ptr cinfo));
|
JMETHOD(void, self_destruct, (j_common_ptr cinfo));
|
||||||
|
|
||||||
@@ -806,7 +806,7 @@ struct jpeg_memory_mgr {
|
|||||||
/* Routine signature for application-supplied marker processing methods.
|
/* Routine signature for application-supplied marker processing methods.
|
||||||
* Need not pass marker code since it is stored in cinfo->unread_marker.
|
* Need not pass marker code since it is stored in cinfo->unread_marker.
|
||||||
*/
|
*/
|
||||||
typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
|
typedef JMETHOD(wxjpeg_boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
|
||||||
|
|
||||||
|
|
||||||
/* Declarations for routines called by application.
|
/* Declarations for routines called by application.
|
||||||
@@ -917,24 +917,24 @@ EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
|
|||||||
J_COLOR_SPACE colorspace));
|
J_COLOR_SPACE colorspace));
|
||||||
EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
|
EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
|
||||||
EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
|
EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
|
||||||
boolean force_baseline));
|
wxjpeg_boolean force_baseline));
|
||||||
EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
|
EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
|
||||||
int scale_factor,
|
int scale_factor,
|
||||||
boolean force_baseline));
|
wxjpeg_boolean force_baseline));
|
||||||
EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
|
EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
|
||||||
const unsigned int *basic_table,
|
const unsigned int *basic_table,
|
||||||
int scale_factor,
|
int scale_factor,
|
||||||
boolean force_baseline));
|
wxjpeg_boolean force_baseline));
|
||||||
EXTERN(int) jpeg_quality_scaling JPP((int quality));
|
EXTERN(int) jpeg_quality_scaling JPP((int quality));
|
||||||
EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
|
EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
|
||||||
EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
|
EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
|
||||||
boolean suppress));
|
wxjpeg_boolean suppress));
|
||||||
EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
|
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(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
|
||||||
|
|
||||||
/* Main entry points for compression */
|
/* Main entry points for compression */
|
||||||
EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
|
EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
|
||||||
boolean write_all_tables));
|
wxjpeg_boolean write_all_tables));
|
||||||
EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
|
EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
|
||||||
JSAMPARRAY scanlines,
|
JSAMPARRAY scanlines,
|
||||||
JDIMENSION num_lines));
|
JDIMENSION num_lines));
|
||||||
@@ -960,7 +960,7 @@ EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
|
|||||||
|
|
||||||
/* Decompression startup: read start of JPEG datastream to see what's there */
|
/* Decompression startup: read start of JPEG datastream to see what's there */
|
||||||
EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
|
EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
|
||||||
boolean require_image));
|
wxjpeg_boolean require_image));
|
||||||
/* Return value is one of: */
|
/* Return value is one of: */
|
||||||
#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */
|
#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */
|
||||||
#define JPEG_HEADER_OK 1 /* Found valid image datastream */
|
#define JPEG_HEADER_OK 1 /* Found valid image datastream */
|
||||||
@@ -972,11 +972,11 @@ EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Main entry points for decompression */
|
/* Main entry points for decompression */
|
||||||
EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
|
EXTERN(wxjpeg_boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
|
||||||
EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
|
EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
|
||||||
JSAMPARRAY scanlines,
|
JSAMPARRAY scanlines,
|
||||||
JDIMENSION max_lines));
|
JDIMENSION max_lines));
|
||||||
EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
|
EXTERN(wxjpeg_boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
|
||||||
|
|
||||||
/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
|
/* Replaces jpeg_read_scanlines when reading raw downsampled data. */
|
||||||
EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
|
EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
|
||||||
@@ -984,11 +984,11 @@ EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
|
|||||||
JDIMENSION max_lines));
|
JDIMENSION max_lines));
|
||||||
|
|
||||||
/* Additional entry points for buffered-image mode. */
|
/* Additional entry points for buffered-image mode. */
|
||||||
EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
|
EXTERN(wxjpeg_boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
|
||||||
EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
|
EXTERN(wxjpeg_boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
|
||||||
int scan_number));
|
int scan_number));
|
||||||
EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
|
EXTERN(wxjpeg_boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
|
||||||
EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
|
EXTERN(wxjpeg_boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
|
||||||
EXTERN(void) jpeg_new_colormap 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(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
|
||||||
/* Return value is one of: */
|
/* Return value is one of: */
|
||||||
@@ -1034,7 +1034,7 @@ EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
|
|||||||
EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
|
EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
|
||||||
|
|
||||||
/* Default restart-marker-resync procedure for use by data source modules */
|
/* Default restart-marker-resync procedure for use by data source modules */
|
||||||
EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
|
EXTERN(wxjpeg_boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
|
||||||
int desired));
|
int desired));
|
||||||
|
|
||||||
|
|
||||||
|
@@ -112,7 +112,7 @@ select_transform (JXFORM_CODE transform)
|
|||||||
|
|
||||||
LOCAL(int)
|
LOCAL(int)
|
||||||
parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||||
int last_file_arg_seen, boolean for_real)
|
int last_file_arg_seen, wxjpeg_boolean for_real)
|
||||||
/* Parse optional switches.
|
/* Parse optional switches.
|
||||||
* Returns argv[] index of first file-name argument (== argc if none).
|
* Returns argv[] index of first file-name argument (== argc if none).
|
||||||
* Any file names with indexes <= last_file_arg_seen are ignored;
|
* Any file names with indexes <= last_file_arg_seen are ignored;
|
||||||
@@ -124,7 +124,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
{
|
{
|
||||||
int argn;
|
int argn;
|
||||||
char * arg;
|
char * arg;
|
||||||
boolean simple_progressive;
|
wxjpeg_boolean simple_progressive;
|
||||||
char * scansarg = NULL; /* saves -scans parm if any */
|
char * scansarg = NULL; /* saves -scans parm if any */
|
||||||
|
|
||||||
/* Set up default JPEG parameters. */
|
/* Set up default JPEG parameters. */
|
||||||
@@ -176,7 +176,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
||||||
/* Enable debug printouts. */
|
/* Enable debug printouts. */
|
||||||
/* On first -d, print version identification */
|
/* On first -d, print version identification */
|
||||||
static boolean printed_version = FALSE;
|
static wxjpeg_boolean printed_version = FALSE;
|
||||||
|
|
||||||
if (! printed_version) {
|
if (! printed_version) {
|
||||||
fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n",
|
fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n",
|
||||||
|
@@ -151,7 +151,7 @@ typedef struct {
|
|||||||
* premultiplied as described above. Since colormap indexes must fit into
|
* premultiplied as described above. Since colormap indexes must fit into
|
||||||
* JSAMPLEs, the entries of this array will too.
|
* JSAMPLEs, the entries of this array will too.
|
||||||
*/
|
*/
|
||||||
boolean is_padded; /* is the colorindex padded for odither? */
|
wxjpeg_boolean is_padded; /* is the colorindex padded for odither? */
|
||||||
|
|
||||||
int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */
|
int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ typedef struct {
|
|||||||
|
|
||||||
/* Variables for Floyd-Steinberg dithering */
|
/* Variables for Floyd-Steinberg dithering */
|
||||||
FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */
|
FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */
|
||||||
boolean on_odd_row; /* flag to remember which row we are on */
|
wxjpeg_boolean on_odd_row; /* flag to remember which row we are on */
|
||||||
} my_cquantizer;
|
} my_cquantizer;
|
||||||
|
|
||||||
typedef my_cquantizer * my_cquantize_ptr;
|
typedef my_cquantizer * my_cquantize_ptr;
|
||||||
@@ -191,7 +191,7 @@ select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
|
|||||||
int nc = cinfo->out_color_components; /* number of color components */
|
int nc = cinfo->out_color_components; /* number of color components */
|
||||||
int max_colors = cinfo->desired_number_of_colors;
|
int max_colors = cinfo->desired_number_of_colors;
|
||||||
int total_colors, iroot, i, j;
|
int total_colors, iroot, i, j;
|
||||||
boolean changed;
|
wxjpeg_boolean changed;
|
||||||
long temp;
|
long temp;
|
||||||
static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE };
|
static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE };
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ alloc_fs_workspace (j_decompress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(void)
|
METHODDEF(void)
|
||||||
start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
|
start_pass_1_quant (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan)
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
size_t arraysize;
|
size_t arraysize;
|
||||||
|
@@ -200,11 +200,11 @@ typedef struct {
|
|||||||
/* Variables for accumulating image statistics */
|
/* Variables for accumulating image statistics */
|
||||||
hist3d histogram; /* pointer to the histogram */
|
hist3d histogram; /* pointer to the histogram */
|
||||||
|
|
||||||
boolean needs_zeroed; /* TRUE if next pass must zero histogram */
|
wxjpeg_boolean needs_zeroed; /* TRUE if next pass must zero histogram */
|
||||||
|
|
||||||
/* Variables for Floyd-Steinberg dithering */
|
/* Variables for Floyd-Steinberg dithering */
|
||||||
FSERRPTR fserrors; /* accumulated errors */
|
FSERRPTR fserrors; /* accumulated errors */
|
||||||
boolean on_odd_row; /* flag to remember which row we are on */
|
wxjpeg_boolean on_odd_row; /* flag to remember which row we are on */
|
||||||
int * error_limiter; /* table for clamping the applied error */
|
int * error_limiter; /* table for clamping the applied error */
|
||||||
} my_cquantizer;
|
} my_cquantizer;
|
||||||
|
|
||||||
@@ -1164,7 +1164,7 @@ finish_pass2 (j_decompress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
METHODDEF(void)
|
METHODDEF(void)
|
||||||
start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
|
start_pass_2_quant (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan)
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
hist3d histogram = cquantize->histogram;
|
hist3d histogram = cquantize->histogram;
|
||||||
|
Reference in New Issue
Block a user