Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
ARM-specific optimization processes 8 or 4 pixels at once.
Improves performance by around 10-22% on a recent ARM Chromebook.
|
|
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
|
|
This information is maintained by the version control system.
|
|
|
|
|
|
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.
|
|
Always define PNG_INTEL_SSE_OPT and PNG_INTEL_SSE_IMPLEMENTATION before
comparing them with 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function (Suggested by Max Stepin).
|
|
|
|
|
|
|
|
|
|
PNG_ARM_NEON_IMPLEMENTATION == 2 to exclude some definitions that assembler
cannot recognize.
|
|
("typedef" directive is unrecognized by the assembler).
|
|
|
|
|
|
|
|
|
|
|
|
__ppc64__ -> __PPC64__
|
|
|
|
|
|
|
|
|
|
Configure libpng with "configure --enable-intel-sse" or compile
libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it. This patch was
previously applied to libpng-1.6.28rc03 but withdrawn to allow time for QA.
|
|
|
|
Configure libpng with "configure --enable-intel-see" or compile
libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it.
|
|
|
|
|
|
|
|
Remove all currently detected cases of unsigned overflow. Detection is
runtime, so test case dependent. The changes to pngvalid.c eliminate
spurious and probably invalid tests with one while loop exception.
Apart from that and the change to the dependence on the intended
unsigned overflow in pngtrans.c the changes are limited to altering the
meme for an unsigned 'x' from:
while (x-- > 0)
to
for (; x > 0; --x)
This works because, in all cases, the control variable is not used in
the loop. The 'while' meme was, at one time, warn'ed by GCC so it is
probably a good change, for some weird religious value of good.
Signed-off-by: John Bowler <jbowler@acm.org>
|
|
flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU.
|
|
and pngrutil.c.
|
|
|
|
|
|
1. png_read_filter_row_sub4_msa
2. png_read_filter_row_avg4_msa
3. png_read_filter_row_paeth4_msa
4. png_read_filter_row_sub3_msa
5. png_read_filter_row_avg3_msa
6. png_read_filter_row_paeth3_msa
Signed-off-by: Mandar Sahastrabuddhe <Mandar.Sahastrabuddhe@imgtec.com>
|
|
|
|
Also added one msa optimized function: png_read_filter_row_up_msa
Signed-off-by: Mandar Sahastrabuddhe <Mandar.Sahastrabuddhe@imgtec.com>
|
|
|
|
The code now validates the ICC profile length against the user chunk limit
before the buffer is allocated, as opposed to doing it while the buffer is read.
This removes the potential to consume virtual address space with a carefully
crafted ICC profile; only an issue on 32-bit systems where a valid profile can
be up to 2^32-4 bytes in length. libpng never writes beyond the application
supplied limit, but previously it did allocate a buffer of the size specified in
the profile header. The exploitability of this is almost zero; the address
space is released as soon as the PNG read completes.
Also clean up PNG_DEBUG compile of pngtest.c.
Signed-off-by: John Bowler <jbowler@acm.org>
|
|
|
|
Updated contrib/intel/intel_sse.patch
|