summaryrefslogtreecommitdiff
path: root/pngrtran.c
AgeCommit message (Collapse)Author
2019-04-07arm: Partially revert "Fix a memory leak in the riffled palette [...]"Cosmin Truta
The memory leak remains fixed, but the associated refactoring is being reverted. Moving the initialization of the riffled palette from png_do_read_transformations to png_init_palette_transformations has caused a regression in some of the test programs. Although png_init_palette_transformations is the proper place to perform this initialization, and the test programs are technically incorrect to fail, we are still undoing that refactoring for the time being.
2019-03-31arm: Rename all functions to the pattern png_*_neon; add debug tracesCosmin Truta
2019-02-03Fix a memory leak in the riffled palette optimization on ARM; refactorCosmin Truta
Move deallocation of riffled_palette from png_write_destroy to png_read_destroy. The reader (not the writer) is the owner of riffled_palette. Move allocation and initialization of riffled_palette from png_do_read_transformations to png_init_palette_transformations. Allow riffled_palette inside png_struct only if the ARM Neon optimizations are enabled. Rename png_riffle_palette_rgba to png_riffle_palette_rgba8, etc., to better indicate the strict applicability of these routines. Fix an unused parameter warning in the build configurations where riffled palette optimization is not enabled. Fix indentation.
2018-09-04Fix the build with MSVC ARM64Cosmin Truta
2018-09-04Restore the ANSI C compliance after adding the ARM optimizationCosmin Truta
Also apply style and formatting fixes
2018-09-04Optimize png_do_expand_palette for ARMRichard Townsend
ARM-specific optimization processes 8 or 4 pixels at once. Improves performance by around 10-22% on a recent ARM Chromebook.
2018-08-18Remove top-level const from function-scope variablesCosmin Truta
As per the const correctness rules, top-level const-ness of data in automatic scopes does not propagate outside of these scopes (unlike const-ness at lower levels, such as pointers to const data). Previously, const was used liberally, but inconsistently across the libpng codebase. Using const wherever applicable is not incorrect. However, _consistent_ use of const is difficult to maintain in such conditions. In conclusion, we shall continue to use const only where doing so is strictly necessary: 1. If a function guarantees that it will not modify an argument passed by pointer, the corresponding function parameter should be a pointer-to-const (const T *). 2. Static data should not be modified, therefore it should be const. Reference: Google C++ Style Guide https://google.github.io/styleguide/cppguide.html#Use_of_const
2018-08-18Replace the remaining uses of PNG_CONST with constCosmin Truta
In v1.6.0, compiler support for const became a requirement. It should be used consistently. To maintain backwards compatibility, PNG_CONST is still maintained in deprecated form.
2018-07-28Remove the "last changed" version information from source commentsCosmin Truta
This information is maintained by the version control system.
2018-07-15Release libpng version 1.6.35Cosmin Truta
2018-06-17[libpng16] Replace the remaining uses of png_size_t with size_tCosmin Truta
In v1.6.0, size_t became a required type. It should be used consistently. To maintain backwards compatibility, png_size_t is still maintained in deprecated form.
2018-03-06[libpng16] Imported from libpng-1.6.35beta01.tarGlenn Randers-Pehrson
2018-02-09More misc. typosluz.paz
found via `codespell-q 3` please review
2017-11-03Merge branch 'typos' of git://github.com/luzpaz/libpng into libpng16Glenn Randers-Pehrson
2017-11-03[Libpng16] Add typecast to NULL argument to png_do_expand()Glenn Randers-Pehrson
2017-11-03Misc. typosUnknown
Some are user facing. Some are in actual code. Most are in source comments. Also, please double check the changes in contrib/tools/pngfix.c
2017-10-31[libpng16] Removed some unnecessary brackets in pngrtran.cGlenn Randers-Pehrson
2017-09-28[libpng16] Imported from libpng-1.6.33.tarGlenn Randers-Pehrson
2017-09-03[libpng16] Fixed incorrect typecast of some arguments to png_malloc() andGlenn Randers-Pehrson
png_calloc() that were png_uint_32 instead of png_alloc_size_t (Bug report by "irwir" in Github libpng issue #175).
2017-07-27[libpng16] Imported from libpng-1.6.31.tarGlenn Randers-Pehrson
2017-07-11[libpng16] Removed one of the GCC-7.1.0 'strict-overflow' warnings thatJohn Bowler
result when integers appear on both sides of a compare. Worked around the others by forcing the strict-overflow setting in the relevant functions to a level where they are not reported. Changed "FALL THROUGH" comments to "FALLTHROUGH" because GCC doesn't like the space. Worked around some C-style casts from (void*) because g++ 5.4.0 objects to them. Increased the buffer size for 'sprint' to pass the gcc 7.1.0 'sprint overflow' check that is on by default with -Wall -Wextra.
2017-06-29[libpng16] Update some "last changed" datesGlenn Randers-Pehrson
2017-03-31URL updatesViktor Szakats
2017-03-30[libpng16] Update CHANGES, ANNOUNCE, and "last changed" dates.Glenn Randers-Pehrson
2017-03-29silence clang -Wcomma warningsViktor Szakats
2017-03-16[libpng16] Imported from libpng-1.6.29.tarGlenn Randers-Pehrson
2017-02-27[libpng16= Avoid potential overflow of shift operations in png_do_expand() ↵Glenn Randers-Pehrson
(Aaron Boxer).
2016-10-02[libpng16] Quieted all remaining -Wconversion compiler warningsGlenn Randers-Pehrson
2016-08-03[libpng16] Imported from libpng-1.6.24.tarGlenn Randers-Pehrson
2016-07-15[libpng16] Fixed more indentationGlenn Randers-Pehrson
2016-05-26[libpng16] Imported from libpng-1.6.22.tarGlenn Randers-Pehrson
2016-03-09[libpng16] Imported from libpng-1.6.22beta03.tarGlenn Randers-Pehrson
2016-01-30[libpng16] Updated CHANGES, ANNOUNCE, change date in pngrtran.cGlenn Randers-Pehrson
2016-01-29Relax limit checks on gamma values.John Bowler
As suggested in the comments gamma values outside the range currently permitted by png_set_alpha_mode are useful for HDR data encoding. These values are already permitted by png_set_gamma so it is reasonable caution to extend the png_set_alpha_mode range as HDR imaging systems are starting to emerge. Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-13[libpng16] Update copyright uears in source files.Glenn Randers-Pehrson
2015-11-12[libpng16] Imported from libpng-1.6.19.tarGlenn Randers-Pehrson
2015-10-31[libpng16] Imported from libpng-1.6.19rc02.tarGlenn Randers-Pehrson
2015-10-29rowbytes check correctionJohn Bowler
The old code incorrectly calculated the output rowbytes when the application decreased either the number of channels or the bit depth (or both) in a user transform. This was safe; libpng overallocated buffer space (potentially by quite a lot; up to 4 times the amount required) but, from 1.5.4 on, resulted in a png_error. Signed-off-by: John Bowler <jbowler@acm.org>
2015-09-24[libpng16] Reverted addition of png_set_filler_16 and png_set_add_alpha_16()Glenn Randers-Pehrson
functions. They unnecessarily duplicate png_set_filler() and png_set_add_alpha() which now work properly with 16-bit images.
2015-09-23[libpng16] Reverted the fix of byte order in png_do_read_filler() with 16-bitGlenn Randers-Pehrson
input that was made in version 1.6.17beta01, to preserve legacy behavior even though it was incorrect. Instead, added new API png_set_filter_16() and png_set_add_alpha_16() that set a flag to make png_do_read_filter() interpret the filler bytes properly.
2015-08-17[libng16] Reverted recent mistaken change of 0xnnnn to 0xnnnnULGlenn Randers-Pehrson
2015-08-16[libpng16] Mention in manual that 16-bit platform support has been dropped.Glenn Randers-Pehrson
2015-08-16[libpng16] Changed 0xnnnn constants to 0xnnnnUL.Glenn Randers-Pehrson
2015-08-13[libpng16] Change "n bit" to "n-bit" in comments.Glenn Randers-Pehrson
2015-08-07[libpng16] Removed unreachable "break" statements in png.c, pngread.c, andVictor Szakats
pngrtran.c to suppress clang warnings (Bug report by Viktor Szakats).
2015-07-22[libpng16] Imported from libpng-1.6.18.tarGlenn Randers-Pehrson
2015-07-01[libpng16] Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).Glenn Randers-Pehrson
Removed some useless typecasts from contrib/tools/png-fix-itxt.c
2015-04-01[libpng16] Suppressed some warnings from the Borland C++ 5.5.1/5.82 compilerGlenn Randers-Pehrson
(Bug report by Viktor Szaka'ts).
2015-03-26[libpng16] Imported from libpng-1.6.17.tarGlenn Randers-Pehrson
2015-03-22[libpng16] Imported from libpng-1.6.17rc06.tarGlenn Randers-Pehrson