diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-12-17 01:39:40 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-10-01 11:25:14 +0300 |
commit | c844bf0ab8acbbb2d4ef0814d8ed7ac9291b7f44 (patch) | |
tree | feb5f12ad75e68918da4018aa765e198590972c0 /indra/cmake | |
parent | 338aeef7e9e8cfd167489e0707f3e4a884d2c00f (diff) |
SL-16542 Pull in chunks of graham's openjpeg code, update openjpeg and enable partial bitstreams
Openjpeg was modified: "p_max_len -= l_nb_bytes_read;" was causing an overflow.
I'm not sure if I did something incorectly in opj_skip/opj_seek viewer side, but seems like openjpeg should have been checking remaining space in p_max_len either way.
P.S. Many thanks to Chafey and Neopallium for implementing openjpeg's partial bitstream support
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/Copy3rdPartyLibs.cmake | 4 | ||||
-rw-r--r-- | indra/cmake/FindOpenJPEG.cmake | 5 | ||||
-rw-r--r-- | indra/cmake/OpenJPEG.cmake | 14 |
3 files changed, 8 insertions, 15 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index ff705101de..04b4202ca3 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -52,7 +52,7 @@ if(WINDOWS) set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(release_files - openjpeg.dll + openjp2.dll libapr-1.dll libaprutil-1.dll libapriconv-1.dll @@ -220,7 +220,7 @@ elseif(LINUX) libgobject-2.0.so libhunspell-1.3.so.0.0.0 libopenal.so - libopenjpeg.so + libopenjp2.so libuuid.so.16 libuuid.so.16.0.22 libfontconfig.so.1.8.0 diff --git a/indra/cmake/FindOpenJPEG.cmake b/indra/cmake/FindOpenJPEG.cmake index 949384eec4..afe319fb06 100644 --- a/indra/cmake/FindOpenJPEG.cmake +++ b/indra/cmake/FindOpenJPEG.cmake @@ -9,14 +9,15 @@ # also defined, but not for general use are # OPENJPEG_LIBRARY, where to find the OpenJPEG library. -FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h +FIND_PATH(OPENJPEG_INCLUDE_DIR openjp2.h /usr/local/include/openjpeg /usr/local/include /usr/include/openjpeg /usr/include +include/openjpeg ) -SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg) +SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjp2) FIND_LIBRARY(OPENJPEG_LIBRARY NAMES ${OPENJPEG_NAMES} PATHS /usr/lib /usr/local/lib diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index bf0bde2ba7..a078c97cb8 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -8,15 +8,7 @@ if (USESYSTEMLIBS) include(FindOpenJPEG) else (USESYSTEMLIBS) use_prebuilt_binary(openjpeg) - - if(WINDOWS) - # Windows has differently named release and debug openjpeg(d) libs. - set(OPENJPEG_LIBRARIES - debug openjpegd - optimized openjpeg) - else(WINDOWS) - set(OPENJPEG_LIBRARIES openjpeg) - endif(WINDOWS) - - set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg) + + set(OPENJPEG_LIBRARIES openjp2) + set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg) endif (USESYSTEMLIBS) |