Author: tfaber
Date: Sun Jun 18 12:19:52 2017
New Revision: 75089
URL: http://svn.reactos.org/svn/reactos?rev=75089&view=rev
Log:
[LIBPNG]
- Update to version 1.6.29
CORE-13451
Modified:
trunk/reactos/dll/3rdparty/libpng/docs/ANNOUNCE
trunk/reactos/dll/3rdparty/libpng/docs/CHANGES
trunk/reactos/dll/3rdparty/libpng/docs/LICENSE
trunk/reactos/dll/3rdparty/libpng/docs/README
trunk/reactos/dll/3rdparty/libpng/docs/TODO
trunk/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt
trunk/reactos/dll/3rdparty/libpng/png.c
trunk/reactos/dll/3rdparty/libpng/pngpriv.h
trunk/reactos/dll/3rdparty/libpng/pngrtran.c
trunk/reactos/dll/3rdparty/libpng/pngrutil.c
trunk/reactos/dll/3rdparty/libpng/pngwutil.c
trunk/reactos/sdk/include/reactos/libs/libpng/png.h
trunk/reactos/sdk/include/reactos/libs/libpng/pngconf.h
trunk/reactos/sdk/include/reactos/libs/libpng/pnglibconf.h
Modified: trunk/reactos/dll/3rdparty/libpng/docs/ANNOUNCE
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/A…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/docs/ANNOUNCE [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/docs/ANNOUNCE [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,4 +1,4 @@
-Libpng 1.6.28 - January 5, 2017
+Libpng 1.6.29 - March 16, 2017
This is a public release of libpng, intended for use in production codes.
@@ -7,28 +7,37 @@
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.6.28.tar.xz (LZMA-compressed, recommended)
- libpng-1.6.28.tar.gz
+ libpng-1.6.29.tar.xz (LZMA-compressed, recommended)
+ libpng-1.6.29.tar.gz
Source files with CRLF line endings (for Windows), without the
"configure" script
- lpng1628.7z (LZMA-compressed, recommended)
- lpng1628.zip
+ lpng1629.7z (LZMA-compressed, recommended)
+ lpng1629.zip
Other information:
- libpng-1.6.28-README.txt
- libpng-1.6.28-LICENSE.txt
- libpng-1.6.28-*.asc (armored detached GPG signatures)
+ libpng-1.6.29-README.txt
+ libpng-1.6.29-LICENSE.txt
+ libpng-1.6.29-*.asc (armored detached GPG signatures)
-Changes since the last public release (1.6.27):
- Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna).
- Added option to Cmake build allowing a custom location of zlib to be
- specified in a scenario where libpng is being built as a subproject
- alongside zlib by another project (Sam Serrels).
- Changed png_ptr->options from a png_byte to png_uint_32, to accomodate
- up to 16 options.
+Changes since the last public release (1.6.28):
+
+ Readded "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna).
+ Moved SSE2 optimization code into the main libpng source directory.
+ Configure libpng with "configure --enable-intel-sse" or compile
+ libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it.
+ Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt).
+ Avoid conditional directives that break statements in pngrutil.c (Romero
+ Malaquias)
+ The contrib/examples/pngtopng.c recovery code was in the wrong "if"
+ branches; the comments were correct.
+ Added code for PowerPC VSX optimisation (Vadim Barkov).
+ Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer).
+ Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c
+ because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1.
+ Suppress clang warnings about implicit sign changes in png.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
Modified: trunk/reactos/dll/3rdparty/libpng/docs/CHANGES
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/C…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/docs/CHANGES [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/docs/CHANGES [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -5794,6 +5794,29 @@
Version 1.6.28 [January 5, 2017]
No changes.
+Version 1.6.29beta01 [January 12, 2017]
+ Readded "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna).
+ Moved SSE2 optimization code into the main libpng source directory.
+ Configure libpng with "configure --enable-intel-sse" or compile
+ libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it.
+ Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt).
+
+Version 1.6.29beta02 [February 22, 2017]
+ Avoid conditional directives that break statements in pngrutil.c (Romero
+ Malaquias)
+ The contrib/examples/pngtopng.c recovery code was in the wrong "if"
+ branches; the comments were correct.
+ Added code for PowerPC VSX optimisation (Vadim Barkov).
+
+Version 1.6.29beta03 [March 1, 2017]
+ Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer).
+ Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c
+ because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1.
+ Suppress clang warnings about implicit sign changes in png.c
+
+Version 1.6.29 [March 16, 2017]
+ No changes.
+
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
Modified: trunk/reactos/dll/3rdparty/libpng/docs/LICENSE
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/L…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/docs/LICENSE [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/docs/LICENSE [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -10,7 +10,7 @@
This code is released under the libpng license.
-libpng versions 1.0.7, July 1, 2000 through 1.6.28, January 5, 2017 are
+libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
@@ -23,6 +23,8 @@
Gilles Vollant
James Yu
Mandar Sahastrabuddhe
+ Google Inc.
+ Vadim Barkov
and with the following additions to the disclaimer:
@@ -128,4 +130,4 @@
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-January 5, 2017
+March 16, 2017
Modified: trunk/reactos/dll/3rdparty/libpng/docs/README
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/R…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/docs/README [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/docs/README [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,4 +1,4 @@
-README for libpng version 1.6.28 - January 5, 2017 (shared library 16.0)
+README for libpng version 1.6.29 - March 16, 2017 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@@ -179,14 +179,16 @@
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
- intel => Optimized code for INTEL-SSE2 platform
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
@@ -194,6 +196,8 @@
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
Modified: trunk/reactos/dll/3rdparty/libpng/docs/TODO
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/T…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/docs/TODO [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/docs/TODO [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -25,5 +25,6 @@
Investigate pre-incremented loop counters and other loop constructions.
Add interpolated method of handling interlacing.
Extend pngvalid.c to validate more of the libpng transformations.
+Refactor preprocessor conditionals to compile entire statements
*/
Modified: trunk/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/l…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.6.28 - January 5, 2017
+ libpng version 1.6.29 - March 16, 2017
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@
Based on:
- libpng versions 0.97, January 1998, through 1.6.28 - January 5, 2017
+ libpng versions 0.97, January 1998, through 1.6.29 - March 16, 2017
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@@ -5355,7 +5355,7 @@
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.6.28 are Y2K compliant. It is my belief that earlier
+upward through 1.6.29 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer
Modified: trunk/reactos/dll/3rdparty/libpng/png.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/png.c?…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/png.c [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/png.c [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.6.28 [January 5, 2017]
+ * Last changed in libpng 1.6.29 [March 16, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_28 Your_png_h_is_not_version_1_6_28;
+typedef png_libpng_version_1_6_29 Your_png_h_is_not_version_1_6_29;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -776,14 +776,14 @@
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.6.28 - January 5, 2017" PNG_STRING_NEWLINE \
+ "libpng version 1.6.29 - March 16, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
- return "libpng version 1.6.28 - January 5, 2017\
+ return "libpng version 1.6.29 - March 16, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -4260,13 +4260,13 @@
if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT &&
(option & 1) == 0)
{
- png_uint_32 mask = 3 << option;
- png_uint_32 setting = (2 + (onoff != 0)) << option;
+ png_uint_32 mask = 3U << option;
+ png_uint_32 setting = (2U + (onoff != 0)) << option;
png_uint_32 current = png_ptr->options;
png_ptr->options = (png_uint_32)(((current & ~mask) | setting) & 0xff);
- return (current & mask) >> option;
+ return (int)(current & mask) >> option;
}
return PNG_OPTION_INVALID;
Modified: trunk/reactos/dll/3rdparty/libpng/pngpriv.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/pngpri…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/pngpriv.h [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/pngpriv.h [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,8 +1,8 @@
/* pngpriv.h - private declarations for use inside libpng
*
- * Last changed in libpng 1.6.26 [October 20, 2016]
- * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.29 [March 16, 2017]
+ * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -190,6 +190,50 @@
# endif
#endif
+#ifndef PNG_POWERPC_VSX_OPT
+# if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__)
+# define PNG_POWERPC_VSX_OPT 2
+# else
+# define PNG_POWERPC_VSX_OPT 0
+# endif
+#endif
+
+#ifndef PNG_INTEL_SSE_OPT
+# ifdef PNG_INTEL_SSE
+ /* Only check for SSE if the build configuration has been modified to
+ * enable SSE optimizations. This means that these optimizations will
+ * be off by default. See contrib/intel for more details.
+ */
+# if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \
+ defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
+ (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
+# define PNG_INTEL_SSE_OPT 1
+# endif
+# endif
+#endif
+
+#if PNG_INTEL_SSE_OPT > 0
+# ifndef PNG_INTEL_SSE_IMPLEMENTATION
+# if defined(__SSE4_1__) || defined(__AVX__)
+ /* We are not actually using AVX, but checking for AVX is the best
+ way we can detect SSE4.1 and SSSE3 on MSVC.
+ */
+# define PNG_INTEL_SSE_IMPLEMENTATION 3
+# elif defined(__SSSE3__)
+# define PNG_INTEL_SSE_IMPLEMENTATION 2
+# elif defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
+ (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
+# define PNG_INTEL_SSE_IMPLEMENTATION 1
+# else
+# define PNG_INTEL_SSE_IMPLEMENTATION 0
+# endif
+# endif
+
+# if PNG_INTEL_SSE_IMPLEMENTATION > 0
+# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2
+# endif
+#endif
+
#if PNG_MIPS_MSA_OPT > 0
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_msa
# ifndef PNG_MIPS_MSA_IMPLEMENTATION
@@ -209,6 +253,11 @@
# define PNG_MIPS_MSA_IMPLEMENTATION 1
# endif
#endif /* PNG_MIPS_MSA_OPT > 0 */
+
+#if PNG_POWERPC_VSX_OPT > 0
+# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx
+# define PNG_POWERPC_VSX_IMPLEMENTATION 1
+#endif
/* Is this a build of a DLL where compilation of the object modules requires
@@ -1256,6 +1305,38 @@
row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
#endif
+#if PNG_POWERPC_VSX_OPT > 0
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_vsx,(png_row_infop row_info,
+ png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_vsx,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_vsx,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_vsx,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_vsx,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_vsx,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_vsx,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+#endif
+
+#if PNG_INTEL_SSE_IMPLEMENTATION > 0
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_sse2,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_sse2,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_sse2,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_sse2,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_sse2,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_sse2,(png_row_infop
+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
+#endif
+
/* Choose the best filter to use and filter the row data */
PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr,
png_row_infop row_info),PNG_EMPTY);
@@ -1991,6 +2072,11 @@
PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_msa,
(png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
#endif
+
+# if PNG_INTEL_SSE_IMPLEMENTATION > 0
+PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2,
+ (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
+# endif
#endif
PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,
Modified: trunk/reactos/dll/3rdparty/libpng/pngrtran.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/pngrtr…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/pngrtran.c [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/pngrtran.c [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,8 +1,8 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.6.24 [August 4, 2016]
- * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.29 [March 16, 2017]
+ * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -4302,7 +4302,7 @@
if (num_trans > 0)
{
sp = row + (png_size_t)row_width - 1;
- dp = row + (png_size_t)(row_width << 2) - 1;
+ dp = row + ((png_size_t)row_width << 2) - 1;
for (i = 0; i < row_width; i++)
{
@@ -4463,7 +4463,7 @@
{
gray = gray & 0xff;
sp = row + (png_size_t)row_width - 1;
- dp = row + (png_size_t)(row_width << 1) - 1;
+ dp = row + ((png_size_t)row_width << 1) - 1;
for (i = 0; i < row_width; i++)
{
@@ -4519,7 +4519,7 @@
png_byte green = (png_byte)(trans_color->green & 0xff);
png_byte blue = (png_byte)(trans_color->blue & 0xff);
sp = row + (png_size_t)row_info->rowbytes - 1;
- dp = row + (png_size_t)(row_width << 2) - 1;
+ dp = row + ((png_size_t)row_width << 2) - 1;
for (i = 0; i < row_width; i++)
{
if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue)
@@ -4542,7 +4542,7 @@
png_byte green_low = (png_byte)(trans_color->green & 0xff);
png_byte blue_low = (png_byte)(trans_color->blue & 0xff);
sp = row + row_info->rowbytes - 1;
- dp = row + (png_size_t)(row_width << 3) - 1;
+ dp = row + ((png_size_t)row_width << 3) - 1;
for (i = 0; i < row_width; i++)
{
if (*(sp - 5) == red_high &&
Modified: trunk/reactos/dll/3rdparty/libpng/pngrutil.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/pngrut…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/pngrutil.c [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/pngrutil.c [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,8 +1,8 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.6.27 [January 5, 2017]
- * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.29 [March 16, 2017]
+ * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -418,7 +418,7 @@
png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED;
}
-#if ZLIB_VERNUM >= 0x1281 && \
+#if ZLIB_VERNUM >= 0x1290 && \
defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32)
if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON)
/* Turn off validation of the ADLER32 checksum in IDAT chunks */
Modified: trunk/reactos/dll/3rdparty/libpng/pngwutil.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/pngwut…
==============================================================================
--- trunk/reactos/dll/3rdparty/libpng/pngwutil.c [iso-8859-1] (original)
+++ trunk/reactos/dll/3rdparty/libpng/pngwutil.c [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -675,6 +675,7 @@
int interlace_type)
{
png_byte buf[13]; /* Buffer to store the IHDR info */
+ int is_invalid_depth;
png_debug(1, "in png_write_IHDR");
@@ -700,11 +701,11 @@
break;
case PNG_COLOR_TYPE_RGB:
+ is_invalid_depth = (bit_depth != 8);
#ifdef PNG_WRITE_16BIT_SUPPORTED
- if (bit_depth != 8 && bit_depth != 16)
-#else
- if (bit_depth != 8)
-#endif
+ is_invalid_depth = (is_invalid_depth && bit_depth != 16);
+#endif
+ if (is_invalid_depth)
png_error(png_ptr, "Invalid bit depth for RGB image");
png_ptr->channels = 3;
@@ -726,18 +727,22 @@
break;
case PNG_COLOR_TYPE_GRAY_ALPHA:
- if (bit_depth != 8 && bit_depth != 16)
+ is_invalid_depth = (bit_depth != 8);
+#ifdef PNG_WRITE_16BIT_SUPPORTED
+ is_invalid_depth = (is_invalid_depth && bit_depth != 16);
+#endif
+ if (is_invalid_depth)
png_error(png_ptr, "Invalid bit depth for grayscale+alpha image");
png_ptr->channels = 2;
break;
case PNG_COLOR_TYPE_RGB_ALPHA:
+ is_invalid_depth = (bit_depth != 8);
#ifdef PNG_WRITE_16BIT_SUPPORTED
- if (bit_depth != 8 && bit_depth != 16)
-#else
- if (bit_depth != 8)
-#endif
+ is_invalid_depth = (is_invalid_depth && bit_depth != 16);
+#endif
+ if (is_invalid_depth)
png_error(png_ptr, "Invalid bit depth for RGBA image");
png_ptr->channels = 4;
Modified: trunk/reactos/sdk/include/reactos/libs/libpng/png.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/libs/l…
==============================================================================
--- trunk/reactos/sdk/include/reactos/libs/libpng/png.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/reactos/libs/libpng/png.h [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.6.28, January 5, 2017
+ * libpng version 1.6.29, March 16, 2017
*
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -12,7 +12,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.6.28, January 5, 2017:
+ * libpng versions 0.97, January 1998, through 1.6.29, March 16, 2017:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@@ -25,7 +25,7 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.0.7, July 1, 2000 through 1.6.28, January 5, 2017 are
+ * libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals
@@ -38,6 +38,8 @@
* Gilles Vollant
* James Yu
* Mandar Sahastrabuddhe
+ * Google Inc.
+ * Vadim Barkov
*
* and with the following additions to the disclaimer:
*
@@ -211,7 +213,7 @@
* ...
* 1.5.28 15 10527 15.so.15.28[.0]
* ...
- * 1.6.28 16 10628 16.so.16.28[.0]
+ * 1.6.29 16 10629 16.so.16.29[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -239,13 +241,13 @@
* Y2K compliance in libpng:
* =========================
*
- * January 5, 2017
+ * March 16, 2017
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.6.28 are Y2K compliant. It is my belief that
+ * upward through 1.6.29 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -307,8 +309,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.28"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.28 - January 5, 2017\n"
+#define PNG_LIBPNG_VER_STRING "1.6.29"
+#define PNG_HEADER_VERSION_STRING " libpng version 1.6.29 - March 16, 2017\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -316,7 +318,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
-#define PNG_LIBPNG_VER_RELEASE 28
+#define PNG_LIBPNG_VER_RELEASE 29
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -347,7 +349,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
-#define PNG_LIBPNG_VER 10628 /* 1.6.28 */
+#define PNG_LIBPNG_VER 10629 /* 1.6.29 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -457,7 +459,7 @@
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef char* png_libpng_version_1_6_28;
+typedef char* png_libpng_version_1_6_29;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@@ -3224,7 +3226,10 @@
# define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */
#endif
#define PNG_IGNORE_ADLER32 8
-#define PNG_OPTION_NEXT 10 /* Next option - numbers must be even */
+#ifdef PNG_POWERPC_VSX_API_SUPPORTED
+# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions supported */
+#endif
+#define PNG_OPTION_NEXT 12 /* Next option - numbers must be even */
/* Return values: NOTE: there are four values and 'off' is *not* zero */
#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
Modified: trunk/reactos/sdk/include/reactos/libs/libpng/pngconf.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/libs/l…
==============================================================================
--- trunk/reactos/sdk/include/reactos/libs/libpng/pngconf.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/reactos/libs/libpng/pngconf.h [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.6.28, January 5, 2017
+ * libpng version 1.6.29, March 16, 2017
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
Modified: trunk/reactos/sdk/include/reactos/libs/libpng/pnglibconf.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/libs/l…
==============================================================================
--- trunk/reactos/sdk/include/reactos/libs/libpng/pnglibconf.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/reactos/libs/libpng/pnglibconf.h [iso-8859-1] Sun Jun 18 12:19:52 2017
@@ -1,8 +1,8 @@
-/* libpng 1.6.28 STANDARD API DEFINITION */
+/* libpng 1.6.29 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
-/* Libpng version 1.6.28 - January 5, 2017 */
+/* Libpng version 1.6.29 - March 16, 2017 */
/* Copyright (c) 1998-2015 Glenn Randers-Pehrson */
@@ -20,6 +20,8 @@
#define PNG_ALIGNED_MEMORY_SUPPORTED
/*#undef PNG_ARM_NEON_API_SUPPORTED*/
/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
+/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/
+/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/
#define PNG_BENIGN_ERRORS_SUPPORTED
#define PNG_BENIGN_READ_ERRORS_SUPPORTED
/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/
Author: tfaber
Date: Sun Jun 18 11:41:14 2017
New Revision: 75088
URL: http://svn.reactos.org/svn/reactos?rev=75088&view=rev
Log:
[LIBSAMPLERATE]
- Update to version 1.0.9
CORE-13451
Added:
trunk/reactos/sdk/lib/3rdparty/libsamplerate/COPYING (with props)
Modified:
trunk/reactos/sdk/lib/3rdparty/libsamplerate/common.h
trunk/reactos/sdk/lib/3rdparty/libsamplerate/config.h
trunk/reactos/sdk/lib/3rdparty/libsamplerate/fastest_coeffs.h
trunk/reactos/sdk/lib/3rdparty/libsamplerate/float_cast.h
trunk/reactos/sdk/lib/3rdparty/libsamplerate/high_qual_coeffs.h
trunk/reactos/sdk/lib/3rdparty/libsamplerate/mid_qual_coeffs.h
trunk/reactos/sdk/lib/3rdparty/libsamplerate/samplerate.c
trunk/reactos/sdk/lib/3rdparty/libsamplerate/samplerate.h
trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_linear.c
trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_sinc.c
trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_zoh.c
trunk/reactos/sdk/lib/3rdparty/libsamplerate/unistd.h
Added: trunk/reactos/sdk/lib/3rdparty/libsamplerate/COPYING
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/COPYING (added)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/COPYING [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -0,0 +1,25 @@
+Copyright (c) 2012-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Propchange: trunk/reactos/sdk/lib/3rdparty/libsamplerate/COPYING
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/common.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/common.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/common.h [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,25 +1,9 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
#ifndef COMMON_H_INCLUDED
@@ -99,6 +83,7 @@
SRC_ERR_NULL_CALLBACK,
SRC_ERR_NO_VARIABLE_RATIO,
SRC_ERR_SINC_PREPARE_DATA_BAD_LEN,
+ SRC_ERR_BAD_INTERNAL_STATE,
/* This must be the last error number. */
SRC_ERR_MAX_ERROR
@@ -129,7 +114,7 @@
src_callback_t callback_func ;
void *user_callback_data ;
long saved_frames ;
- float *saved_data ;
+ const float *saved_data ;
} SRC_PRIVATE ;
/* In src_sinc.c */
@@ -165,5 +150,11 @@
return res ;
} /* fmod_one */
+static inline int
+is_bad_src_ratio (double ratio)
+{ return (ratio < (1.0 / SRC_MAX_RATIO) || ratio > (1.0 * SRC_MAX_RATIO)) ;
+} /* is_bad_src_ratio */
+
+
#endif /* COMMON_H_INCLUDED */
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/config.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/config.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/config.h [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,19 +1,9 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
+**
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
/*
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/fastest_coeffs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/fastest_coeffs.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/fastest_coeffs.h [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,25 +1,9 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
/*
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/float_cast.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/float_cast.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/float_cast.h [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,19 +1,9 @@
/*
-** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU Lesser General Public License as published by
-** the Free Software Foundation; either version 2.1 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU Lesser General Public License for more details.
-**
-** You should have received a copy of the GNU Lesser General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+** Copyright (c) 2001-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
+**
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
/* Version 1.5 */
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/high_qual_coeffs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/high_qual_coeffs.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/high_qual_coeffs.h [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,25 +1,9 @@
/*
-** Copyright (C) 2007-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2007-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
/*
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/mid_qual_coeffs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/mid_qual_coeffs.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/mid_qual_coeffs.h [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,25 +1,9 @@
/*
-** Copyright (C) 2007-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2007-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
/*
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/samplerate.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/samplerate.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/samplerate.c [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,36 +1,15 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
-*/
-
#include "precomp.h"
static int psrc_set_converter (SRC_PRIVATE *psrc, int converter_type) ;
-
-static inline int
-is_bad_src_ratio (double ratio)
-{ return (ratio < (1.0 / SRC_MAX_RATIO) || ratio > (1.0 * SRC_MAX_RATIO)) ;
-} /* is_bad_src_ratio */
SRC_STATE *
src_new (int converter_type, int channels, int *error)
@@ -285,6 +264,20 @@
return SRC_ERR_NO_ERROR ;
} /* src_set_ratio */
+
+int
+src_get_channels (SRC_STATE *state)
+{ SRC_PRIVATE *psrc ;
+
+ psrc = (SRC_PRIVATE*) state ;
+
+ if (psrc == NULL)
+ return SRC_ERR_BAD_STATE ;
+ if (psrc->vari_process == NULL || psrc->const_process == NULL)
+ return SRC_ERR_BAD_PROC_PTR ;
+
+ return psrc->channels ;
+} /* src_get_channels */
int
src_reset (SRC_STATE *state)
@@ -381,7 +374,7 @@
case SRC_ERR_BAD_DATA :
return "SRC_DATA pointer is NULL." ;
case SRC_ERR_BAD_DATA_PTR :
- return "SRC_DATA->data_out is NULL." ;
+ return "SRC_DATA->data_out or SRC_DATA->data_in is NULL." ;
case SRC_ERR_NO_PRIVATE :
return "Internal error. No private data." ;
@@ -418,6 +411,8 @@
return "This converter only allows constant conversion ratios." ;
case SRC_ERR_SINC_PREPARE_DATA_BAD_LEN :
return "Internal error : Bad length in prepare_data ()." ;
+ case SRC_ERR_BAD_INTERNAL_STATE :
+ return "Error : Someone is trampling on my internal state." ;
case SRC_ERR_MAX_ERROR :
return "Placeholder. No error defined for this error number." ;
@@ -445,7 +440,7 @@
error = src_process (src_state, src_data) ;
- src_state = src_delete (src_state) ;
+ src_delete (src_state) ;
return error ;
} /* src_simple */
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/samplerate.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/samplerate.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/samplerate.h [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,25 +1,9 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
/*
@@ -40,7 +24,8 @@
/* SRC_DATA is used to pass data to src_simple() and src_process(). */
typedef struct
-{ float *data_in, *data_out ;
+{ const float *data_in ;
+ float *data_out ;
long input_frames, output_frames ;
long input_frames_used, output_frames_gen ;
@@ -49,12 +34,6 @@
double src_ratio ;
} SRC_DATA ;
-
-/* SRC_CB_DATA is used with callback based API. */
-typedef struct
-{ long frames ;
- float *data_in ;
-} SRC_CB_DATA ;
/*
** User supplied callback function type for use with src_callback_new()
@@ -137,6 +116,13 @@
int src_set_ratio (SRC_STATE *state, double new_ratio) ;
/*
+** Get the current channel count.
+** Returns negative on error, positive channel count otherwise
+*/
+
+int src_get_channels (SRC_STATE *state) ;
+
+/*
** Reset the internal SRC state.
** Does not modify the quality settings.
** Does not free any memory allocations.
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_linear.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_linear.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_linear.c [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,25 +1,9 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
#include "precomp.h"
@@ -72,6 +56,10 @@
priv->in_used = priv->out_gen = 0 ;
src_ratio = psrc->last_ratio ;
+
+ if (is_bad_src_ratio (src_ratio))
+ return SRC_ERR_BAD_INTERNAL_STATE ;
+
input_index = psrc->last_position ;
/* Calculate samples before first sample in input array. */
@@ -177,10 +165,11 @@
if (psrc->private_data == NULL)
{ priv = calloc (1, sizeof (*priv) + psrc->channels * sizeof (float)) ;
- if (priv == NULL)
- return SRC_ERR_MALLOC_FAILED ;
psrc->private_data = priv ;
} ;
+
+ if (priv == NULL)
+ return SRC_ERR_MALLOC_FAILED ;
priv->linear_magic_marker = LINEAR_MAGIC_MARKER ;
priv->channels = psrc->channels ;
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_sinc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_sinc.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_sinc.c [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,25 +1,9 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
#include "precomp.h"
@@ -136,7 +120,7 @@
return "Band limited sinc interpolation, medium quality, 121dB SNR, 90% BW." ;
case SRC_SINC_BEST_QUALITY :
- return "Band limited sinc interpolation, best quality, 145dB SNR, 96% BW." ;
+ return "Band limited sinc interpolation, best quality, 144dB SNR, 96% BW." ;
default :
break ;
@@ -195,19 +179,19 @@
switch (src_enum)
{ case SRC_SINC_FASTEST :
temp_filter.coeffs = fastest_coeffs.coeffs ;
- temp_filter.coeff_half_len = ARRAY_LEN (fastest_coeffs.coeffs) - 1 ;
+ temp_filter.coeff_half_len = ARRAY_LEN (fastest_coeffs.coeffs) - 2 ;
temp_filter.index_inc = fastest_coeffs.increment ;
break ;
case SRC_SINC_MEDIUM_QUALITY :
temp_filter.coeffs = slow_mid_qual_coeffs.coeffs ;
- temp_filter.coeff_half_len = ARRAY_LEN (slow_mid_qual_coeffs.coeffs) - 1 ;
+ temp_filter.coeff_half_len = ARRAY_LEN (slow_mid_qual_coeffs.coeffs) - 2 ;
temp_filter.index_inc = slow_mid_qual_coeffs.increment ;
break ;
case SRC_SINC_BEST_QUALITY :
temp_filter.coeffs = slow_high_qual_coeffs.coeffs ;
- temp_filter.coeff_half_len = ARRAY_LEN (slow_high_qual_coeffs.coeffs) - 1 ;
+ temp_filter.coeff_half_len = ARRAY_LEN (slow_high_qual_coeffs.coeffs) - 2 ;
temp_filter.index_inc = slow_high_qual_coeffs.increment ;
break ;
@@ -341,6 +325,9 @@
src_ratio = psrc->last_ratio ;
+ if (is_bad_src_ratio (src_ratio))
+ return SRC_ERR_BAD_INTERNAL_STATE ;
+
/* Check the sample rate ratio wrt the buffer len. */
count = (filter->coeff_half_len + 2.0) / filter->index_inc ;
if (MIN (psrc->last_ratio, data->src_ratio) < 1.0)
@@ -375,17 +362,14 @@
/* This is the termination condition. */
if (filter->b_real_end >= 0)
- { if (filter->b_current + input_index + terminate >= filter->b_real_end)
+ { if (filter->b_current + input_index + terminate > filter->b_real_end)
break ;
} ;
if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10)
src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ;
- float_increment = filter->index_inc * 1.0 ;
- if (src_ratio < 1.0)
- float_increment = filter->index_inc * src_ratio ;
-
+ float_increment = filter->index_inc * (src_ratio < 1.0 ? src_ratio : 1.0) ;
increment = double_to_fp (float_increment) ;
start_filter_index = double_to_fp (input_index * float_increment) ;
@@ -490,6 +474,9 @@
src_ratio = psrc->last_ratio ;
+ if (is_bad_src_ratio (src_ratio))
+ return SRC_ERR_BAD_INTERNAL_STATE ;
+
/* Check the sample rate ratio wrt the buffer len. */
count = (filter->coeff_half_len + 2.0) / filter->index_inc ;
if (MIN (psrc->last_ratio, data->src_ratio) < 1.0)
@@ -531,10 +518,7 @@
if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10)
src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ;
- float_increment = filter->index_inc * 1.0 ;
- if (src_ratio < 1.0)
- float_increment = filter->index_inc * src_ratio ;
-
+ float_increment = filter->index_inc * (src_ratio < 1.0 ? src_ratio : 1.0) ;
increment = double_to_fp (float_increment) ;
start_filter_index = double_to_fp (input_index * float_increment) ;
@@ -644,6 +628,9 @@
src_ratio = psrc->last_ratio ;
+ if (is_bad_src_ratio (src_ratio))
+ return SRC_ERR_BAD_INTERNAL_STATE ;
+
/* Check the sample rate ratio wrt the buffer len. */
count = (filter->coeff_half_len + 2.0) / filter->index_inc ;
if (MIN (psrc->last_ratio, data->src_ratio) < 1.0)
@@ -685,10 +672,7 @@
if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10)
src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ;
- float_increment = filter->index_inc * 1.0 ;
- if (src_ratio < 1.0)
- float_increment = filter->index_inc * src_ratio ;
-
+ float_increment = filter->index_inc * (src_ratio < 1.0 ? src_ratio : 1.0) ;
increment = double_to_fp (float_increment) ;
start_filter_index = double_to_fp (input_index * float_increment) ;
@@ -804,6 +788,9 @@
src_ratio = psrc->last_ratio ;
+ if (is_bad_src_ratio (src_ratio))
+ return SRC_ERR_BAD_INTERNAL_STATE ;
+
/* Check the sample rate ratio wrt the buffer len. */
count = (filter->coeff_half_len + 2.0) / filter->index_inc ;
if (MIN (psrc->last_ratio, data->src_ratio) < 1.0)
@@ -845,10 +832,7 @@
if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10)
src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ;
- float_increment = filter->index_inc * 1.0 ;
- if (src_ratio < 1.0)
- float_increment = filter->index_inc * src_ratio ;
-
+ float_increment = filter->index_inc * (src_ratio < 1.0 ? src_ratio : 1.0) ;
increment = double_to_fp (float_increment) ;
start_filter_index = double_to_fp (input_index * float_increment) ;
@@ -1051,6 +1035,9 @@
src_ratio = psrc->last_ratio ;
+ if (is_bad_src_ratio (src_ratio))
+ return SRC_ERR_BAD_INTERNAL_STATE ;
+
/* Check the sample rate ratio wrt the buffer len. */
count = (filter->coeff_half_len + 2.0) / filter->index_inc ;
if (MIN (psrc->last_ratio, data->src_ratio) < 1.0)
@@ -1092,10 +1079,7 @@
if (filter->out_count > 0 && fabs (psrc->last_ratio - data->src_ratio) > 1e-10)
src_ratio = psrc->last_ratio + filter->out_gen * (data->src_ratio - psrc->last_ratio) / filter->out_count ;
- float_increment = filter->index_inc * 1.0 ;
- if (src_ratio < 1.0)
- float_increment = filter->index_inc * src_ratio ;
-
+ float_increment = filter->index_inc * (src_ratio < 1.0 ? src_ratio : 1.0) ;
increment = double_to_fp (float_increment) ;
start_filter_index = double_to_fp (input_index * float_increment) ;
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_zoh.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_zoh.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/src_zoh.c [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,25 +1,9 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-** This code is part of Secret Rabbit Code aka libsamplerate. A commercial
-** use license for this code is available, please see:
-** http://www.mega-nerd.com/SRC/procedure.html
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
#include "precomp.h"
@@ -70,6 +54,10 @@
priv->in_used = priv->out_gen = 0 ;
src_ratio = psrc->last_ratio ;
+
+ if (is_bad_src_ratio (src_ratio))
+ return SRC_ERR_BAD_INTERNAL_STATE ;
+
input_index = psrc->last_position ;
/* Calculate samples before first sample in input array. */
@@ -168,10 +156,11 @@
if (psrc->private_data == NULL)
{ priv = calloc (1, sizeof (*priv) + psrc->channels * sizeof (float)) ;
- if (priv == NULL)
- return SRC_ERR_MALLOC_FAILED ;
psrc->private_data = priv ;
} ;
+
+ if (priv == NULL)
+ return SRC_ERR_MALLOC_FAILED ;
priv->zoh_magic_marker = ZOH_MAGIC_MARKER ;
priv->channels = psrc->channels ;
Modified: trunk/reactos/sdk/lib/3rdparty/libsamplerate/unistd.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/3rdparty/libsample…
==============================================================================
--- trunk/reactos/sdk/lib/3rdparty/libsamplerate/unistd.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/3rdparty/libsamplerate/unistd.h [iso-8859-1] Sun Jun 18 11:41:14 2017
@@ -1,19 +1,9 @@
/*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd(a)mega-nerd.com>
+** All rights reserved.
**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU Lesser General Public License as published by
-** the Free Software Foundation; either version 2.1 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU Lesser General Public License for more details.
-**
-** You should have received a copy of the GNU Lesser General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+** This code is released under 2-clause BSD license. Please see the
+** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
*/
/*