mirror of
https://github.com/fltk/fltk.git
synced 2026-05-19 20:27:04 +08:00
Update bundled image libraries and zlib to current versions
For details see README.bundled-libs.txt
This commit is contained in:
+177
-86
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
|
||||
# Written by Michael Surette
|
||||
# Originally written by Michael Surette
|
||||
#
|
||||
# Copyright 1998-2020 by Bill Spitzak and others.
|
||||
# Copyright 1998-2023 by Bill Spitzak and others.
|
||||
#
|
||||
# This library is free software. Distribution and use rights are outlined in
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
@@ -15,6 +15,25 @@
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
# Important implementation note for FLTK developers
|
||||
#######################################################################
|
||||
#
|
||||
# In the current version of FLTK's CMake build files (1.3.x) we're
|
||||
# using 'include_directories()' to define directories that must be
|
||||
# used in compile commands (typically "-Idirectories").
|
||||
#
|
||||
# include_directories() is a global command that affects *all* source
|
||||
# files in the current directory and all subdirectories. This can lead
|
||||
# to conflicts and should be replaced with target_include_directories()
|
||||
# which can be applied to particular targets and source files only.
|
||||
#
|
||||
# This is a known issue and will be addressed in FLTK 1.4.0.
|
||||
#
|
||||
# Albrecht-S December 4, 2023
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
set (DEBUG_OPTIONS_CMAKE 0)
|
||||
if (DEBUG_OPTIONS_CMAKE)
|
||||
message (STATUS "[** options.cmake **]")
|
||||
@@ -45,7 +64,155 @@ set (OPTION_ABI_VERSION ""
|
||||
)
|
||||
set (FL_ABI_VERSION ${OPTION_ABI_VERSION})
|
||||
|
||||
|
||||
#######################################################################
|
||||
# Select MSVC (Visual Studio) Runtime: DLL (/MDx) or static (/MTx)
|
||||
# where x = 'd' for Debug builds, empty ('') for non-Debug builds.
|
||||
# Note: this might be handled better by the 'MSVC_RUNTIME_LIBRARY'
|
||||
# target property for each target rather than setting a global
|
||||
# CMake variable - but this version does the latter.
|
||||
# *Note* Supported since CMake version 3.15
|
||||
#######################################################################
|
||||
|
||||
if (MSVC AND NOT (CMAKE_VERSION VERSION_LESS 3.15))
|
||||
option (FLTK_MSVC_RUNTIME_DLL "use MSVC Runtime-DLL (/MDx)" ON)
|
||||
if (FLTK_MSVC_RUNTIME_DLL)
|
||||
set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
else ()
|
||||
set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif ()
|
||||
endif (MSVC AND NOT (CMAKE_VERSION VERSION_LESS 3.15))
|
||||
|
||||
#######################################################################
|
||||
# Bundled Library Options
|
||||
#######################################################################
|
||||
|
||||
option (OPTION_USE_SYSTEM_ZLIB "use system zlib" ON)
|
||||
|
||||
if (APPLE)
|
||||
option (OPTION_USE_SYSTEM_LIBJPEG "use system libjpeg" OFF)
|
||||
option (OPTION_USE_SYSTEM_LIBPNG "use system libpng" OFF)
|
||||
else ()
|
||||
option (OPTION_USE_SYSTEM_LIBJPEG "use system libjpeg" ON)
|
||||
option (OPTION_USE_SYSTEM_LIBPNG "use system libpng" ON)
|
||||
endif ()
|
||||
|
||||
#######################################################################
|
||||
# Make sure that png and zlib are either system or local for compatibility
|
||||
#######################################################################
|
||||
|
||||
if (OPTION_USE_SYSTEM_ZLIB)
|
||||
find_package (ZLIB)
|
||||
endif ()
|
||||
|
||||
if (OPTION_USE_SYSTEM_LIBPNG)
|
||||
find_package (PNG)
|
||||
endif ()
|
||||
|
||||
# If we use the system zlib, we must also use the system png zlib and vice versa
|
||||
# If either of them is not available, we fall back to using both local libraries
|
||||
if (OPTION_USE_SYSTEM_LIBPNG AND NOT (OPTION_USE_SYSTEM_ZLIB AND ZLIB_FOUND))
|
||||
set (PNG_FOUND FALSE)
|
||||
set (OPTION_USE_SYSTEM_LIBPNG OFF)
|
||||
message (STATUS "Local z lib selected: overriding png lib to local for compatibility.\n")
|
||||
endif ()
|
||||
if (OPTION_USE_SYSTEM_ZLIB AND NOT (OPTION_USE_SYSTEM_LIBPNG AND PNG_FOUND))
|
||||
set (ZLIB_FOUND FALSE)
|
||||
set (OPTION_USE_SYSTEM_ZLIB OFF)
|
||||
message (STATUS "Local png lib selected: overriding z lib to local for compatibility.\n")
|
||||
endif ()
|
||||
|
||||
#######################################################################
|
||||
# Bundled Compression Library : zlib
|
||||
#######################################################################
|
||||
|
||||
if (OPTION_USE_SYSTEM_ZLIB AND ZLIB_FOUND)
|
||||
set (FLTK_USE_BUILTIN_ZLIB FALSE)
|
||||
set (FLTK_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
include_directories (${ZLIB_INCLUDE_DIRS})
|
||||
else()
|
||||
if (OPTION_USE_SYSTEM_ZLIB)
|
||||
message (STATUS "cannot find system zlib library - using built-in\n")
|
||||
endif ()
|
||||
|
||||
add_subdirectory (zlib)
|
||||
set (FLTK_USE_BUILTIN_ZLIB TRUE)
|
||||
set (FLTK_ZLIB_LIBRARIES fltk_z)
|
||||
set (ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zlib)
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/zlib)
|
||||
endif ()
|
||||
|
||||
set (HAVE_LIBZ 1)
|
||||
|
||||
#######################################################################
|
||||
# Bundled Image Library : libjpeg
|
||||
#######################################################################
|
||||
|
||||
if (OPTION_USE_SYSTEM_LIBJPEG)
|
||||
find_package (JPEG)
|
||||
endif ()
|
||||
|
||||
if (OPTION_USE_SYSTEM_LIBJPEG AND JPEG_FOUND)
|
||||
set (FLTK_USE_BUILTIN_JPEG FALSE)
|
||||
set (FLTK_JPEG_LIBRARIES ${JPEG_LIBRARIES})
|
||||
include_directories (${JPEG_INCLUDE_DIR})
|
||||
else ()
|
||||
if (OPTION_USE_SYSTEM_LIBJPEG)
|
||||
message (STATUS "cannot find system jpeg library - using built-in\n")
|
||||
endif ()
|
||||
|
||||
add_subdirectory (jpeg)
|
||||
set (FLTK_USE_BUILTIN_JPEG TRUE)
|
||||
set (FLTK_JPEG_LIBRARIES fltk_jpeg)
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/jpeg)
|
||||
endif ()
|
||||
|
||||
set (HAVE_LIBJPEG 1)
|
||||
|
||||
#######################################################################
|
||||
# Bundled Image Library : libpng
|
||||
#######################################################################
|
||||
|
||||
if (OPTION_USE_SYSTEM_LIBPNG AND PNG_FOUND)
|
||||
|
||||
set (FLTK_USE_BUILTIN_PNG FALSE)
|
||||
set (FLTK_PNG_LIBRARIES ${PNG_LIBRARIES})
|
||||
include_directories (${PNG_INCLUDE_DIRS})
|
||||
add_definitions (${PNG_DEFINITIONS})
|
||||
|
||||
set (_INCLUDE_SAVED ${CMAKE_REQUIRED_INCLUDES})
|
||||
list (APPEND CMAKE_REQUIRED_INCLUDES ${PNG_INCLUDE_DIRS})
|
||||
|
||||
# Note: we do not check for <libpng/png.h> explicitly.
|
||||
# This is assumed to exist if we have PNG_FOUND and don't find <png.h>
|
||||
|
||||
# FIXME - Force search by unsetting the chache variable. Maybe use
|
||||
# FIXME - another cache variable to check for option changes?
|
||||
|
||||
unset (HAVE_PNG_H CACHE) # force search
|
||||
check_include_file (png.h HAVE_PNG_H)
|
||||
mark_as_advanced (HAVE_PNG_H)
|
||||
|
||||
set (CMAKE_REQUIRED_INCLUDES ${_INCLUDE_SAVED})
|
||||
unset (_INCLUDE_SAVED)
|
||||
|
||||
else ()
|
||||
|
||||
if (OPTION_USE_SYSTEM_LIBPNG)
|
||||
message (STATUS "cannot find system png library - using built-in\n")
|
||||
endif ()
|
||||
|
||||
add_subdirectory (png)
|
||||
set (FLTK_USE_BUILTIN_PNG TRUE)
|
||||
set (FLTK_PNG_LIBRARIES fltk_png)
|
||||
set (HAVE_PNG_H 1)
|
||||
set (HAVE_PNG_GET_VALID 1)
|
||||
set (HAVE_PNG_SET_TRNS_TO_ALPHA 1)
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/png)
|
||||
endif ()
|
||||
|
||||
set (HAVE_LIBPNG 1)
|
||||
|
||||
#######################################################################
|
||||
if (UNIX)
|
||||
option (OPTION_CREATE_LINKS "create backwards compatibility links" OFF)
|
||||
@@ -326,90 +493,6 @@ if (debug_threads)
|
||||
endif (debug_threads)
|
||||
unset (debug_threads)
|
||||
|
||||
#######################################################################
|
||||
option (OPTION_USE_SYSTEM_ZLIB "use system zlib" ON)
|
||||
|
||||
if (OPTION_USE_SYSTEM_ZLIB)
|
||||
include (FindZLIB)
|
||||
endif (OPTION_USE_SYSTEM_ZLIB)
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
set (FLTK_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
include_directories (${ZLIB_INCLUDE_DIRS})
|
||||
set (FLTK_BUILTIN_ZLIB_FOUND FALSE)
|
||||
else()
|
||||
if (OPTION_USE_SYSTEM_ZLIB)
|
||||
message (STATUS "cannot find system zlib library - using built-in\n")
|
||||
endif (OPTION_USE_SYSTEM_ZLIB)
|
||||
|
||||
add_subdirectory (zlib)
|
||||
set (FLTK_ZLIB_LIBRARIES fltk_z)
|
||||
set (ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zlib)
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/zlib)
|
||||
set (FLTK_BUILTIN_ZLIB_FOUND TRUE)
|
||||
endif (ZLIB_FOUND)
|
||||
|
||||
set (HAVE_LIBZ 1)
|
||||
|
||||
#######################################################################
|
||||
if (APPLE)
|
||||
option (OPTION_USE_SYSTEM_LIBJPEG "use system libjpeg" OFF)
|
||||
else ()
|
||||
option (OPTION_USE_SYSTEM_LIBJPEG "use system libjpeg" ON)
|
||||
endif (APPLE)
|
||||
|
||||
if (OPTION_USE_SYSTEM_LIBJPEG)
|
||||
include (FindJPEG)
|
||||
endif (OPTION_USE_SYSTEM_LIBJPEG)
|
||||
|
||||
if (JPEG_FOUND)
|
||||
set (FLTK_JPEG_LIBRARIES ${JPEG_LIBRARIES})
|
||||
include_directories (${JPEG_INCLUDE_DIR})
|
||||
set (FLTK_BUILTIN_JPEG_FOUND FALSE)
|
||||
else ()
|
||||
if (OPTION_USE_SYSTEM_LIBJPEG)
|
||||
message (STATUS "cannot find system jpeg library - using built-in\n")
|
||||
endif (OPTION_USE_SYSTEM_LIBJPEG)
|
||||
|
||||
add_subdirectory (jpeg)
|
||||
set (FLTK_JPEG_LIBRARIES fltk_jpeg)
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/jpeg)
|
||||
set (FLTK_BUILTIN_JPEG_FOUND TRUE)
|
||||
endif (JPEG_FOUND)
|
||||
|
||||
set (HAVE_LIBJPEG 1)
|
||||
|
||||
#######################################################################
|
||||
if (APPLE)
|
||||
option (OPTION_USE_SYSTEM_LIBPNG "use system libpng" OFF)
|
||||
else ()
|
||||
option (OPTION_USE_SYSTEM_LIBPNG "use system libpng" ON)
|
||||
endif (APPLE)
|
||||
|
||||
if (OPTION_USE_SYSTEM_LIBPNG)
|
||||
include (FindPNG)
|
||||
endif (OPTION_USE_SYSTEM_LIBPNG)
|
||||
|
||||
if (PNG_FOUND)
|
||||
set (FLTK_PNG_LIBRARIES ${PNG_LIBRARIES})
|
||||
include_directories (${PNG_INCLUDE_DIR})
|
||||
add_definitions (${PNG_DEFINITIONS})
|
||||
set (FLTK_BUILTIN_PNG_FOUND FALSE)
|
||||
else()
|
||||
if (OPTION_USE_SYSTEM_LIBPNG)
|
||||
message (STATUS "cannot find system png library - using built-in\n")
|
||||
endif (OPTION_USE_SYSTEM_LIBPNG)
|
||||
|
||||
add_subdirectory (png)
|
||||
set (FLTK_PNG_LIBRARIES fltk_png)
|
||||
set (HAVE_PNG_H 1)
|
||||
set (HAVE_PNG_GET_VALID 1)
|
||||
set (HAVE_PNG_SET_TRNS_TO_ALPHA 1)
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/png)
|
||||
set (FLTK_BUILTIN_PNG_FOUND TRUE)
|
||||
endif (PNG_FOUND)
|
||||
|
||||
set (HAVE_LIBPNG 1)
|
||||
|
||||
#######################################################################
|
||||
if (X11_Xinerama_FOUND)
|
||||
@@ -526,6 +609,14 @@ if (DEBUG_OPTIONS_CMAKE)
|
||||
fl_debug_var (OPENGL_FOUND)
|
||||
fl_debug_var (OPENGL_INCLUDE_DIR)
|
||||
fl_debug_var (OPENGL_LIBRARIES)
|
||||
fl_debug_var (CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||
message ("--- bundled libraries ---")
|
||||
fl_debug_var (OPTION_USE_SYSTEM_LIBJPEG)
|
||||
fl_debug_var (OPTION_USE_SYSTEM_LIBPNG)
|
||||
fl_debug_var (OPTION_USE_SYSTEM_ZLIB)
|
||||
fl_debug_var (FLTK_USE_BUILTIN_JPEG)
|
||||
fl_debug_var (FLTK_USE_BUILTIN_PNG)
|
||||
fl_debug_var (FLTK_USE_BUILTIN_ZLIB)
|
||||
message ("--- X11 ---")
|
||||
fl_debug_var (X11_FOUND)
|
||||
fl_debug_var (X11_INCLUDE_DIR)
|
||||
|
||||
+100
-46
@@ -5,23 +5,30 @@ This file is mainly intended for FLTK developers and contains information
|
||||
about the current versions of all bundled libraries and about how to
|
||||
upgrade these bundled libraries.
|
||||
|
||||
Starting with FLTK 1.3.9 the bundled libraries jpeg, png, and zlib use
|
||||
"symbol prefixing" with the prefix 'fltk_' for all external symbols to
|
||||
distinguish the bundled libraries from existing system libraries and
|
||||
to avoid runtime errors.
|
||||
|
||||
Current versions of bundled libraries (as of Nov. 5, 2021):
|
||||
User code compiled correctly with the header files provided by the
|
||||
bundled image libraries need not be changed.
|
||||
|
||||
Current versions of bundled libraries (as of December 5, 2023):
|
||||
|
||||
Library Version Release date FLTK Version
|
||||
--------------------------------------------------------------------------
|
||||
jpeg jpeg-9d 2020-01-12 1.3.6 - 1.3.8
|
||||
png libpng-1.6.37 2019-04-14 1.3.6 - 1.3.8
|
||||
zlib zlib-1.2.11 2017-01-15 1.3.6 - 1.3.8
|
||||
jpeg jpeg-9e 2022-01-16 1.3.9
|
||||
png libpng-1.6.40 2023-06-21 1.3.9
|
||||
zlib zlib-1.3 2023-08-18 1.3.9
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
Previous versions of bundled libraries:
|
||||
|
||||
Library Version Release date FLTK Version
|
||||
------------------------------------------------------------------
|
||||
jpeg jpeg-9a 2014-01-19 1.3.5
|
||||
png libpng-1.6.16 2014-12-22 1.3.5
|
||||
zlib zlib-1.2.8 2013-04-28 1.3.5
|
||||
jpeg jpeg-9d 2020-01-12 1.3.6 - 1.3.8
|
||||
png libpng-1.6.37 2019-04-14 1.3.6 - 1.3.8
|
||||
zlib zlib-1.2.11 2017-01-15 1.3.6 - 1.3.8
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -34,15 +41,18 @@ General information:
|
||||
We use our own build files, hence a few files MUST NOT be upgraded when
|
||||
the library source files are upgraded. We strive to keep changes to the
|
||||
library source files as small as possible. Patching library code to
|
||||
work with FLTK should be a rare exception.
|
||||
work with FLTK should be a rare exception. Symbol prefixing with prefix
|
||||
'fltk_' is one such exception to the rule.
|
||||
|
||||
If patches are necessary all changes in the library files should be
|
||||
marked with "FLTK" in a comment so a developer who upgrades the library
|
||||
later is aware of changes in the source code for FLTK. Additional comments
|
||||
should be added to show the rationale, i.e. why a particular change was
|
||||
necessary. If applicable, add a reference to a Software Trouble Report,
|
||||
GitHub Issue or PR like "STR 3456", "Issue #123", or "PR #234".
|
||||
later is aware of changes in the source code for FLTK. Look for 'FLTK'
|
||||
and/or 'fltk_' to find the differences.
|
||||
|
||||
Additional comments should be added to show the rationale, i.e. why
|
||||
a particular change was necessary. If applicable, add a reference to
|
||||
a Software Trouble Report, GitHub Issue or Pull Request (PR) like
|
||||
"STR 3456", "Issue #123", or "PR #234".
|
||||
|
||||
How to update the bundled libraries:
|
||||
|
||||
@@ -62,10 +72,11 @@ How to update the bundled libraries:
|
||||
Merging source files:
|
||||
|
||||
Please check if some source and header files contain "FLTK" comments
|
||||
to be aware of necessary merges. It is also good to get the distribution
|
||||
tar ball of the previous version and to run a (graphical) diff or
|
||||
merge tool on the previous version and the bundled version of FLTK
|
||||
to see the "previous" differences.
|
||||
and/or 'fltk_' symbol prefixing to be aware of necessary merges.
|
||||
It is also good to download the distribution tar ball or Git source
|
||||
files of the previous version and to run a (graphical) diff or merge
|
||||
tool on the previous version and the bundled version of FLTK to see
|
||||
the "previous" differences.
|
||||
|
||||
Files that were not patched in previous versions should be copied to
|
||||
the new version w/o changes. Files that had FLTK specific patches must
|
||||
@@ -96,9 +107,9 @@ Tests after merge:
|
||||
|
||||
Upgrade notes for specific libraries:
|
||||
|
||||
The following chapters contain information of specific files and how
|
||||
they are upgraded. Since the changes in all bundled libraries can't
|
||||
be known in advance this information may change in the future. Please
|
||||
The following chapters contain informations about specific files and
|
||||
how they are upgraded. Since the changes in all bundled libraries are
|
||||
not known in advance this information may change in the future. Please
|
||||
verify that no other changes are necessary.
|
||||
|
||||
|
||||
@@ -108,21 +119,38 @@ zlib:
|
||||
Download: See website and follow links.
|
||||
Repository: git clone https://github.com/madler/zlib.git
|
||||
|
||||
zlib should be upgraded first because libpng depends on zlib.
|
||||
|
||||
Download the latest zlib sources, `cd' to /path-to/zlib and run
|
||||
|
||||
$ ./configure --zprefix
|
||||
|
||||
This creates the header file 'zconf.h' with definitions to enable
|
||||
the standard 'z_' symbol prefix.
|
||||
|
||||
Unfortunately zlib requires patching some source and header files to
|
||||
convert this 'z_' prefix to 'fltk_z_' to be more specific. As of this
|
||||
writing (Nov. 2021) three files need symbol prefix patches:
|
||||
|
||||
- gzread.c
|
||||
- zconf.h
|
||||
- zlib.h
|
||||
|
||||
You may want to compare these files and/or the previous version to
|
||||
find out which changes are required. The general rule is to change
|
||||
all occurrences of 'z_' to 'fltk_z_' but there *are* exceptions.
|
||||
|
||||
|
||||
The following files need special handling:
|
||||
|
||||
CMakeLists.txt: Keep FLTK version, update manually if necessary.
|
||||
- CMakeLists.txt: Keep FLTK version, update manually if necessary.
|
||||
- Makefile: Same as CMakeLists.txt.
|
||||
- gzread.c: Merge changes (see above, manual merge recommended).
|
||||
- zconf.h: Merge changes (see above, manual merge recommended).
|
||||
- zlib.h: Merge changes (see above, manual merge recommended).
|
||||
- makedepend: Keep this file.
|
||||
|
||||
Makefile: Same as CMakeLists.txt.
|
||||
|
||||
zconf.h: Merge changes.
|
||||
|
||||
As of zlib 1.2.11: two small sections marked with "FLTK" comments
|
||||
that need to be kept.
|
||||
|
||||
makedepend: Keep this file.
|
||||
|
||||
Run `make depend' in the zlib folder on a Linux system after
|
||||
Run `make depend' in the zlib folder on a Linux system after
|
||||
the upgrade to update this file.
|
||||
|
||||
|
||||
@@ -134,17 +162,25 @@ png:
|
||||
|
||||
libpng should be upgraded after zlib because it depends on zlib.
|
||||
|
||||
Download the latest libpng sources, `cd' to /path-to/libpng and run
|
||||
\code
|
||||
$ ./configure --with-libpng-prefix=fltk_
|
||||
$ make
|
||||
\endcode
|
||||
This creates the header files 'pnglibconf.h' and 'pngprefix.h'
|
||||
with the 'fltk_' symbol prefix.
|
||||
|
||||
The following files need special handling:
|
||||
|
||||
CMakeLists.txt: Keep FLTK version, update manually if necessary.
|
||||
- CMakeLists.txt: Keep FLTK version, update manually if necessary.
|
||||
- Makefile: Same as CMakeLists.txt.
|
||||
- pnglibconf.h: Generate on a Linux system and merge (see above).
|
||||
- pngprefix.h: Generate on a Linux system and merge (see above).
|
||||
- makedepend: Keep this file.
|
||||
- png.c: Keep a change labelled with "FLTK"
|
||||
- pngerror.c: Keep two changes labelled with "FLTK"
|
||||
|
||||
Makefile: Same as CMakeLists.txt.
|
||||
|
||||
pnglibconf.h: Generate on a Linux system and merge.
|
||||
|
||||
makedepend: Keep this file.
|
||||
|
||||
Run `make depend' in the png folder on a Linux system after
|
||||
Run `make depend' in the png folder on a Linux system after
|
||||
the upgrade to update this file.
|
||||
|
||||
|
||||
@@ -152,17 +188,35 @@ jpeg:
|
||||
|
||||
Website: https://ijg.org/
|
||||
Download: See website and follow links.
|
||||
Repository: <unknown>
|
||||
Repository: N/A
|
||||
|
||||
Download the latest jpeg-xy sources on a Linux (or Unix) system,
|
||||
`cd' to /path-to/jpeg-xy and run
|
||||
\code
|
||||
$ ./configure
|
||||
$ make [-jN]
|
||||
\endcode
|
||||
This builds the library and should create the static library file
|
||||
'.libs/libjpeg.a'.
|
||||
|
||||
Execute the following command to extract the libjpeg symbol names
|
||||
used to build the 'prefixed' libfltk_jpeg library:
|
||||
\code
|
||||
$ nm --extern-only --defined-only .libs/libjpeg.a | awk '{print $3}' \
|
||||
| sed '/^$/d' | sort -u | awk '{print "#define "$1" fltk_"$1}' \
|
||||
> fltk_jpeg_prefix.h
|
||||
\endcode
|
||||
This creates the header file 'fltk_jpeg_prefix.h' with the
|
||||
'# define' statements using the 'fltk_' symbol prefix.
|
||||
|
||||
The following files need special handling:
|
||||
|
||||
CMakeLists.txt: Keep FLTK version, update manually if necessary.
|
||||
|
||||
Makefile: Same as CMakeLists.txt.
|
||||
|
||||
- CMakeLists.txt: Keep FLTK version, update manually if necessary.
|
||||
- Makefile: Same as CMakeLists.txt.
|
||||
- fltk_jpeg_prefix.h: Generate on a Linux system and merge (see above).
|
||||
- jconfig.h: keep changes flagged with \verbatim /* FLTK */ \endverbatim
|
||||
Note: more to come...
|
||||
- makedepend: Keep this file.
|
||||
|
||||
makedepend: Keep this file.
|
||||
|
||||
Run `make depend' in the jpeg folder on a Linux system after
|
||||
Run `make depend' in the jpeg folder on a Linux system after
|
||||
the upgrade to update this file.
|
||||
|
||||
+37
-15
@@ -1,36 +1,56 @@
|
||||
#
|
||||
# JPEG library CMake configuration for the Fast Light Toolkit (FLTK).
|
||||
#
|
||||
# Copyright 1998-2023 by Bill Spitzak and others.
|
||||
#
|
||||
# This library is free software. Distribution and use rights are outlined in
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
# memmgr back ends: compile only one of these into a working library
|
||||
# (For now, let's use the mode that requires the image fit into memory.
|
||||
# This is the recommended mode for Win32 anyway.)
|
||||
set(systemdependent_SRCS jmemnobs.c)
|
||||
|
||||
set (systemdependent_SRCS jmemnobs.c)
|
||||
|
||||
# library object files common to compression and decompression
|
||||
set(common_SRCS
|
||||
jaricom.c jcomapi.c jutils.c jerror.c jmemmgr.c
|
||||
|
||||
set (common_SRCS
|
||||
jaricom.c jcomapi.c jutils.c jerror.c jmemmgr.c
|
||||
)
|
||||
|
||||
# compression library object files
|
||||
set(compression_SRCS
|
||||
jcapimin.c jcapistd.c jcarith.c jctrans.c jcparam.c jdatadst.c jcinit.c
|
||||
jcmaster.c jcmarker.c jcmainct.c jcprepct.c jccoefct.c jccolor.c
|
||||
jcsample.c jchuff.c jcdctmgr.c jfdctfst.c jfdctflt.c
|
||||
jfdctint.c
|
||||
|
||||
set (compression_SRCS
|
||||
jcapimin.c jcapistd.c jcarith.c jctrans.c jcparam.c jdatadst.c jcinit.c
|
||||
jcmaster.c jcmarker.c jcmainct.c jcprepct.c jccoefct.c jccolor.c
|
||||
jcsample.c jchuff.c jcdctmgr.c jfdctfst.c jfdctflt.c
|
||||
jfdctint.c
|
||||
)
|
||||
|
||||
# decompression library object files
|
||||
set(decompression_SRCS
|
||||
jdapimin.c jdapistd.c jdarith.c jdtrans.c jdatasrc.c jdmaster.c
|
||||
jdinput.c jdmarker.c jdhuff.c jdmainct.c jdcoefct.c
|
||||
jdpostct.c jddctmgr.c jidctfst.c jidctflt.c jidctint.c
|
||||
jdsample.c jdcolor.c jquant1.c jquant2.c jdmerge.c
|
||||
|
||||
set (decompression_SRCS
|
||||
jdapimin.c jdapistd.c jdarith.c jdtrans.c jdatasrc.c jdmaster.c
|
||||
jdinput.c jdmarker.c jdhuff.c jdmainct.c jdcoefct.c
|
||||
jdpostct.c jddctmgr.c jidctfst.c jidctflt.c jidctint.c
|
||||
jdsample.c jdcolor.c jquant1.c jquant2.c jdmerge.c
|
||||
)
|
||||
|
||||
list(APPEND BUILD_SRCS "${systemdependent_SRCS};${common_SRCS}")
|
||||
list(APPEND BUILD_SRCS "${compression_SRCS};${decompression_SRCS}")
|
||||
list (APPEND BUILD_SRCS "${systemdependent_SRCS};${common_SRCS}")
|
||||
list (APPEND BUILD_SRCS "${compression_SRCS};${decompression_SRCS}")
|
||||
|
||||
#######################################################################
|
||||
|
||||
# Suppress some Visual Studio compiler warnings
|
||||
|
||||
set (msvc_warnings /wd4267)
|
||||
|
||||
#######################################################################
|
||||
@@ -48,6 +68,7 @@ endif (MSVC)
|
||||
#######################################################################
|
||||
|
||||
if (OPTION_BUILD_SHARED_LIBS)
|
||||
|
||||
FL_ADD_LIBRARY (fltk_jpeg SHARED "${BUILD_SRCS}")
|
||||
|
||||
if (MSVC)
|
||||
@@ -61,5 +82,6 @@ endif (OPTION_BUILD_SHARED_LIBS)
|
||||
#######################################################################
|
||||
|
||||
install (FILES jconfig.h jerror.h jmorecfg.h jpeglib.h
|
||||
fltk_jpeg_prefix.h
|
||||
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
|
||||
)
|
||||
|
||||
+9
-10
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# JPEG library makefile for the Fast Light Toolkit (FLTK).
|
||||
#
|
||||
# Copyright 1997-2011 by Bill Spitzak and others.
|
||||
# Copyright 1997-2023 by Bill Spitzak and others.
|
||||
#
|
||||
# This library is free software. Distribution and use rights are outlined in
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
include ../makeinclude
|
||||
|
||||
|
||||
#
|
||||
# Object files...
|
||||
#
|
||||
@@ -74,14 +73,12 @@ OBJS = \
|
||||
|
||||
LIBJPEG = ../lib/libfltk_jpeg$(LIBEXT)
|
||||
|
||||
|
||||
#
|
||||
# Make all targets...
|
||||
#
|
||||
|
||||
all: $(LIBJPEG)
|
||||
|
||||
|
||||
#
|
||||
# Clean all targets and object files...
|
||||
#
|
||||
@@ -90,7 +87,6 @@ clean:
|
||||
$(RM) $(OBJS)
|
||||
$(RM) $(LIBJPEG)
|
||||
|
||||
|
||||
#
|
||||
# Install everything...
|
||||
#
|
||||
@@ -106,7 +102,7 @@ install: $(LIBJPEG)
|
||||
$(INSTALL_DATA) jerror.h $(DESTDIR)$(includedir)/FL/images
|
||||
$(INSTALL_DATA) jmorecfg.h $(DESTDIR)$(includedir)/FL/images
|
||||
$(INSTALL_DATA) jpeglib.h $(DESTDIR)$(includedir)/FL/images
|
||||
|
||||
$(INSTALL_DATA) fltk_jpeg_prefix.h $(DESTDIR)$(includedir)/FL/images
|
||||
|
||||
#
|
||||
# Uninstall everything...
|
||||
@@ -120,7 +116,7 @@ uninstall:
|
||||
$(RM) $(includedir)/FL/images/jerror.h
|
||||
$(RM) $(includedir)/FL/images/jmorecfg.h
|
||||
$(RM) $(includedir)/FL/images/jpeglib.h
|
||||
|
||||
$(RM) $(includedir)/FL/images/fltk_jpeg_prefix.h
|
||||
|
||||
#
|
||||
# libfltk_jpeg.a
|
||||
@@ -132,13 +128,16 @@ $(LIBJPEG): $(OBJS)
|
||||
$(LIBCOMMAND) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
|
||||
#
|
||||
# Make dependencies...
|
||||
#
|
||||
|
||||
depend: $(OBJS:.o=.c)
|
||||
makedepend -Y -I.. -f makedepend $(OBJS:.o=.c)
|
||||
depend: $(OBJS:.o=.c)
|
||||
makedepend -Y -I.. -f makedepend -w 20 $(OBJS:.o=.c)
|
||||
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
|
||||
echo "" >> makedepend.tmp
|
||||
grep '^[a-zA-Z]' makedepend | ( LC_ALL=C sort -u -f >> makedepend.tmp; )
|
||||
mv makedepend.tmp makedepend
|
||||
|
||||
include makedepend
|
||||
|
||||
|
||||
+18
-15
@@ -1,7 +1,7 @@
|
||||
The Independent JPEG Group's JPEG software
|
||||
==========================================
|
||||
|
||||
README for release 9d of 12-Jan-2020
|
||||
README for release 9e of 16-Jan-2022
|
||||
====================================
|
||||
|
||||
This distribution contains the ninth public release of the Independent JPEG
|
||||
@@ -38,6 +38,7 @@ User documentation:
|
||||
rdjpgcom, and wrjpgcom.
|
||||
*.1 Unix-style man pages for programs (same info as usage.txt).
|
||||
wizard.txt Advanced usage instructions for JPEG wizards only.
|
||||
cdaltui.txt Description of alternate user interface for cjpeg/djpeg.
|
||||
change.log Version-to-version change highlights.
|
||||
Programmer and internal documentation:
|
||||
libjpeg.txt How to use the JPEG library in your own programs.
|
||||
@@ -115,7 +116,7 @@ with respect to this software, its quality, accuracy, merchantability, or
|
||||
fitness for a particular purpose. This software is provided "AS IS", and you,
|
||||
its user, assume the entire risk as to its quality and accuracy.
|
||||
|
||||
This software is copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
|
||||
This software is copyright (C) 1991-2022, Thomas G. Lane, Guido Vollbeding.
|
||||
All Rights Reserved except as specified below.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
@@ -165,7 +166,7 @@ The best short technical introduction to the JPEG compression algorithm is
|
||||
(Adjacent articles in that issue discuss MPEG motion picture compression,
|
||||
applications of JPEG, and related topics.) If you don't have the CACM issue
|
||||
handy, a PDF file containing a revised version of Wallace's article is
|
||||
available at http://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually
|
||||
available at https://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually
|
||||
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
|
||||
omits the sample images that appeared in CACM, but it includes corrections
|
||||
and some added material. Note: the Wallace article is copyright ACM and IEEE,
|
||||
@@ -209,17 +210,16 @@ document is Revision 3. And a contributed document ISO/IEC JTC1/SC29/WG1 N
|
||||
5799 with title "Evolution of JPEG", June/July 2011, Berlin, Germany.
|
||||
IJG JPEG 9 introduces a reversible color transform for improved lossless
|
||||
compression which is described in a contributed document ISO/IEC JTC1/SC29/
|
||||
WG1 N 6080 with title "JPEG 9 Lossless Coding", June/July 2012, Paris,
|
||||
France.
|
||||
WG1 N 6080 with title "JPEG 9 Lossless Coding", June/July 2012, Paris, France.
|
||||
|
||||
The JPEG standard does not specify all details of an interchangeable file
|
||||
format. For the omitted details we follow the "JFIF" conventions, version 2.
|
||||
JFIF version 1 has been adopted as Recommendation ITU-T T.871 (05/2011) :
|
||||
Information technology - Digital compression and coding of continuous-tone
|
||||
still images: JPEG File Interchange Format (JFIF). It is available as a
|
||||
free download in PDF file format from http://www.itu.int/rec/T-REC-T.871.
|
||||
free download in PDF file format from https://www.itu.int/rec/T-REC-T.871.
|
||||
A PDF file of the older JFIF document is available at
|
||||
http://www.w3.org/Graphics/JPEG/jfif3.pdf.
|
||||
https://www.w3.org/Graphics/JPEG/jfif3.pdf.
|
||||
|
||||
The TIFF 6.0 file format specification can be obtained by FTP from
|
||||
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
|
||||
@@ -227,7 +227,7 @@ found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
|
||||
IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
|
||||
Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
|
||||
(Compression tag 7). Copies of this Note can be obtained from
|
||||
http://www.ijg.org/files/. It is expected that the next revision
|
||||
https://www.ijg.org/files/. It is expected that the next revision
|
||||
of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
|
||||
Although IJG's own code does not support TIFF/JPEG, the free libtiff library
|
||||
uses our library to implement TIFF/JPEG per the Note.
|
||||
@@ -238,9 +238,11 @@ ARCHIVE LOCATIONS
|
||||
|
||||
The "official" archive site for this software is www.ijg.org.
|
||||
The most recent released version can always be found there in
|
||||
directory "files". This particular version will be archived as
|
||||
http://www.ijg.org/files/jpegsrc.v9d.tar.gz, and in Windows-compatible
|
||||
"zip" archive format as http://www.ijg.org/files/jpegsr9d.zip.
|
||||
directory "files". This particular version will be archived
|
||||
in Windows-compatible "zip" archive format as
|
||||
https://www.ijg.org/files/jpegsr9e.zip, and
|
||||
in Unix-compatible "tar.gz" archive format as
|
||||
https://www.ijg.org/files/jpegsrc.v9e.tar.gz.
|
||||
|
||||
The JPEG FAQ (Frequently Asked Questions) article is a source of some
|
||||
general information about JPEG.
|
||||
@@ -286,11 +288,12 @@ communication about JPEG configuration in Sigma Photo Pro software.
|
||||
|
||||
Thank to Andrew Finkenstadt for hosting the ijg.org site.
|
||||
|
||||
Thank to Thomas G. Lane for the original design and development of
|
||||
this singular software package.
|
||||
Thank to Thomas G. Lane for the original design and development
|
||||
of this singular software package.
|
||||
|
||||
Thank to Lars Goehler, Andreas Heinecke, Sebastian Fuss, Yvonne Roebert,
|
||||
Andrej Werner, and Ulf-Dietrich Braumann for support and public relations.
|
||||
Thank to Lars Goehler, Andreas Heinecke, Sebastian Fuss,
|
||||
Yvonne Roebert, Andrej Werner, Ulf-Dietrich Braumann,
|
||||
and Nina Ssymank for support and public relations.
|
||||
|
||||
|
||||
FILE FORMAT WARS
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
CHANGE LOG for Independent JPEG Group's JPEG software
|
||||
|
||||
|
||||
Version 9e 16-Jan-2022
|
||||
-----------------------
|
||||
|
||||
Include alternate user interface files for cjpeg/djpeg.
|
||||
|
||||
jcparam.c: change default chrominance DC quantization factor
|
||||
for lossless support. Note: Requires rebuild of test images.
|
||||
|
||||
rdgif.c, cderror.h: add sanity check for GIF image dimensions.
|
||||
Thank to Casper Sun for cjpeg potential vulnerability report.
|
||||
|
||||
Add ARM and ARM64 platform support in the Visual Studio build.
|
||||
|
||||
|
||||
Version 9d 12-Jan-2020
|
||||
-----------------------
|
||||
|
||||
|
||||
+3
-1
@@ -1,6 +1,6 @@
|
||||
IJG JPEG LIBRARY: FILE LIST
|
||||
|
||||
Copyright (C) 1994-2019, Thomas G. Lane, Guido Vollbeding.
|
||||
Copyright (C) 1994-2020, Thomas G. Lane, Guido Vollbeding.
|
||||
This file is part of the Independent JPEG Group's software.
|
||||
For conditions of distribution and use, see the accompanying README file.
|
||||
|
||||
@@ -140,7 +140,9 @@ transupp.h Declarations for jpegtran support routines in transupp.c.
|
||||
C source code files:
|
||||
|
||||
cjpeg.c Main program for cjpeg.
|
||||
cjpegalt.c Main program for cjpeg with alternate user interface.
|
||||
djpeg.c Main program for djpeg.
|
||||
djpegalt.c Main program for djpeg with alternate user interface.
|
||||
jpegtran.c Main program for jpegtran.
|
||||
cdjpeg.c Utility routines used by all three programs.
|
||||
rdcolmap.c Code to read a colormap file for djpeg's "-map" switch.
|
||||
|
||||
+94
-23
@@ -1,6 +1,6 @@
|
||||
INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software
|
||||
|
||||
Copyright (C) 1991-2019, Thomas G. Lane, Guido Vollbeding.
|
||||
Copyright (C) 1991-2021, Thomas G. Lane, Guido Vollbeding.
|
||||
This file is part of the Independent JPEG Group's software.
|
||||
For conditions of distribution and use, see the accompanying README file.
|
||||
|
||||
@@ -150,8 +150,11 @@ makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C
|
||||
makefile.vc jconfig.vc Windows, MS Visual C++
|
||||
makefile.vs jconfig.vc Windows, MS Visual C++ 6 Developer Studio
|
||||
make*.vc6
|
||||
makefile.vs jconfig.vc Windows, Visual Studio 2019 (v16)
|
||||
makefile.vs jconfig.vc Windows, Visual Studio 2019 Version 16
|
||||
make*.v16
|
||||
makefile.vs jconfig.vc Windows, Visual Studio 2022 Version 17
|
||||
make*.v16
|
||||
make*.v17
|
||||
makefile.b32 jconfig.vc Windows, Borland C++ 32-bit (bcc32)
|
||||
makefile.mms jconfig.vms Digital VMS, with MMS software
|
||||
makefile.vms jconfig.vms Digital VMS, without MMS software
|
||||
@@ -320,6 +323,7 @@ As a quick test of functionality we've included a small sample image in
|
||||
several forms:
|
||||
testorig.jpg Starting point for the djpeg tests.
|
||||
testimg.ppm The output of djpeg testorig.jpg
|
||||
testimg.gif The output of djpeg -gif testorig.jpg
|
||||
testimg.bmp The output of djpeg -bmp -colors 256 testorig.jpg
|
||||
testimg.jpg The output of cjpeg testimg.ppm
|
||||
testprog.jpg Progressive-mode equivalent of testorig.jpg.
|
||||
@@ -1029,18 +1033,18 @@ library, we recommend building the applications so that you can run the
|
||||
self-test.)
|
||||
|
||||
To use:
|
||||
1. Open the command prompt, change to the source directory and execute
|
||||
the command line
|
||||
NMAKE /f makefile.vs setup-vc6
|
||||
If you get an error message saying that the "NMAKE" command could
|
||||
1. Open the Windows Command Prompt, change to the source directory and
|
||||
execute the command line
|
||||
nmake /f makefile.vs setup-vc6
|
||||
If you get an error message saying that the "nmake" command could
|
||||
not be found, execute the command
|
||||
"%ProgramFiles%\Microsoft Visual Studio\VC98\Bin\VCVARS32"
|
||||
to set the environment for using Microsoft Visual C++ tools,
|
||||
and repeat the NMAKE call.
|
||||
and repeat the nmake call.
|
||||
This will move jconfig.vc to jconfig.h and makefiles to project files.
|
||||
(Note that the renaming is critical!)
|
||||
Alternatively you can use
|
||||
NMAKE /f makefile.vs setupcopy-vc6
|
||||
nmake /f makefile.vs setupcopy-vc6
|
||||
This will create renamed copies of the files, which allows to repeat
|
||||
the setup later.
|
||||
2. Open the workspace file jpeg.dsw, build the library project.
|
||||
@@ -1048,45 +1052,112 @@ To use:
|
||||
probably get a message saying that the project files are being updated.)
|
||||
3. Open the workspace file apps.dsw, build the application projects.
|
||||
4. To perform the self-test, execute the command line
|
||||
NMAKE /f makefile.vs test-build
|
||||
nmake /f makefile.vs test-build
|
||||
5. Move the application .exe files from the Release folder to an
|
||||
appropriate location on your path.
|
||||
|
||||
|
||||
Microsoft Windows, Visual Studio 2019 (v16):
|
||||
Microsoft Windows, Visual Studio 2019 Version 16:
|
||||
|
||||
We include makefiles that should work as project files in Visual Studio
|
||||
2019 (v16) or later. There is a library makefile that builds the IJG
|
||||
library as a static Win32/x64 library, and application makefiles that
|
||||
build the sample applications as Win32/x64 console applications. (Even
|
||||
if you only want the library, we recommend building the applications so
|
||||
that you can run the self-test.)
|
||||
2019 Version 16 or later. There is a library makefile that builds the
|
||||
IJG library as a static Win32/x64/ARM/ARM64 library, and application
|
||||
makefiles that build the sample applications as Win32/x64/ARM/ARM64
|
||||
console applications. (Even if you only want the library, we recommend
|
||||
building the applications so that you can run the self-test.)
|
||||
|
||||
To use:
|
||||
1. Open the Developer Command Prompt for VS 2019, change to the source
|
||||
1. Ensure you’ve checked the item "Desktop development with C++" in the
|
||||
Workloads tab of Visual Studio Installer.
|
||||
Open the Developer Command Prompt for VS 2019, change to the source
|
||||
directory and execute the command line
|
||||
NMAKE /f makefile.vs setup-v16
|
||||
nmake /f makefile.vs setup-v16
|
||||
This will move jconfig.vc to jconfig.h and makefiles to project files.
|
||||
(Note that the renaming is critical!)
|
||||
Alternatively you can use
|
||||
NMAKE /f makefile.vs setupcopy-v16
|
||||
nmake /f makefile.vs setupcopy-v16
|
||||
This will create renamed copies of the files, which allows to repeat
|
||||
the setup later.
|
||||
2. Open the solution file jpeg.sln, build the library project.
|
||||
a) If you are using Visual Studio more recent than
|
||||
2019 (v16), you'll probably get a message saying
|
||||
that the project files are being updated.
|
||||
2019 Version 16, you'll probably get a message
|
||||
saying that the project files are being updated.
|
||||
b) If necessary, open the project properties and
|
||||
adapt the Windows Target Platform Version in
|
||||
the Configuration Properties, General section;
|
||||
we support the latest version at the time of release.
|
||||
c) If you want to build x64 code, change the platform setting from
|
||||
c) If you get a warning saying that a platform cannot be found,
|
||||
you can either
|
||||
* forgo the platform and ignore the warning, or
|
||||
* remove the platform in the Configuration Manager, or
|
||||
* install the corresponding platform Buildtools in
|
||||
Visual Studio Installer (Workloads tab Optional components
|
||||
or Individual components tab).
|
||||
d) If you want to build x64 code, change the platform setting from
|
||||
Win32 to x64. You can build Win32 and x64 versions side by side.
|
||||
e) If you want to build ARM/ARM64 code, change the platform setting
|
||||
to ARM/ARM64. Ensure you've installed the ARM/ARM64-Buildtools
|
||||
in Visual Studio Installer (Workloads tab Optional components
|
||||
or Individual components tab).
|
||||
You can build Win32/x64/ARM/ARM64 versions side by side.
|
||||
3. Open the solution file apps.sln, build the application projects.
|
||||
4. To perform the self-test, execute the command line
|
||||
NMAKE /f makefile.vs test-32
|
||||
nmake /f makefile.vs test-32
|
||||
for the Win32 build, or on a 64-bit system
|
||||
NMAKE /f makefile.vs test-64
|
||||
nmake /f makefile.vs test-64
|
||||
for the x64 build.
|
||||
5. Move the application .exe files from the Release folder to an
|
||||
appropriate location on your path.
|
||||
|
||||
|
||||
Microsoft Windows, Visual Studio 2022 Version 17:
|
||||
|
||||
We include makefiles that should work as project files in Visual Studio
|
||||
2022 Version 17 or later. There is a library makefile that builds the
|
||||
IJG library as a static Win32/x64/ARM/ARM64 library, and application
|
||||
makefiles that build the sample applications as Win32/x64/ARM/ARM64
|
||||
console applications. (Even if you only want the library, we recommend
|
||||
building the applications so that you can run the self-test.)
|
||||
|
||||
To use:
|
||||
1. Ensure you’ve checked the item "Desktop development with C++" in the
|
||||
Workloads tab of Visual Studio Installer.
|
||||
Open the Developer Command Prompt for VS 2022, change to the source
|
||||
directory and execute the command line
|
||||
nmake /f makefile.vs setup-v17
|
||||
This will move jconfig.vc to jconfig.h and makefiles to project files.
|
||||
(Note that the renaming is critical!)
|
||||
Alternatively you can use
|
||||
nmake /f makefile.vs setupcopy-v17
|
||||
This will create renamed copies of the files, which allows to repeat
|
||||
the setup later.
|
||||
2. Open the solution file jpeg.sln, build the library project.
|
||||
a) If you are using Visual Studio more recent than
|
||||
2022 Version 17, you'll probably get a message
|
||||
saying that the project files are being updated.
|
||||
b) If necessary, open the project properties and
|
||||
adapt the Windows Target Platform Version in
|
||||
the Configuration Properties, General section;
|
||||
we support the latest version at the time of release.
|
||||
c) If you get a warning saying that a platform cannot be found,
|
||||
you can either
|
||||
* forgo the platform and ignore the warning, or
|
||||
* remove the platform in the Configuration Manager, or
|
||||
* install the corresponding platform Buildtools in
|
||||
Visual Studio Installer (Workloads tab Optional components
|
||||
or Individual components tab).
|
||||
d) If you want to build x64 code, change the platform setting from
|
||||
Win32 to x64. You can build Win32 and x64 versions side by side.
|
||||
e) If you want to build ARM/ARM64 code, change the platform setting
|
||||
to ARM/ARM64. Ensure you've installed the ARM/ARM64-Buildtools
|
||||
in Visual Studio Installer (Workloads tab Optional components
|
||||
or Individual components tab).
|
||||
You can build Win32/x64/ARM/ARM64 versions side by side.
|
||||
3. Open the solution file apps.sln, build the application projects.
|
||||
4. To perform the self-test, execute the command line
|
||||
nmake /f makefile.vs test-32
|
||||
for the Win32 build, or on a 64-bit system
|
||||
nmake /f makefile.vs test-64
|
||||
for the x64 build.
|
||||
5. Move the application .exe files from the Release folder to an
|
||||
appropriate location on your path.
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* jcarith.c
|
||||
*
|
||||
* Developed 1997-2019 by Guido Vollbeding.
|
||||
* Developed 1997-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -361,7 +361,7 @@ emit_restart (j_compress_ptr cinfo, int restart_num)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
unsigned char *st;
|
||||
@@ -450,7 +450,7 @@ encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
const int * natural_order;
|
||||
@@ -557,7 +557,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
unsigned char *st;
|
||||
@@ -592,7 +592,7 @@ encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
const int * natural_order;
|
||||
@@ -691,7 +691,7 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
const int * natural_order;
|
||||
|
||||
+74
-72
@@ -2,7 +2,7 @@
|
||||
* jccoefct.c
|
||||
*
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* Modified 2003-2011 by Guido Vollbeding.
|
||||
* Modified 2003-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -36,16 +36,14 @@ typedef struct {
|
||||
struct jpeg_c_coef_controller pub; /* public fields */
|
||||
|
||||
JDIMENSION iMCU_row_num; /* iMCU row # within image */
|
||||
JDIMENSION mcu_ctr; /* counts MCUs processed in current row */
|
||||
JDIMENSION MCU_ctr; /* counts MCUs processed in current row */
|
||||
int MCU_vert_offset; /* counts MCU rows within iMCU row */
|
||||
int MCU_rows_per_iMCU_row; /* number of such rows needed */
|
||||
|
||||
/* For single-pass compression, it's sufficient to buffer just one MCU
|
||||
* (although this may prove a bit slow in practice). We allocate a
|
||||
* workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each
|
||||
* MCU constructed and sent. (On 80x86, the workspace is FAR even though
|
||||
* it's not really very big; this is to keep the module interfaces unchanged
|
||||
* when a large coefficient buffer is necessary.)
|
||||
* (although this may prove a bit slow in practice). We append a
|
||||
* workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it
|
||||
* for each MCU constructed and sent.
|
||||
* In multi-pass modes, this array points to the current MCU's blocks
|
||||
* within the virtual arrays.
|
||||
*/
|
||||
@@ -53,6 +51,9 @@ typedef struct {
|
||||
|
||||
/* In multi-pass modes, we need a virtual block array for each component. */
|
||||
jvirt_barray_ptr whole_image[MAX_COMPONENTS];
|
||||
|
||||
/* Workspace for single-pass compression (omitted otherwise). */
|
||||
JBLOCK blk_buffer[C_MAX_BLOCKS_IN_MCU];
|
||||
} my_coef_controller;
|
||||
|
||||
typedef my_coef_controller * my_coef_ptr;
|
||||
@@ -88,7 +89,7 @@ start_iMCU_row (j_compress_ptr cinfo)
|
||||
coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
|
||||
}
|
||||
|
||||
coef->mcu_ctr = 0;
|
||||
coef->MCU_ctr = 0;
|
||||
coef->MCU_vert_offset = 0;
|
||||
}
|
||||
|
||||
@@ -125,7 +126,6 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
|
||||
#endif
|
||||
default:
|
||||
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,59 +147,56 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
JDIMENSION MCU_col_num; /* index of current MCU within row */
|
||||
JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
|
||||
JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
|
||||
int blkn, bi, ci, yindex, yoffset, blockcnt;
|
||||
JDIMENSION ypos, xpos;
|
||||
int ci, xindex, yindex, yoffset, blockcnt;
|
||||
JBLOCKROW blkp;
|
||||
JSAMPARRAY input_ptr;
|
||||
JDIMENSION xpos;
|
||||
jpeg_component_info *compptr;
|
||||
forward_DCT_ptr forward_DCT;
|
||||
|
||||
/* Loop to write as much as one whole iMCU row */
|
||||
for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
|
||||
yoffset++) {
|
||||
for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col;
|
||||
for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col;
|
||||
MCU_col_num++) {
|
||||
/* Determine where data comes from in input_buf and do the DCT thing.
|
||||
* Each call on forward_DCT processes a horizontal row of DCT blocks
|
||||
* as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks
|
||||
* sequentially. Dummy blocks at the right or bottom edge are filled in
|
||||
* Each call on forward_DCT processes a horizontal row of DCT blocks as
|
||||
* wide as an MCU. Dummy blocks at the right or bottom edge are filled in
|
||||
* specially. The data in them does not matter for image reconstruction,
|
||||
* so we fill them with values that will encode to the smallest amount of
|
||||
* data, viz: all zeroes in the AC entries, DC entries equal to previous
|
||||
* block's DC value. (Thanks to Thomas Kinsman for this idea.)
|
||||
*/
|
||||
blkn = 0;
|
||||
blkp = coef->blk_buffer; /* pointer to current DCT block within MCU */
|
||||
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
|
||||
compptr = cinfo->cur_comp_info[ci];
|
||||
forward_DCT = cinfo->fdct->forward_DCT[compptr->component_index];
|
||||
input_ptr = input_buf[compptr->component_index] +
|
||||
yoffset * compptr->DCT_v_scaled_size;
|
||||
/* ypos == (yoffset + yindex) * compptr->DCT_v_scaled_size */
|
||||
blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
|
||||
: compptr->last_col_width;
|
||||
xpos = MCU_col_num * compptr->MCU_sample_width;
|
||||
ypos = yoffset * compptr->DCT_v_scaled_size;
|
||||
/* ypos == (yoffset+yindex) * DCTSIZE */
|
||||
for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
|
||||
if (coef->iMCU_row_num < last_iMCU_row ||
|
||||
yoffset+yindex < compptr->last_row_height) {
|
||||
(*forward_DCT) (cinfo, compptr,
|
||||
input_buf[compptr->component_index],
|
||||
coef->MCU_buffer[blkn],
|
||||
ypos, xpos, (JDIMENSION) blockcnt);
|
||||
if (blockcnt < compptr->MCU_width) {
|
||||
/* Create some dummy blocks at the right edge of the image. */
|
||||
FMEMZERO((void FAR *) coef->MCU_buffer[blkn + blockcnt],
|
||||
(compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK));
|
||||
for (bi = blockcnt; bi < compptr->MCU_width; bi++) {
|
||||
coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0];
|
||||
}
|
||||
}
|
||||
yoffset + yindex < compptr->last_row_height) {
|
||||
(*forward_DCT) (cinfo, compptr, input_ptr, blkp,
|
||||
xpos, (JDIMENSION) blockcnt);
|
||||
input_ptr += compptr->DCT_v_scaled_size;
|
||||
blkp += blockcnt;
|
||||
/* Dummy blocks at right edge */
|
||||
if ((xindex = compptr->MCU_width - blockcnt) == 0)
|
||||
continue;
|
||||
} else {
|
||||
/* Create a row of dummy blocks at the bottom of the image. */
|
||||
FMEMZERO((void FAR *) coef->MCU_buffer[blkn],
|
||||
compptr->MCU_width * SIZEOF(JBLOCK));
|
||||
for (bi = 0; bi < compptr->MCU_width; bi++) {
|
||||
coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0];
|
||||
}
|
||||
/* At bottom of image, need a whole row of dummy blocks */
|
||||
xindex = compptr->MCU_width;
|
||||
}
|
||||
blkn += compptr->MCU_width;
|
||||
ypos += compptr->DCT_v_scaled_size;
|
||||
/* Fill in any dummy blocks needed in this row */
|
||||
MEMZERO(blkp, xindex * SIZEOF(JBLOCK));
|
||||
do {
|
||||
blkp[0][0] = blkp[-1][0];
|
||||
blkp++;
|
||||
} while (--xindex);
|
||||
}
|
||||
}
|
||||
/* Try to write the MCU. In event of a suspension failure, we will
|
||||
@@ -208,12 +205,12 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {
|
||||
/* Suspension forced; update state counters and exit */
|
||||
coef->MCU_vert_offset = yoffset;
|
||||
coef->mcu_ctr = MCU_col_num;
|
||||
coef->MCU_ctr = MCU_col_num;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
/* Completed an MCU row, but perhaps not an iMCU row */
|
||||
coef->mcu_ctr = 0;
|
||||
coef->MCU_ctr = 0;
|
||||
}
|
||||
/* Completed the iMCU row, advance counters for next one */
|
||||
coef->iMCU_row_num++;
|
||||
@@ -256,6 +253,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
jpeg_component_info *compptr;
|
||||
JBLOCKARRAY buffer;
|
||||
JBLOCKROW thisblockrow, lastblockrow;
|
||||
JSAMPARRAY input_ptr;
|
||||
forward_DCT_ptr forward_DCT;
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
@@ -280,14 +278,15 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
if (ndummy > 0)
|
||||
ndummy = h_samp_factor - ndummy;
|
||||
forward_DCT = cinfo->fdct->forward_DCT[ci];
|
||||
input_ptr = input_buf[ci];
|
||||
/* Perform DCT for all non-dummy blocks in this iMCU row. Each call
|
||||
* on forward_DCT processes a complete horizontal row of DCT blocks.
|
||||
*/
|
||||
for (block_row = 0; block_row < block_rows; block_row++) {
|
||||
thisblockrow = buffer[block_row];
|
||||
(*forward_DCT) (cinfo, compptr, input_buf[ci], thisblockrow,
|
||||
(JDIMENSION) (block_row * compptr->DCT_v_scaled_size),
|
||||
(*forward_DCT) (cinfo, compptr, input_ptr, thisblockrow,
|
||||
(JDIMENSION) 0, blocks_across);
|
||||
input_ptr += compptr->DCT_v_scaled_size;
|
||||
if (ndummy > 0) {
|
||||
/* Create dummy blocks at the right edge of the image. */
|
||||
thisblockrow += blocks_across; /* => first dummy block */
|
||||
@@ -303,15 +302,14 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
* of the dummy blocks to match the last real block's DC value.
|
||||
* This squeezes a few more bytes out of the resulting file...
|
||||
*/
|
||||
if (coef->iMCU_row_num == last_iMCU_row) {
|
||||
if (block_row < compptr->v_samp_factor) {
|
||||
blocks_across += ndummy; /* include lower right corner */
|
||||
MCUs_across = blocks_across / h_samp_factor;
|
||||
for (block_row = block_rows; block_row < compptr->v_samp_factor;
|
||||
block_row++) {
|
||||
do {
|
||||
thisblockrow = buffer[block_row];
|
||||
lastblockrow = buffer[block_row-1];
|
||||
FMEMZERO((void FAR *) thisblockrow,
|
||||
(size_t) (blocks_across * SIZEOF(JBLOCK)));
|
||||
(size_t) blocks_across * SIZEOF(JBLOCK));
|
||||
for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) {
|
||||
lastDC = lastblockrow[h_samp_factor-1][0];
|
||||
for (bi = 0; bi < h_samp_factor; bi++) {
|
||||
@@ -320,7 +318,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
thisblockrow += h_samp_factor; /* advance to next MCU in row */
|
||||
lastblockrow += h_samp_factor;
|
||||
}
|
||||
}
|
||||
} while (++block_row < compptr->v_samp_factor);
|
||||
}
|
||||
}
|
||||
/* NB: compress_output will increment iMCU_row_num if successful.
|
||||
@@ -347,8 +345,9 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
{
|
||||
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
||||
JDIMENSION MCU_col_num; /* index of current MCU within row */
|
||||
int blkn, ci, xindex, yindex, yoffset;
|
||||
int ci, xindex, yindex, yoffset;
|
||||
JDIMENSION start_col;
|
||||
JBLOCKARRAY blkp;
|
||||
JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
|
||||
JBLOCKROW buffer_ptr;
|
||||
jpeg_component_info *compptr;
|
||||
@@ -368,30 +367,31 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
/* Loop to process one whole iMCU row */
|
||||
for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
|
||||
yoffset++) {
|
||||
for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
|
||||
for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row;
|
||||
MCU_col_num++) {
|
||||
/* Construct list of pointers to DCT blocks belonging to this MCU */
|
||||
blkn = 0; /* index of current DCT block within MCU */
|
||||
blkp = coef->MCU_buffer; /* pointer to current DCT block within MCU */
|
||||
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
|
||||
compptr = cinfo->cur_comp_info[ci];
|
||||
start_col = MCU_col_num * compptr->MCU_width;
|
||||
for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
|
||||
buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
|
||||
for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
|
||||
coef->MCU_buffer[blkn++] = buffer_ptr++;
|
||||
}
|
||||
buffer_ptr = buffer[ci][yoffset + yindex] + start_col;
|
||||
xindex = compptr->MCU_width;
|
||||
do {
|
||||
*blkp++ = buffer_ptr++;
|
||||
} while (--xindex);
|
||||
}
|
||||
}
|
||||
/* Try to write the MCU. */
|
||||
if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {
|
||||
/* Suspension forced; update state counters and exit */
|
||||
coef->MCU_vert_offset = yoffset;
|
||||
coef->mcu_ctr = MCU_col_num;
|
||||
coef->MCU_ctr = MCU_col_num;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
/* Completed an MCU row, but perhaps not an iMCU row */
|
||||
coef->mcu_ctr = 0;
|
||||
coef->MCU_ctr = 0;
|
||||
}
|
||||
/* Completed the iMCU row, advance counters for next one */
|
||||
coef->iMCU_row_num++;
|
||||
@@ -411,13 +411,6 @@ jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
||||
{
|
||||
my_coef_ptr coef;
|
||||
|
||||
coef = (my_coef_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_coef_controller));
|
||||
cinfo->coef = (struct jpeg_c_coef_controller *) coef;
|
||||
coef->pub.start_pass = start_pass_coef;
|
||||
|
||||
/* Create the coefficient buffer. */
|
||||
if (need_full_buffer) {
|
||||
#ifdef FULL_COEF_BUFFER_SUPPORTED
|
||||
/* Allocate a full-image virtual array for each component, */
|
||||
@@ -425,6 +418,9 @@ jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
||||
int ci;
|
||||
jpeg_component_info *compptr;
|
||||
|
||||
coef = (my_coef_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_coef_controller) - SIZEOF(coef->blk_buffer));
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
coef->whole_image[ci] = (*cinfo->mem->request_virt_barray)
|
||||
@@ -440,15 +436,21 @@ jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
||||
#endif
|
||||
} else {
|
||||
/* We only need a single-MCU buffer. */
|
||||
JBLOCKROW buffer;
|
||||
int i;
|
||||
JBLOCKARRAY blkp;
|
||||
JBLOCKROW buffer_ptr;
|
||||
int bi;
|
||||
|
||||
buffer = (JBLOCKROW)
|
||||
(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
|
||||
for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
|
||||
coef->MCU_buffer[i] = buffer + i;
|
||||
}
|
||||
coef = (my_coef_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller));
|
||||
blkp = coef->MCU_buffer;
|
||||
buffer_ptr = coef->blk_buffer;
|
||||
bi = C_MAX_BLOCKS_IN_MCU;
|
||||
do {
|
||||
*blkp++ = buffer_ptr++;
|
||||
} while (--bi);
|
||||
coef->whole_image[0] = NULL; /* flag for no virtual arrays */
|
||||
}
|
||||
|
||||
coef->pub.start_pass = start_pass_coef;
|
||||
cinfo->coef = &coef->pub;
|
||||
}
|
||||
|
||||
+9
-20
@@ -2,7 +2,7 @@
|
||||
* jcdctmgr.c
|
||||
*
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* Modified 2003-2013 by Guido Vollbeding.
|
||||
* Modified 2003-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -66,15 +66,14 @@ typedef union {
|
||||
* Perform forward DCT on one or more blocks of a component.
|
||||
*
|
||||
* The input samples are taken from the sample_data[] array starting at
|
||||
* position start_row/start_col, and moving to the right for any additional
|
||||
* blocks. The quantized coefficients are returned in coef_blocks[].
|
||||
* position start_col, and moving to the right for any additional blocks.
|
||||
* The quantized coefficients are returned in coef_blocks[].
|
||||
*/
|
||||
|
||||
METHODDEF(void)
|
||||
forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
|
||||
JDIMENSION start_row, JDIMENSION start_col,
|
||||
JDIMENSION num_blocks)
|
||||
JDIMENSION start_col, JDIMENSION num_blocks)
|
||||
/* This version is used for integer DCT implementations. */
|
||||
{
|
||||
/* This routine is heavily used, so it's worth coding it tightly. */
|
||||
@@ -84,8 +83,6 @@ forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */
|
||||
JDIMENSION bi;
|
||||
|
||||
sample_data += start_row; /* fold in the vertical offset once */
|
||||
|
||||
for (bi = 0; bi < num_blocks; bi++, start_col += compptr->DCT_h_scaled_size) {
|
||||
/* Perform the DCT */
|
||||
(*do_dct) (workspace, sample_data, start_col);
|
||||
@@ -136,8 +133,7 @@ forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
METHODDEF(void)
|
||||
forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
|
||||
JDIMENSION start_row, JDIMENSION start_col,
|
||||
JDIMENSION num_blocks)
|
||||
JDIMENSION start_col, JDIMENSION num_blocks)
|
||||
/* This version is used for floating-point DCT implementations. */
|
||||
{
|
||||
/* This routine is heavily used, so it's worth coding it tightly. */
|
||||
@@ -147,8 +143,6 @@ forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */
|
||||
JDIMENSION bi;
|
||||
|
||||
sample_data += start_row; /* fold in the vertical offset once */
|
||||
|
||||
for (bi = 0; bi < num_blocks; bi++, start_col += compptr->DCT_h_scaled_size) {
|
||||
/* Perform the DCT */
|
||||
(*do_dct) (workspace, sample_data, start_col);
|
||||
@@ -347,13 +341,11 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
|
||||
#endif
|
||||
default:
|
||||
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ERREXIT2(cinfo, JERR_BAD_DCTSIZE,
|
||||
compptr->DCT_h_scaled_size, compptr->DCT_v_scaled_size);
|
||||
break;
|
||||
}
|
||||
qtblno = compptr->quant_tbl_no;
|
||||
/* Make sure specified quantization table is present */
|
||||
@@ -444,7 +436,6 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
|
||||
#endif
|
||||
default:
|
||||
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -461,17 +452,15 @@ jinit_forward_dct (j_compress_ptr cinfo)
|
||||
int ci;
|
||||
jpeg_component_info *compptr;
|
||||
|
||||
fdct = (my_fdct_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_fdct_controller));
|
||||
fdct = (my_fdct_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_fdct_controller));
|
||||
cinfo->fdct = &fdct->pub;
|
||||
fdct->pub.start_pass = start_pass_fdctmgr;
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
/* Allocate a divisor table for each component */
|
||||
compptr->dct_table =
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(divisor_table));
|
||||
compptr->dct_table = (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(divisor_table));
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -2,7 +2,7 @@
|
||||
* jchuff.c
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 2006-2019 by Guido Vollbeding.
|
||||
* Modified 2006-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -542,7 +542,7 @@ emit_restart_e (huff_entropy_ptr entropy, int restart_num)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
register int temp, temp2;
|
||||
@@ -625,7 +625,7 @@ encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
const int * natural_order;
|
||||
@@ -736,7 +736,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
int Al, blkn;
|
||||
@@ -779,7 +779,7 @@ encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
const int * natural_order;
|
||||
@@ -1009,7 +1009,7 @@ encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_huff (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
working_state state;
|
||||
@@ -1190,7 +1190,7 @@ htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
encode_mcu_gather (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
int blkn, ci;
|
||||
|
||||
+13
-15
@@ -2,7 +2,7 @@
|
||||
* jcmaster.c
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 2003-2019 by Guido Vollbeding.
|
||||
* Modified 2003-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -391,16 +391,16 @@ per_scan_setup (j_compress_ptr cinfo)
|
||||
{
|
||||
int ci, mcublks, tmp;
|
||||
jpeg_component_info *compptr;
|
||||
|
||||
|
||||
if (cinfo->comps_in_scan == 1) {
|
||||
|
||||
|
||||
/* Noninterleaved (single-component) scan */
|
||||
compptr = cinfo->cur_comp_info[0];
|
||||
|
||||
|
||||
/* Overall image size in MCUs */
|
||||
cinfo->MCUs_per_row = compptr->width_in_blocks;
|
||||
cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
|
||||
|
||||
|
||||
/* For noninterleaved scan, always one block per MCU */
|
||||
compptr->MCU_width = 1;
|
||||
compptr->MCU_height = 1;
|
||||
@@ -413,28 +413,26 @@ per_scan_setup (j_compress_ptr cinfo)
|
||||
tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
|
||||
if (tmp == 0) tmp = compptr->v_samp_factor;
|
||||
compptr->last_row_height = tmp;
|
||||
|
||||
|
||||
/* Prepare array describing MCU composition */
|
||||
cinfo->blocks_in_MCU = 1;
|
||||
cinfo->MCU_membership[0] = 0;
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
/* Interleaved (multi-component) scan */
|
||||
if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
|
||||
ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
|
||||
MAX_COMPS_IN_SCAN);
|
||||
|
||||
|
||||
/* Overall image size in MCUs */
|
||||
cinfo->MCUs_per_row = (JDIMENSION)
|
||||
jdiv_round_up((long) cinfo->jpeg_width,
|
||||
(long) (cinfo->max_h_samp_factor * cinfo->block_size));
|
||||
cinfo->MCU_rows_in_scan = (JDIMENSION)
|
||||
jdiv_round_up((long) cinfo->jpeg_height,
|
||||
(long) (cinfo->max_v_samp_factor * cinfo->block_size));
|
||||
|
||||
cinfo->MCU_rows_in_scan = cinfo->total_iMCU_rows;
|
||||
|
||||
cinfo->blocks_in_MCU = 0;
|
||||
|
||||
|
||||
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
|
||||
compptr = cinfo->cur_comp_info[ci];
|
||||
/* Sampling factors give # of blocks of component in each MCU */
|
||||
@@ -457,7 +455,7 @@ per_scan_setup (j_compress_ptr cinfo)
|
||||
cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Convert restart specified in rows to actual MCU count. */
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
/* FLTK should probably be preserved when the JPEG lib is upgraded. */
|
||||
/* FLTK *************************************************************** */
|
||||
|
||||
/* FLTK: enable symbol prefixes, see README.bundled-libs.txt */
|
||||
#include "fltk_jpeg_prefix.h"
|
||||
|
||||
/* jconfig.h. Generated from jconfig.cfg by configure. */
|
||||
/* jconfig.cfg --- source file edited by configure script */
|
||||
/* see jconfig.txt for explanations */
|
||||
|
||||
+13
-8
@@ -2,7 +2,7 @@
|
||||
* jcparam.c
|
||||
*
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modified 2003-2019 by Guido Vollbeding.
|
||||
* Modified 2003-2022 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -62,8 +62,9 @@ jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
|
||||
|
||||
|
||||
/* These are the sample quantization tables given in JPEG spec section K.1.
|
||||
* The spec says that the values given produce "good" quality, and
|
||||
* when divided by 2, "very good" quality.
|
||||
* NOTE: chrominance DC value is changed from 17 to 16 for lossless support.
|
||||
* The spec says that the values given produce "good" quality,
|
||||
* and when divided by 2, "very good" quality.
|
||||
*/
|
||||
static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
|
||||
16, 11, 10, 16, 24, 40, 51, 61,
|
||||
@@ -76,7 +77,7 @@ static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
|
||||
72, 92, 95, 98, 112, 100, 103, 99
|
||||
};
|
||||
static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {
|
||||
17, 18, 24, 47, 99, 99, 99, 99,
|
||||
16, 18, 24, 47, 99, 99, 99, 99,
|
||||
18, 21, 26, 66, 99, 99, 99, 99,
|
||||
24, 26, 56, 99, 99, 99, 99, 99,
|
||||
47, 66, 99, 99, 99, 99, 99, 99,
|
||||
@@ -379,11 +380,13 @@ jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
|
||||
case JCS_RGB:
|
||||
cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */
|
||||
cinfo->num_components = 3;
|
||||
SET_COMP(0, 0x52 /* 'R' */, 1,1, 0,
|
||||
SET_COMP(0, 0x52 /* 'R' */, 1,1,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0);
|
||||
SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0);
|
||||
SET_COMP(2, 0x42 /* 'B' */, 1,1, 0,
|
||||
SET_COMP(2, 0x42 /* 'B' */, 1,1,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0);
|
||||
break;
|
||||
@@ -417,11 +420,13 @@ jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
|
||||
cinfo->JFIF_major_version = 2; /* Set JFIF major version = 2 */
|
||||
cinfo->num_components = 3;
|
||||
/* Add offset 0x20 to the normal R/G/B component IDs */
|
||||
SET_COMP(0, 0x72 /* 'r' */, 1,1, 0,
|
||||
SET_COMP(0, 0x72 /* 'r' */, 1,1,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0);
|
||||
SET_COMP(1, 0x67 /* 'g' */, 1,1, 0, 0,0);
|
||||
SET_COMP(2, 0x62 /* 'b' */, 1,1, 0,
|
||||
SET_COMP(2, 0x62 /* 'b' */, 1,1,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
|
||||
cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0);
|
||||
break;
|
||||
|
||||
+11
-11
@@ -2,6 +2,7 @@
|
||||
* jcprepct.c
|
||||
*
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* Modified 2003-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -109,7 +110,8 @@ expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols,
|
||||
register int row;
|
||||
|
||||
for (row = input_rows; row < output_rows; row++) {
|
||||
jcopy_sample_rows(image_data, input_rows-1, image_data, row,
|
||||
jcopy_sample_rows(image_data + input_rows - 1,
|
||||
image_data + row,
|
||||
1, num_cols);
|
||||
}
|
||||
}
|
||||
@@ -220,8 +222,8 @@ pre_process_context (j_compress_ptr cinfo,
|
||||
for (ci = 0; ci < cinfo->num_components; ci++) {
|
||||
int row;
|
||||
for (row = 1; row <= cinfo->max_v_samp_factor; row++) {
|
||||
jcopy_sample_rows(prep->color_buf[ci], 0,
|
||||
prep->color_buf[ci], -row,
|
||||
jcopy_sample_rows(prep->color_buf[ci],
|
||||
prep->color_buf[ci] - row,
|
||||
1, cinfo->image_width);
|
||||
}
|
||||
}
|
||||
@@ -277,10 +279,9 @@ create_context_buffer (j_compress_ptr cinfo)
|
||||
/* Grab enough space for fake row pointers for all the components;
|
||||
* we need five row groups' worth of pointers for each component.
|
||||
*/
|
||||
fake_buffer = (JSAMPARRAY)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
(cinfo->num_components * 5 * rgroup_height) *
|
||||
SIZEOF(JSAMPROW));
|
||||
fake_buffer = (JSAMPARRAY) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
(cinfo->num_components * 5 * rgroup_height) * SIZEOF(JSAMPROW));
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
@@ -324,10 +325,9 @@ jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
||||
if (need_full_buffer) /* safety check */
|
||||
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
|
||||
|
||||
prep = (my_prep_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_prep_controller));
|
||||
cinfo->prep = (struct jpeg_c_prep_controller *) prep;
|
||||
prep = (my_prep_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_prep_controller));
|
||||
cinfo->prep = &prep->pub;
|
||||
prep->pub.start_pass = start_pass_prep;
|
||||
|
||||
/* Allocate the color conversion buffer.
|
||||
|
||||
+5
-5
@@ -2,6 +2,7 @@
|
||||
* jcsample.c
|
||||
*
|
||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
* Modified 2003-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -200,7 +201,7 @@ fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY output_data)
|
||||
{
|
||||
/* Copy the data */
|
||||
jcopy_sample_rows(input_data, 0, output_data, 0,
|
||||
jcopy_sample_rows(input_data, output_data,
|
||||
cinfo->max_v_samp_factor, cinfo->image_width);
|
||||
/* Edge-expand */
|
||||
expand_right_edge(output_data, cinfo->max_v_samp_factor, cinfo->image_width,
|
||||
@@ -483,10 +484,9 @@ jinit_downsampler (j_compress_ptr cinfo)
|
||||
boolean smoothok = TRUE;
|
||||
int h_in_group, v_in_group, h_out_group, v_out_group;
|
||||
|
||||
downsample = (my_downsample_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_downsampler));
|
||||
cinfo->downsample = (struct jpeg_downsampler *) downsample;
|
||||
downsample = (my_downsample_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_downsampler));
|
||||
cinfo->downsample = &downsample->pub;
|
||||
downsample->pub.start_pass = start_pass_downsample;
|
||||
downsample->pub.downsample = sep_downsample;
|
||||
downsample->pub.need_context_rows = FALSE;
|
||||
|
||||
+26
-30
@@ -2,7 +2,7 @@
|
||||
* jctrans.c
|
||||
*
|
||||
* Copyright (C) 1995-1998, Thomas G. Lane.
|
||||
* Modified 2000-2017 by Guido Vollbeding.
|
||||
* Modified 2000-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -224,7 +224,7 @@ typedef struct {
|
||||
struct jpeg_c_coef_controller pub; /* public fields */
|
||||
|
||||
JDIMENSION iMCU_row_num; /* iMCU row # within image */
|
||||
JDIMENSION mcu_ctr; /* counts MCUs processed in current row */
|
||||
JDIMENSION MCU_ctr; /* counts MCUs processed in current row */
|
||||
int MCU_vert_offset; /* counts MCU rows within iMCU row */
|
||||
int MCU_rows_per_iMCU_row; /* number of such rows needed */
|
||||
|
||||
@@ -232,7 +232,7 @@ typedef struct {
|
||||
jvirt_barray_ptr * whole_image;
|
||||
|
||||
/* Workspace for constructing dummy blocks at right/bottom edges. */
|
||||
JBLOCKROW dummy_buffer[C_MAX_BLOCKS_IN_MCU];
|
||||
JBLOCK dummy_buffer[C_MAX_BLOCKS_IN_MCU];
|
||||
} my_coef_controller;
|
||||
|
||||
typedef my_coef_controller * my_coef_ptr;
|
||||
@@ -257,7 +257,7 @@ start_iMCU_row (j_compress_ptr cinfo)
|
||||
coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;
|
||||
}
|
||||
|
||||
coef->mcu_ctr = 0;
|
||||
coef->MCU_ctr = 0;
|
||||
coef->MCU_vert_offset = 0;
|
||||
}
|
||||
|
||||
@@ -315,25 +315,30 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
/* Loop to process one whole iMCU row */
|
||||
for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
|
||||
yoffset++) {
|
||||
for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;
|
||||
for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col;
|
||||
MCU_col_num++) {
|
||||
/* Construct list of pointers to DCT blocks belonging to this MCU */
|
||||
blkn = 0; /* index of current DCT block within MCU */
|
||||
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
|
||||
compptr = cinfo->cur_comp_info[ci];
|
||||
start_col = MCU_col_num * compptr->MCU_width;
|
||||
blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
|
||||
: compptr->last_col_width;
|
||||
start_col = MCU_col_num * compptr->MCU_width;
|
||||
for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
|
||||
if (coef->iMCU_row_num < last_iMCU_row ||
|
||||
yindex+yoffset < compptr->last_row_height) {
|
||||
yoffset + yindex < compptr->last_row_height) {
|
||||
/* Fill in pointers to real blocks in this row */
|
||||
buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
|
||||
for (xindex = 0; xindex < blockcnt; xindex++)
|
||||
buffer_ptr = buffer[ci][yoffset + yindex] + start_col;
|
||||
xindex = blockcnt;
|
||||
do {
|
||||
MCU_buffer[blkn++] = buffer_ptr++;
|
||||
} while (--xindex);
|
||||
/* Dummy blocks at right edge */
|
||||
if ((xindex = compptr->MCU_width - blockcnt) == 0)
|
||||
continue;
|
||||
} else {
|
||||
/* At bottom of image, need a whole row of dummy blocks */
|
||||
xindex = 0;
|
||||
xindex = compptr->MCU_width;
|
||||
}
|
||||
/* Fill in any dummy blocks needed in this row.
|
||||
* Dummy blocks are filled in the same way as in jccoefct.c:
|
||||
@@ -341,23 +346,23 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
||||
* block's DC value. The init routine has already zeroed the
|
||||
* AC entries, so we need only set the DC entries correctly.
|
||||
*/
|
||||
for (; xindex < compptr->MCU_width; xindex++) {
|
||||
MCU_buffer[blkn] = coef->dummy_buffer[blkn];
|
||||
MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0];
|
||||
blkn++;
|
||||
}
|
||||
buffer_ptr = coef->dummy_buffer + blkn;
|
||||
do {
|
||||
buffer_ptr[0][0] = MCU_buffer[blkn-1][0][0];
|
||||
MCU_buffer[blkn++] = buffer_ptr++;
|
||||
} while (--xindex);
|
||||
}
|
||||
}
|
||||
/* Try to write the MCU. */
|
||||
if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) {
|
||||
/* Suspension forced; update state counters and exit */
|
||||
coef->MCU_vert_offset = yoffset;
|
||||
coef->mcu_ctr = MCU_col_num;
|
||||
coef->MCU_ctr = MCU_col_num;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
/* Completed an MCU row, but perhaps not an iMCU row */
|
||||
coef->mcu_ctr = 0;
|
||||
coef->MCU_ctr = 0;
|
||||
}
|
||||
/* Completed the iMCU row, advance counters for next one */
|
||||
coef->iMCU_row_num++;
|
||||
@@ -379,12 +384,9 @@ transencode_coef_controller (j_compress_ptr cinfo,
|
||||
jvirt_barray_ptr * coef_arrays)
|
||||
{
|
||||
my_coef_ptr coef;
|
||||
JBLOCKROW buffer;
|
||||
int i;
|
||||
|
||||
coef = (my_coef_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_coef_controller));
|
||||
coef = (my_coef_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller));
|
||||
cinfo->coef = &coef->pub;
|
||||
coef->pub.start_pass = start_pass_coef;
|
||||
coef->pub.compress_data = compress_output;
|
||||
@@ -392,12 +394,6 @@ transencode_coef_controller (j_compress_ptr cinfo,
|
||||
/* Save pointer to virtual arrays */
|
||||
coef->whole_image = coef_arrays;
|
||||
|
||||
/* Allocate and pre-zero space for dummy DCT blocks. */
|
||||
buffer = (JBLOCKROW)
|
||||
(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
|
||||
FMEMZERO((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
|
||||
for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
|
||||
coef->dummy_buffer[i] = buffer + i;
|
||||
}
|
||||
/* Pre-zero space for dummy DCT blocks */
|
||||
MEMZERO(coef->dummy_buffer, SIZEOF(coef->dummy_buffer));
|
||||
}
|
||||
|
||||
+24
-11
@@ -2,7 +2,7 @@
|
||||
* jdapimin.c
|
||||
*
|
||||
* Copyright (C) 1994-1998, Thomas G. Lane.
|
||||
* Modified 2009-2013 by Guido Vollbeding.
|
||||
* Modified 2009-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -114,7 +114,7 @@ jpeg_abort_decompress (j_decompress_ptr cinfo)
|
||||
LOCAL(void)
|
||||
default_decompress_parms (j_decompress_ptr cinfo)
|
||||
{
|
||||
int cid0, cid1, cid2;
|
||||
int cid0, cid1, cid2, cid3;
|
||||
|
||||
/* Guess the input colorspace, and set output colorspace accordingly. */
|
||||
/* Note application may override our guesses. */
|
||||
@@ -123,13 +123,16 @@ default_decompress_parms (j_decompress_ptr cinfo)
|
||||
cinfo->jpeg_color_space = JCS_GRAYSCALE;
|
||||
cinfo->out_color_space = JCS_GRAYSCALE;
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
cid0 = cinfo->comp_info[0].component_id;
|
||||
cid1 = cinfo->comp_info[1].component_id;
|
||||
cid2 = cinfo->comp_info[2].component_id;
|
||||
|
||||
/* First try to guess from the component IDs */
|
||||
/* For robust detection of standard colorspaces
|
||||
* regardless of the presence of special markers,
|
||||
* check component IDs from SOF marker first.
|
||||
*/
|
||||
if (cid0 == 0x01 && cid1 == 0x02 && cid2 == 0x03)
|
||||
cinfo->jpeg_color_space = JCS_YCbCr;
|
||||
else if (cid0 == 0x01 && cid1 == 0x22 && cid2 == 0x23)
|
||||
@@ -151,7 +154,6 @@ default_decompress_parms (j_decompress_ptr cinfo)
|
||||
default:
|
||||
WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
|
||||
cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);
|
||||
@@ -160,9 +162,22 @@ default_decompress_parms (j_decompress_ptr cinfo)
|
||||
/* Always guess RGB is proper output colorspace. */
|
||||
cinfo->out_color_space = JCS_RGB;
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
if (cinfo->saw_Adobe_marker) {
|
||||
cid0 = cinfo->comp_info[0].component_id;
|
||||
cid1 = cinfo->comp_info[1].component_id;
|
||||
cid2 = cinfo->comp_info[2].component_id;
|
||||
cid3 = cinfo->comp_info[3].component_id;
|
||||
|
||||
/* For robust detection of standard colorspaces
|
||||
* regardless of the presence of special markers,
|
||||
* check component IDs from SOF marker first.
|
||||
*/
|
||||
if (cid0 == 0x01 && cid1 == 0x02 && cid2 == 0x03 && cid3 == 0x04)
|
||||
cinfo->jpeg_color_space = JCS_YCCK;
|
||||
else if (cid0 == 0x43 && cid1 == 0x4D && cid2 == 0x59 && cid3 == 0x4B)
|
||||
cinfo->jpeg_color_space = JCS_CMYK; /* ASCII 'C', 'M', 'Y', 'K' */
|
||||
else if (cinfo->saw_Adobe_marker) {
|
||||
switch (cinfo->Adobe_transform) {
|
||||
case 0:
|
||||
cinfo->jpeg_color_space = JCS_CMYK;
|
||||
@@ -173,19 +188,17 @@ default_decompress_parms (j_decompress_ptr cinfo)
|
||||
default:
|
||||
WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);
|
||||
cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/* No special markers, assume straight CMYK. */
|
||||
/* Unknown IDs and no special markers, assume straight CMYK. */
|
||||
cinfo->jpeg_color_space = JCS_CMYK;
|
||||
}
|
||||
cinfo->out_color_space = JCS_CMYK;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
cinfo->jpeg_color_space = JCS_UNKNOWN;
|
||||
cinfo->out_color_space = JCS_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set defaults for other decompression parameters. */
|
||||
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* jdarith.c
|
||||
*
|
||||
* Developed 1997-2019 by Guido Vollbeding.
|
||||
* Developed 1997-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -239,7 +239,7 @@ process_restart (j_decompress_ptr cinfo)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
JBLOCKROW block;
|
||||
@@ -318,7 +318,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
JBLOCKROW block;
|
||||
@@ -400,7 +400,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
unsigned char *st;
|
||||
@@ -434,7 +434,7 @@ decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
JBLOCKROW block;
|
||||
@@ -509,7 +509,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
|
||||
jpeg_component_info * compptr;
|
||||
|
||||
+57
-54
@@ -2,7 +2,7 @@
|
||||
* jdcoefct.c
|
||||
*
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* Modified 2002-2011 by Guido Vollbeding.
|
||||
* Modified 2002-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -19,11 +19,13 @@
|
||||
#include "jinclude.h"
|
||||
#include "jpeglib.h"
|
||||
|
||||
|
||||
/* Block smoothing is only applicable for progressive JPEG, so: */
|
||||
#ifndef D_PROGRESSIVE_SUPPORTED
|
||||
#undef BLOCK_SMOOTHING_SUPPORTED
|
||||
#endif
|
||||
|
||||
|
||||
/* Private buffer controller object */
|
||||
|
||||
typedef struct {
|
||||
@@ -38,11 +40,8 @@ typedef struct {
|
||||
/* The output side's location is represented by cinfo->output_iMCU_row. */
|
||||
|
||||
/* In single-pass modes, it's sufficient to buffer just one MCU.
|
||||
* We allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks,
|
||||
* We append a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks,
|
||||
* and let the entropy decoder write into that workspace each time.
|
||||
* (On 80x86, the workspace is FAR even though it's not really very big;
|
||||
* this is to keep the module interfaces unchanged when a large coefficient
|
||||
* buffer is necessary.)
|
||||
* In multi-pass modes, this array points to the current MCU's blocks
|
||||
* within the virtual arrays; it is used only by the input side.
|
||||
*/
|
||||
@@ -58,10 +57,14 @@ typedef struct {
|
||||
int * coef_bits_latch;
|
||||
#define SAVED_COEFS 6 /* we save coef_bits[0..5] */
|
||||
#endif
|
||||
|
||||
/* Workspace for single-pass modes (omitted otherwise). */
|
||||
JBLOCK blk_buffer[D_MAX_BLOCKS_IN_MCU];
|
||||
} my_coef_controller;
|
||||
|
||||
typedef my_coef_controller * my_coef_ptr;
|
||||
|
||||
|
||||
/* Forward declarations */
|
||||
METHODDEF(int) decompress_onepass
|
||||
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
|
||||
@@ -151,7 +154,8 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
||||
JDIMENSION MCU_col_num; /* index of current MCU within row */
|
||||
JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
|
||||
JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
|
||||
int blkn, ci, xindex, yindex, yoffset, useful_width;
|
||||
int ci, xindex, yindex, yoffset, useful_width;
|
||||
JBLOCKROW blkp;
|
||||
JSAMPARRAY output_ptr;
|
||||
JDIMENSION start_col, output_col;
|
||||
jpeg_component_info *compptr;
|
||||
@@ -162,10 +166,10 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
||||
yoffset++) {
|
||||
for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col;
|
||||
MCU_col_num++) {
|
||||
blkp = coef->blk_buffer; /* pointer to current DCT block within MCU */
|
||||
/* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */
|
||||
if (cinfo->lim_Se) /* can bypass in DC only case */
|
||||
FMEMZERO((void FAR *) coef->MCU_buffer[0],
|
||||
(size_t) (cinfo->blocks_in_MCU * SIZEOF(JBLOCK)));
|
||||
MEMZERO(blkp, cinfo->blocks_in_MCU * SIZEOF(JBLOCK));
|
||||
if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) {
|
||||
/* Suspension forced; update state counters and exit */
|
||||
coef->MCU_vert_offset = yoffset;
|
||||
@@ -173,37 +177,34 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
||||
return JPEG_SUSPENDED;
|
||||
}
|
||||
/* Determine where data should go in output_buf and do the IDCT thing.
|
||||
* We skip dummy blocks at the right and bottom edges (but blkn gets
|
||||
* incremented past them!). Note the inner loop relies on having
|
||||
* allocated the MCU_buffer[] blocks sequentially.
|
||||
* We skip dummy blocks at the right and bottom edges (but blkp gets
|
||||
* incremented past them!).
|
||||
*/
|
||||
blkn = 0; /* index of current DCT block within MCU */
|
||||
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
|
||||
compptr = cinfo->cur_comp_info[ci];
|
||||
/* Don't bother to IDCT an uninteresting component. */
|
||||
if (! compptr->component_needed) {
|
||||
blkn += compptr->MCU_blocks;
|
||||
blkp += compptr->MCU_blocks;
|
||||
continue;
|
||||
}
|
||||
inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index];
|
||||
useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
|
||||
: compptr->last_col_width;
|
||||
output_ptr = output_buf[compptr->component_index] +
|
||||
yoffset * compptr->DCT_v_scaled_size;
|
||||
useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
|
||||
: compptr->last_col_width;
|
||||
start_col = MCU_col_num * compptr->MCU_sample_width;
|
||||
for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
|
||||
if (cinfo->input_iMCU_row < last_iMCU_row ||
|
||||
yoffset+yindex < compptr->last_row_height) {
|
||||
yoffset + yindex < compptr->last_row_height) {
|
||||
output_col = start_col;
|
||||
for (xindex = 0; xindex < useful_width; xindex++) {
|
||||
(*inverse_DCT) (cinfo, compptr,
|
||||
(JCOEFPTR) coef->MCU_buffer[blkn+xindex],
|
||||
(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) (blkp + xindex),
|
||||
output_ptr, output_col);
|
||||
output_col += compptr->DCT_h_scaled_size;
|
||||
}
|
||||
output_ptr += compptr->DCT_v_scaled_size;
|
||||
}
|
||||
blkn += compptr->MCU_width;
|
||||
output_ptr += compptr->DCT_v_scaled_size;
|
||||
blkp += compptr->MCU_width;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,7 +213,7 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
||||
}
|
||||
/* Completed the iMCU row, advance counters for next one */
|
||||
cinfo->output_iMCU_row++;
|
||||
if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) {
|
||||
if (++(cinfo->input_iMCU_row) <= last_iMCU_row) {
|
||||
start_iMCU_row(cinfo);
|
||||
return JPEG_ROW_COMPLETED;
|
||||
}
|
||||
@@ -247,8 +248,9 @@ consume_data (j_decompress_ptr cinfo)
|
||||
{
|
||||
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
|
||||
JDIMENSION MCU_col_num; /* index of current MCU within row */
|
||||
int blkn, ci, xindex, yindex, yoffset;
|
||||
int ci, xindex, yindex, yoffset;
|
||||
JDIMENSION start_col;
|
||||
JBLOCKARRAY blkp;
|
||||
JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
|
||||
JBLOCKROW buffer_ptr;
|
||||
jpeg_component_info *compptr;
|
||||
@@ -272,15 +274,16 @@ consume_data (j_decompress_ptr cinfo)
|
||||
for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row;
|
||||
MCU_col_num++) {
|
||||
/* Construct list of pointers to DCT blocks belonging to this MCU */
|
||||
blkn = 0; /* index of current DCT block within MCU */
|
||||
blkp = coef->MCU_buffer; /* pointer to current DCT block within MCU */
|
||||
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
|
||||
compptr = cinfo->cur_comp_info[ci];
|
||||
start_col = MCU_col_num * compptr->MCU_width;
|
||||
for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
|
||||
buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
|
||||
for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
|
||||
coef->MCU_buffer[blkn++] = buffer_ptr++;
|
||||
}
|
||||
buffer_ptr = buffer[ci][yoffset + yindex] + start_col;
|
||||
xindex = compptr->MCU_width;
|
||||
do {
|
||||
*blkp++ = buffer_ptr++;
|
||||
} while (--xindex);
|
||||
}
|
||||
}
|
||||
/* Try to fetch the MCU. */
|
||||
@@ -370,7 +373,7 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
||||
}
|
||||
}
|
||||
|
||||
if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)
|
||||
if (++(cinfo->output_iMCU_row) <= last_iMCU_row)
|
||||
return JPEG_ROW_COMPLETED;
|
||||
return JPEG_SCAN_COMPLETED;
|
||||
}
|
||||
@@ -419,10 +422,9 @@ smoothing_ok (j_decompress_ptr cinfo)
|
||||
|
||||
/* Allocate latch area if not already done */
|
||||
if (coef->coef_bits_latch == NULL)
|
||||
coef->coef_bits_latch = (int *)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
cinfo->num_components *
|
||||
(SAVED_COEFS * SIZEOF(int)));
|
||||
coef->coef_bits_latch = (int *) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
cinfo->num_components * (SAVED_COEFS * SIZEOF(int)));
|
||||
coef_bits_latch = coef->coef_bits_latch;
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
@@ -662,7 +664,7 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
||||
}
|
||||
}
|
||||
|
||||
if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)
|
||||
if (++(cinfo->output_iMCU_row) <= last_iMCU_row)
|
||||
return JPEG_ROW_COMPLETED;
|
||||
return JPEG_SCAN_COMPLETED;
|
||||
}
|
||||
@@ -679,17 +681,6 @@ jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
|
||||
{
|
||||
my_coef_ptr coef;
|
||||
|
||||
coef = (my_coef_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_coef_controller));
|
||||
cinfo->coef = (struct jpeg_d_coef_controller *) coef;
|
||||
coef->pub.start_input_pass = start_input_pass;
|
||||
coef->pub.start_output_pass = start_output_pass;
|
||||
#ifdef BLOCK_SMOOTHING_SUPPORTED
|
||||
coef->coef_bits_latch = NULL;
|
||||
#endif
|
||||
|
||||
/* Create the coefficient buffer. */
|
||||
if (need_full_buffer) {
|
||||
#ifdef D_MULTISCAN_FILES_SUPPORTED
|
||||
/* Allocate a full-image virtual array for each component, */
|
||||
@@ -698,6 +689,9 @@ jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
|
||||
int ci, access_rows;
|
||||
jpeg_component_info *compptr;
|
||||
|
||||
coef = (my_coef_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_coef_controller) - SIZEOF(coef->blk_buffer));
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
access_rows = compptr->v_samp_factor;
|
||||
@@ -722,20 +716,29 @@ jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
|
||||
#endif
|
||||
} else {
|
||||
/* We only need a single-MCU buffer. */
|
||||
JBLOCKROW buffer;
|
||||
int i;
|
||||
JBLOCKARRAY blkp;
|
||||
JBLOCKROW buffer_ptr;
|
||||
int bi;
|
||||
|
||||
buffer = (JBLOCKROW)
|
||||
(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
|
||||
for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) {
|
||||
coef->MCU_buffer[i] = buffer + i;
|
||||
}
|
||||
coef = (my_coef_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller));
|
||||
buffer_ptr = coef->blk_buffer;
|
||||
if (cinfo->lim_Se == 0) /* DC only case: want to bypass later */
|
||||
FMEMZERO((void FAR *) buffer,
|
||||
(size_t) (D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)));
|
||||
MEMZERO(buffer_ptr, SIZEOF(coef->blk_buffer));
|
||||
blkp = coef->MCU_buffer;
|
||||
bi = D_MAX_BLOCKS_IN_MCU;
|
||||
do {
|
||||
*blkp++ = buffer_ptr++;
|
||||
} while (--bi);
|
||||
coef->pub.consume_data = dummy_consume_data;
|
||||
coef->pub.decompress_data = decompress_onepass;
|
||||
coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */
|
||||
}
|
||||
|
||||
coef->pub.start_input_pass = start_input_pass;
|
||||
coef->pub.start_output_pass = start_output_pass;
|
||||
#ifdef BLOCK_SMOOTHING_SUPPORTED
|
||||
coef->coef_bits_latch = NULL;
|
||||
#endif
|
||||
cinfo->coef = &coef->pub;
|
||||
}
|
||||
|
||||
+83
-24
@@ -2,7 +2,7 @@
|
||||
* jdcolor.c
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 2011-2019 by Guido Vollbeding.
|
||||
* Modified 2011-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -420,7 +420,7 @@ rgb_convert (j_decompress_ptr cinfo,
|
||||
/*
|
||||
* Color conversion for no colorspace change: just copy the data,
|
||||
* converting from separate-planes to interleaved representation.
|
||||
* We assume out_color_components == num_components.
|
||||
* Note: Omit uninteresting components in output buffer.
|
||||
*/
|
||||
|
||||
METHODDEF(void)
|
||||
@@ -431,22 +431,27 @@ null_convert (j_decompress_ptr cinfo,
|
||||
register JSAMPROW outptr;
|
||||
register JSAMPROW inptr;
|
||||
register JDIMENSION count;
|
||||
register int num_comps = cinfo->num_components;
|
||||
register int out_comps = cinfo->out_color_components;
|
||||
JDIMENSION num_cols = cinfo->output_width;
|
||||
JSAMPROW startptr;
|
||||
int ci;
|
||||
jpeg_component_info *compptr;
|
||||
|
||||
while (--num_rows >= 0) {
|
||||
/* It seems fastest to make a separate pass for each component. */
|
||||
for (ci = 0; ci < num_comps; ci++) {
|
||||
startptr = *output_buf++;
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
if (! compptr->component_needed)
|
||||
continue; /* skip uninteresting component */
|
||||
inptr = input_buf[ci][input_row];
|
||||
outptr = output_buf[0] + ci;
|
||||
outptr = startptr++;
|
||||
for (count = num_cols; count > 0; count--) {
|
||||
*outptr = *inptr++; /* don't need GETJSAMPLE() here */
|
||||
outptr += num_comps;
|
||||
outptr += out_comps;
|
||||
}
|
||||
}
|
||||
input_row++;
|
||||
output_buf++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,7 +467,7 @@ grayscale_convert (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows)
|
||||
{
|
||||
jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0,
|
||||
jcopy_sample_rows(input_buf[0] + input_row, output_buf,
|
||||
num_rows, cinfo->output_width);
|
||||
}
|
||||
|
||||
@@ -549,6 +554,47 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Convert CMYK to YK part of YCCK for colorless output.
|
||||
* We assume build_rgb_y_table has been called.
|
||||
*/
|
||||
|
||||
METHODDEF(void)
|
||||
cmyk_yk_convert (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows)
|
||||
{
|
||||
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
||||
register int r, g, b;
|
||||
register INT32 * ctab = cconvert->rgb_y_tab;
|
||||
register JSAMPROW outptr;
|
||||
register JSAMPROW inptr0, inptr1, inptr2, inptr3;
|
||||
register JDIMENSION col;
|
||||
JDIMENSION num_cols = cinfo->output_width;
|
||||
|
||||
while (--num_rows >= 0) {
|
||||
inptr0 = input_buf[0][input_row];
|
||||
inptr1 = input_buf[1][input_row];
|
||||
inptr2 = input_buf[2][input_row];
|
||||
inptr3 = input_buf[3][input_row];
|
||||
input_row++;
|
||||
outptr = *output_buf++;
|
||||
for (col = 0; col < num_cols; col++) {
|
||||
r = MAXJSAMPLE - GETJSAMPLE(inptr0[col]);
|
||||
g = MAXJSAMPLE - GETJSAMPLE(inptr1[col]);
|
||||
b = MAXJSAMPLE - GETJSAMPLE(inptr2[col]);
|
||||
/* Y */
|
||||
outptr[0] = (JSAMPLE)
|
||||
((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])
|
||||
>> SCALEBITS);
|
||||
/* K passes through unchanged */
|
||||
outptr[1] = inptr3[col]; /* don't need GETJSAMPLE here */
|
||||
outptr += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Empty method for start_pass.
|
||||
*/
|
||||
@@ -568,7 +614,7 @@ GLOBAL(void)
|
||||
jinit_color_deconverter (j_decompress_ptr cinfo)
|
||||
{
|
||||
my_cconvert_ptr cconvert;
|
||||
int ci;
|
||||
int ci, i;
|
||||
|
||||
cconvert = (my_cconvert_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_color_deconverter));
|
||||
@@ -608,7 +654,7 @@ jinit_color_deconverter (j_decompress_ptr cinfo)
|
||||
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
||||
|
||||
/* Set out_color_components and conversion method based on requested space.
|
||||
* Also clear the component_needed flags for any unused components,
|
||||
* Also adjust the component_needed flags for any unused components,
|
||||
* so that earlier pipeline stages can avoid useless computation.
|
||||
*/
|
||||
|
||||
@@ -674,9 +720,9 @@ jinit_color_deconverter (j_decompress_ptr cinfo)
|
||||
break;
|
||||
|
||||
case JCS_BG_RGB:
|
||||
cinfo->out_color_components = RGB_PIXELSIZE;
|
||||
if (cinfo->jpeg_color_space != JCS_BG_RGB)
|
||||
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
||||
cinfo->out_color_components = RGB_PIXELSIZE;
|
||||
switch (cinfo->color_transform) {
|
||||
case JCT_NONE:
|
||||
cconvert->pub.color_convert = rgb_convert;
|
||||
@@ -690,25 +736,38 @@ jinit_color_deconverter (j_decompress_ptr cinfo)
|
||||
break;
|
||||
|
||||
case JCS_CMYK:
|
||||
if (cinfo->jpeg_color_space != JCS_YCCK)
|
||||
goto def_label;
|
||||
cinfo->out_color_components = 4;
|
||||
switch (cinfo->jpeg_color_space) {
|
||||
case JCS_YCCK:
|
||||
cconvert->pub.color_convert = ycck_cmyk_convert;
|
||||
build_ycc_rgb_table(cinfo);
|
||||
break;
|
||||
case JCS_CMYK:
|
||||
cconvert->pub.color_convert = null_convert;
|
||||
break;
|
||||
default:
|
||||
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
||||
}
|
||||
cconvert->pub.color_convert = ycck_cmyk_convert;
|
||||
build_ycc_rgb_table(cinfo);
|
||||
break;
|
||||
|
||||
default: /* permit null conversion to same output space */
|
||||
case JCS_YCCK:
|
||||
if (cinfo->jpeg_color_space != JCS_CMYK ||
|
||||
/* Support only YK part of YCCK for colorless output */
|
||||
! cinfo->comp_info[0].component_needed ||
|
||||
cinfo->comp_info[1].component_needed ||
|
||||
cinfo->comp_info[2].component_needed ||
|
||||
! cinfo->comp_info[3].component_needed)
|
||||
goto def_label;
|
||||
cinfo->out_color_components = 2;
|
||||
/* Need all components on input side */
|
||||
cinfo->comp_info[1].component_needed = TRUE;
|
||||
cinfo->comp_info[2].component_needed = TRUE;
|
||||
cconvert->pub.color_convert = cmyk_yk_convert;
|
||||
build_rgb_y_table(cinfo);
|
||||
break;
|
||||
|
||||
default: def_label: /* permit null conversion to same output space */
|
||||
if (cinfo->out_color_space != cinfo->jpeg_color_space)
|
||||
/* unsupported non-null conversion */
|
||||
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
||||
cinfo->out_color_components = cinfo->num_components;
|
||||
i = 0;
|
||||
for (ci = 0; ci < cinfo->num_components; ci++)
|
||||
if (cinfo->comp_info[ci].component_needed)
|
||||
i++; /* count output color components */
|
||||
cinfo->out_color_components = i;
|
||||
cconvert->pub.color_convert = null_convert;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -2,7 +2,7 @@
|
||||
* jdhuff.c
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 2006-2019 by Guido Vollbeding.
|
||||
* Modified 2006-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -704,7 +704,7 @@ process_restart (j_decompress_ptr cinfo)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
int Al = cinfo->Al;
|
||||
@@ -776,7 +776,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
register int s, k, r;
|
||||
@@ -864,7 +864,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
JCOEF p1;
|
||||
@@ -913,7 +913,7 @@ decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
register int s, k, r;
|
||||
@@ -1072,7 +1072,7 @@ undoit:
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu_sub (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu_sub (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
const int * natural_order;
|
||||
@@ -1201,7 +1201,7 @@ decode_mcu_sub (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
*/
|
||||
|
||||
METHODDEF(boolean)
|
||||
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||
decode_mcu (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)
|
||||
{
|
||||
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
|
||||
int blkn;
|
||||
|
||||
+17
-22
@@ -2,7 +2,7 @@
|
||||
* jdinput.c
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 2002-2013 by Guido Vollbeding.
|
||||
* Modified 2002-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -330,7 +330,6 @@ initial_setup (j_decompress_ptr cinfo)
|
||||
default:
|
||||
ERREXIT4(cinfo, JERR_BAD_PROGRESSION,
|
||||
cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);
|
||||
break;
|
||||
}
|
||||
|
||||
/* We initialize DCT_scaled_size and min_DCT_scaled_size to block_size.
|
||||
@@ -391,16 +390,16 @@ per_scan_setup (j_decompress_ptr cinfo)
|
||||
{
|
||||
int ci, mcublks, tmp;
|
||||
jpeg_component_info *compptr;
|
||||
|
||||
|
||||
if (cinfo->comps_in_scan == 1) {
|
||||
|
||||
|
||||
/* Noninterleaved (single-component) scan */
|
||||
compptr = cinfo->cur_comp_info[0];
|
||||
|
||||
|
||||
/* Overall image size in MCUs */
|
||||
cinfo->MCUs_per_row = compptr->width_in_blocks;
|
||||
cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
|
||||
|
||||
|
||||
/* For noninterleaved scan, always one block per MCU */
|
||||
compptr->MCU_width = 1;
|
||||
compptr->MCU_height = 1;
|
||||
@@ -413,28 +412,26 @@ per_scan_setup (j_decompress_ptr cinfo)
|
||||
tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
|
||||
if (tmp == 0) tmp = compptr->v_samp_factor;
|
||||
compptr->last_row_height = tmp;
|
||||
|
||||
|
||||
/* Prepare array describing MCU composition */
|
||||
cinfo->blocks_in_MCU = 1;
|
||||
cinfo->MCU_membership[0] = 0;
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
/* Interleaved (multi-component) scan */
|
||||
if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
|
||||
ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
|
||||
MAX_COMPS_IN_SCAN);
|
||||
|
||||
|
||||
/* Overall image size in MCUs */
|
||||
cinfo->MCUs_per_row = (JDIMENSION)
|
||||
jdiv_round_up((long) cinfo->image_width,
|
||||
(long) (cinfo->max_h_samp_factor * cinfo->block_size));
|
||||
cinfo->MCU_rows_in_scan = (JDIMENSION)
|
||||
jdiv_round_up((long) cinfo->image_height,
|
||||
(long) (cinfo->max_v_samp_factor * cinfo->block_size));
|
||||
|
||||
cinfo->MCU_rows_in_scan = cinfo->total_iMCU_rows;
|
||||
|
||||
cinfo->blocks_in_MCU = 0;
|
||||
|
||||
|
||||
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
|
||||
compptr = cinfo->cur_comp_info[ci];
|
||||
/* Sampling factors give # of blocks of component in each MCU */
|
||||
@@ -457,7 +454,7 @@ per_scan_setup (j_decompress_ptr cinfo)
|
||||
cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -501,9 +498,8 @@ latch_quant_tables (j_decompress_ptr cinfo)
|
||||
cinfo->quant_tbl_ptrs[qtblno] == NULL)
|
||||
ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
|
||||
/* OK, save away the quantization table */
|
||||
qtbl = (JQUANT_TBL *)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(JQUANT_TBL));
|
||||
qtbl = (JQUANT_TBL *) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(JQUANT_TBL));
|
||||
MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL));
|
||||
compptr->quant_table = qtbl;
|
||||
}
|
||||
@@ -644,9 +640,8 @@ jinit_input_controller (j_decompress_ptr cinfo)
|
||||
my_inputctl_ptr inputctl;
|
||||
|
||||
/* Create subobject in permanent pool */
|
||||
inputctl = (my_inputctl_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
|
||||
SIZEOF(my_input_controller));
|
||||
inputctl = (my_inputctl_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_input_controller));
|
||||
cinfo->inputctl = &inputctl->pub;
|
||||
/* Initialize method pointers */
|
||||
inputctl->pub.consume_input = consume_markers;
|
||||
|
||||
+26
-22
@@ -2,7 +2,7 @@
|
||||
* jdmainct.c
|
||||
*
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* Modified 2002-2016 by Guido Vollbeding.
|
||||
* Modified 2002-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -170,21 +170,22 @@ alloc_funny_pointers (j_decompress_ptr cinfo)
|
||||
/* Get top-level space for component array pointers.
|
||||
* We alloc both arrays with one call to save a few cycles.
|
||||
*/
|
||||
mainp->xbuffer[0] = (JSAMPIMAGE)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
cinfo->num_components * 2 * SIZEOF(JSAMPARRAY));
|
||||
mainp->xbuffer[0] = (JSAMPIMAGE) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
cinfo->num_components * 2 * SIZEOF(JSAMPARRAY));
|
||||
mainp->xbuffer[1] = mainp->xbuffer[0] + cinfo->num_components;
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
if (! compptr->component_needed)
|
||||
continue; /* skip uninteresting component */
|
||||
rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
|
||||
cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
|
||||
/* Get space for pointer lists --- M+4 row groups in each list.
|
||||
* We alloc both pointer lists with one call to save a few cycles.
|
||||
*/
|
||||
xbuf = (JSAMPARRAY)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW));
|
||||
xbuf = (JSAMPARRAY) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo,
|
||||
JPOOL_IMAGE, 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW));
|
||||
xbuf += rgroup; /* want one row group at negative offsets */
|
||||
mainp->xbuffer[0][ci] = xbuf;
|
||||
xbuf += rgroup * (M + 4);
|
||||
@@ -210,6 +211,8 @@ make_funny_pointers (j_decompress_ptr cinfo)
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
if (! compptr->component_needed)
|
||||
continue; /* skip uninteresting component */
|
||||
rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
|
||||
cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
|
||||
xbuf0 = mainp->xbuffer[0][ci];
|
||||
@@ -250,6 +253,8 @@ set_wraparound_pointers (j_decompress_ptr cinfo)
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
if (! compptr->component_needed)
|
||||
continue; /* skip uninteresting component */
|
||||
rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
|
||||
cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
|
||||
xbuf0 = mainp->xbuffer[0][ci];
|
||||
@@ -278,6 +283,8 @@ set_bottom_pointers (j_decompress_ptr cinfo)
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
if (! compptr->component_needed)
|
||||
continue; /* skip uninteresting component */
|
||||
/* Count sample rows in one iMCU row and in one row group */
|
||||
iMCUheight = compptr->v_samp_factor * compptr->DCT_v_scaled_size;
|
||||
rgroup = iMCUheight / cinfo->min_DCT_v_scaled_size;
|
||||
@@ -333,7 +340,6 @@ start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
|
||||
#endif
|
||||
default:
|
||||
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,9 +350,8 @@ start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
|
||||
*/
|
||||
|
||||
METHODDEF(void)
|
||||
process_data_simple_main (j_decompress_ptr cinfo,
|
||||
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail)
|
||||
process_data_simple_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf,
|
||||
JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
|
||||
{
|
||||
my_main_ptr mainp = (my_main_ptr) cinfo->main;
|
||||
|
||||
@@ -375,9 +380,8 @@ process_data_simple_main (j_decompress_ptr cinfo,
|
||||
*/
|
||||
|
||||
METHODDEF(void)
|
||||
process_data_context_main (j_decompress_ptr cinfo,
|
||||
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail)
|
||||
process_data_context_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf,
|
||||
JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
|
||||
{
|
||||
my_main_ptr mainp = (my_main_ptr) cinfo->main;
|
||||
|
||||
@@ -449,13 +453,12 @@ process_data_context_main (j_decompress_ptr cinfo,
|
||||
#ifdef QUANT_2PASS_SUPPORTED
|
||||
|
||||
METHODDEF(void)
|
||||
process_data_crank_post (j_decompress_ptr cinfo,
|
||||
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
|
||||
JDIMENSION out_rows_avail)
|
||||
process_data_crank_post (j_decompress_ptr cinfo, JSAMPARRAY output_buf,
|
||||
JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
|
||||
{
|
||||
(*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL,
|
||||
(JDIMENSION *) NULL, (JDIMENSION) 0,
|
||||
output_buf, out_row_ctr, out_rows_avail);
|
||||
(JDIMENSION *) NULL, (JDIMENSION) 0,
|
||||
output_buf, out_row_ctr, out_rows_avail);
|
||||
}
|
||||
|
||||
#endif /* QUANT_2PASS_SUPPORTED */
|
||||
@@ -472,9 +475,8 @@ jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
|
||||
int ci, rgroup, ngroups;
|
||||
jpeg_component_info *compptr;
|
||||
|
||||
mainp = (my_main_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_main_controller));
|
||||
mainp = (my_main_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_main_controller));
|
||||
cinfo->main = &mainp->pub;
|
||||
mainp->pub.start_pass = start_pass_main;
|
||||
|
||||
@@ -497,6 +499,8 @@ jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
|
||||
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
if (! compptr->component_needed)
|
||||
continue; /* skip uninteresting component */
|
||||
rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) /
|
||||
cinfo->min_DCT_v_scaled_size; /* height of a row group of component */
|
||||
mainp->buffer[ci] = (*cinfo->mem->alloc_sarray)
|
||||
|
||||
+11
-18
@@ -2,7 +2,7 @@
|
||||
* jdmaster.c
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 2002-2019 by Guido Vollbeding.
|
||||
* Modified 2002-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -103,10 +103,8 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
|
||||
* This function is used for full decompression.
|
||||
*/
|
||||
{
|
||||
#ifdef IDCT_SCALING_SUPPORTED
|
||||
int ci, ssize;
|
||||
int ci, i;
|
||||
jpeg_component_info *compptr;
|
||||
#endif
|
||||
|
||||
/* Prevent application from calling me at wrong times */
|
||||
if (cinfo->global_state != DSTATE_READY)
|
||||
@@ -124,7 +122,7 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
|
||||
*/
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
ssize = 1;
|
||||
int ssize = 1;
|
||||
if (! cinfo->raw_data_out)
|
||||
while (cinfo->min_DCT_h_scaled_size * ssize <=
|
||||
(cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) &&
|
||||
@@ -166,27 +164,22 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
|
||||
#endif /* IDCT_SCALING_SUPPORTED */
|
||||
|
||||
/* Report number of components in selected colorspace. */
|
||||
/* Probably this should be in the color conversion module... */
|
||||
/* This should correspond to the actual code in the color conversion module. */
|
||||
switch (cinfo->out_color_space) {
|
||||
case JCS_GRAYSCALE:
|
||||
cinfo->out_color_components = 1;
|
||||
break;
|
||||
case JCS_RGB:
|
||||
case JCS_BG_RGB:
|
||||
#if RGB_PIXELSIZE != 3
|
||||
cinfo->out_color_components = RGB_PIXELSIZE;
|
||||
break;
|
||||
#endif /* else share code with YCbCr */
|
||||
case JCS_YCbCr:
|
||||
case JCS_BG_YCC:
|
||||
cinfo->out_color_components = 3;
|
||||
break;
|
||||
case JCS_CMYK:
|
||||
case JCS_YCCK:
|
||||
cinfo->out_color_components = 4;
|
||||
break;
|
||||
default: /* else must be same colorspace as in file */
|
||||
cinfo->out_color_components = cinfo->num_components;
|
||||
default: /* YCCK <=> CMYK conversion or same colorspace as in file */
|
||||
i = 0;
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++)
|
||||
if (compptr->component_needed)
|
||||
i++; /* count output color components */
|
||||
cinfo->out_color_components = i;
|
||||
}
|
||||
cinfo->output_components = (cinfo->quantize_colors ? 1 :
|
||||
cinfo->out_color_components);
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
* jdmerge.c
|
||||
*
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* Modified 2013-2019 by Guido Vollbeding.
|
||||
* Modified 2013-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -190,7 +190,7 @@ merged_2v_upsample (j_decompress_ptr cinfo,
|
||||
|
||||
if (upsample->spare_full) {
|
||||
/* If we have a spare row saved from a previous cycle, just return it. */
|
||||
jcopy_sample_rows(& upsample->spare_row, 0, output_buf + *out_row_ctr, 0,
|
||||
jcopy_sample_rows(& upsample->spare_row, output_buf + *out_row_ctr,
|
||||
1, upsample->out_row_width);
|
||||
num_rows = 1;
|
||||
upsample->spare_full = FALSE;
|
||||
|
||||
+29
-46
@@ -2,7 +2,7 @@
|
||||
* jdsample.c
|
||||
*
|
||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
* Modified 2002-2015 by Guido Vollbeding.
|
||||
* Modified 2002-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -27,7 +27,7 @@
|
||||
/* Pointer to routine to upsample a single component */
|
||||
typedef JMETHOD(void, upsample1_ptr,
|
||||
(j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
|
||||
JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr));
|
||||
|
||||
/* Private subobject */
|
||||
|
||||
@@ -102,6 +102,9 @@ sep_upsample (j_decompress_ptr cinfo,
|
||||
if (upsample->next_row_out >= cinfo->max_v_samp_factor) {
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
/* Don't bother to upsample an uninteresting component. */
|
||||
if (! compptr->component_needed)
|
||||
continue;
|
||||
/* Invoke per-component upsample method. Notice we pass a POINTER
|
||||
* to color_buf[ci], so that fullsize_upsample can change it.
|
||||
*/
|
||||
@@ -156,25 +159,12 @@ sep_upsample (j_decompress_ptr cinfo,
|
||||
|
||||
METHODDEF(void)
|
||||
fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||
JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr)
|
||||
{
|
||||
*output_data_ptr = input_data;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This is a no-op version used for "uninteresting" components.
|
||||
* These components will not be referenced by color conversion.
|
||||
*/
|
||||
|
||||
METHODDEF(void)
|
||||
noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||
{
|
||||
*output_data_ptr = NULL; /* safety check */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This version handles any integral sampling ratios.
|
||||
* This is not used for typical JPEG files, so it need not be fast.
|
||||
@@ -188,25 +178,25 @@ noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
|
||||
METHODDEF(void)
|
||||
int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||
JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
|
||||
JSAMPARRAY output_data = *output_data_ptr;
|
||||
JSAMPARRAY output_data, output_end;
|
||||
register JSAMPROW inptr, outptr;
|
||||
register JSAMPLE invalue;
|
||||
register int h;
|
||||
JSAMPROW outend;
|
||||
int h_expand, v_expand;
|
||||
int inrow, outrow;
|
||||
|
||||
h_expand = upsample->h_expand[compptr->component_index];
|
||||
v_expand = upsample->v_expand[compptr->component_index];
|
||||
|
||||
inrow = outrow = 0;
|
||||
while (outrow < cinfo->max_v_samp_factor) {
|
||||
output_data = *output_data_ptr;
|
||||
output_end = output_data + cinfo->max_v_samp_factor;
|
||||
for (; output_data < output_end; output_data += v_expand) {
|
||||
/* Generate one output row with proper horizontal expansion */
|
||||
inptr = input_data[inrow];
|
||||
outptr = output_data[outrow];
|
||||
inptr = *input_data++;
|
||||
outptr = *output_data;
|
||||
outend = outptr + cinfo->output_width;
|
||||
while (outptr < outend) {
|
||||
invalue = *inptr++; /* don't need GETJSAMPLE() here */
|
||||
@@ -216,11 +206,9 @@ int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
}
|
||||
/* Generate any additional output rows by duplicating the first one */
|
||||
if (v_expand > 1) {
|
||||
jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
|
||||
v_expand-1, cinfo->output_width);
|
||||
jcopy_sample_rows(output_data, output_data + 1,
|
||||
v_expand - 1, cinfo->output_width);
|
||||
}
|
||||
inrow++;
|
||||
outrow += v_expand;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +220,7 @@ int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
|
||||
METHODDEF(void)
|
||||
h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||
JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr)
|
||||
{
|
||||
JSAMPARRAY output_data = *output_data_ptr;
|
||||
register JSAMPROW inptr, outptr;
|
||||
@@ -260,28 +248,26 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
|
||||
METHODDEF(void)
|
||||
h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||
JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr)
|
||||
{
|
||||
JSAMPARRAY output_data = *output_data_ptr;
|
||||
JSAMPARRAY output_data, output_end;
|
||||
register JSAMPROW inptr, outptr;
|
||||
register JSAMPLE invalue;
|
||||
JSAMPROW outend;
|
||||
int inrow, outrow;
|
||||
|
||||
inrow = outrow = 0;
|
||||
while (outrow < cinfo->max_v_samp_factor) {
|
||||
inptr = input_data[inrow];
|
||||
outptr = output_data[outrow];
|
||||
output_data = *output_data_ptr;
|
||||
output_end = output_data + cinfo->max_v_samp_factor;
|
||||
for (; output_data < output_end; output_data += 2) {
|
||||
inptr = *input_data++;
|
||||
outptr = *output_data;
|
||||
outend = outptr + cinfo->output_width;
|
||||
while (outptr < outend) {
|
||||
invalue = *inptr++; /* don't need GETJSAMPLE() here */
|
||||
*outptr++ = invalue;
|
||||
*outptr++ = invalue;
|
||||
}
|
||||
jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
|
||||
jcopy_sample_rows(output_data, output_data + 1,
|
||||
1, cinfo->output_width);
|
||||
inrow++;
|
||||
outrow += 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,9 +284,8 @@ jinit_upsampler (j_decompress_ptr cinfo)
|
||||
jpeg_component_info * compptr;
|
||||
int h_in_group, v_in_group, h_out_group, v_out_group;
|
||||
|
||||
upsample = (my_upsample_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_upsampler));
|
||||
upsample = (my_upsample_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_upsampler));
|
||||
cinfo->upsample = &upsample->pub;
|
||||
upsample->pub.start_pass = start_pass_upsample;
|
||||
upsample->pub.upsample = sep_upsample;
|
||||
@@ -314,6 +299,9 @@ jinit_upsampler (j_decompress_ptr cinfo)
|
||||
*/
|
||||
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
|
||||
ci++, compptr++) {
|
||||
/* Don't bother to upsample an uninteresting component. */
|
||||
if (! compptr->component_needed)
|
||||
continue;
|
||||
/* Compute size of an "input group" after IDCT scaling. This many samples
|
||||
* are to be converted to max_h_samp_factor * max_v_samp_factor pixels.
|
||||
*/
|
||||
@@ -324,11 +312,6 @@ jinit_upsampler (j_decompress_ptr cinfo)
|
||||
h_out_group = cinfo->max_h_samp_factor;
|
||||
v_out_group = cinfo->max_v_samp_factor;
|
||||
upsample->rowgroup_height[ci] = v_in_group; /* save for use later */
|
||||
if (! compptr->component_needed) {
|
||||
/* Don't bother to upsample an uninteresting component. */
|
||||
upsample->methods[ci] = noop_upsample;
|
||||
continue; /* don't need to allocate buffer */
|
||||
}
|
||||
if (h_in_group == h_out_group && v_in_group == v_out_group) {
|
||||
/* Fullsize components can be processed without any work. */
|
||||
upsample->methods[ci] = fullsize_upsample;
|
||||
|
||||
+6
-7
@@ -2,7 +2,7 @@
|
||||
* jpegint.h
|
||||
*
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 1997-2019 by Guido Vollbeding.
|
||||
* Modified 1997-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -103,8 +103,7 @@ struct jpeg_downsampler {
|
||||
typedef JMETHOD(void, forward_DCT_ptr,
|
||||
(j_compress_ptr cinfo, jpeg_component_info * compptr,
|
||||
JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
|
||||
JDIMENSION start_row, JDIMENSION start_col,
|
||||
JDIMENSION num_blocks));
|
||||
JDIMENSION start_col, JDIMENSION num_blocks));
|
||||
|
||||
struct jpeg_forward_dct {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo));
|
||||
@@ -115,7 +114,7 @@ struct jpeg_forward_dct {
|
||||
/* Entropy encoding */
|
||||
struct jpeg_entropy_encoder {
|
||||
JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
|
||||
JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
|
||||
JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKARRAY MCU_data));
|
||||
JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
|
||||
};
|
||||
|
||||
@@ -211,7 +210,7 @@ struct jpeg_marker_reader {
|
||||
/* Entropy decoding */
|
||||
struct jpeg_entropy_decoder {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKROW *MCU_data));
|
||||
JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data));
|
||||
JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
|
||||
};
|
||||
|
||||
@@ -416,8 +415,8 @@ EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
|
||||
/* Utility routines in jutils.c */
|
||||
EXTERN(long) jdiv_round_up JPP((long a, long b));
|
||||
EXTERN(long) jround_up JPP((long a, long b));
|
||||
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
|
||||
JSAMPARRAY output_array, int dest_row,
|
||||
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array,
|
||||
JSAMPARRAY output_array,
|
||||
int num_rows, JDIMENSION num_cols));
|
||||
EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
|
||||
JDIMENSION num_blocks));
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
* jpeglib.h
|
||||
*
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modified 2002-2019 by Guido Vollbeding.
|
||||
* Modified 2002-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -39,7 +39,7 @@ extern "C" {
|
||||
|
||||
#define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */
|
||||
#define JPEG_LIB_VERSION_MAJOR 9
|
||||
#define JPEG_LIB_VERSION_MINOR 4
|
||||
#define JPEG_LIB_VERSION_MINOR 5
|
||||
|
||||
|
||||
/* Various constants determining the sizes of things.
|
||||
|
||||
+13
-19
@@ -2,7 +2,7 @@
|
||||
* jquant1.c
|
||||
*
|
||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
* Modified 2011 by Guido Vollbeding.
|
||||
* Modified 2011-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -293,8 +293,7 @@ create_colormap (j_decompress_ptr cinfo)
|
||||
/* The colors are ordered in the map in standard row-major order, */
|
||||
/* i.e. rightmost (highest-indexed) color changes most rapidly. */
|
||||
|
||||
colormap = (*cinfo->mem->alloc_sarray)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
(JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components);
|
||||
|
||||
/* blksize is number of adjacent repeated entries for a component */
|
||||
@@ -400,9 +399,8 @@ make_odither_array (j_decompress_ptr cinfo, int ncolors)
|
||||
int j,k;
|
||||
INT32 num,den;
|
||||
|
||||
odither = (ODITHER_MATRIX_PTR)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(ODITHER_MATRIX));
|
||||
odither = (ODITHER_MATRIX_PTR) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(ODITHER_MATRIX));
|
||||
/* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1).
|
||||
* Hence the dither value for the matrix cell with fill order f
|
||||
* (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1).
|
||||
@@ -531,8 +529,7 @@ quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
||||
|
||||
for (row = 0; row < num_rows; row++) {
|
||||
/* Initialize output values to 0 so can process components separately */
|
||||
FMEMZERO((void FAR *) output_buf[row],
|
||||
(size_t) (width * SIZEOF(JSAMPLE)));
|
||||
FMEMZERO((void FAR *) output_buf[row], (size_t) width * SIZEOF(JSAMPLE));
|
||||
row_index = cquantize->row_index;
|
||||
for (ci = 0; ci < nc; ci++) {
|
||||
input_ptr = input_buf[row] + ci;
|
||||
@@ -636,8 +633,7 @@ quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
||||
|
||||
for (row = 0; row < num_rows; row++) {
|
||||
/* Initialize output values to 0 so can process components separately */
|
||||
FMEMZERO((void FAR *) output_buf[row],
|
||||
(size_t) (width * SIZEOF(JSAMPLE)));
|
||||
FMEMZERO((void FAR *) output_buf[row], (size_t) width * SIZEOF(JSAMPLE));
|
||||
for (ci = 0; ci < nc; ci++) {
|
||||
input_ptr = input_buf[row] + ci;
|
||||
output_ptr = output_buf[row];
|
||||
@@ -726,10 +722,10 @@ alloc_fs_workspace (j_decompress_ptr cinfo)
|
||||
size_t arraysize;
|
||||
int i;
|
||||
|
||||
arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
|
||||
arraysize = ((size_t) cinfo->output_width + (size_t) 2) * SIZEOF(FSERROR);
|
||||
for (i = 0; i < cinfo->out_color_components; i++) {
|
||||
cquantize->fserrors[i] = (FSERRPTR)
|
||||
(*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
|
||||
cquantize->fserrors[i] = (FSERRPTR) (*cinfo->mem->alloc_large)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,13 +776,12 @@ start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
|
||||
if (cquantize->fserrors[0] == NULL)
|
||||
alloc_fs_workspace(cinfo);
|
||||
/* Initialize the propagated errors to zero. */
|
||||
arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
|
||||
arraysize = ((size_t) cinfo->output_width + (size_t) 2) * SIZEOF(FSERROR);
|
||||
for (i = 0; i < cinfo->out_color_components; i++)
|
||||
FMEMZERO((void FAR *) cquantize->fserrors[i], arraysize);
|
||||
break;
|
||||
default:
|
||||
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -823,10 +818,9 @@ jinit_1pass_quantizer (j_decompress_ptr cinfo)
|
||||
{
|
||||
my_cquantize_ptr cquantize;
|
||||
|
||||
cquantize = (my_cquantize_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_cquantizer));
|
||||
cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
|
||||
cquantize = (my_cquantize_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_cquantizer));
|
||||
cinfo->cquantize = &cquantize->pub;
|
||||
cquantize->pub.start_pass = start_pass_1_quant;
|
||||
cquantize->pub.finish_pass = finish_pass_1_quant;
|
||||
cquantize->pub.new_color_map = new_color_map_1_quant;
|
||||
|
||||
+9
-9
@@ -2,7 +2,7 @@
|
||||
* jquant2.c
|
||||
*
|
||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
* Modified 2011 by Guido Vollbeding.
|
||||
* Modified 2011-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -1197,8 +1197,8 @@ start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
|
||||
ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);
|
||||
|
||||
if (cinfo->dither_mode == JDITHER_FS) {
|
||||
size_t arraysize = (size_t) ((cinfo->output_width + 2) *
|
||||
(3 * SIZEOF(FSERROR)));
|
||||
size_t arraysize = ((size_t) cinfo->output_width + (size_t) 2)
|
||||
* (3 * SIZEOF(FSERROR));
|
||||
/* Allocate Floyd-Steinberg workspace if we didn't already. */
|
||||
if (cquantize->fserrors == NULL)
|
||||
cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)
|
||||
@@ -1247,10 +1247,9 @@ jinit_2pass_quantizer (j_decompress_ptr cinfo)
|
||||
my_cquantize_ptr cquantize;
|
||||
int i;
|
||||
|
||||
cquantize = (my_cquantize_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
SIZEOF(my_cquantizer));
|
||||
cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
|
||||
cquantize = (my_cquantize_ptr) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_cquantizer));
|
||||
cinfo->cquantize = &cquantize->pub;
|
||||
cquantize->pub.start_pass = start_pass_2_quant;
|
||||
cquantize->pub.new_color_map = new_color_map_2_quant;
|
||||
cquantize->fserrors = NULL; /* flag optional arrays not allocated */
|
||||
@@ -1284,7 +1283,8 @@ jinit_2pass_quantizer (j_decompress_ptr cinfo)
|
||||
if (desired > MAXNUMCOLORS)
|
||||
ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);
|
||||
cquantize->sv_colormap = (*cinfo->mem->alloc_sarray)
|
||||
((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3);
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
(JDIMENSION) desired, (JDIMENSION) 3);
|
||||
cquantize->desired = desired;
|
||||
} else
|
||||
cquantize->sv_colormap = NULL;
|
||||
@@ -1302,7 +1302,7 @@ jinit_2pass_quantizer (j_decompress_ptr cinfo)
|
||||
if (cinfo->dither_mode == JDITHER_FS) {
|
||||
cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||
(size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR))));
|
||||
((size_t) cinfo->output_width + (size_t) 2) * (3 * SIZEOF(FSERROR)));
|
||||
/* Might as well create the error-limiting table too. */
|
||||
init_error_limit(cinfo);
|
||||
}
|
||||
|
||||
+48
-51
@@ -2,7 +2,7 @@
|
||||
* jutils.c
|
||||
*
|
||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
* Modified 2009-2019 by Guido Vollbeding.
|
||||
* Modified 2009-2020 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -52,67 +52,67 @@ const int jpeg_zigzag_order[DCTSIZE2] = {
|
||||
*/
|
||||
|
||||
const int jpeg_natural_order[DCTSIZE2+16] = {
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 32, 25, 18, 11, 4, 5,
|
||||
12, 19, 26, 33, 40, 48, 41, 34,
|
||||
27, 20, 13, 6, 7, 14, 21, 28,
|
||||
35, 42, 49, 56, 57, 50, 43, 36,
|
||||
29, 22, 15, 23, 30, 37, 44, 51,
|
||||
58, 59, 52, 45, 38, 31, 39, 46,
|
||||
53, 60, 61, 54, 47, 55, 62, 63,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 32, 25, 18, 11, 4, 5,
|
||||
12, 19, 26, 33, 40, 48, 41, 34,
|
||||
27, 20, 13, 6, 7, 14, 21, 28,
|
||||
35, 42, 49, 56, 57, 50, 43, 36,
|
||||
29, 22, 15, 23, 30, 37, 44, 51,
|
||||
58, 59, 52, 45, 38, 31, 39, 46,
|
||||
53, 60, 61, 54, 47, 55, 62, 63,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
};
|
||||
|
||||
const int jpeg_natural_order7[7*7+16] = {
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 32, 25, 18, 11, 4, 5,
|
||||
12, 19, 26, 33, 40, 48, 41, 34,
|
||||
27, 20, 13, 6, 14, 21, 28, 35,
|
||||
42, 49, 50, 43, 36, 29, 22, 30,
|
||||
37, 44, 51, 52, 45, 38, 46, 53,
|
||||
54,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 32, 25, 18, 11, 4, 5,
|
||||
12, 19, 26, 33, 40, 48, 41, 34,
|
||||
27, 20, 13, 6, 14, 21, 28, 35,
|
||||
42, 49, 50, 43, 36, 29, 22, 30,
|
||||
37, 44, 51, 52, 45, 38, 46, 53,
|
||||
54,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
};
|
||||
|
||||
const int jpeg_natural_order6[6*6+16] = {
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 32, 25, 18, 11, 4, 5,
|
||||
12, 19, 26, 33, 40, 41, 34, 27,
|
||||
20, 13, 21, 28, 35, 42, 43, 36,
|
||||
29, 37, 44, 45,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 32, 25, 18, 11, 4, 5,
|
||||
12, 19, 26, 33, 40, 41, 34, 27,
|
||||
20, 13, 21, 28, 35, 42, 43, 36,
|
||||
29, 37, 44, 45,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
};
|
||||
|
||||
const int jpeg_natural_order5[5*5+16] = {
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 32, 25, 18, 11, 4, 12,
|
||||
19, 26, 33, 34, 27, 20, 28, 35,
|
||||
36,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 32, 25, 18, 11, 4, 12,
|
||||
19, 26, 33, 34, 27, 20, 28, 35,
|
||||
36,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
};
|
||||
|
||||
const int jpeg_natural_order4[4*4+16] = {
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 25, 18, 11, 19, 26, 27,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
0, 1, 8, 16, 9, 2, 3, 10,
|
||||
17, 24, 25, 18, 11, 19, 26, 27,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
};
|
||||
|
||||
const int jpeg_natural_order3[3*3+16] = {
|
||||
0, 1, 8, 16, 9, 2, 10, 17,
|
||||
18,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
0, 1, 8, 16, 9, 2, 10, 17,
|
||||
18,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
};
|
||||
|
||||
const int jpeg_natural_order2[2*2+16] = {
|
||||
0, 1, 8, 9,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
0, 1, 8, 9,
|
||||
63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
|
||||
63, 63, 63, 63, 63, 63, 63, 63
|
||||
};
|
||||
|
||||
|
||||
@@ -174,12 +174,12 @@ jzero_far (void FAR * target, size_t bytestozero)
|
||||
|
||||
|
||||
GLOBAL(void)
|
||||
jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
|
||||
JSAMPARRAY output_array, int dest_row,
|
||||
jcopy_sample_rows (JSAMPARRAY input_array,
|
||||
JSAMPARRAY output_array,
|
||||
int num_rows, JDIMENSION num_cols)
|
||||
/* Copy some rows of samples from one place to another.
|
||||
* num_rows rows are copied from input_array[source_row++]
|
||||
* to output_array[dest_row++]; these areas may overlap for duplication.
|
||||
* num_rows rows are copied from *input_array++ to *output_array++;
|
||||
* these areas may overlap for duplication.
|
||||
* The source and destination arrays must be at least as wide as num_cols.
|
||||
*/
|
||||
{
|
||||
@@ -191,9 +191,6 @@ jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
|
||||
#endif
|
||||
register int row;
|
||||
|
||||
input_array += source_row;
|
||||
output_array += dest_row;
|
||||
|
||||
for (row = num_rows; row > 0; row--) {
|
||||
inptr = *input_array++;
|
||||
outptr = *output_array++;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* jversion.h
|
||||
*
|
||||
* Copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
|
||||
* Copyright (C) 1991-2022, Thomas G. Lane, Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
*
|
||||
@@ -9,6 +9,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#define JVERSION "9d 12-Jan-2020"
|
||||
#define JVERSION "9e 16-Jan-2022"
|
||||
|
||||
#define JCOPYRIGHT "Copyright (C) 2020, Thomas G. Lane, Guido Vollbeding"
|
||||
#define JCOPYRIGHT "Copyright (C) 2022, Thomas G. Lane, Guido Vollbeding"
|
||||
|
||||
+323
-47
@@ -1,59 +1,335 @@
|
||||
# DO NOT DELETE
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
jaricom.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcapimin.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcapistd.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcarith.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jccoefct.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jccolor.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcdctmgr.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jaricom.o: fltk_jpeg_prefix.h
|
||||
jaricom.o: jconfig.h
|
||||
jaricom.o: jerror.h
|
||||
jaricom.o: jinclude.h
|
||||
jaricom.o: jmorecfg.h
|
||||
jaricom.o: jpegint.h
|
||||
jaricom.o: jpeglib.h
|
||||
jcapimin.o: fltk_jpeg_prefix.h
|
||||
jcapimin.o: jconfig.h
|
||||
jcapimin.o: jerror.h
|
||||
jcapimin.o: jinclude.h
|
||||
jcapimin.o: jmorecfg.h
|
||||
jcapimin.o: jpegint.h
|
||||
jcapimin.o: jpeglib.h
|
||||
jcapistd.o: fltk_jpeg_prefix.h
|
||||
jcapistd.o: jconfig.h
|
||||
jcapistd.o: jerror.h
|
||||
jcapistd.o: jinclude.h
|
||||
jcapistd.o: jmorecfg.h
|
||||
jcapistd.o: jpegint.h
|
||||
jcapistd.o: jpeglib.h
|
||||
jcarith.o: fltk_jpeg_prefix.h
|
||||
jcarith.o: jconfig.h
|
||||
jcarith.o: jerror.h
|
||||
jcarith.o: jinclude.h
|
||||
jcarith.o: jmorecfg.h
|
||||
jcarith.o: jpegint.h
|
||||
jcarith.o: jpeglib.h
|
||||
jccoefct.o: fltk_jpeg_prefix.h
|
||||
jccoefct.o: jconfig.h
|
||||
jccoefct.o: jerror.h
|
||||
jccoefct.o: jinclude.h
|
||||
jccoefct.o: jmorecfg.h
|
||||
jccoefct.o: jpegint.h
|
||||
jccoefct.o: jpeglib.h
|
||||
jccolor.o: fltk_jpeg_prefix.h
|
||||
jccolor.o: jconfig.h
|
||||
jccolor.o: jerror.h
|
||||
jccolor.o: jinclude.h
|
||||
jccolor.o: jmorecfg.h
|
||||
jccolor.o: jpegint.h
|
||||
jccolor.o: jpeglib.h
|
||||
jcdctmgr.o: fltk_jpeg_prefix.h
|
||||
jcdctmgr.o: jconfig.h
|
||||
jcdctmgr.o: jdct.h
|
||||
jchuff.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcinit.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcmainct.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcmarker.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcmaster.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcomapi.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcparam.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcprepct.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcsample.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jctrans.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdapimin.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdapistd.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdarith.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdatadst.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdatasrc.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdcoefct.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdcolor.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jddctmgr.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jcdctmgr.o: jerror.h
|
||||
jcdctmgr.o: jinclude.h
|
||||
jcdctmgr.o: jmorecfg.h
|
||||
jcdctmgr.o: jpegint.h
|
||||
jcdctmgr.o: jpeglib.h
|
||||
jchuff.o: fltk_jpeg_prefix.h
|
||||
jchuff.o: jconfig.h
|
||||
jchuff.o: jerror.h
|
||||
jchuff.o: jinclude.h
|
||||
jchuff.o: jmorecfg.h
|
||||
jchuff.o: jpegint.h
|
||||
jchuff.o: jpeglib.h
|
||||
jcinit.o: fltk_jpeg_prefix.h
|
||||
jcinit.o: jconfig.h
|
||||
jcinit.o: jerror.h
|
||||
jcinit.o: jinclude.h
|
||||
jcinit.o: jmorecfg.h
|
||||
jcinit.o: jpegint.h
|
||||
jcinit.o: jpeglib.h
|
||||
jcmainct.o: fltk_jpeg_prefix.h
|
||||
jcmainct.o: jconfig.h
|
||||
jcmainct.o: jerror.h
|
||||
jcmainct.o: jinclude.h
|
||||
jcmainct.o: jmorecfg.h
|
||||
jcmainct.o: jpegint.h
|
||||
jcmainct.o: jpeglib.h
|
||||
jcmarker.o: fltk_jpeg_prefix.h
|
||||
jcmarker.o: jconfig.h
|
||||
jcmarker.o: jerror.h
|
||||
jcmarker.o: jinclude.h
|
||||
jcmarker.o: jmorecfg.h
|
||||
jcmarker.o: jpegint.h
|
||||
jcmarker.o: jpeglib.h
|
||||
jcmaster.o: fltk_jpeg_prefix.h
|
||||
jcmaster.o: jconfig.h
|
||||
jcmaster.o: jerror.h
|
||||
jcmaster.o: jinclude.h
|
||||
jcmaster.o: jmorecfg.h
|
||||
jcmaster.o: jpegint.h
|
||||
jcmaster.o: jpeglib.h
|
||||
jcomapi.o: fltk_jpeg_prefix.h
|
||||
jcomapi.o: jconfig.h
|
||||
jcomapi.o: jerror.h
|
||||
jcomapi.o: jinclude.h
|
||||
jcomapi.o: jmorecfg.h
|
||||
jcomapi.o: jpegint.h
|
||||
jcomapi.o: jpeglib.h
|
||||
jcparam.o: fltk_jpeg_prefix.h
|
||||
jcparam.o: jconfig.h
|
||||
jcparam.o: jerror.h
|
||||
jcparam.o: jinclude.h
|
||||
jcparam.o: jmorecfg.h
|
||||
jcparam.o: jpegint.h
|
||||
jcparam.o: jpeglib.h
|
||||
jcprepct.o: fltk_jpeg_prefix.h
|
||||
jcprepct.o: jconfig.h
|
||||
jcprepct.o: jerror.h
|
||||
jcprepct.o: jinclude.h
|
||||
jcprepct.o: jmorecfg.h
|
||||
jcprepct.o: jpegint.h
|
||||
jcprepct.o: jpeglib.h
|
||||
jcsample.o: fltk_jpeg_prefix.h
|
||||
jcsample.o: jconfig.h
|
||||
jcsample.o: jerror.h
|
||||
jcsample.o: jinclude.h
|
||||
jcsample.o: jmorecfg.h
|
||||
jcsample.o: jpegint.h
|
||||
jcsample.o: jpeglib.h
|
||||
jctrans.o: fltk_jpeg_prefix.h
|
||||
jctrans.o: jconfig.h
|
||||
jctrans.o: jerror.h
|
||||
jctrans.o: jinclude.h
|
||||
jctrans.o: jmorecfg.h
|
||||
jctrans.o: jpegint.h
|
||||
jctrans.o: jpeglib.h
|
||||
jdapimin.o: fltk_jpeg_prefix.h
|
||||
jdapimin.o: jconfig.h
|
||||
jdapimin.o: jerror.h
|
||||
jdapimin.o: jinclude.h
|
||||
jdapimin.o: jmorecfg.h
|
||||
jdapimin.o: jpegint.h
|
||||
jdapimin.o: jpeglib.h
|
||||
jdapistd.o: fltk_jpeg_prefix.h
|
||||
jdapistd.o: jconfig.h
|
||||
jdapistd.o: jerror.h
|
||||
jdapistd.o: jinclude.h
|
||||
jdapistd.o: jmorecfg.h
|
||||
jdapistd.o: jpegint.h
|
||||
jdapistd.o: jpeglib.h
|
||||
jdarith.o: fltk_jpeg_prefix.h
|
||||
jdarith.o: jconfig.h
|
||||
jdarith.o: jerror.h
|
||||
jdarith.o: jinclude.h
|
||||
jdarith.o: jmorecfg.h
|
||||
jdarith.o: jpegint.h
|
||||
jdarith.o: jpeglib.h
|
||||
jdatadst.o: fltk_jpeg_prefix.h
|
||||
jdatadst.o: jconfig.h
|
||||
jdatadst.o: jerror.h
|
||||
jdatadst.o: jinclude.h
|
||||
jdatadst.o: jmorecfg.h
|
||||
jdatadst.o: jpegint.h
|
||||
jdatadst.o: jpeglib.h
|
||||
jdatasrc.o: fltk_jpeg_prefix.h
|
||||
jdatasrc.o: jconfig.h
|
||||
jdatasrc.o: jerror.h
|
||||
jdatasrc.o: jinclude.h
|
||||
jdatasrc.o: jmorecfg.h
|
||||
jdatasrc.o: jpegint.h
|
||||
jdatasrc.o: jpeglib.h
|
||||
jdcoefct.o: fltk_jpeg_prefix.h
|
||||
jdcoefct.o: jconfig.h
|
||||
jdcoefct.o: jerror.h
|
||||
jdcoefct.o: jinclude.h
|
||||
jdcoefct.o: jmorecfg.h
|
||||
jdcoefct.o: jpegint.h
|
||||
jdcoefct.o: jpeglib.h
|
||||
jdcolor.o: fltk_jpeg_prefix.h
|
||||
jdcolor.o: jconfig.h
|
||||
jdcolor.o: jerror.h
|
||||
jdcolor.o: jinclude.h
|
||||
jdcolor.o: jmorecfg.h
|
||||
jdcolor.o: jpegint.h
|
||||
jdcolor.o: jpeglib.h
|
||||
jddctmgr.o: fltk_jpeg_prefix.h
|
||||
jddctmgr.o: jconfig.h
|
||||
jddctmgr.o: jdct.h
|
||||
jdhuff.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdinput.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdmainct.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdmarker.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdmaster.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdmerge.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdpostct.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdsample.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jdtrans.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jerror.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jddctmgr.o: jerror.h
|
||||
jddctmgr.o: jinclude.h
|
||||
jddctmgr.o: jmorecfg.h
|
||||
jddctmgr.o: jpegint.h
|
||||
jddctmgr.o: jpeglib.h
|
||||
jdhuff.o: fltk_jpeg_prefix.h
|
||||
jdhuff.o: jconfig.h
|
||||
jdhuff.o: jerror.h
|
||||
jdhuff.o: jinclude.h
|
||||
jdhuff.o: jmorecfg.h
|
||||
jdhuff.o: jpegint.h
|
||||
jdhuff.o: jpeglib.h
|
||||
jdinput.o: fltk_jpeg_prefix.h
|
||||
jdinput.o: jconfig.h
|
||||
jdinput.o: jerror.h
|
||||
jdinput.o: jinclude.h
|
||||
jdinput.o: jmorecfg.h
|
||||
jdinput.o: jpegint.h
|
||||
jdinput.o: jpeglib.h
|
||||
jdmainct.o: fltk_jpeg_prefix.h
|
||||
jdmainct.o: jconfig.h
|
||||
jdmainct.o: jerror.h
|
||||
jdmainct.o: jinclude.h
|
||||
jdmainct.o: jmorecfg.h
|
||||
jdmainct.o: jpegint.h
|
||||
jdmainct.o: jpeglib.h
|
||||
jdmarker.o: fltk_jpeg_prefix.h
|
||||
jdmarker.o: jconfig.h
|
||||
jdmarker.o: jerror.h
|
||||
jdmarker.o: jinclude.h
|
||||
jdmarker.o: jmorecfg.h
|
||||
jdmarker.o: jpegint.h
|
||||
jdmarker.o: jpeglib.h
|
||||
jdmaster.o: fltk_jpeg_prefix.h
|
||||
jdmaster.o: jconfig.h
|
||||
jdmaster.o: jerror.h
|
||||
jdmaster.o: jinclude.h
|
||||
jdmaster.o: jmorecfg.h
|
||||
jdmaster.o: jpegint.h
|
||||
jdmaster.o: jpeglib.h
|
||||
jdmerge.o: fltk_jpeg_prefix.h
|
||||
jdmerge.o: jconfig.h
|
||||
jdmerge.o: jerror.h
|
||||
jdmerge.o: jinclude.h
|
||||
jdmerge.o: jmorecfg.h
|
||||
jdmerge.o: jpegint.h
|
||||
jdmerge.o: jpeglib.h
|
||||
jdpostct.o: fltk_jpeg_prefix.h
|
||||
jdpostct.o: jconfig.h
|
||||
jdpostct.o: jerror.h
|
||||
jdpostct.o: jinclude.h
|
||||
jdpostct.o: jmorecfg.h
|
||||
jdpostct.o: jpegint.h
|
||||
jdpostct.o: jpeglib.h
|
||||
jdsample.o: fltk_jpeg_prefix.h
|
||||
jdsample.o: jconfig.h
|
||||
jdsample.o: jerror.h
|
||||
jdsample.o: jinclude.h
|
||||
jdsample.o: jmorecfg.h
|
||||
jdsample.o: jpegint.h
|
||||
jdsample.o: jpeglib.h
|
||||
jdtrans.o: fltk_jpeg_prefix.h
|
||||
jdtrans.o: jconfig.h
|
||||
jdtrans.o: jerror.h
|
||||
jdtrans.o: jinclude.h
|
||||
jdtrans.o: jmorecfg.h
|
||||
jdtrans.o: jpegint.h
|
||||
jdtrans.o: jpeglib.h
|
||||
jerror.o: fltk_jpeg_prefix.h
|
||||
jerror.o: jconfig.h
|
||||
jerror.o: jerror.h
|
||||
jerror.o: jinclude.h
|
||||
jerror.o: jmorecfg.h
|
||||
jerror.o: jpegint.h
|
||||
jerror.o: jpeglib.h
|
||||
jerror.o: jversion.h
|
||||
jfdctflt.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jfdctflt.o: fltk_jpeg_prefix.h
|
||||
jfdctflt.o: jconfig.h
|
||||
jfdctflt.o: jdct.h
|
||||
jfdctfst.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jfdctflt.o: jerror.h
|
||||
jfdctflt.o: jinclude.h
|
||||
jfdctflt.o: jmorecfg.h
|
||||
jfdctflt.o: jpegint.h
|
||||
jfdctflt.o: jpeglib.h
|
||||
jfdctfst.o: fltk_jpeg_prefix.h
|
||||
jfdctfst.o: jconfig.h
|
||||
jfdctfst.o: jdct.h
|
||||
jfdctint.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jfdctfst.o: jerror.h
|
||||
jfdctfst.o: jinclude.h
|
||||
jfdctfst.o: jmorecfg.h
|
||||
jfdctfst.o: jpegint.h
|
||||
jfdctfst.o: jpeglib.h
|
||||
jfdctint.o: fltk_jpeg_prefix.h
|
||||
jfdctint.o: jconfig.h
|
||||
jfdctint.o: jdct.h
|
||||
jidctflt.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jfdctint.o: jerror.h
|
||||
jfdctint.o: jinclude.h
|
||||
jfdctint.o: jmorecfg.h
|
||||
jfdctint.o: jpegint.h
|
||||
jfdctint.o: jpeglib.h
|
||||
jidctflt.o: fltk_jpeg_prefix.h
|
||||
jidctflt.o: jconfig.h
|
||||
jidctflt.o: jdct.h
|
||||
jidctfst.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jidctflt.o: jerror.h
|
||||
jidctflt.o: jinclude.h
|
||||
jidctflt.o: jmorecfg.h
|
||||
jidctflt.o: jpegint.h
|
||||
jidctflt.o: jpeglib.h
|
||||
jidctfst.o: fltk_jpeg_prefix.h
|
||||
jidctfst.o: jconfig.h
|
||||
jidctfst.o: jdct.h
|
||||
jidctint.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jidctfst.o: jerror.h
|
||||
jidctfst.o: jinclude.h
|
||||
jidctfst.o: jmorecfg.h
|
||||
jidctfst.o: jpegint.h
|
||||
jidctfst.o: jpeglib.h
|
||||
jidctint.o: fltk_jpeg_prefix.h
|
||||
jidctint.o: jconfig.h
|
||||
jidctint.o: jdct.h
|
||||
jmemmgr.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jidctint.o: jerror.h
|
||||
jidctint.o: jinclude.h
|
||||
jidctint.o: jmorecfg.h
|
||||
jidctint.o: jpegint.h
|
||||
jidctint.o: jpeglib.h
|
||||
jmemmgr.o: fltk_jpeg_prefix.h
|
||||
jmemmgr.o: jconfig.h
|
||||
jmemmgr.o: jerror.h
|
||||
jmemmgr.o: jinclude.h
|
||||
jmemmgr.o: jmemsys.h
|
||||
jmemnobs.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jmemmgr.o: jmorecfg.h
|
||||
jmemmgr.o: jpegint.h
|
||||
jmemmgr.o: jpeglib.h
|
||||
jmemnobs.o: fltk_jpeg_prefix.h
|
||||
jmemnobs.o: jconfig.h
|
||||
jmemnobs.o: jerror.h
|
||||
jmemnobs.o: jinclude.h
|
||||
jmemnobs.o: jmemsys.h
|
||||
jquant1.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jquant2.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jutils.o: jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
|
||||
jmemnobs.o: jmorecfg.h
|
||||
jmemnobs.o: jpegint.h
|
||||
jmemnobs.o: jpeglib.h
|
||||
jquant1.o: fltk_jpeg_prefix.h
|
||||
jquant1.o: jconfig.h
|
||||
jquant1.o: jerror.h
|
||||
jquant1.o: jinclude.h
|
||||
jquant1.o: jmorecfg.h
|
||||
jquant1.o: jpegint.h
|
||||
jquant1.o: jpeglib.h
|
||||
jquant2.o: fltk_jpeg_prefix.h
|
||||
jquant2.o: jconfig.h
|
||||
jquant2.o: jerror.h
|
||||
jquant2.o: jinclude.h
|
||||
jquant2.o: jmorecfg.h
|
||||
jquant2.o: jpegint.h
|
||||
jquant2.o: jpeglib.h
|
||||
jutils.o: fltk_jpeg_prefix.h
|
||||
jutils.o: jconfig.h
|
||||
jutils.o: jerror.h
|
||||
jutils.o: jinclude.h
|
||||
jutils.o: jmorecfg.h
|
||||
jutils.o: jpegint.h
|
||||
jutils.o: jpeglib.h
|
||||
|
||||
+14
-19
@@ -1,5 +1,5 @@
|
||||
libpng 1.6.37 - April 14, 2019
|
||||
==============================
|
||||
libpng 1.6.40 - June 21, 2023
|
||||
=============================
|
||||
|
||||
This is a public release of libpng, intended for use in production code.
|
||||
|
||||
@@ -9,13 +9,13 @@ Files available for download
|
||||
|
||||
Source files with LF line endings (for Unix/Linux):
|
||||
|
||||
* libpng-1.6.37.tar.xz (LZMA-compressed, recommended)
|
||||
* libpng-1.6.37.tar.gz
|
||||
* libpng-1.6.40.tar.xz (LZMA-compressed, recommended)
|
||||
* libpng-1.6.40.tar.gz
|
||||
|
||||
Source files with CRLF line endings (for Windows):
|
||||
|
||||
* lp1637.7z (LZMA-compressed, recommended)
|
||||
* lp1637.zip
|
||||
* lpng1640.7z (LZMA-compressed, recommended)
|
||||
* lpng1640.zip
|
||||
|
||||
Other information:
|
||||
|
||||
@@ -25,20 +25,15 @@ Other information:
|
||||
* TRADEMARK.md
|
||||
|
||||
|
||||
Changes since the previous public release (version 1.6.36)
|
||||
----------------------------------------------------------
|
||||
Changes from version 1.6.39 to version 1.6.40
|
||||
---------------------------------------------
|
||||
|
||||
* Fixed a use-after-free vulnerability (CVE-2019-7317) in png_image_free.
|
||||
* Fixed a memory leak in the ARM NEON implementation of png_do_expand_palette.
|
||||
* Fixed a memory leak in pngtest.c.
|
||||
* Fixed two vulnerabilities (CVE-2018-14048, CVE-2018-14550) in
|
||||
contrib/pngminus; refactor.
|
||||
* Changed the license of contrib/pngminus to MIT; refresh makefile and docs.
|
||||
(Contributed by Willem van Schaik)
|
||||
* Fixed a typo in the libpng license v2.
|
||||
(Contributed by Miguel Ojeda)
|
||||
* Added makefiles for AddressSanitizer-enabled builds.
|
||||
* Cleaned up various makefiles.
|
||||
* Fixed the eXIf chunk multiplicity checks.
|
||||
* Fixed a memory leak in pCAL processing.
|
||||
* Corrected the validity report about tRNS inside png_get_valid().
|
||||
* Fixed various build issues on *BSD, Mac and Windows.
|
||||
* Updated the configurations and the scripts for continuous integration.
|
||||
* Cleaned up the code, the build scripts, and the documentation.
|
||||
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
|
||||
|
||||
+38
-12
@@ -204,7 +204,7 @@ Version 0.97 [January, 1998]
|
||||
Added simple sRGB support (Glenn R-P)
|
||||
Easier conditional compiling, e.g.,
|
||||
define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
|
||||
all configurable options can be selected from command-line instead
|
||||
all configurable options can be selected from command line instead
|
||||
of having to edit pngconf.h (Glenn R-P)
|
||||
Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
|
||||
Added more conditions for png_do_background, to avoid changing
|
||||
@@ -942,7 +942,7 @@ Version 1.0.8 [July 24, 2000]
|
||||
Version 1.0.9beta1 [November 10, 2000]
|
||||
Fixed typo in scripts/makefile.hpux
|
||||
Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
|
||||
Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
|
||||
Fixed sequence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
|
||||
Changed "cdrom.com" in documentation to "libpng.org"
|
||||
Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg).
|
||||
Changed type of "params" from voidp to png_voidp in png_read|write_png().
|
||||
@@ -2295,7 +2295,7 @@ Version 1.4.0beta58 [May 14, 2009]
|
||||
Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri)
|
||||
|
||||
Version 1.4.0beta59 [May 15, 2009]
|
||||
Reformated sources in libpng style (3-space intentation, comment format)
|
||||
Reformatted sources in libpng style (3-space indentation, comment format)
|
||||
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
|
||||
Added sections about the git repository and our coding style to the
|
||||
documentation
|
||||
@@ -2661,7 +2661,7 @@ Version 1.4.1beta06 [January 28, 2010]
|
||||
|
||||
Version 1.4.1beta07 [February 6, 2010]
|
||||
Folded some long lines in the source files.
|
||||
Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX,
|
||||
Added definable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX,
|
||||
and a PNG_USER_LIMITS_SUPPORTED flag.
|
||||
Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as
|
||||
png_ptr->png_user_chunk_malloc_max.
|
||||
@@ -3886,7 +3886,7 @@ Version 1.6.0beta06 [January 24, 2012]
|
||||
Version 1.6.0beta07 [January 28, 2012]
|
||||
Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived)
|
||||
compiler issues slightly different warnings from those issued by the
|
||||
current vesions of GCC. This eliminates those warnings by
|
||||
current versions of GCC. This eliminates those warnings by
|
||||
adding/removing casts and small code rewrites.
|
||||
Updated configure.ac from autoupdate: added --enable-werror option.
|
||||
Also some layout regularization and removal of introduced tab characters
|
||||
@@ -3919,7 +3919,7 @@ Version 1.6.0beta08 [February 1, 2012]
|
||||
version checking to configure.ac
|
||||
Improved pngstest speed by not doing redundant tests and add const to
|
||||
the background parameter of png_image_finish_read. The --background
|
||||
option is now done automagically only when required, so that commandline
|
||||
option is now done automagically only when required, so that command-line
|
||||
option no longer exists.
|
||||
Cleaned up pngpriv.h to consistently declare all functions and data.
|
||||
Also eliminated PNG_CONST_DATA, which is apparently not needed but we
|
||||
@@ -4052,7 +4052,7 @@ Version 1.6.0beta16 [March 6, 2012]
|
||||
(in fact this is harmless, but the PNG data produced may be sub-optimal).
|
||||
|
||||
Version 1.6.0beta17 [March 10, 2012]
|
||||
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
|
||||
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
|
||||
Reject all iCCP chunks after the first, even if the first one is invalid.
|
||||
Deflate/inflate was reworked to move common zlib calls into single
|
||||
functions [rw]util.c. A new shared keyword check routine was also added
|
||||
@@ -4962,7 +4962,7 @@ Version 1.6.13beta01 [July 4, 2014]
|
||||
Changed "if defined(__ARM_NEON__)" to
|
||||
"if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu).
|
||||
Fixed clang no-warning builds: png_digit was defined but never used.
|
||||
|
||||
|
||||
Version 1.6.13beta02 [July 21, 2014]
|
||||
Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32
|
||||
(bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11.
|
||||
@@ -5453,7 +5453,7 @@ Version 1.6.21beta01 [December 11, 2015]
|
||||
Version 1.6.21beta02 [December 14, 2015]
|
||||
Moved png_check_keyword() from pngwutil.c to pngset.c
|
||||
Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
|
||||
in the BigEndian tests by not testing it, making the BE code the same
|
||||
in the BigEndian tests by not testing it, making the BE code the same
|
||||
as the LE version.
|
||||
Fixes to pngvalid for various reduced build configurations (eliminate unused
|
||||
statics) and a fix for the case in rgb_to_gray when the digitize option
|
||||
@@ -5517,7 +5517,7 @@ Version 1.6.22beta03 [March 9, 2016]
|
||||
Added a common-law trademark notice and export control information
|
||||
to the LICENSE file, png.h, and the man page.
|
||||
Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that
|
||||
were accidentally removed from libpng-1.6.17.
|
||||
were accidentally removed from libpng-1.6.17.
|
||||
Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h
|
||||
(Robert C. Seacord).
|
||||
Removed dubious "#if INT_MAX" test from png.h that was added to
|
||||
@@ -5927,7 +5927,7 @@ Version 1.6.32beta03 [August 2, 2017]
|
||||
(Bug report from the OSS-fuzz project).
|
||||
|
||||
Version 1.6.32beta04 [August 2, 2017]
|
||||
Replaced local eXIf_buf with info_ptr-eXIf_buf in png_handle_eXIf().
|
||||
Replaced local eXIf_buf with info_ptr->eXIf_buf in png_handle_eXIf().
|
||||
Update libpng.3 and libpng-manual.txt about eXIf functions.
|
||||
|
||||
Version 1.6.32beta05 [August 2, 2017]
|
||||
@@ -5950,7 +5950,7 @@ Version 1.6.32beta09 [August 3, 2017]
|
||||
Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation,
|
||||
no longer using deprecated cmake LOCATION feature (Clifford Yapp).
|
||||
Fixed five-byte error in the calculation of IDAT maximum possible size.
|
||||
|
||||
|
||||
Version 1.6.32beta10 [August 5, 2017]
|
||||
Moved chunk-length check into a png_check_chunk_length() private
|
||||
function (Suggested by Max Stepin).
|
||||
@@ -6103,6 +6103,32 @@ Version 1.6.37 [April 14, 2019]
|
||||
Added makefiles for AddressSanitizer-enabled builds.
|
||||
Cleaned up various makefiles.
|
||||
|
||||
Version 1.6.38 [September 14, 2022]
|
||||
Added configurations and scripts for continuous integration.
|
||||
Fixed various errors in the handling of tRNS, hIST and eXIf.
|
||||
Implemented many stability improvements across all platforms.
|
||||
Updated the internal documentation.
|
||||
|
||||
Version 1.6.39 [November 20, 2022]
|
||||
Changed the error handler of oversized chunks (i.e. larger than
|
||||
PNG_USER_CHUNK_MALLOC_MAX) from png_chunk_error to png_benign_error.
|
||||
Fixed a buffer overflow error in contrib/tools/pngfix.
|
||||
Fixed a memory leak (CVE-2019-6129) in contrib/tools/pngcp.
|
||||
Disabled the ARM Neon optimizations by default in the CMake file,
|
||||
following the default behavior of the configure script.
|
||||
Allowed configure.ac to work with the trunk version of autoconf.
|
||||
Removed the support for "install" targets from the legacy makefiles;
|
||||
removed the obsolete makefile.cegcc.
|
||||
Cleaned up the code and updated the internal documentation.
|
||||
|
||||
Version 1.6.40 [June 21, 2023]
|
||||
Fixed the eXIf chunk multiplicity checks.
|
||||
Fixed a memory leak in pCAL processing.
|
||||
Corrected the validity report about tRNS inside png_get_valid().
|
||||
Fixed various build issues on *BSD, Mac and Windows.
|
||||
Updated the configurations and the scripts for continuous integration.
|
||||
Cleaned up the code, the build scripts, and the documentation.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
|
||||
Subscription is required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
|
||||
+58
-23
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# PNG library CMake configuration for the Fast Light Toolkit (FLTK).
|
||||
#
|
||||
# Copyright 1998-2021 by Bill Spitzak and others.
|
||||
# Copyright 1998-2023 by Bill Spitzak and others.
|
||||
#
|
||||
# This library is free software. Distribution and use rights are outlined in
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
@@ -31,37 +31,72 @@ set(PNG_SRCS
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c
|
||||
|
||||
# build on ARM (Apple M1 systems)
|
||||
arm/arm_init.c
|
||||
arm/filter_neon_intrinsics.c
|
||||
arm/palette_neon_intrinsics.c
|
||||
)
|
||||
|
||||
#######################################################################
|
||||
FL_ADD_LIBRARY(fltk_png STATIC "${PNG_SRCS}")
|
||||
# install the png headers
|
||||
install(FILES png.h;pngconf.h;pnglibconf.h
|
||||
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
|
||||
# Note: This file is only used if we build the bundled PNG library and
|
||||
# if we do this we MUST also build and use the bundled ZLIB, hence
|
||||
# we MUST also link to the bundled ZLIB (see below).
|
||||
#######################################################################
|
||||
|
||||
#######################################################################
|
||||
# Build some files on ARM (e.g. Apple M1 systems)
|
||||
#######################################################################
|
||||
|
||||
# We can only determine the target architecture if it is set
|
||||
# in CMAKE_OSX_ARCHITECTURES, otherwise we *assume* it is true and
|
||||
# compile these files even if this results in some warnings.
|
||||
# This includes all non-macOS platforms.
|
||||
|
||||
if (CMAKE_OSX_ARCHITECTURES)
|
||||
string(REGEX MATCH "arm64" is_arm "${CMAKE_OSX_ARCHITECTURES}")
|
||||
else ()
|
||||
set (is_arm TRUE)
|
||||
endif ()
|
||||
|
||||
if (is_arm)
|
||||
LIST (APPEND PNG_SRCS
|
||||
arm/arm_init.c
|
||||
arm/filter_neon_intrinsics.c
|
||||
arm/palette_neon_intrinsics.c
|
||||
)
|
||||
endif ()
|
||||
|
||||
unset (is_arm)
|
||||
|
||||
#######################################################################
|
||||
# Build some files on ppc64
|
||||
# We compile these files whatever the architecture resulting in void code
|
||||
# on non-ppc64 architectures.
|
||||
#######################################################################
|
||||
|
||||
LIST (APPEND PNG_SRCS
|
||||
powerpc/powerpc_init.c
|
||||
powerpc/filter_vsx_intrinsics.c
|
||||
)
|
||||
|
||||
if(OPTION_USE_SYSTEM_ZLIB)
|
||||
target_link_libraries(fltk_png ${FLTK_ZLIB_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(fltk_png fltk_z)
|
||||
endif(OPTION_USE_SYSTEM_ZLIB)
|
||||
#######################################################################
|
||||
# Build the static library
|
||||
#######################################################################
|
||||
|
||||
FL_ADD_LIBRARY (fltk_png STATIC "${PNG_SRCS}")
|
||||
target_link_libraries(fltk_png PUBLIC fltk_z)
|
||||
|
||||
#######################################################################
|
||||
if(OPTION_BUILD_SHARED_LIBS)
|
||||
# Build the shared library (optional)
|
||||
#######################################################################
|
||||
FL_ADD_LIBRARY(fltk_png SHARED "${PNG_SRCS}")
|
||||
|
||||
if(OPTION_USE_SYSTEM_ZLIB)
|
||||
target_link_libraries(fltk_png_SHARED ${FLTK_ZLIB_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(fltk_png_SHARED fltk_z_SHARED)
|
||||
endif(OPTION_USE_SYSTEM_ZLIB)
|
||||
if (OPTION_BUILD_SHARED_LIBS)
|
||||
|
||||
FL_ADD_LIBRARY (fltk_png SHARED "${PNG_SRCS}")
|
||||
target_link_libraries (fltk_png_SHARED fltk_z_SHARED)
|
||||
|
||||
endif ()
|
||||
|
||||
#######################################################################
|
||||
endif(OPTION_BUILD_SHARED_LIBS)
|
||||
# Install the library headers
|
||||
#######################################################################
|
||||
|
||||
install (FILES png.h pngconf.h pnglibconf.h pngprefix.h
|
||||
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
|
||||
)
|
||||
|
||||
+43
-44
@@ -128,16 +128,18 @@ Your directory structure should look like this:
|
||||
README
|
||||
*.h, *.c => libpng source files
|
||||
CMakeLists.txt => "cmake" script
|
||||
ci
|
||||
ci_*.sh
|
||||
configuration files:
|
||||
configure.ac, configure, Makefile.am, Makefile.in,
|
||||
autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in,
|
||||
libpng-config.in, aclocal.m4, config.h.in, config.sub,
|
||||
depcomp, install-sh, mkinstalldirs, test-pngtest.sh
|
||||
depcomp, install-sh, mkinstalldirs, test-pngtest.sh, etc.
|
||||
contrib
|
||||
arm-neon, conftest, examples, gregbook, libtests, pngminim,
|
||||
pngminus, pngsuite, tools, visupng
|
||||
projects
|
||||
cbuilder5, owatcom, visualc71, vstudio, xcode
|
||||
owatcom, visualc71, vstudio
|
||||
scripts
|
||||
makefile.*
|
||||
*.def (module definition files)
|
||||
@@ -145,7 +147,7 @@ Your directory structure should look like this:
|
||||
pngtest.png
|
||||
etc.
|
||||
zlib
|
||||
README, *.h, *.c contrib, etc.
|
||||
README, *.h, *.c, contrib, etc.
|
||||
|
||||
If the line endings in the files look funny, you may wish to get the other
|
||||
distribution of libpng. It is available in both tar.gz (UNIX style line
|
||||
@@ -153,28 +155,27 @@ endings) and zip (DOS style line endings) formats.
|
||||
|
||||
VI. Building with project files
|
||||
|
||||
If you are building libpng with MSVC, you can enter the
|
||||
libpng projects\visualc71 or vstudio directory and follow the instructions
|
||||
in README.txt.
|
||||
If you are building libpng with Microsoft Visual Studio, you can enter
|
||||
the directory projects\visualc71 or projects\vstudio and follow the
|
||||
instructions in README.txt.
|
||||
|
||||
Otherwise enter the zlib directory and follow the instructions in zlib/README,
|
||||
then come back here and run "configure" or choose the appropriate
|
||||
makefile.sys in the scripts directory.
|
||||
Otherwise, enter the zlib directory and follow the instructions in
|
||||
zlib/README, then come back here and run "configure" or choose the
|
||||
appropriate makefile in the scripts directory.
|
||||
|
||||
VII. Building with makefiles
|
||||
|
||||
Copy the file (or files) that you need from the
|
||||
scripts directory into this directory, for example
|
||||
|
||||
MSDOS example:
|
||||
|
||||
copy scripts\makefile.msc makefile
|
||||
copy scripts\pnglibconf.h.prebuilt pnglibconf.h
|
||||
|
||||
UNIX example:
|
||||
|
||||
cp scripts/makefile.std makefile
|
||||
cp scripts/pnglibconf.h.prebuilt pnglibconf.h
|
||||
cp scripts/makefile.std Makefile
|
||||
make
|
||||
|
||||
Windows example:
|
||||
|
||||
nmake -f scripts\makefile.vcwin32
|
||||
|
||||
Read the makefile to see if you need to change any source or
|
||||
target directories to match your preferences.
|
||||
@@ -191,36 +192,33 @@ test. For more confidence, you can run another test by typing
|
||||
Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
|
||||
your output with the result shown in contrib/pngsuite/README.
|
||||
|
||||
Most of the makefiles will allow you to run "make install" to
|
||||
put the library in its final resting place (if you want to
|
||||
do that, run "make install" in the zlib directory first if necessary).
|
||||
Some also allow you to run "make test-installed" after you have
|
||||
run "make install".
|
||||
Most of the makefiles used to allow you to run "make install" to put
|
||||
the library in its final resting place, but that feature is no longer
|
||||
supported. The only tested and supported manners to install libpng are
|
||||
the conventional build and install procedures driven by the configure
|
||||
script or by the CMake file.
|
||||
|
||||
VIII. Configuring libpng for 16-bit platforms
|
||||
VIII. Configuring for DOS and other 16-bit platforms
|
||||
|
||||
You will want to look into zconf.h to tell zlib (and thus libpng) that
|
||||
it cannot allocate more than 64K at a time. Even if you can, the memory
|
||||
won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K.
|
||||
|
||||
IX. Configuring for DOS
|
||||
Officially, the support for 16-bit platforms has been removed.
|
||||
|
||||
For DOS users who only have access to the lower 640K, you will
|
||||
have to limit zlib's memory usage via a png_set_compression_mem_level()
|
||||
call. See zlib.h or zconf.h in the zlib library for more information.
|
||||
|
||||
X. Configuring for Medium Model
|
||||
You may be or may not be in luck if you target the "large" memory model,
|
||||
but all the smaller models ("small", "compact" and "medium") are known
|
||||
to be unworkable. For DOS users who have access beyond the lower 640K,
|
||||
a "flat" 32-bit DOS model (such as DJGPP) is strongly recommended.
|
||||
|
||||
Libpng's support for medium model has been tested on most of the popular
|
||||
compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
|
||||
defined, and FAR gets defined to far in pngconf.h, and you should be
|
||||
all set. Everything in the library (except for zlib's structure) is
|
||||
expecting far data. You must use the typedefs with the p or pp on
|
||||
the end for pointers (or at least look at them and be careful). Make
|
||||
note that the rows of data are defined as png_bytepp, which is
|
||||
an "unsigned char far * far *".
|
||||
For DOS users who only have access to the lower 640K, you will have to
|
||||
limit zlib's memory usage via a png_set_compression_mem_level() call.
|
||||
You will also have to look into zconf.h to tell zlib (and thus libpng)
|
||||
that it cannot allocate more than 64K at a time. Even if you can, the
|
||||
memory won't be accessible. Therefore, you should limit zlib and libpng
|
||||
to 64K by defining MAXSEG_64K.
|
||||
|
||||
XI. Prepending a prefix to exported symbols
|
||||
IX. Prepending a prefix to exported symbols
|
||||
|
||||
Starting with libpng-1.6.0, you can configure libpng (when using the
|
||||
"configure" script) to prefix all exported symbols by means of the
|
||||
@@ -231,7 +229,7 @@ identifier). This creates a set of macros in pnglibconf.h, so this is
|
||||
transparent to applications; their function calls get transformed by
|
||||
the macros to use the modified names.
|
||||
|
||||
XII. Configuring for compiler xxx:
|
||||
X. Configuring for compiler xxx:
|
||||
|
||||
All includes for libpng are in pngconf.h. If you need to add, change
|
||||
or delete an include, this is the place to do it.
|
||||
@@ -243,7 +241,7 @@ As of libpng-1.5.0, pngpriv.h also includes three other private header
|
||||
files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material
|
||||
that previously appeared in the public headers.
|
||||
|
||||
XIII. Removing unwanted object code
|
||||
XI. Removing unwanted object code
|
||||
|
||||
There are a bunch of #define's in pngconf.h that control what parts of
|
||||
libpng are compiled. All the defines end in _SUPPORTED. If you are
|
||||
@@ -282,7 +280,7 @@ library to fail if they call functions not available in your library.
|
||||
The size of the library itself should not be an issue, because only
|
||||
those sections that are actually used will be loaded into memory.
|
||||
|
||||
XIV. Enabling or disabling hardware optimizations
|
||||
XII. Enabling or disabling hardware optimizations
|
||||
|
||||
Certain hardware capabilities, such as the Intel SSE instructions,
|
||||
are normally detected at run time. Enable them with configure options
|
||||
@@ -332,7 +330,7 @@ or disable them all at once with
|
||||
|
||||
cmake . -DPNG_HARDWARE_OPTIMIZATIONS=no
|
||||
|
||||
XV. Changes to the build and configuration of libpng in libpng-1.5.x
|
||||
XIII. Changes to the build and configuration of libpng in libpng-1.5.x
|
||||
|
||||
Details of internal changes to the library code can be found in the CHANGES
|
||||
file and in the GIT repository logs. These will be of no concern to the vast
|
||||
@@ -423,7 +421,7 @@ $PREFIX/include directory). Do not edit pnglibconf.h after you have built
|
||||
libpng, because than the settings would not accurately reflect the settings
|
||||
that were used to build libpng.
|
||||
|
||||
XVI. Setjmp/longjmp issues
|
||||
XIV. Setjmp/longjmp issues
|
||||
|
||||
Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp()
|
||||
is known to be not thread-safe on some platforms and we don't know of
|
||||
@@ -441,7 +439,7 @@ This requires setjmp/longjmp, so you must either build the library
|
||||
with PNG_SETJMP_SUPPORTED defined, or with PNG_SIMPLIFIED_READ_SUPPORTED
|
||||
and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined.
|
||||
|
||||
XVII. Common linking failures
|
||||
XV. Common linking failures
|
||||
|
||||
If your application fails to find libpng or zlib entries while linking:
|
||||
|
||||
@@ -453,12 +451,13 @@ If your application fails to find libpng or zlib entries while linking:
|
||||
If you are using the vstudio project, observe the WARNING in
|
||||
project/vstudio/README.txt.
|
||||
|
||||
XVIII. Other sources of information about libpng:
|
||||
XVI. Other sources of information about libpng:
|
||||
|
||||
Further information can be found in the README and libpng-manual.txt
|
||||
files, in the individual makefiles, in png.h, and the manual pages
|
||||
libpng.3 and png.5.
|
||||
|
||||
Copyright (c) 2022 Cosmin Truta
|
||||
Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson
|
||||
This document is released under the libpng license.
|
||||
For conditions of distribution and use, see the disclaimer
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
||||
PNG Reference Library License version 2
|
||||
---------------------------------------
|
||||
|
||||
* Copyright (c) 1995-2019 The PNG Reference Library Authors.
|
||||
* Copyright (c) 2018-2019 Cosmin Truta.
|
||||
* Copyright (c) 1995-2023 The PNG Reference Library Authors.
|
||||
* Copyright (c) 2018-2023 Cosmin Truta.
|
||||
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
||||
* Copyright (c) 1996-1997 Andreas Dilger.
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
||||
+11
-4
@@ -2,7 +2,7 @@
|
||||
# PNG library Makefile for the Fast Light Toolkit (FLTK).
|
||||
#
|
||||
# Copyright 1997-2011 by Easy Software Products.
|
||||
# Copyright 2012-2020 by Bill Spitzak and others.
|
||||
# Copyright 2012-2023 by Bill Spitzak and others.
|
||||
#
|
||||
# This library is free software. Distribution and use rights are outlined in
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
@@ -24,7 +24,8 @@ include ../makeinclude
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
pngwtran.o pngmem.o pngerror.o pngpread.o \
|
||||
arm/arm_init.o arm/filter_neon_intrinsics.o arm/palette_neon_intrinsics.o
|
||||
arm/arm_init.o arm/filter_neon_intrinsics.o arm/palette_neon_intrinsics.o \
|
||||
powerpc/powerpc_init.o powerpc/filter_vsx_intrinsics.o
|
||||
|
||||
LIBPNG = ../lib/libfltk_png$(LIBEXT)
|
||||
|
||||
@@ -59,6 +60,7 @@ install: $(LIBPNG)
|
||||
$(INSTALL_DATA) png.h $(DESTDIR)$(includedir)/FL/images
|
||||
$(INSTALL_DATA) pngconf.h $(DESTDIR)$(includedir)/FL/images
|
||||
$(INSTALL_DATA) pnglibconf.h $(DESTDIR)$(includedir)/FL/images
|
||||
$(INSTALL_DATA) pngprefix.h $(DESTDIR)$(includedir)/FL/images
|
||||
|
||||
|
||||
#
|
||||
@@ -72,6 +74,7 @@ uninstall:
|
||||
$(RM) $(DESTDIR)$(includedir)/FL/images/png.h
|
||||
$(RM) $(DESTDIR)$(includedir)/FL/images/pngconf.h
|
||||
$(RM) $(DESTDIR)$(includedir)/FL/images/pnglibconf.h
|
||||
$(RM) $(DESTDIR)$(includedir)/FL/images/pngprefix.h
|
||||
|
||||
|
||||
#
|
||||
@@ -89,8 +92,12 @@ $(LIBPNG): $(OBJS)
|
||||
# Make dependencies...
|
||||
#
|
||||
|
||||
depend: $(OBJS:.o=.c)
|
||||
makedepend -Y -I.. -f makedepend $(OBJS:.o=.c)
|
||||
depend: $(OBJS:.o=.c)
|
||||
makedepend -Y -I.. -f makedepend -w 20 $(OBJS:.o=.c)
|
||||
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
|
||||
echo "" >> makedepend.tmp
|
||||
grep '^[a-zA-Z]' makedepend | ( LC_ALL=C sort -u -f >> makedepend.tmp; )
|
||||
mv makedepend.tmp makedepend
|
||||
|
||||
include makedepend
|
||||
|
||||
|
||||
+148
-149
@@ -1,57 +1,88 @@
|
||||
README for libpng version 1.6.37 - April 14, 2019
|
||||
=================================================
|
||||
README for libpng version 1.6.40
|
||||
================================
|
||||
|
||||
See the note about version numbers near the top of png.h.
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
See the note about version numbers near the top of `png.h`.
|
||||
See `INSTALL` for instructions on how to install libpng.
|
||||
|
||||
Libpng comes in several distribution formats. Get libpng-*.tar.gz or
|
||||
libpng-*.tar.xz or if you want UNIX-style line endings in the text
|
||||
files, or lpng*.7z or lpng*.zip if you want DOS-style line endings.
|
||||
Libpng comes in several distribution formats. Get `libpng-*.tar.gz`
|
||||
or `libpng-*.tar.xz` if you want UNIX-style line endings in the text
|
||||
files, or `lpng*.7z` or `lpng*.zip` if you want DOS-style line endings.
|
||||
|
||||
Version 0.89 was the first official release of libpng. Don't let the
|
||||
fact that it's the first release fool you. The libpng library has been
|
||||
in extensive use and testing since mid-1995. By late 1997 it had
|
||||
finally gotten to the stage where there hadn't been significant
|
||||
changes to the API in some time, and people have a bad feeling about
|
||||
libraries with versions < 1.0. Version 1.0.0 was released in
|
||||
March 1998.
|
||||
For a detailed description on using libpng, read `libpng-manual.txt`.
|
||||
For examples of libpng in a program, see `example.c` and `pngtest.c`.
|
||||
For usage information and restrictions (what little they are) on libpng,
|
||||
see `png.h`. For a description on using zlib (the compression library
|
||||
used by libpng) and zlib's restrictions, see `zlib.h`.
|
||||
|
||||
****
|
||||
Note that some of the changes to the png_info structure render this
|
||||
You should use zlib 1.0.4 or later to run this, but it _may_ work with
|
||||
versions as old as zlib 0.95. Even so, there are bugs in older zlib
|
||||
versions which can cause the output of invalid compression streams for
|
||||
some images.
|
||||
|
||||
You should also note that zlib is a compression library that is useful
|
||||
for more things than just PNG files. You can use zlib as a drop-in
|
||||
replacement for `fread()` and `fwrite()`, if you are so inclined.
|
||||
|
||||
zlib should be available at the same place that libpng is, or at
|
||||
https://zlib.net .
|
||||
|
||||
You may also want a copy of the PNG specification. It is available
|
||||
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
|
||||
these at http://www.libpng.org/pub/png/pngdocs.html .
|
||||
|
||||
This code is currently being archived at https://libpng.sourceforge.io
|
||||
in the download area, and at http://libpng.download/src .
|
||||
|
||||
This release, based in a large way on Glenn's, Guy's and Andreas'
|
||||
earlier work, was created and will be supported by myself and the PNG
|
||||
development group.
|
||||
|
||||
Send comments, corrections and commendations to `png-mng-implement`
|
||||
at `lists.sourceforge.net`. (Subscription is required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe.)
|
||||
|
||||
Send general questions about the PNG specification to `png-mng-misc`
|
||||
at `lists.sourceforge.net`. (Subscription is required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-misc
|
||||
to subscribe.)
|
||||
|
||||
Historical notes
|
||||
----------------
|
||||
|
||||
The libpng library has been in extensive use and testing since mid-1995.
|
||||
Version 0.89, published a year later, was the first official release.
|
||||
By late 1997, it had finally gotten to the stage where there hadn't
|
||||
been significant changes to the API in some time, and people have a bad
|
||||
feeling about libraries with versions below 1.0. Version 1.0.0 was
|
||||
released in March 1998.
|
||||
|
||||
Note that some of the changes to the `png_info` structure render this
|
||||
version of the library binary incompatible with libpng-0.89 or
|
||||
earlier versions if you are using a shared library. The type of the
|
||||
"filler" parameter for png_set_filler() has changed from png_byte to
|
||||
png_uint_32, which will affect shared-library applications that use
|
||||
this function.
|
||||
`filler` parameter for `png_set_filler()` has changed from `png_byte`
|
||||
to `png_uint_32`, which will affect shared-library applications that
|
||||
use this function.
|
||||
|
||||
To avoid problems with changes to the internals of the png info_struct,
|
||||
To avoid problems with changes to the internals of the `info_struct`,
|
||||
new APIs have been made available in 0.95 to avoid direct application
|
||||
access to info_ptr. These functions are the png_set_<chunk> and
|
||||
png_get_<chunk> functions. These functions should be used when
|
||||
accessing/storing the info_struct data, rather than manipulating it
|
||||
access to `info_ptr`. These functions are the `png_set_<chunk>` and
|
||||
`png_get_<chunk>` functions. These functions should be used when
|
||||
accessing/storing the `info_struct` data, rather than manipulating it
|
||||
directly, to avoid such problems in the future.
|
||||
|
||||
It is important to note that the APIs did not make current programs
|
||||
that access the info struct directly incompatible with the new
|
||||
library, through libpng-1.2.x. In libpng-1.4.x, which was meant to
|
||||
be a transitional release, members of the png_struct and the
|
||||
info_struct can still be accessed, but the compiler will issue a
|
||||
be a transitional release, members of the `png_struct` and the
|
||||
`info_struct` can still be accessed, but the compiler will issue a
|
||||
warning about deprecated usage. Since libpng-1.5.0, direct access
|
||||
to these structs is not allowed, and the definitions of the structs
|
||||
reside in private pngstruct.h and pnginfo.h header files that are not
|
||||
accessible to applications. It is strongly suggested that new
|
||||
programs use the new APIs (as shown in example.c and pngtest.c), and
|
||||
older programs be converted to the new format, to facilitate upgrades
|
||||
in the future.
|
||||
****
|
||||
|
||||
Additions since 0.90 include the ability to compile libpng as a
|
||||
Windows DLL, and new APIs for accessing data in the info struct.
|
||||
Experimental functions include the ability to set weighting and cost
|
||||
factors for row filter selection, direct reads of integers from buffers
|
||||
on big-endian processors that support misaligned data access, faster
|
||||
methods of doing alpha composition, and more accurate 16->8 bit color
|
||||
conversion.
|
||||
reside in private `pngstruct.h` and `pnginfo.h` header files that are
|
||||
not accessible to applications. It is strongly suggested that new
|
||||
programs use the new APIs (as shown in `example.c` and `pngtest.c`),
|
||||
and older programs be converted to the new format, to facilitate
|
||||
upgrades in the future.
|
||||
|
||||
The additions since 0.89 include the ability to read from a PNG stream
|
||||
which has had some (or all) of the signature bytes read by the calling
|
||||
@@ -61,118 +92,86 @@ the library action on the detection of chunk CRC errors. It is possible
|
||||
to set different actions based on whether the CRC error occurred in a
|
||||
critical or an ancillary chunk.
|
||||
|
||||
For a detailed description on using libpng, read libpng-manual.txt.
|
||||
For examples of libpng in a program, see example.c and pngtest.c. For
|
||||
usage information and restrictions (what little they are) on libpng,
|
||||
see png.h. For a description on using zlib (the compression library
|
||||
used by libpng) and zlib's restrictions, see zlib.h
|
||||
The additions since 0.90 include the ability to compile libpng as a
|
||||
Windows DLL, and new APIs for accessing data in the `info_struct`.
|
||||
Experimental functions included the ability to set weighting and cost
|
||||
factors for row filter selection, direct reads of integers from buffers
|
||||
on big-endian processors that support misaligned data access, faster
|
||||
methods of doing alpha composition, and more accurate 16-to-8 bit color
|
||||
conversion. Some of these experimental functions, such as the weighted
|
||||
filter heuristics, have since been removed.
|
||||
|
||||
I have included a general makefile, as well as several machine and
|
||||
compiler specific ones, but you may have to modify one for your own
|
||||
needs.
|
||||
Files included in this distribution
|
||||
-----------------------------------
|
||||
|
||||
You should use zlib 1.0.4 or later to run this, but it MAY work with
|
||||
versions as old as zlib 0.95. Even so, there are bugs in older zlib
|
||||
versions which can cause the output of invalid compression streams for
|
||||
some images.
|
||||
|
||||
You should also note that zlib is a compression library that is useful
|
||||
for more things than just PNG files. You can use zlib as a drop-in
|
||||
replacement for fread() and fwrite(), if you are so inclined.
|
||||
|
||||
zlib should be available at the same place that libpng is, or at
|
||||
https://zlib.net.
|
||||
|
||||
You may also want a copy of the PNG specification. It is available
|
||||
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
|
||||
these at http://www.libpng.org/pub/png/pngdocs.html .
|
||||
|
||||
This code is currently being archived at libpng.sourceforge.io in the
|
||||
[DOWNLOAD] area, and at http://libpng.download/src .
|
||||
|
||||
This release, based in a large way on Glenn's, Guy's and Andreas'
|
||||
earlier work, was created and will be supported by myself and the PNG
|
||||
development group.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at
|
||||
lists.sourceforge.net (subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe).
|
||||
|
||||
Send general questions about the PNG specification to png-mng-misc
|
||||
at lists.sourceforge.net (subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-misc to
|
||||
subscribe).
|
||||
|
||||
Files in this distribution:
|
||||
|
||||
ANNOUNCE => Announcement of this version, with recent changes
|
||||
AUTHORS => List of contributing authors
|
||||
CHANGES => Description of changes between libpng versions
|
||||
KNOWNBUG => List of known bugs and deficiencies
|
||||
LICENSE => License to use and redistribute libpng
|
||||
README => This file
|
||||
TODO => Things not implemented in the current library
|
||||
TRADEMARK => Trademark information
|
||||
example.c => Example code for using libpng functions
|
||||
libpng.3 => manual page for libpng (includes libpng-manual.txt)
|
||||
libpng-manual.txt => Description of libpng and its functions
|
||||
libpngpf.3 => manual page for libpng's private functions
|
||||
png.5 => manual page for the PNG format
|
||||
png.c => Basic interface functions common to library
|
||||
png.h => Library function and interface declarations (public)
|
||||
pngpriv.h => Library function and interface declarations (private)
|
||||
pngconf.h => System specific library configuration (public)
|
||||
pngstruct.h => png_struct declaration (private)
|
||||
pnginfo.h => png_info struct declaration (private)
|
||||
pngdebug.h => debugging macros (private)
|
||||
pngerror.c => Error/warning message I/O functions
|
||||
pngget.c => Functions for retrieving info from struct
|
||||
pngmem.c => Memory handling functions
|
||||
pngbar.png => PNG logo, 88x31
|
||||
pngnow.png => PNG logo, 98x31
|
||||
pngpread.c => Progressive reading functions
|
||||
pngread.c => Read data/helper high-level functions
|
||||
pngrio.c => Lowest-level data read I/O functions
|
||||
pngrtran.c => Read data transformation functions
|
||||
pngrutil.c => Read data utility functions
|
||||
pngset.c => Functions for storing data into the info_struct
|
||||
pngtest.c => Library test program
|
||||
pngtest.png => Library test sample image
|
||||
pngtrans.c => Common data transformation functions
|
||||
pngwio.c => Lowest-level write I/O functions
|
||||
pngwrite.c => High-level write functions
|
||||
pngwtran.c => Write data transformations
|
||||
pngwutil.c => Write utility functions
|
||||
arm => Contains optimized code for the ARM platform
|
||||
powerpc => Contains optimized code for the PowerPC platform
|
||||
contrib => Contributions
|
||||
arm-neon => Optimized code for ARM-NEON platform
|
||||
powerpc-vsx => Optimized code for POWERPC-VSX platform
|
||||
examples => Example programs
|
||||
gregbook => source code for PNG reading and writing, from
|
||||
Greg Roelofs' "PNG: The Definitive Guide",
|
||||
O'Reilly, 1999
|
||||
libtests => Test programs
|
||||
mips-msa => Optimized code for MIPS-MSA platform
|
||||
pngminim => Minimal decoder, encoder, and progressive decoder
|
||||
programs demonstrating use of pngusr.dfa
|
||||
pngminus => Simple pnm2png and png2pnm programs
|
||||
pngsuite => Test images
|
||||
testpngs
|
||||
tools => Various tools
|
||||
visupng => Contains a MSVC workspace for VisualPng
|
||||
intel => Optimized code for INTEL-SSE2 platform
|
||||
mips => Optimized code for MIPS platform
|
||||
projects => Contains project files and workspaces for
|
||||
building a DLL
|
||||
owatcom => Contains a WATCOM project for building libpng
|
||||
visualc71 => Contains a Microsoft Visual C++ (MSVC)
|
||||
workspace for building libpng and zlib
|
||||
vstudio => Contains a Microsoft Visual C++ (MSVC)
|
||||
workspace for building libpng and zlib
|
||||
scripts => Directory containing scripts for building libpng:
|
||||
(see scripts/README.txt for the list of scripts)
|
||||
ANNOUNCE => Announcement of this version, with recent changes
|
||||
AUTHORS => List of contributing authors
|
||||
CHANGES => Description of changes between libpng versions
|
||||
INSTALL => Instructions to install libpng
|
||||
LICENSE => License to use and redistribute libpng
|
||||
README => This file
|
||||
TODO => Things not implemented in the current library
|
||||
TRADEMARK => Trademark information
|
||||
example.c => Example code for using libpng functions
|
||||
libpng.3 => Manual page for libpng (includes libpng-manual.txt)
|
||||
libpng-manual.txt => Description of libpng and its functions
|
||||
libpngpf.3 => Manual page for libpng's private functions (deprecated)
|
||||
png.5 => Manual page for the PNG format
|
||||
png.c => Basic interface functions common to library
|
||||
png.h => Library function and interface declarations (public)
|
||||
pngpriv.h => Library function and interface declarations (private)
|
||||
pngconf.h => System specific library configuration (public)
|
||||
pngstruct.h => png_struct declaration (private)
|
||||
pnginfo.h => png_info struct declaration (private)
|
||||
pngdebug.h => debugging macros (private)
|
||||
pngerror.c => Error/warning message I/O functions
|
||||
pngget.c => Functions for retrieving info from struct
|
||||
pngmem.c => Memory handling functions
|
||||
pngbar.png => PNG logo, 88x31
|
||||
pngnow.png => PNG logo, 98x31
|
||||
pngpread.c => Progressive reading functions
|
||||
pngread.c => Read data/helper high-level functions
|
||||
pngrio.c => Lowest-level data read I/O functions
|
||||
pngrtran.c => Read data transformation functions
|
||||
pngrutil.c => Read data utility functions
|
||||
pngset.c => Functions for storing data into the info_struct
|
||||
pngtest.c => Library test program
|
||||
pngtest.png => Library test sample image
|
||||
pngtrans.c => Common data transformation functions
|
||||
pngwio.c => Lowest-level write I/O functions
|
||||
pngwrite.c => High-level write functions
|
||||
pngwtran.c => Write data transformations
|
||||
pngwutil.c => Write utility functions
|
||||
arm/ => Optimized code for the ARM platform
|
||||
intel/ => Optimized code for the INTEL-SSE2 platform
|
||||
mips/ => Optimized code for the MIPS platform
|
||||
powerpc/ => Optimized code for the PowerPC platform
|
||||
ci/ => Scripts for continuous integration
|
||||
contrib/ => External contributions
|
||||
arm-neon/ => Optimized code for the ARM-NEON platform
|
||||
mips-msa/ => Optimized code for the MIPS-MSA platform
|
||||
powerpc-vsx/ => Optimized code for the POWERPC-VSX platform
|
||||
examples/ => Examples of libpng usage
|
||||
gregbook/ => Source code for PNG reading and writing, from
|
||||
"PNG: The Definitive Guide" by Greg Roelofs,
|
||||
O'Reilly, 1999
|
||||
libtests/ => Test programs
|
||||
oss-fuzz/ => Files used by the OSS-Fuzz project for fuzz-testing
|
||||
libpng
|
||||
pngminim/ => Minimal decoder, encoder, and progressive decoder
|
||||
programs demonstrating the use of pngusr.dfa
|
||||
pngminus/ => Simple pnm2png and png2pnm programs
|
||||
pngsuite/ => Test images
|
||||
testpngs/ => Test images
|
||||
tools/ => Various tools
|
||||
visupng/ => VisualPng, a Windows viewer for PNG images
|
||||
projects/ => Project files and workspaces for various IDEs
|
||||
owatcom/ => OpenWatcom project
|
||||
visualc71/ => Microsoft Visual C++ 7.1 workspace
|
||||
vstudio/ => Microsoft Visual Studio workspace
|
||||
scripts/ => Scripts and makefiles for building libpng
|
||||
(see scripts/README.txt for the complete list)
|
||||
tests/ => Test scripts
|
||||
|
||||
Good luck, and happy coding!
|
||||
|
||||
|
||||
+17
-14
@@ -1,7 +1,7 @@
|
||||
|
||||
/* arm_init.c - NEON optimised filter functions
|
||||
*
|
||||
* Copyright (c) 2018 Cosmin Truta
|
||||
* Copyright (c) 2018-2022 Cosmin Truta
|
||||
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
|
||||
* Written by Mans Rullgard, 2011.
|
||||
*
|
||||
@@ -10,9 +10,7 @@
|
||||
* and license in png.h
|
||||
*/
|
||||
|
||||
/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are
|
||||
* called.
|
||||
*/
|
||||
/* This module requires POSIX 1003.1 functions. */
|
||||
#define _POSIX_SOURCE 1
|
||||
|
||||
#include "../pngpriv.h"
|
||||
@@ -33,21 +31,26 @@
|
||||
* has partial support is contrib/arm-neon/linux.c - a generic Linux
|
||||
* implementation which reads /proc/cpufino.
|
||||
*/
|
||||
#include <signal.h> /* for sig_atomic_t */
|
||||
|
||||
#ifndef PNG_ARM_NEON_FILE
|
||||
# ifdef __linux__
|
||||
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
|
||||
# if defined(__aarch64__) || defined(_M_ARM64)
|
||||
/* ARM Neon is expected to be unconditionally available on ARM64. */
|
||||
# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64"
|
||||
# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
|
||||
/* ARM Neon is expected to be available on the target CPU architecture. */
|
||||
# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch"
|
||||
# elif defined(__linux__)
|
||||
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
|
||||
# else
|
||||
# error "No support for run-time ARM Neon checking; use compile-time options"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef PNG_ARM_NEON_FILE
|
||||
|
||||
#include <signal.h> /* for sig_atomic_t */
|
||||
static int png_have_neon(png_structp png_ptr);
|
||||
#include PNG_ARM_NEON_FILE
|
||||
|
||||
#else /* PNG_ARM_NEON_FILE */
|
||||
# error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks"
|
||||
#endif /* PNG_ARM_NEON_FILE */
|
||||
#ifdef PNG_ARM_NEON_FILE
|
||||
# include PNG_ARM_NEON_FILE
|
||||
#endif
|
||||
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
||||
|
||||
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/* This code requires -mfpu=neon on the command line: */
|
||||
#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
|
||||
|
||||
#if defined(_MSC_VER) && defined(_M_ARM64)
|
||||
#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
||||
# include <arm64_neon.h>
|
||||
#else
|
||||
# include <arm_neon.h>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#if PNG_ARM_NEON_IMPLEMENTATION == 1
|
||||
|
||||
#if defined(_MSC_VER) && defined(_M_ARM64)
|
||||
#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
||||
# include <arm64_neon.h>
|
||||
#else
|
||||
# include <arm_neon.h>
|
||||
@@ -30,8 +30,6 @@ png_riffle_palette_neon(png_structrp png_ptr)
|
||||
int num_trans = png_ptr->num_trans;
|
||||
int i;
|
||||
|
||||
png_debug(1, "in png_riffle_palette_neon");
|
||||
|
||||
/* Initially black, opaque. */
|
||||
uint8x16x4_t w = {{
|
||||
vdupq_n_u8(0x00),
|
||||
@@ -40,6 +38,8 @@ png_riffle_palette_neon(png_structrp png_ptr)
|
||||
vdupq_n_u8(0xff),
|
||||
}};
|
||||
|
||||
png_debug(1, "in png_riffle_palette_neon");
|
||||
|
||||
/* First, riffle the RGB colours into an RGBA8 palette.
|
||||
* The alpha component is set to opaque for now.
|
||||
*/
|
||||
@@ -65,11 +65,12 @@ png_do_expand_palette_rgba8_neon(png_structrp png_ptr, png_row_infop row_info,
|
||||
png_uint_32 row_width = row_info->width;
|
||||
const png_uint_32 *riffled_palette =
|
||||
(const png_uint_32 *)png_ptr->riffled_palette;
|
||||
const png_int_32 pixels_per_chunk = 4;
|
||||
int i;
|
||||
const png_uint_32 pixels_per_chunk = 4;
|
||||
png_uint_32 i;
|
||||
|
||||
png_debug(1, "in png_do_expand_palette_rgba8_neon");
|
||||
|
||||
PNG_UNUSED(row)
|
||||
if (row_width < pixels_per_chunk)
|
||||
return 0;
|
||||
|
||||
@@ -109,10 +110,11 @@ png_do_expand_palette_rgb8_neon(png_structrp png_ptr, png_row_infop row_info,
|
||||
png_uint_32 row_width = row_info->width;
|
||||
png_const_bytep palette = (png_const_bytep)png_ptr->palette;
|
||||
const png_uint_32 pixels_per_chunk = 8;
|
||||
int i;
|
||||
png_uint_32 i;
|
||||
|
||||
png_debug(1, "in png_do_expand_palette_rgb8_neon");
|
||||
|
||||
PNG_UNUSED(row)
|
||||
if (row_width <= pixels_per_chunk)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Copyright (c) 2018-2019 Cosmin Truta
|
||||
Copyright (c) 2018-2023 Cosmin Truta
|
||||
Copyright (c) 1998-2018 Glenn Randers-Pehrson
|
||||
|
||||
This document is released under the libpng license.
|
||||
@@ -9,9 +9,9 @@ libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng version 1.6.36, December 2018, through 1.6.37 - April 2019
|
||||
libpng version 1.6.36, December 2018, through 1.6.40 - June 2023
|
||||
Updated and distributed by Cosmin Truta
|
||||
Copyright (c) 2018-2019 Cosmin Truta
|
||||
Copyright (c) 2018-2023 Cosmin Truta
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.6.35 - July 2018
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
@@ -877,7 +877,7 @@ described below (the latter being the two common names for associated alpha
|
||||
color channels). Note that PNG files always contain non-associated color
|
||||
channels; png_set_alpha_mode() with one of the modes causes the decoder to
|
||||
convert the pixels to an associated form before returning them to your
|
||||
application.
|
||||
application.
|
||||
|
||||
Since it is not necessary to perform arithmetic on opaque color values so
|
||||
long as they are not to be resampled and are in the final color space it is
|
||||
@@ -1792,7 +1792,7 @@ the information. If, instead, you want to convert the image to an opaque
|
||||
version with no alpha channel use png_set_background; see below.
|
||||
|
||||
As of libpng version 1.5.2, almost all useful expansions are supported, the
|
||||
major ommissions are conversion of grayscale to indexed images (which can be
|
||||
major omissions are conversion of grayscale to indexed images (which can be
|
||||
done trivially in the application) and conversion of indexed to grayscale (which
|
||||
can be done by a trivial manipulation of the palette.)
|
||||
|
||||
|
||||
+22
-32
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "April 14, 2019"
|
||||
.TH LIBPNG 3 "June 21, 2023"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.37
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.40
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
@@ -519,7 +519,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
||||
.SH LIBPNG.TXT
|
||||
libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Copyright (c) 2018-2019 Cosmin Truta
|
||||
Copyright (c) 2018-2023 Cosmin Truta
|
||||
Copyright (c) 1998-2018 Glenn Randers-Pehrson
|
||||
|
||||
This document is released under the libpng license.
|
||||
@@ -528,9 +528,9 @@ libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng version 1.6.36, December 2018, through 1.6.37 - April 2019
|
||||
libpng version 1.6.36, December 2018, through 1.6.40 - June 2023
|
||||
Updated and distributed by Cosmin Truta
|
||||
Copyright (c) 2018-2019 Cosmin Truta
|
||||
Copyright (c) 2018-2023 Cosmin Truta
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.6.35 - July 2018
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
@@ -1396,7 +1396,7 @@ described below (the latter being the two common names for associated alpha
|
||||
color channels). Note that PNG files always contain non-associated color
|
||||
channels; png_set_alpha_mode() with one of the modes causes the decoder to
|
||||
convert the pixels to an associated form before returning them to your
|
||||
application.
|
||||
application.
|
||||
|
||||
Since it is not necessary to perform arithmetic on opaque color values so
|
||||
long as they are not to be resampled and are in the final color space it is
|
||||
@@ -2311,7 +2311,7 @@ the information. If, instead, you want to convert the image to an opaque
|
||||
version with no alpha channel use png_set_background; see below.
|
||||
|
||||
As of libpng version 1.5.2, almost all useful expansions are supported, the
|
||||
major ommissions are conversion of grayscale to indexed images (which can be
|
||||
major omissions are conversion of grayscale to indexed images (which can be
|
||||
done trivially in the application) and conversion of indexed to grayscale (which
|
||||
can be done by a trivial manipulation of the palette.)
|
||||
|
||||
@@ -5995,35 +5995,25 @@ letter, until version 1.0.6j; from then on they were given the upcoming
|
||||
public release number plus "betaNN" or "rcNN".
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.IR libpngpf(3) ", " png(5)
|
||||
.LP
|
||||
.IR libpng :
|
||||
.BR "png"(5)
|
||||
.IP
|
||||
https://libpng.sourceforge.io/ (follow the [DOWNLOAD] link)
|
||||
http://www.libpng.org/pub/png
|
||||
|
||||
The PNG (Portable Network Graphics) format specification.
|
||||
.LP
|
||||
.IR zlib :
|
||||
.B libpng
|
||||
.IP
|
||||
(generally) at the same location as
|
||||
.I libpng
|
||||
or at
|
||||
http://www.libpng.org/pub/png/libpng.html (canonical home page)
|
||||
.br
|
||||
https://zlib.net/
|
||||
|
||||
https://github.com/pnggroup/libpng (canonical Git repository)
|
||||
.br
|
||||
https://libpng.sourceforge.io (downloadable archives)
|
||||
.LP
|
||||
.IR PNG specification: RFC 2083
|
||||
.B zlib
|
||||
.IP
|
||||
(generally) at the same location as
|
||||
.I libpng
|
||||
or at
|
||||
https://zlib.net (canonical home page)
|
||||
.br
|
||||
https://www.ietf.org/rfc/rfc2083.txt
|
||||
https://github.com/madler/zlib (canonical Git repository)
|
||||
.br
|
||||
or (as a W3C Recommendation) at
|
||||
.br
|
||||
https://www.w3.org/TR/REC-png.html
|
||||
|
||||
A copy of zlib may also be found at the same location as libpng.
|
||||
.LP
|
||||
In the case of any inconsistency between the PNG specification
|
||||
and this library, the specification takes precedence.
|
||||
@@ -6043,10 +6033,10 @@ Libpng:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Maintained by Cosmin Truta.
|
||||
|
||||
Supported by the PNG development group
|
||||
Supported by the PNG development group.
|
||||
.br
|
||||
png-mng-implement at lists.sourceforge.net (subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe).
|
||||
png-mng-implement at lists.sourceforge.net. (Subscription is required;
|
||||
visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe.)
|
||||
|
||||
.\" end of man page
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNGPF 3 "April 14, 2019"
|
||||
.TH LIBPNGPF 3 "June 21, 2023"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.37
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.40
|
||||
(private functions)
|
||||
|
||||
.SH SYNOPSIS
|
||||
|
||||
+160
-36
@@ -1,38 +1,162 @@
|
||||
# DO NOT DELETE
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
png.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
png.o: pngdebug.h
|
||||
pngset.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngset.o: pngdebug.h
|
||||
pngget.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngget.o: pngdebug.h
|
||||
pngrutil.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngrutil.o: pngdebug.h
|
||||
pngtrans.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngtrans.o: pngdebug.h
|
||||
pngwutil.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngwutil.o: pngdebug.h
|
||||
pngread.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngread.o: pngdebug.h
|
||||
pngrio.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngrio.o: pngdebug.h
|
||||
pngwio.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngwio.o: pngdebug.h
|
||||
pngwrite.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngwrite.o: pngdebug.h
|
||||
pngrtran.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngrtran.o: pngdebug.h
|
||||
pngwtran.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngwtran.o: pngdebug.h
|
||||
pngmem.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngmem.o: pngdebug.h
|
||||
pngerror.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngerror.o: pngdebug.h
|
||||
pngpread.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
pngpread.o: pngdebug.h
|
||||
arm/arm_init.o: pngpriv.h pnglibconf.h png.h pngconf.h pngstruct.h pnginfo.h
|
||||
arm/arm_init.o: png.h
|
||||
arm/arm_init.o: pngconf.h
|
||||
arm/arm_init.o: pngdebug.h
|
||||
arm/filter_neon_intrinsics.o: pngpriv.h pnglibconf.h png.h pngconf.h
|
||||
arm/filter_neon_intrinsics.o: pngstruct.h pnginfo.h pngdebug.h
|
||||
arm/palette_neon_intrinsics.o: pngpriv.h pnglibconf.h png.h pngconf.h
|
||||
arm/palette_neon_intrinsics.o: pngstruct.h pnginfo.h pngdebug.h
|
||||
arm/arm_init.o: pnginfo.h
|
||||
arm/arm_init.o: pnglibconf.h
|
||||
arm/arm_init.o: pngprefix.h
|
||||
arm/arm_init.o: pngpriv.h
|
||||
arm/arm_init.o: pngstruct.h
|
||||
arm/filter_neon_intrinsics.o: png.h
|
||||
arm/filter_neon_intrinsics.o: pngconf.h
|
||||
arm/filter_neon_intrinsics.o: pngdebug.h
|
||||
arm/filter_neon_intrinsics.o: pnginfo.h
|
||||
arm/filter_neon_intrinsics.o: pnglibconf.h
|
||||
arm/filter_neon_intrinsics.o: pngprefix.h
|
||||
arm/filter_neon_intrinsics.o: pngpriv.h
|
||||
arm/filter_neon_intrinsics.o: pngstruct.h
|
||||
arm/palette_neon_intrinsics.o: png.h
|
||||
arm/palette_neon_intrinsics.o: pngconf.h
|
||||
arm/palette_neon_intrinsics.o: pngdebug.h
|
||||
arm/palette_neon_intrinsics.o: pnginfo.h
|
||||
arm/palette_neon_intrinsics.o: pnglibconf.h
|
||||
arm/palette_neon_intrinsics.o: pngprefix.h
|
||||
arm/palette_neon_intrinsics.o: pngpriv.h
|
||||
arm/palette_neon_intrinsics.o: pngstruct.h
|
||||
png.o: png.h
|
||||
png.o: pngconf.h
|
||||
png.o: pngdebug.h
|
||||
png.o: pnginfo.h
|
||||
png.o: pnglibconf.h
|
||||
png.o: pngprefix.h
|
||||
png.o: pngpriv.h
|
||||
png.o: pngstruct.h
|
||||
pngerror.o: png.h
|
||||
pngerror.o: pngconf.h
|
||||
pngerror.o: pngdebug.h
|
||||
pngerror.o: pnginfo.h
|
||||
pngerror.o: pnglibconf.h
|
||||
pngerror.o: pngprefix.h
|
||||
pngerror.o: pngpriv.h
|
||||
pngerror.o: pngstruct.h
|
||||
pngget.o: png.h
|
||||
pngget.o: pngconf.h
|
||||
pngget.o: pngdebug.h
|
||||
pngget.o: pnginfo.h
|
||||
pngget.o: pnglibconf.h
|
||||
pngget.o: pngprefix.h
|
||||
pngget.o: pngpriv.h
|
||||
pngget.o: pngstruct.h
|
||||
pngmem.o: png.h
|
||||
pngmem.o: pngconf.h
|
||||
pngmem.o: pngdebug.h
|
||||
pngmem.o: pnginfo.h
|
||||
pngmem.o: pnglibconf.h
|
||||
pngmem.o: pngprefix.h
|
||||
pngmem.o: pngpriv.h
|
||||
pngmem.o: pngstruct.h
|
||||
pngpread.o: png.h
|
||||
pngpread.o: pngconf.h
|
||||
pngpread.o: pngdebug.h
|
||||
pngpread.o: pnginfo.h
|
||||
pngpread.o: pnglibconf.h
|
||||
pngpread.o: pngprefix.h
|
||||
pngpread.o: pngpriv.h
|
||||
pngpread.o: pngstruct.h
|
||||
pngread.o: png.h
|
||||
pngread.o: pngconf.h
|
||||
pngread.o: pngdebug.h
|
||||
pngread.o: pnginfo.h
|
||||
pngread.o: pnglibconf.h
|
||||
pngread.o: pngprefix.h
|
||||
pngread.o: pngpriv.h
|
||||
pngread.o: pngstruct.h
|
||||
pngrio.o: png.h
|
||||
pngrio.o: pngconf.h
|
||||
pngrio.o: pngdebug.h
|
||||
pngrio.o: pnginfo.h
|
||||
pngrio.o: pnglibconf.h
|
||||
pngrio.o: pngprefix.h
|
||||
pngrio.o: pngpriv.h
|
||||
pngrio.o: pngstruct.h
|
||||
pngrtran.o: png.h
|
||||
pngrtran.o: pngconf.h
|
||||
pngrtran.o: pngdebug.h
|
||||
pngrtran.o: pnginfo.h
|
||||
pngrtran.o: pnglibconf.h
|
||||
pngrtran.o: pngprefix.h
|
||||
pngrtran.o: pngpriv.h
|
||||
pngrtran.o: pngstruct.h
|
||||
pngrutil.o: png.h
|
||||
pngrutil.o: pngconf.h
|
||||
pngrutil.o: pngdebug.h
|
||||
pngrutil.o: pnginfo.h
|
||||
pngrutil.o: pnglibconf.h
|
||||
pngrutil.o: pngprefix.h
|
||||
pngrutil.o: pngpriv.h
|
||||
pngrutil.o: pngstruct.h
|
||||
pngset.o: png.h
|
||||
pngset.o: pngconf.h
|
||||
pngset.o: pngdebug.h
|
||||
pngset.o: pnginfo.h
|
||||
pngset.o: pnglibconf.h
|
||||
pngset.o: pngprefix.h
|
||||
pngset.o: pngpriv.h
|
||||
pngset.o: pngstruct.h
|
||||
pngtrans.o: png.h
|
||||
pngtrans.o: pngconf.h
|
||||
pngtrans.o: pngdebug.h
|
||||
pngtrans.o: pnginfo.h
|
||||
pngtrans.o: pnglibconf.h
|
||||
pngtrans.o: pngprefix.h
|
||||
pngtrans.o: pngpriv.h
|
||||
pngtrans.o: pngstruct.h
|
||||
pngwio.o: png.h
|
||||
pngwio.o: pngconf.h
|
||||
pngwio.o: pngdebug.h
|
||||
pngwio.o: pnginfo.h
|
||||
pngwio.o: pnglibconf.h
|
||||
pngwio.o: pngprefix.h
|
||||
pngwio.o: pngpriv.h
|
||||
pngwio.o: pngstruct.h
|
||||
pngwrite.o: png.h
|
||||
pngwrite.o: pngconf.h
|
||||
pngwrite.o: pngdebug.h
|
||||
pngwrite.o: pnginfo.h
|
||||
pngwrite.o: pnglibconf.h
|
||||
pngwrite.o: pngprefix.h
|
||||
pngwrite.o: pngpriv.h
|
||||
pngwrite.o: pngstruct.h
|
||||
pngwtran.o: png.h
|
||||
pngwtran.o: pngconf.h
|
||||
pngwtran.o: pngdebug.h
|
||||
pngwtran.o: pnginfo.h
|
||||
pngwtran.o: pnglibconf.h
|
||||
pngwtran.o: pngprefix.h
|
||||
pngwtran.o: pngpriv.h
|
||||
pngwtran.o: pngstruct.h
|
||||
pngwutil.o: png.h
|
||||
pngwutil.o: pngconf.h
|
||||
pngwutil.o: pngdebug.h
|
||||
pngwutil.o: pnginfo.h
|
||||
pngwutil.o: pnglibconf.h
|
||||
pngwutil.o: pngprefix.h
|
||||
pngwutil.o: pngpriv.h
|
||||
pngwutil.o: pngstruct.h
|
||||
powerpc/filter_vsx_intrinsics.o: png.h
|
||||
powerpc/filter_vsx_intrinsics.o: pngconf.h
|
||||
powerpc/filter_vsx_intrinsics.o: pngdebug.h
|
||||
powerpc/filter_vsx_intrinsics.o: pnginfo.h
|
||||
powerpc/filter_vsx_intrinsics.o: pnglibconf.h
|
||||
powerpc/filter_vsx_intrinsics.o: pngprefix.h
|
||||
powerpc/filter_vsx_intrinsics.o: pngpriv.h
|
||||
powerpc/filter_vsx_intrinsics.o: pngstruct.h
|
||||
powerpc/powerpc_init.o: png.h
|
||||
powerpc/powerpc_init.o: pngconf.h
|
||||
powerpc/powerpc_init.o: pngdebug.h
|
||||
powerpc/powerpc_init.o: pnginfo.h
|
||||
powerpc/powerpc_init.o: pnglibconf.h
|
||||
powerpc/powerpc_init.o: pngprefix.h
|
||||
powerpc/powerpc_init.o: pngpriv.h
|
||||
powerpc/powerpc_init.o: pngstruct.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "April 14, 2019"
|
||||
.TH PNG 5 "June 21, 2023"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
|
||||
@@ -18,7 +18,7 @@ Also, PNG can store gamma and chromaticity data for improved color
|
||||
matching on heterogeneous platforms.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
|
||||
.BR "libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
|
||||
.LP
|
||||
PNG Specification (Second Edition), November 2003:
|
||||
.IP
|
||||
@@ -43,7 +43,7 @@ or W3C Recommendation
|
||||
https://www.w3.org/TR/REC-png-961001
|
||||
|
||||
.SH AUTHORS
|
||||
This man page: Cosmin Truta, Glenn Randers-Pehrson
|
||||
This man page: Glenn Randers-Pehrson, Cosmin Truta
|
||||
.LP
|
||||
Portable Network Graphics (PNG) Specification (Second Edition)
|
||||
Information technology - Computer graphics and image processing -
|
||||
@@ -51,34 +51,9 @@ Portable Network Graphics (PNG): Functional specification.
|
||||
ISO/IEC 15948:2003 (E) (November 10, 2003): David Duce and others.
|
||||
.LP
|
||||
Portable Network Graphics (PNG) Specification Version 1.2 (July 8, 1999):
|
||||
Glenn Randers-Pehrson and others (png-list).
|
||||
Glenn Randers-Pehrson and others.
|
||||
.LP
|
||||
Portable Network Graphics (PNG) Specification Version 1.0 (October 1, 1996):
|
||||
Thomas Boutell and others (png-list).
|
||||
Thomas Boutell and others.
|
||||
|
||||
.SH COPYRIGHT
|
||||
.LP
|
||||
This man page is
|
||||
.br
|
||||
Copyright (c) 2018-2019 Cosmin Truta.
|
||||
.br
|
||||
Copyright (c) 1998-2006 Glenn Randers-Pehrson.
|
||||
.br
|
||||
See png.h for conditions of use and distribution.
|
||||
.LP
|
||||
The PNG Specification (Second Edition) is
|
||||
.br
|
||||
Copyright (c) 2003 W3C. (MIT, ERCIM, Keio), All Rights Reserved.
|
||||
.LP
|
||||
The PNG-1.2 Specification is
|
||||
.br
|
||||
Copyright (c) 1999 Glenn Randers-Pehrson.
|
||||
.br
|
||||
See the specification for conditions of use and distribution.
|
||||
.LP
|
||||
The PNG-1.0 Specification is
|
||||
.br
|
||||
Copyright (c) 1996 Massachusetts Institute of Technology.
|
||||
.br
|
||||
See the specification for conditions of use and distribution.
|
||||
.\" end of man page
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user