mirror of https://github.com/stella-emu/stella.git
Merge branch 'master' into feature/filesystem
This commit is contained in:
commit
82baea225e
Binary file not shown.
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 64 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
@ -2342,7 +2342,7 @@ void DebuggerParser::executeTimer()
|
||||||
|
|
||||||
for(uInt32 i = 0; i < argCount; ++i)
|
for(uInt32 i = 0; i < argCount; ++i)
|
||||||
{
|
{
|
||||||
if(static_cast<uInt32>(args[i]) >= std::max(0x80u, romBankCount - 1))
|
if(static_cast<uInt32>(args[i]) >= std::max(0x80U, romBankCount - 1))
|
||||||
{
|
{
|
||||||
if(numAddrs == 2)
|
if(numAddrs == 2)
|
||||||
{
|
{
|
||||||
|
@ -2367,7 +2367,7 @@ void DebuggerParser::executeTimer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uInt32 idx;
|
uInt32 idx = 0;
|
||||||
if(numAddrs < 2)
|
if(numAddrs < 2)
|
||||||
{
|
{
|
||||||
idx = debugger.m6502().addTimer(addr[0], bank[0], mirrors, anyBank);
|
idx = debugger.m6502().addTimer(addr[0], bank[0], mirrors, anyBank);
|
||||||
|
|
|
@ -84,8 +84,8 @@ uInt32 TimerMap::add(uInt16 addr, uInt8 bank, bool mirrors, bool anyBank)
|
||||||
// complete a partial timer:
|
// complete a partial timer:
|
||||||
Timer& tmPartial = myList[idx];
|
Timer& tmPartial = myList[idx];
|
||||||
TimerPoint tpFrom = tmPartial.from;
|
TimerPoint tpFrom = tmPartial.from;
|
||||||
bool oldMirrors = tmPartial.mirrors;
|
const bool oldMirrors = tmPartial.mirrors;
|
||||||
bool oldAnyBank = tmPartial.anyBank;
|
const bool oldAnyBank = tmPartial.anyBank;
|
||||||
|
|
||||||
tmPartial.setTo(tp, mirrors, anyBank);
|
tmPartial.setTo(tp, mirrors, anyBank);
|
||||||
toKey(tp, tmPartial.mirrors, tmPartial.anyBank);
|
toKey(tp, tmPartial.mirrors, tmPartial.anyBank);
|
||||||
|
@ -153,8 +153,8 @@ void TimerMap::clear()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TimerMap::reset()
|
void TimerMap::reset()
|
||||||
{
|
{
|
||||||
for(auto it = myList.begin(); it != myList.end(); ++it)
|
for(auto& it: myList)
|
||||||
it->reset();
|
it.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -163,7 +163,7 @@ void TimerMap::update(uInt16 addr, uInt8 bank, const uInt64 cycles)
|
||||||
if((addr & ADDRESS_MASK) != addr)
|
if((addr & ADDRESS_MASK) != addr)
|
||||||
{
|
{
|
||||||
// 13 bit timerpoint
|
// 13 bit timerpoint
|
||||||
TimerPoint tp(addr & ADDRESS_MASK, bank);
|
const TimerPoint tp(addr & ADDRESS_MASK, bank);
|
||||||
|
|
||||||
// Find address in from and to maps
|
// Find address in from and to maps
|
||||||
const auto from = myFromMap.equal_range(tp);
|
const auto from = myFromMap.equal_range(tp);
|
||||||
|
@ -178,7 +178,7 @@ void TimerMap::update(uInt16 addr, uInt8 bank, const uInt64 cycles)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 16 bit timerpoint
|
// 16 bit timerpoint
|
||||||
TimerPoint tp(addr, bank);
|
const TimerPoint tp(addr, bank);
|
||||||
|
|
||||||
// Find address in from and to maps
|
// Find address in from and to maps
|
||||||
const auto from = myFromMap.equal_range(tp);
|
const auto from = myFromMap.equal_range(tp);
|
||||||
|
|
|
@ -48,20 +48,6 @@ class TimerMap
|
||||||
TimerPoint()
|
TimerPoint()
|
||||||
: addr{0}, bank(ANY_BANK) {}
|
: addr{0}, bank(ANY_BANK) {}
|
||||||
|
|
||||||
#if 0 // unused
|
|
||||||
bool operator==(const TimerPoint& other) const
|
|
||||||
{
|
|
||||||
if(addr == other.addr)
|
|
||||||
{
|
|
||||||
if(bank == ANY_BANK || other.bank == ANY_BANK)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return bank == other.bank;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool operator<(const TimerPoint& other) const
|
bool operator<(const TimerPoint& other) const
|
||||||
{
|
{
|
||||||
if(bank == ANY_BANK || other.bank == ANY_BANK)
|
if(bank == ANY_BANK || other.bank == ANY_BANK)
|
||||||
|
@ -92,10 +78,10 @@ class TimerMap
|
||||||
: from{c_from}, to{c_to}, mirrors{c_mirrors}, anyBank{c_anyBank} {}
|
: from{c_from}, to{c_to}, mirrors{c_mirrors}, anyBank{c_anyBank} {}
|
||||||
|
|
||||||
Timer(uInt16 fromAddr, uInt16 toAddr, uInt8 fromBank, uInt8 toBank,
|
Timer(uInt16 fromAddr, uInt16 toAddr, uInt8 fromBank, uInt8 toBank,
|
||||||
bool mirrors = false, bool anyBank = false)
|
bool c_mirrors = false, bool c_anyBank = false)
|
||||||
{
|
{
|
||||||
Timer(TimerPoint(fromAddr, fromBank), TimerPoint(fromAddr, fromBank),
|
Timer(TimerPoint(fromAddr, fromBank), TimerPoint(fromAddr, fromBank),
|
||||||
mirrors, anyBank);
|
c_mirrors, c_anyBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer(const TimerPoint& tp, bool c_mirrors = false, bool c_anyBank = false)
|
Timer(const TimerPoint& tp, bool c_mirrors = false, bool c_anyBank = false)
|
||||||
|
@ -106,38 +92,11 @@ class TimerMap
|
||||||
isPartial = true;
|
isPartial = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer(uInt16 addr, uInt8 bank, bool mirrors = false, bool anyBank = false)
|
Timer(uInt16 addr, uInt8 bank, bool c_mirrors = false, bool c_anyBank = false)
|
||||||
{
|
{
|
||||||
Timer(TimerPoint(addr, bank), mirrors, anyBank);
|
Timer(TimerPoint(addr, bank), c_mirrors, c_anyBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // unused
|
|
||||||
bool operator==(const Timer& other) const
|
|
||||||
{
|
|
||||||
cerr << from.addr << ", " << to.addr << endl;
|
|
||||||
if(from.addr == other.from.addr && to.addr == other.to.addr)
|
|
||||||
{
|
|
||||||
if((from.bank == ANY_BANK || other.from.bank == ANY_BANK) &&
|
|
||||||
(to.bank == ANY_BANK || other.to.bank == ANY_BANK))
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return from.bank == other.from.bank && to.bank == other.to.bank;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator<(const Timer& other) const
|
|
||||||
{
|
|
||||||
if(from.bank < other.from.bank || (from.bank == other.from.bank && from.addr < other.from.addr))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if(from.bank == other.from.bank && from.addr == other.from.addr)
|
|
||||||
return to.bank < other.to.bank || (to.bank == other.to.bank && to.addr < other.to.addr);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void setTo(const TimerPoint& tp, bool c_mirrors = false, bool c_anyBank = false)
|
void setTo(const TimerPoint& tp, bool c_mirrors = false, bool c_anyBank = false)
|
||||||
{
|
{
|
||||||
to = tp;
|
to = tp;
|
||||||
|
@ -207,7 +166,7 @@ class TimerMap
|
||||||
const uInt64 cycles);
|
const uInt64 cycles);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void toKey(TimerPoint& tp, bool mirrors, bool anyBank);
|
static void toKey(TimerPoint& tp, bool mirrors, bool anyBank);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using TimerList = std::deque<Timer>; // makes sure that the element pointers do NOT change
|
using TimerList = std::deque<Timer>; // makes sure that the element pointers do NOT change
|
||||||
|
|
|
@ -238,7 +238,7 @@ void FrameLayoutDetector::finalizeFrame()
|
||||||
// 1.0 (>=312) and added to PAL and (inverted) NTSC sums.
|
// 1.0 (>=312) and added to PAL and (inverted) NTSC sums.
|
||||||
constexpr double ODD_PENALTY = 0.5; // guessed value :)
|
constexpr double ODD_PENALTY = 0.5; // guessed value :)
|
||||||
const double palFrame = BSPF::clamp(((myCurrentFrameFinalLines % 2) ? ODD_PENALTY : 1.0)
|
const double palFrame = BSPF::clamp(((myCurrentFrameFinalLines % 2) ? ODD_PENALTY : 1.0)
|
||||||
* static_cast<double>(myCurrentFrameFinalLines - frameLinesNTSC)
|
* (static_cast<double>(myCurrentFrameFinalLines) - frameLinesNTSC)
|
||||||
/ static_cast<double>(frameLinesPAL - frameLinesNTSC), 0.0, 1.0);
|
/ static_cast<double>(frameLinesPAL - frameLinesNTSC), 0.0, 1.0);
|
||||||
myPalFrameSum += palFrame;
|
myPalFrameSum += palFrame;
|
||||||
myNtscFrameSum += 1.0 - palFrame;
|
myNtscFrameSum += 1.0 - palFrame;
|
||||||
|
|
|
@ -84,7 +84,7 @@ void JitterEmulation::frameComplete(Int32 scanlineCount, Int32 vsyncCycles)
|
||||||
{
|
{
|
||||||
const Int32 scanlineDifference = scanlineCount - myLastFrameScanlines;
|
const Int32 scanlineDifference = scanlineCount - myLastFrameScanlines;
|
||||||
|
|
||||||
if(abs(scanlineDifference) < myScanlineDelta
|
if(abs(scanlineDifference) >= myScanlineDelta
|
||||||
&& abs(myJitter) < static_cast<Int32>(myRandom.next() % myJitterLines))
|
&& abs(myJitter) < static_cast<Int32>(myRandom.next() % myJitterLines))
|
||||||
{
|
{
|
||||||
// Repeated invalid frames cause randomly repeated jitter
|
// Repeated invalid frames cause randomly repeated jitter
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018-2019 Cosmin Truta
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1996-1997 Andreas Dilger
|
* Copyright (c) 1996-1997 Andreas Dilger
|
||||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_6_37 Your_png_h_is_not_version_1_6_37;
|
typedef png_libpng_version_1_6_38 Your_png_h_is_not_version_1_6_38;
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
/* The version tests may need to be added to, but the problem warning has
|
/* The version tests may need to be added to, but the problem warning has
|
||||||
|
@ -720,7 +720,7 @@ png_init_io(png_structrp png_ptr, png_FILE_p fp)
|
||||||
*
|
*
|
||||||
* Where UNSIGNED_MAX is the appropriate maximum unsigned value, so when the
|
* Where UNSIGNED_MAX is the appropriate maximum unsigned value, so when the
|
||||||
* negative integral value is added the result will be an unsigned value
|
* negative integral value is added the result will be an unsigned value
|
||||||
* correspnding to the 2's complement representation.
|
* corresponding to the 2's complement representation.
|
||||||
*/
|
*/
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_save_int_32(png_bytep buf, png_int_32 i)
|
png_save_int_32(png_bytep buf, png_int_32 i)
|
||||||
|
@ -815,8 +815,8 @@ png_get_copyright(png_const_structrp png_ptr)
|
||||||
return PNG_STRING_COPYRIGHT
|
return PNG_STRING_COPYRIGHT
|
||||||
#else
|
#else
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.6.37" PNG_STRING_NEWLINE \
|
"libpng version 1.6.38" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 2018-2019 Cosmin Truta" PNG_STRING_NEWLINE \
|
"Copyright (c) 2018-2022 Cosmin Truta" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
|
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
|
||||||
PNG_STRING_NEWLINE \
|
PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.6.37 - April 14, 2019
|
* libpng version 1.6.38 - September 14, 2022
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018-2019 Cosmin Truta
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1996-1997 Andreas Dilger
|
* Copyright (c) 1996-1997 Andreas Dilger
|
||||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
|
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
|
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
|
||||||
* Glenn Randers-Pehrson
|
* Glenn Randers-Pehrson
|
||||||
* libpng versions 1.6.36, December 2018, through 1.6.37, April 2019:
|
* libpng versions 1.6.36, December 2018, through 1.6.38, September 2022:
|
||||||
* Cosmin Truta
|
* Cosmin Truta
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*/
|
*/
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
* PNG Reference Library License version 2
|
* PNG Reference Library License version 2
|
||||||
* ---------------------------------------
|
* ---------------------------------------
|
||||||
*
|
*
|
||||||
* * Copyright (c) 1995-2020 The PNG Reference Library Authors.
|
* * Copyright (c) 1995-2022 The PNG Reference Library Authors.
|
||||||
* * Copyright (c) 2018-2019 Cosmin Truta.
|
* * Copyright (c) 2018-2022 Cosmin Truta.
|
||||||
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
||||||
* * Copyright (c) 1996-1997 Andreas Dilger.
|
* * Copyright (c) 1996-1997 Andreas Dilger.
|
||||||
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
* ...
|
* ...
|
||||||
* 1.5.30 15 10530 15.so.15.30[.0]
|
* 1.5.30 15 10530 15.so.15.30[.0]
|
||||||
* ...
|
* ...
|
||||||
* 1.6.37 16 10637 16.so.16.37[.0]
|
* 1.6.38 16 10638 16.so.16.38[.0]
|
||||||
*
|
*
|
||||||
* Henceforth the source version will match the shared-library major and
|
* Henceforth the source version will match the shared-library major and
|
||||||
* minor numbers; the shared-library major version number will be used for
|
* minor numbers; the shared-library major version number will be used for
|
||||||
|
@ -278,8 +278,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.6.37"
|
#define PNG_LIBPNG_VER_STRING "1.6.38"
|
||||||
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.37 - April 14, 2019\n"
|
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.38 - September 14, 2022\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 16
|
#define PNG_LIBPNG_VER_SONUM 16
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 16
|
#define PNG_LIBPNG_VER_DLLNUM 16
|
||||||
|
@ -287,7 +287,7 @@
|
||||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||||
#define PNG_LIBPNG_VER_MAJOR 1
|
#define PNG_LIBPNG_VER_MAJOR 1
|
||||||
#define PNG_LIBPNG_VER_MINOR 6
|
#define PNG_LIBPNG_VER_MINOR 6
|
||||||
#define PNG_LIBPNG_VER_RELEASE 37
|
#define PNG_LIBPNG_VER_RELEASE 38
|
||||||
|
|
||||||
/* This should be zero for a public release, or non-zero for a
|
/* This should be zero for a public release, or non-zero for a
|
||||||
* development version. [Deprecated]
|
* development version. [Deprecated]
|
||||||
|
@ -318,7 +318,7 @@
|
||||||
* From version 1.0.1 it is:
|
* From version 1.0.1 it is:
|
||||||
* XXYYZZ, where XX=major, YY=minor, ZZ=release
|
* XXYYZZ, where XX=major, YY=minor, ZZ=release
|
||||||
*/
|
*/
|
||||||
#define PNG_LIBPNG_VER 10637 /* 1.6.37 */
|
#define PNG_LIBPNG_VER 10638 /* 1.6.38 */
|
||||||
|
|
||||||
/* Library configuration: these options cannot be changed after
|
/* Library configuration: these options cannot be changed after
|
||||||
* the library has been built.
|
* the library has been built.
|
||||||
|
@ -428,7 +428,7 @@ extern "C" {
|
||||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||||
* do not agree upon the version number.
|
* do not agree upon the version number.
|
||||||
*/
|
*/
|
||||||
typedef char* png_libpng_version_1_6_37;
|
typedef char* png_libpng_version_1_6_38;
|
||||||
|
|
||||||
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
||||||
*
|
*
|
||||||
|
@ -1446,7 +1446,7 @@ PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action,
|
||||||
* mainly useful for testing, as the defaults should work with most users.
|
* mainly useful for testing, as the defaults should work with most users.
|
||||||
* Those users who are tight on memory or want faster performance at the
|
* Those users who are tight on memory or want faster performance at the
|
||||||
* expense of compression can modify them. See the compression library
|
* expense of compression can modify them. See the compression library
|
||||||
* header file (zlib.h) for an explination of the compression functions.
|
* header file (zlib.h) for an explanation of the compression functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Set the filtering method(s) used by libpng. Currently, the only valid
|
/* Set the filtering method(s) used by libpng. Currently, the only valid
|
||||||
|
@ -1501,7 +1501,7 @@ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
|
||||||
* 0 - 9, corresponding directly to the zlib compression levels 0 - 9
|
* 0 - 9, corresponding directly to the zlib compression levels 0 - 9
|
||||||
* (0 - no compression, 9 - "maximal" compression). Note that tests have
|
* (0 - no compression, 9 - "maximal" compression). Note that tests have
|
||||||
* shown that zlib compression levels 3-6 usually perform as well as level 9
|
* shown that zlib compression levels 3-6 usually perform as well as level 9
|
||||||
* for PNG images, and do considerably fewer caclulations. In the future,
|
* for PNG images, and do considerably fewer calculations. In the future,
|
||||||
* these values may not correspond directly to the zlib compression levels.
|
* these values may not correspond directly to the zlib compression levels.
|
||||||
*/
|
*/
|
||||||
#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
|
#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
/* pngconf.h - machine-configurable file for libpng
|
/* pngconf.h - machine-configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.6.37
|
* libpng version 1.6.38
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018-2019 Cosmin Truta
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1996-1997 Andreas Dilger
|
* Copyright (c) 1996-1997 Andreas Dilger
|
||||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -180,8 +180,8 @@
|
||||||
* compiler-specific macros to the values required to change the calling
|
* compiler-specific macros to the values required to change the calling
|
||||||
* conventions of the various functions.
|
* conventions of the various functions.
|
||||||
*/
|
*/
|
||||||
#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
|
#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \
|
||||||
defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
defined(__CYGWIN__)
|
||||||
/* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or
|
/* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or
|
||||||
* MinGW on any architecture currently supported by Windows. Also includes
|
* MinGW on any architecture currently supported by Windows. Also includes
|
||||||
* Watcom builds but these need special treatment because they are not
|
* Watcom builds but these need special treatment because they are not
|
||||||
|
@ -230,7 +230,7 @@
|
||||||
* the type.
|
* the type.
|
||||||
*/
|
*/
|
||||||
# ifndef PNG_EXPORT_TYPE
|
# ifndef PNG_EXPORT_TYPE
|
||||||
# define PNG_EXPORT_TYPE(name) name PNG_IMPEXP
|
# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP
|
||||||
# endif
|
# endif
|
||||||
# define PNG_DLL_EXPORT __export
|
# define PNG_DLL_EXPORT __export
|
||||||
# else /* newer compiler */
|
# else /* newer compiler */
|
||||||
|
@ -450,7 +450,7 @@
|
||||||
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
||||||
PNG_EXPORT(ordinal, type, name, args);
|
PNG_EXPORT(ordinal, type, name, args);
|
||||||
# else /* No floating point APIs */
|
# else /* No floating point APIs */
|
||||||
# define PNG_FP_EXPORT(ordinal, name, name, args)
|
# define PNG_FP_EXPORT(ordinal, type, name, args)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
|
#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
|
||||||
|
@ -458,7 +458,7 @@
|
||||||
# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
|
# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
|
||||||
PNG_EXPORT(ordinal, type, name, args);
|
PNG_EXPORT(ordinal, type, name, args);
|
||||||
# else /* No fixed point APIs */
|
# else /* No fixed point APIs */
|
||||||
# define PNG_FIXED_EXPORT(ordinal, name, name, args)
|
# define PNG_FIXED_EXPORT(ordinal, type, name, args)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/* pngpriv.h - private declarations for use inside libpng
|
/* pngpriv.h - private declarations for use inside libpng
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018-2019 Cosmin Truta
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1996-1997 Andreas Dilger
|
* Copyright (c) 1996-1997 Andreas Dilger
|
||||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -174,7 +174,7 @@
|
||||||
# else /* !defined __ARM_NEON__ */
|
# else /* !defined __ARM_NEON__ */
|
||||||
/* The 'intrinsics' code simply won't compile without this -mfpu=neon:
|
/* The 'intrinsics' code simply won't compile without this -mfpu=neon:
|
||||||
*/
|
*/
|
||||||
# if !defined(__aarch64__)
|
# if !defined(__aarch64__) && !defined(_M_ARM64)
|
||||||
/* The assembler code currently does not work on ARM64 */
|
/* The assembler code currently does not work on ARM64 */
|
||||||
# define PNG_ARM_NEON_IMPLEMENTATION 2
|
# define PNG_ARM_NEON_IMPLEMENTATION 2
|
||||||
# endif /* __aarch64__ */
|
# endif /* __aarch64__ */
|
||||||
|
@ -185,6 +185,8 @@
|
||||||
/* Use the intrinsics code by default. */
|
/* Use the intrinsics code by default. */
|
||||||
# define PNG_ARM_NEON_IMPLEMENTATION 1
|
# define PNG_ARM_NEON_IMPLEMENTATION 1
|
||||||
# endif
|
# endif
|
||||||
|
#else /* PNG_ARM_NEON_OPT == 0 */
|
||||||
|
# define PNG_ARM_NEON_IMPLEMENTATION 0
|
||||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
|
|
||||||
#ifndef PNG_MIPS_MSA_OPT
|
#ifndef PNG_MIPS_MSA_OPT
|
||||||
|
@ -263,11 +265,15 @@
|
||||||
# ifndef PNG_MIPS_MSA_IMPLEMENTATION
|
# ifndef PNG_MIPS_MSA_IMPLEMENTATION
|
||||||
# define PNG_MIPS_MSA_IMPLEMENTATION 1
|
# define PNG_MIPS_MSA_IMPLEMENTATION 1
|
||||||
# endif
|
# endif
|
||||||
|
#else
|
||||||
|
# define PNG_MIPS_MSA_IMPLEMENTATION 0
|
||||||
#endif /* PNG_MIPS_MSA_OPT > 0 */
|
#endif /* PNG_MIPS_MSA_OPT > 0 */
|
||||||
|
|
||||||
#if PNG_POWERPC_VSX_OPT > 0
|
#if PNG_POWERPC_VSX_OPT > 0
|
||||||
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx
|
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx
|
||||||
# define PNG_POWERPC_VSX_IMPLEMENTATION 1
|
# define PNG_POWERPC_VSX_IMPLEMENTATION 1
|
||||||
|
#else
|
||||||
|
# define PNG_POWERPC_VSX_IMPLEMENTATION 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -492,16 +498,7 @@
|
||||||
static_cast<type>(static_cast<const void*>(value))
|
static_cast<type>(static_cast<const void*>(value))
|
||||||
#else
|
#else
|
||||||
# define png_voidcast(type, value) (value)
|
# define png_voidcast(type, value) (value)
|
||||||
# ifdef _WIN64
|
# define png_constcast(type, value) ((type)(void*)(const void*)(value))
|
||||||
# ifdef __GNUC__
|
|
||||||
typedef unsigned long long png_ptruint;
|
|
||||||
# else
|
|
||||||
typedef unsigned __int64 png_ptruint;
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
typedef unsigned long png_ptruint;
|
|
||||||
# endif
|
|
||||||
# define png_constcast(type, value) ((type)(png_ptruint)(const void*)(value))
|
|
||||||
# define png_aligncast(type, value) ((void*)(value))
|
# define png_aligncast(type, value) ((void*)(value))
|
||||||
# define png_aligncastconst(type, value) ((const void*)(value))
|
# define png_aligncastconst(type, value) ((const void*)(value))
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
@ -543,9 +540,8 @@
|
||||||
# include <alloc.h>
|
# include <alloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
|
#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
|
||||||
defined(_WIN32) || defined(__WIN32__)
|
# include <windows.h>
|
||||||
# include <windows.h> /* defines _WINDOWS_ macro */
|
|
||||||
#endif
|
#endif
|
||||||
#endif /* PNG_VERSION_INFO_ONLY */
|
#endif /* PNG_VERSION_INFO_ONLY */
|
||||||
|
|
||||||
|
@ -554,14 +550,10 @@
|
||||||
* functions that are passed far data must be model-independent.
|
* functions that are passed far data must be model-independent.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Memory model/platform independent fns */
|
/* Platform-independent functions */
|
||||||
#ifndef PNG_ABORT
|
#ifndef PNG_ABORT
|
||||||
# ifdef _WINDOWS_
|
|
||||||
# define PNG_ABORT() ExitProcess(0)
|
|
||||||
# else
|
|
||||||
# define PNG_ABORT() abort()
|
# define PNG_ABORT() abort()
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/* These macros may need to be architecture dependent. */
|
/* These macros may need to be architecture dependent. */
|
||||||
#define PNG_ALIGN_NONE 0 /* do not use data alignment */
|
#define PNG_ALIGN_NONE 0 /* do not use data alignment */
|
||||||
|
@ -585,8 +577,8 @@
|
||||||
/* This is used because in some compiler implementations non-aligned
|
/* This is used because in some compiler implementations non-aligned
|
||||||
* structure members are supported, so the offsetof approach below fails.
|
* structure members are supported, so the offsetof approach below fails.
|
||||||
* Set PNG_ALIGN_SIZE=0 for compiler combinations where unaligned access
|
* Set PNG_ALIGN_SIZE=0 for compiler combinations where unaligned access
|
||||||
* is good for performance. Do not do this unless you have tested the result
|
* is good for performance. Do not do this unless you have tested the
|
||||||
* and understand it.
|
* result and understand it.
|
||||||
*/
|
*/
|
||||||
# define png_alignof(type) (sizeof(type))
|
# define png_alignof(type) (sizeof(type))
|
||||||
#else
|
#else
|
||||||
|
@ -594,17 +586,16 @@
|
||||||
# define png_alignof(type) offsetof(struct{char c; type t;}, t)
|
# define png_alignof(type) offsetof(struct{char c; type t;}, t)
|
||||||
# else
|
# else
|
||||||
# if PNG_ALIGN_TYPE == PNG_ALIGN_ALWAYS
|
# if PNG_ALIGN_TYPE == PNG_ALIGN_ALWAYS
|
||||||
# define png_alignof(type) (1)
|
# define png_alignof(type) 1
|
||||||
# endif
|
# endif
|
||||||
/* Else leave png_alignof undefined to prevent use thereof */
|
/* Else leave png_alignof undefined to prevent use thereof */
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This implicitly assumes alignment is always to a power of 2. */
|
/* This implicitly assumes alignment is always a multiple of 2. */
|
||||||
#ifdef png_alignof
|
#ifdef png_alignof
|
||||||
# define png_isaligned(ptr, type) \
|
# define png_isaligned(ptr, type) \
|
||||||
(((type)((const char*)ptr-(const char*)0) & \
|
(((type)(size_t)((const void*)(ptr)) & (type)(png_alignof(type)-1)) == 0)
|
||||||
(type)(png_alignof(type)-1)) == 0)
|
|
||||||
#else
|
#else
|
||||||
# define png_isaligned(ptr, type) 0
|
# define png_isaligned(ptr, type) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3452,7 +3452,6 @@ png_image_read_background(png_voidp argument)
|
||||||
|
|
||||||
for (pass = 0; pass < passes; ++pass)
|
for (pass = 0; pass < passes; ++pass)
|
||||||
{
|
{
|
||||||
png_bytep row = png_voidcast(png_bytep, display->first_row);
|
|
||||||
unsigned int startx, stepx, stepy;
|
unsigned int startx, stepx, stepy;
|
||||||
png_uint_32 y;
|
png_uint_32 y;
|
||||||
|
|
||||||
|
@ -3557,8 +3556,6 @@ png_image_read_background(png_voidp argument)
|
||||||
|
|
||||||
inrow += 2; /* gray and alpha channel */
|
inrow += 2; /* gray and alpha channel */
|
||||||
}
|
}
|
||||||
|
|
||||||
row += display->row_bytes;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#ifdef PNG_ARM_NEON_IMPLEMENTATION
|
#ifdef PNG_ARM_NEON_IMPLEMENTATION
|
||||||
# if PNG_ARM_NEON_IMPLEMENTATION == 1
|
# if PNG_ARM_NEON_IMPLEMENTATION == 1
|
||||||
# define PNG_ARM_NEON_INTRINSICS_AVAILABLE
|
# define PNG_ARM_NEON_INTRINSICS_AVAILABLE
|
||||||
# if defined(_MSC_VER) && defined(_M_ARM64)
|
# if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
||||||
# include <arm64_neon.h>
|
# include <arm64_neon.h>
|
||||||
# else
|
# else
|
||||||
# include <arm_neon.h>
|
# include <arm_neon.h>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Cosmin Truta
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1996-1997 Andreas Dilger
|
* Copyright (c) 1996-1997 Andreas Dilger
|
||||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -301,7 +301,6 @@ png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size, int warn)
|
||||||
|
|
||||||
if (buffer != NULL && new_size > png_ptr->read_buffer_size)
|
if (buffer != NULL && new_size > png_ptr->read_buffer_size)
|
||||||
{
|
{
|
||||||
png_ptr->read_buffer = NULL;
|
|
||||||
png_ptr->read_buffer = NULL;
|
png_ptr->read_buffer = NULL;
|
||||||
png_ptr->read_buffer_size = 0;
|
png_ptr->read_buffer_size = 0;
|
||||||
png_free(png_ptr, buffer);
|
png_free(png_ptr, buffer);
|
||||||
|
@ -2076,20 +2075,21 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||||
png_byte buf[1];
|
png_byte buf[1];
|
||||||
png_crc_read(png_ptr, buf, 1);
|
png_crc_read(png_ptr, buf, 1);
|
||||||
info_ptr->eXIf_buf[i] = buf[0];
|
info_ptr->eXIf_buf[i] = buf[0];
|
||||||
if (i == 1 && buf[0] != 'M' && buf[0] != 'I'
|
if (i == 1)
|
||||||
&& info_ptr->eXIf_buf[0] != buf[0])
|
|
||||||
{
|
{
|
||||||
png_crc_finish(png_ptr, length);
|
if ((buf[0] != 'M' && buf[0] != 'I') ||
|
||||||
|
(info_ptr->eXIf_buf[0] != buf[0]))
|
||||||
|
{
|
||||||
|
png_crc_finish(png_ptr, length - 2);
|
||||||
png_chunk_benign_error(png_ptr, "incorrect byte-order specifier");
|
png_chunk_benign_error(png_ptr, "incorrect byte-order specifier");
|
||||||
png_free(png_ptr, info_ptr->eXIf_buf);
|
png_free(png_ptr, info_ptr->eXIf_buf);
|
||||||
info_ptr->eXIf_buf = NULL;
|
info_ptr->eXIf_buf = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (png_crc_finish(png_ptr, 0) != 0)
|
if (png_crc_finish(png_ptr, 0) == 0)
|
||||||
return;
|
|
||||||
|
|
||||||
png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
|
png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
|
||||||
|
|
||||||
png_free(png_ptr, info_ptr->eXIf_buf);
|
png_free(png_ptr, info_ptr->eXIf_buf);
|
||||||
|
@ -2126,7 +2126,8 @@ png_handle_hIST(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||||
|
|
||||||
num = length / 2 ;
|
num = length / 2 ;
|
||||||
|
|
||||||
if (num != (unsigned int) png_ptr->num_palette ||
|
if (length != num * 2 ||
|
||||||
|
num != (unsigned int)png_ptr->num_palette ||
|
||||||
num > (unsigned int)PNG_MAX_PALETTE_LENGTH)
|
num > (unsigned int)PNG_MAX_PALETTE_LENGTH)
|
||||||
{
|
{
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
|
@ -4621,14 +4622,13 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
png_bytep temp = png_ptr->big_row_buf + 32;
|
png_bytep temp = png_ptr->big_row_buf + 32;
|
||||||
int extra = (int)((temp - (png_bytep)0) & 0x0f);
|
size_t extra = (size_t)temp & 0x0f;
|
||||||
png_ptr->row_buf = temp - extra - 1/*filter byte*/;
|
png_ptr->row_buf = temp - extra - 1/*filter byte*/;
|
||||||
|
|
||||||
temp = png_ptr->big_prev_row + 32;
|
temp = png_ptr->big_prev_row + 32;
|
||||||
extra = (int)((temp - (png_bytep)0) & 0x0f);
|
extra = (size_t)temp & 0x0f;
|
||||||
png_ptr->prev_row = temp - extra - 1/*filter byte*/;
|
png_ptr->prev_row = temp - extra - 1/*filter byte*/;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Use 31 bytes of padding before and 17 bytes after row_buf. */
|
/* Use 31 bytes of padding before and 17 bytes after row_buf. */
|
||||||
png_ptr->row_buf = png_ptr->big_row_buf + 31;
|
png_ptr->row_buf = png_ptr->big_row_buf + 31;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Cosmin Truta
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 1998-2018 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2018 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1996-1997 Andreas Dilger
|
* Copyright (c) 1996-1997 Andreas Dilger
|
||||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -1019,6 +1019,9 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
|
||||||
info_ptr->trans_alpha = png_voidcast(png_bytep,
|
info_ptr->trans_alpha = png_voidcast(png_bytep,
|
||||||
png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH));
|
png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH));
|
||||||
memcpy(info_ptr->trans_alpha, trans_alpha, (size_t)num_trans);
|
memcpy(info_ptr->trans_alpha, trans_alpha, (size_t)num_trans);
|
||||||
|
|
||||||
|
info_ptr->valid |= PNG_INFO_tRNS;
|
||||||
|
info_ptr->free_me |= PNG_FREE_TRNS;
|
||||||
}
|
}
|
||||||
png_ptr->trans_alpha = info_ptr->trans_alpha;
|
png_ptr->trans_alpha = info_ptr->trans_alpha;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/* pngstruct.h - header file for PNG reference library
|
/* pngstruct.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018-2019 Cosmin Truta
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1996-1997 Andreas Dilger
|
* Copyright (c) 1996-1997 Andreas Dilger
|
||||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -334,18 +334,8 @@ struct png_struct_def
|
||||||
size_t current_buffer_size; /* amount of data now in current_buffer */
|
size_t current_buffer_size; /* amount of data now in current_buffer */
|
||||||
int process_mode; /* what push library is currently doing */
|
int process_mode; /* what push library is currently doing */
|
||||||
int cur_palette; /* current push library palette index */
|
int cur_palette; /* current push library palette index */
|
||||||
|
|
||||||
#endif /* PROGRESSIVE_READ */
|
#endif /* PROGRESSIVE_READ */
|
||||||
|
|
||||||
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
|
|
||||||
/* For the Borland special 64K segment handler */
|
|
||||||
png_bytepp offset_table_ptr;
|
|
||||||
png_bytep offset_table;
|
|
||||||
png_uint_16 offset_table_number;
|
|
||||||
png_uint_16 offset_table_count;
|
|
||||||
png_uint_16 offset_table_count_free;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
||||||
png_bytep palette_lookup; /* lookup table for quantizing */
|
png_bytep palette_lookup; /* lookup table for quantizing */
|
||||||
png_bytep quantize_index; /* index translation for palette files */
|
png_bytep quantize_index; /* index translation for palette files */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018-2019 Cosmin Truta
|
* Copyright (c) 2018-2022 Cosmin Truta
|
||||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1996-1997 Andreas Dilger
|
* Copyright (c) 1996-1997 Andreas Dilger
|
||||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
@ -489,6 +489,16 @@ png_convert_from_time_t(png_timep ptime, time_t ttime)
|
||||||
png_debug(1, "in png_convert_from_time_t");
|
png_debug(1, "in png_convert_from_time_t");
|
||||||
|
|
||||||
tbuf = gmtime(&ttime);
|
tbuf = gmtime(&ttime);
|
||||||
|
if (tbuf == NULL)
|
||||||
|
{
|
||||||
|
/* TODO: add a safe function which takes a png_ptr argument and raises
|
||||||
|
* a png_error if the ttime argument is invalid and the call to gmtime
|
||||||
|
* fails as a consequence.
|
||||||
|
*/
|
||||||
|
memset(ptime, 0, sizeof(*ptime));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
png_convert_from_struct_tm(ptime, tbuf);
|
png_convert_from_struct_tm(ptime, tbuf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -146,9 +146,9 @@ extern "C" {
|
||||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||||
** [sqlite_version()] and [sqlite_source_id()].
|
** [sqlite_version()] and [sqlite_source_id()].
|
||||||
*/
|
*/
|
||||||
#define SQLITE_VERSION "3.38.5"
|
#define SQLITE_VERSION "3.39.4"
|
||||||
#define SQLITE_VERSION_NUMBER 3038005
|
#define SQLITE_VERSION_NUMBER 3039004
|
||||||
#define SQLITE_SOURCE_ID "2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe"
|
#define SQLITE_SOURCE_ID "2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Run-Time Library Version Numbers
|
** CAPI3REF: Run-Time Library Version Numbers
|
||||||
|
@ -5593,7 +5593,8 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
|
||||||
** object D and returns a pointer to that copy. ^The [sqlite3_value] returned
|
** object D and returns a pointer to that copy. ^The [sqlite3_value] returned
|
||||||
** is a [protected sqlite3_value] object even if the input is not.
|
** is a [protected sqlite3_value] object even if the input is not.
|
||||||
** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
|
** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
|
||||||
** memory allocation fails.
|
** memory allocation fails. ^If V is a [pointer value], then the result
|
||||||
|
** of sqlite3_value_dup(V) is a NULL value.
|
||||||
**
|
**
|
||||||
** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
|
** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
|
||||||
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
|
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
|
||||||
|
@ -6275,6 +6276,28 @@ SQLITE_API int sqlite3_get_autocommit(sqlite3*);
|
||||||
*/
|
*/
|
||||||
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
||||||
|
|
||||||
|
/*
|
||||||
|
** CAPI3REF: Return The Schema Name For A Database Connection
|
||||||
|
** METHOD: sqlite3
|
||||||
|
**
|
||||||
|
** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name
|
||||||
|
** for the N-th database on database connection D, or a NULL pointer of N is
|
||||||
|
** out of range. An N value of 0 means the main database file. An N of 1 is
|
||||||
|
** the "temp" schema. Larger values of N correspond to various ATTACH-ed
|
||||||
|
** databases.
|
||||||
|
**
|
||||||
|
** Space to hold the string that is returned by sqlite3_db_name() is managed
|
||||||
|
** by SQLite itself. The string might be deallocated by any operation that
|
||||||
|
** changes the schema, including [ATTACH] or [DETACH] or calls to
|
||||||
|
** [sqlite3_serialize()] or [sqlite3_deserialize()], even operations that
|
||||||
|
** occur on a different thread. Applications that need to
|
||||||
|
** remember the string long-term should make their own copy. Applications that
|
||||||
|
** are accessing the same database connection simultaneously on multiple
|
||||||
|
** threads should mutex-protect calls to this API and should make their own
|
||||||
|
** private copy of the result prior to releasing the mutex.
|
||||||
|
*/
|
||||||
|
SQLITE_API const char *sqlite3_db_name(sqlite3 *db, int N);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Return The Filename For A Database Connection
|
** CAPI3REF: Return The Filename For A Database Connection
|
||||||
** METHOD: sqlite3
|
** METHOD: sqlite3
|
||||||
|
@ -9554,8 +9577,8 @@ SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vtab_collation(sqlite3_index_
|
||||||
** of a [virtual table] implementation. The result of calling this
|
** of a [virtual table] implementation. The result of calling this
|
||||||
** interface from outside of xBestIndex() is undefined and probably harmful.
|
** interface from outside of xBestIndex() is undefined and probably harmful.
|
||||||
**
|
**
|
||||||
** ^The sqlite3_vtab_distinct() interface returns an integer that is
|
** ^The sqlite3_vtab_distinct() interface returns an integer between 0 and
|
||||||
** either 0, 1, or 2. The integer returned by sqlite3_vtab_distinct()
|
** 3. The integer returned by sqlite3_vtab_distinct()
|
||||||
** gives the virtual table additional information about how the query
|
** gives the virtual table additional information about how the query
|
||||||
** planner wants the output to be ordered. As long as the virtual table
|
** planner wants the output to be ordered. As long as the virtual table
|
||||||
** can meet the ordering requirements of the query planner, it may set
|
** can meet the ordering requirements of the query planner, it may set
|
||||||
|
@ -9587,6 +9610,13 @@ SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vtab_collation(sqlite3_index_
|
||||||
** that have the same value for all columns identified by "aOrderBy".
|
** that have the same value for all columns identified by "aOrderBy".
|
||||||
** ^However omitting the extra rows is optional.
|
** ^However omitting the extra rows is optional.
|
||||||
** This mode is used for a DISTINCT query.
|
** This mode is used for a DISTINCT query.
|
||||||
|
** <li value="3"><p>
|
||||||
|
** ^(If the sqlite3_vtab_distinct() interface returns 3, that means
|
||||||
|
** that the query planner needs only distinct rows but it does need the
|
||||||
|
** rows to be sorted.)^ ^The virtual table implementation is free to omit
|
||||||
|
** rows that are identical in all aOrderBy columns, if it wants to, but
|
||||||
|
** it is not required to omit any rows. This mode is used for queries
|
||||||
|
** that have both DISTINCT and ORDER BY clauses.
|
||||||
** </ol>
|
** </ol>
|
||||||
**
|
**
|
||||||
** ^For the purposes of comparing virtual table output values to see if the
|
** ^For the purposes of comparing virtual table output values to see if the
|
||||||
|
|
Loading…
Reference in New Issue