1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Merge pull request #28140 from asmorkalov:as/openjpeg_2.5.4

OpenJPEG update to 2.5.4 #28140

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Alexander Smorkalov
2025-12-08 08:59:51 +03:00
committed by GitHub
parent fc6c6bf7de
commit bd54424f03
3 changed files with 11 additions and 2 deletions
+6
View File
@@ -1987,6 +1987,12 @@ OPJ_BOOL opj_jp2_setup_encoder(opj_jp2_t *jp2,
if (image->icc_profile_len) {
jp2->meth = 2;
jp2->enumcs = 0;
jp2->color.icc_profile_buf = (OPJ_BYTE *)opj_malloc(image->icc_profile_len);
if (jp2->color.icc_profile_buf) {
jp2->color.icc_profile_len = image->icc_profile_len;
memcpy(jp2->color.icc_profile_buf, image->icc_profile_buf,
image->icc_profile_len);
}
} else {
jp2->meth = 1;
if (image->color_space == OPJ_CLRSPC_SRGB) {
+1 -1
View File
@@ -10,6 +10,6 @@ Description: JPEG2000 library (Part 1 and 2)
URL: http://www.openjpeg.org/
Version: @OPENJPEG_VERSION@
Libs: -L${libdir} -lopenjp2
Libs.private: -lm
Libs.private: @deps@
Cflags: -I${includedir}
Cflags.private: -DOPJ_STATIC
+4 -1
View File
@@ -635,6 +635,8 @@ typedef void * opj_codec_t;
/*
* Callback function prototype for read function
* @return returns The number of bytes delivered into
* \a p_buffer. -1 signals end of stream.
*/
typedef OPJ_SIZE_T(* opj_stream_read_fn)(void * p_buffer, OPJ_SIZE_T p_nb_bytes,
void * p_user_data) ;
@@ -1239,7 +1241,6 @@ OPJ_API void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t* p_stream,
/**
* Sets the length of the user data for the stream.
*
* @param p_stream the stream to modify
* @param data_length length of the user_data.
*/
@@ -1437,6 +1438,8 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_components(opj_codec_t *p_codec,
* that is to say at the highest resolution level, even if requesting the image at lower
* resolution levels.
*
* Note: If p_start_x, p_start_y, p_end_x, p_end_y are all 0, then the whole image is decoded.
*
* Generally opj_set_decode_area() should be followed by opj_decode(), and the
* codec cannot be re-used.
* In the particular case of an image made of a single tile, several sequences of