| Age | Commit message (Collapse) | Author |
|
|
|
Generate pkg-config Libs.private from the actual dependencies linked into
our libraries, rather than hardcoding static lists, to avoid overlinking
of library users when pkg-config is invoked with --static. libopenjpip
doesn't actually link with libcurl, libfcgi, or libpthread, and neither
of our libraries links with libm on Windows (which doesn't have libm).
|
|
code documentation updates
|
|
|
|
|
|
Consider the case where the caller has not set the p_image
pointer to NULL before calling opj_read_header().
If opj_j2k_read_header_procedure() fails while obtaining the rest
of the marker segment when calling opj_stream_read_data() because
the data stream is too short, then opj_j2k_read_header() will
never have the chance to initialize p_image, leaving it
uninitialized.
opj_jp2_read_header() will check the p_image value whether
opj_j2k_read_header() suceeded or failed. This may be detected as
an error in valgrind or ASAN.
The fix is to check whether opj_j2k_read_header() suceeded before
using the output argument p_image.
|
|
opj_j2k_add_tlmarker(): validate that current tile-part number if smaller that total number of tile-parts
|
|
that total number of tile-parts
Fixes #1564
|
|
Do not turn on 'TPsot==TNsot detection fix' when TNsot==1, and
|
|
and make it active when opj_decoder_set_strict_mode() is called with true
|
|
The fix of 2c0823cb30a70319c704565b59f496e490a3c7f9 (#1530) broke
decoding of some JPEG2000 files where Isot==0, Psot==0, TPsot==0 and
TNsot==0 like the following ones from the GDAL autotest suite:
autotest/gdrivers/data/jpeg2000/stefan_full_rgba_alpha_1bit.jp2
autotest/gdrivers/data/jpeg2000/3_13bit_and_1bit.jp2
|
|
OPJ_DPARAMETERS_DISABLE_TPSOT_FIX flag to disable it
Adresses the use case of https://lists.osgeo.org/pipermail/gdal-dev/2024-November/059805.html
where Sentinel2 L1C JPEG2000 files are made of a single tile-part per
tile.
|
|
Fixes #1340
|
|
Fix memory allocation failure on K230
|
|
Encoder: performance gain ~0.1%
Decoder: performance gain ~2.5%
|
|
reference from Rec. ITU-T T.800 (06/2019):
- Table A.13 – Coding style parameter values for the Scod parameter
- Section A.8.1 Start of packet (SOP)
- Section A.8.2 End of packet header (EPH)
|
|
|
|
|
|
Fixes #1535
|
|
potential later heap-buffer-overflow in in opj_t1_decode_cblk when disabling strict mode
Fixes #1533
|
|
|
|
opj_j2k_decode_tiles(): avoid use of uninitialized l_current_tile_no variable
|
|
|
|
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68763
|
|
|
|
|
|
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
|
|
It was previously included by openjpeg.h
|
|
to https://github.com/uclouvain/openjpeg/pull/1488)
|
|
opj_dwt_decode_tile(): avoid potential UndefinedBehaviorSanitizer 'applying zero offset to null pointer' (fixes #1505)
|
|
zero offset to null pointer' (fixes #1505)
|
|
Compatibility for cmake version < 3.5 is now deprecated in cmake and
specifing version below 3.5 in cmake_minimum_required produces a
warning.[1]
[1] https://cmake.org/cmake/help/latest/release/3.27.html#deprecated-and-removed-features
|
|
|
|
Use NEON instructions for ARM64 (implementation based on microsoft/STL#2127).
Godbolt output here: https://godbolt.org/z/q7GPTqT14
|
|
opj_tcd_dc_level_shift_decode(): avoid increment nullptr (fixes #1480)
|
|
Integer Overflow at j2k.c:3962
|
|
Integer Overflow at j2k.c:11114
|
|
fix ht_dec.c:1215
|
|
(likely harmless issue as we don't dereference it)
|
|
Require `stdint.h` & `inttypes.h`
|
|
destination. fix ht_dec.c:1215 (#1492)
|
|
|
|
|
|
|
|
With #1450 which goes with 480cc9d49775d018c19ce0e01f6be27858d63d39 "Remove support for non-C99 compilers (like VS2010) that don't support snprintf()",
support for MSVC versions prior to vs2015 is dropped: https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
This means that all supported MSVC versions do have `stdint.h` & `inttypes.h` now.
For non windows platforms, those headers were already mandatory.
Make them mandatory for all builds.
|
|
There are a bunch of loc where we can see a usage of `opj_int_ceildiv`:
```
(OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)a, (OPJ_INT32)b);
```
where a & b are `OPJ_UINT32`.
This can lead to overflow/underflow for some a/b combinations.
Replace those calls by `opj_uint_ceildiv` instead to always get a correct result.
This also allows some valid single tile images with huge tile size to be decoded properly.
Fix #1438
|
|
opj_jp2_read_header(): move setting color_space here instead in opj_jp2_decode()/get_tile() (fixes #570)
|
|
opj_jp2_decode()/get_tile() + add unit test (fixes #570)
|