-
Notifications
You must be signed in to change notification settings - Fork 608
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
HEIF support #2160
Merged
Merged
HEIF support #2160
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Module to find LIBHEIF | ||
# | ||
# This module will first look into the directories defined by the variables: | ||
# - LIBHEIF_PATH, LIBHEIF_INCLUDE_PATH, LIBHEIF_LIBRARY_PATH | ||
# | ||
# This module defines the following variables: | ||
# | ||
# LIBHEIF_FOUND True if LIBHEIF was found. | ||
# LIBHEIF_INCLUDES Where to find LIBHEIF headers | ||
# LIBHEIF_LIBRARIES List of libraries to link against when using LIBHEIF | ||
# LIBHEIF_VERSION Version of LIBHEIF (e.g., 3.6.2) | ||
|
||
include (FindPackageHandleStandardArgs) | ||
include (FindPackageMessage) | ||
|
||
find_path (LIBHEIF_INCLUDE_DIR | ||
libheif/heif_version.h | ||
PATHS | ||
${LIBHEIF_INCLUDE_PATH} | ||
${LIBHEIF_PATH}/include/ | ||
DOC "The directory where libheif headers reside") | ||
|
||
find_library (LIBHEIF_LIBRARY heif | ||
PATHS ${LIBHEIF_PATH}/lib ${LIBHEIF_LIBRARY_PATH}) | ||
|
||
message (STATUS "LIBHEIF_INCLUDE_DIR = ${LIBHEIF_INCLUDE_DIR}") | ||
if (LIBHEIF_INCLUDE_DIR) | ||
file(STRINGS "${LIBHEIF_INCLUDE_DIR}/libheif/heif_version.h" TMP REGEX "^#define LIBHEIF_VERSION[ \t].*$") | ||
string(REGEX MATCHALL "[0-9.]+" LIBHEIF_VERSION ${TMP}) | ||
endif () | ||
|
||
if (LIBHEIF_INCLUDE_DIR AND LIBHEIF_LIBRARY) | ||
set(LIBHEIF_FOUND TRUE) | ||
set(LIBHEIF_INCLUDES "${LIBHEIF_INCLUDE_DIR}") | ||
set(LIBHEIF_LIBRARIES "${LIBHEIF_LIBRARY}") | ||
if (NOT LIBHEIF_FIND_QUIETLY) | ||
message(STATUS "Found libheif ${LIBHEIF_VERSION} library ${LIBHEIF_LIBRARIES}") | ||
message(STATUS "Found libheif includes ${LIBHEIF_INCLUDES}") | ||
endif () | ||
else() | ||
set(LIBHEIF_FOUND FALSE) | ||
message(STATUS "libheif not found. Specify LIBHEIF_PATH to locate it") | ||
endif() | ||
|
||
include (FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args (LIBHEIF | ||
REQUIRED_VARS LIBHEIF_INCLUDE_DIR | ||
LIBHEIF_LIBRARIES | ||
VERSION_VAR LIBHEIF_VERSION | ||
) | ||
|
||
mark_as_advanced ( | ||
LIBHEIF_INCLUDE_DIR | ||
LIBHEIF_LIBRARIES | ||
LIBHEIF_VERSION | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if (USE_HEIF AND LIBHEIF_FOUND) | ||
add_oiio_plugin (heifinput.cpp heifoutput.cpp | ||
INCLUDE_DIRS ${LIBHEIF_INCLUDES} | ||
LINK_LIBRARIES ${LIBHEIF_LIBRARIES} | ||
DEFINITIONS "-DUSE_HEIF=1") | ||
else () | ||
message (WARNING "heif plugin will not be built") | ||
endif () |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the end of this sentence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, yes. Will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!