Skip to content

Do not require libde265 at configure time - #93

Merged
garbear merged 1 commit into
xbmc:Piersfrom
kel-mo:de265-optional
Sep 3, 2026
Merged

Do not require libde265 at configure time#93
garbear merged 1 commit into
xbmc:Piersfrom
kel-mo:de265-optional

Conversation

@kel-mo

@kel-mo kel-mo commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

src/ includes kodi/addon-instance/ImageDecoder.h, libheif/heif_cxx.h and TinyEXIF — never libde265/de265.h. git log -S libde265 -- src/ lib/ returns nothing, so the REQUIRED has been vestigial for the life of the add-on.

It does have a cost: it prevents configuring against a system libheif that supplies HEVC on its own. freedesktop-sdk 26.08 ships libheif 1.23.1 with plugin loading enabled and provides libheif-libde265.so through the codecs-extra extension; Debian splits the decoder out into libheif-plugin-libde265 the same way. In those environments libde265 need not be visible to this add-on at all.

This only drops REQUIRED. ${de265_INCLUDE_DIRS} and ${de265_LIBRARIES} are left in place, so wherever libde265 is found — including Kodi's own depends builds, where FindHEIF.cmake resolves a static libheif and cannot pick up transitive libraries from pkg-config — the include path and link line are byte-for-byte unchanged.

Testing: built in the Flathub tv.kodi.Kodi manifest against freedesktop-sdk 26.08 with the bundled libheif and libde265 modules removed. The resulting imagedecoder.heif.so lists only libheif.so.1 (plus tinyxml2 and libc) in DT_NEEDED. Four HEIC images display correctly in Kodi 22: 4032×3024 and 4000×3000 grid-tiled files of 48 HEVC tiles each, 8-bit 4:2:0, profiles Main and Main Still Picture, exercising tile assembly, embedded thumbnails, EXIF and irot rotation.

The add-on includes only libheif headers and has never called libde265
directly. Requiring it blocks configuration against a system libheif
that already provides HEVC, whether built in or loaded as a plugin,
which is how freedesktop-sdk and several distributions ship it.

de265 stays in the include path and link line when it is found, so
static libheif builds that pull in libde265 are unaffected.
@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown

Greptile Summary

The PR makes direct libde265 discovery optional, allowing configuration when libheif supplies HEVC decoding independently while preserving de265 include and link variables when discovery succeeds.

  • Removes REQUIRED from find_package(de265).
  • Retains the existing de265 include-directory and library references.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code-triggered failures identified.

Optional discovery continues cleanly when libde265 is absent and preserves explicit linkage when it is found; no supported repository build path was shown to require an undiscoverable direct libde265 dependency.

Important Files Changed

Filename Overview
CMakeLists.txt Makes libde265 optional without otherwise changing dependency ordering or the addon's link composition.

Reviews (1): Last reviewed commit: "Do not require libde265 at configure tim..." | Re-trigger Greptile

@garbear
garbear merged commit 297b450 into xbmc:Piers Sep 3, 2026
9 checks passed
kel-mo added a commit to kel-mo/tv.kodi.Kodi that referenced this pull request Sep 6, 2026
Stop building libheif and libde265 for this addon. 26.08 ships libheif
1.23.1 and gets its HEVC backend from the codecs-extra extension, which
carries the libheif-libde265 plugin; the runtime's build looks for it at
lib/<triplet>/codecs-extra/lib/libheif. AVIF also improves, as the
runtime's libheif links aom and svt-av1 next to dav1d.

The addon required libde265 at configure time although it only ever
includes libheif headers, which blocks configuring against a libheif
that supplies HEVC itself. Move the pin to the Piers head, which carries
the upstream fix (xbmc/imagedecoder.heif#93), so no local patch is
needed. Everywhere libde265 is present, as in kodi's own depends builds,
the link line is unchanged.
kel-mo added a commit to kel-mo/tv.kodi.Kodi that referenced this pull request Sep 8, 2026
Stop building libheif and libde265 for this addon. 26.08 ships libheif
1.23.1 and gets its HEVC backend from the codecs-extra extension, which
carries the libheif-libde265 plugin; the runtime's build looks for it at
lib/<triplet>/codecs-extra/lib/libheif. AVIF also improves, as the
runtime's libheif links aom and svt-av1 next to dav1d.

The addon required libde265 at configure time although it only ever
includes libheif headers, which blocks configuring against a libheif
that supplies HEVC itself. Move the pin to the Piers head, which carries
the upstream fix (xbmc/imagedecoder.heif#93), so no local patch is
needed. Everywhere libde265 is present, as in kodi's own depends builds,
the link line is unchanged.
kel-mo added a commit to kel-mo/tv.kodi.Kodi that referenced this pull request Sep 9, 2026
Stop building libheif and libde265 for this addon. 26.08 ships libheif
1.23.1 and gets its HEVC backend from the codecs-extra extension, which
carries the libheif-libde265 plugin; the runtime's build looks for it at
lib/<triplet>/codecs-extra/lib/libheif. AVIF also improves, as the
runtime's libheif links aom and svt-av1 next to dav1d.

The addon required libde265 at configure time although it only ever
includes libheif headers, which blocks configuring against a libheif
that supplies HEVC itself. Move the pin to the Piers head, which carries
the upstream fix (xbmc/imagedecoder.heif#93), so no local patch is
needed. Everywhere libde265 is present, as in kodi's own depends builds,
the link line is unchanged.
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