Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to openjpeg2 new api (2.1+) #1217

Merged
merged 6 commits into from
Jul 14, 2016
Merged

Conversation

LebedevRI
Copy link
Member

@LebedevRI LebedevRI commented Jun 28, 2016

  • Caveat 1: dt_imageio_j2k_read_profile() apparently needs to decode whole image. even after going through openjpeg sources, i see no way to replace parameters.cp_limit_decoding = LIMIT_TO_MAIN_HEADER;
  • Caveat 2: at least in debian, openjpeg-1.5 installs <openjpeg.h> into /usr/include too.
    I think i have workarounded that, but if libopenjpeg-dev is installed side-by-side with new libopenjp2-7-dev, there may be issues (works for me right now)...
    Seems to be fixed by the last commit
  • Caveat 3: openjp2-2.1 api is different (obviously) from old v1.5, do we want to support old `openjpeg-1.5 too? I guess can be done, but will be ugly.

As far as i can tell, this is feature complete.
Exporting to {jp2,j2k} works, reading from works, reading ICC works.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826810
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826805

CMake Warning (dev) at cmake/modules/LibFindMacros.cmake:160 (message):
  Plural form Glib_LIBRARIES;Glib_LIBRARY found in config options of GIO.
  This works as before but is now deprecated.  Please only use singular forms
  INCLUDE_DIR and LIBRARY, and update your find scripts for LibFindMacros >
  2.0 automatic dependency system (most often you can simply remove the
  PROCESS variables entirely).
Call Stack (most recent call first):
  cmake/modules/FindGIO.cmake:26 (libfind_process)
  src/CMakeLists.txt:196 (find_package)
At least in debian, libopenjpeg-dev 1:1.5.2-3.1 installs openjpeg.h
not just as /usr/include/openjpeg-1.5/openjpeg.h, but also as
/usr/include/openjpeg.h

Without NO_DEFAULT_PATH, cmake does not find
the right openjpeg.h in /usr/include/openjpeg-2.1/openjpeg.h,
and does not set OpenJPEG_INCLUDE_DIR to /usr/include/openjpeg-2.1,
but to /usr/include...
# Include dir
find_path(OpenJPEG_INCLUDE_DIR
NAMES openjpeg.h
PATHS ${OpenJPEG_PKGCONF_INCLUDE_DIRS}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should go into HINTS, not PATHS

@LebedevRI LebedevRI merged commit d336e1b into darktable-org:master Jul 14, 2016
@LebedevRI LebedevRI deleted the openjpeg2 branch July 14, 2016 10:38
@LebedevRI LebedevRI modified the milestone: 2.1 Oct 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants