Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/sync-addon-metadata-translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Sync addon metadata translations

on:
push:
branches: [ Matrix, Nexus ]
paths:
- '**addon.xml'
- '**resource.language.**strings.po'

jobs:
default:
if: github.repository == 'xbmc/imagedecoder.heif'
runs-on: ubuntu-latest

steps:

- name: Checkout repository
uses: actions/checkout@v2
with:
path: project

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install git+https://github.com/xbmc/sync_addon_metadata_translations.git

- name: Run sync-addon-metadata-translations
run: |
sync-addon-metadata-translations
working-directory: ./project

- name: Create PR for sync-addon-metadata-translations changes
uses: peter-evans/create-pull-request@v3.10.0
with:
commit-message: Sync of addon metadata translations
title: Sync of addon metadata translations
body: Sync of addon metadata translations triggered by ${{ github.sha }}
branch: amt-sync
delete-branch: true
path: ./project
reviewers: gade01
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This is a [Kodi](https://kodi.tv) image decoder addon for HEIF images.

[![License: GPL-2.0-or-later](https://img.shields.io/badge/License-GPL%20v2+-blue.svg)](LICENSE.md)
[![Build Status](https://travis-ci.org/xbmc/imagedecoder.heif.svg?branch=Matrix)](https://travis-ci.org/xbmc/imagedecoder.heif)
[![Build Status](https://dev.azure.com/teamkodi/binary-addons/_apis/build/status/xbmc.imagedecoder.heif?branchName=Matrix)](https://dev.azure.com/teamkodi/binary-addons/_build/latest?definitionId=26&branchName=Matrix)
[![Build Status](https://jenkins.kodi.tv/view/Addons/job/xbmc/job/imagedecoder.heif/job/Matrix/badge/icon)](https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Fimagedecoder.heif/branches/)

Expand Down
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Upstream-Name: imagedecoder.heif
Source: https://github.com/xbmc/imagedecoder.heif

Files: *
Copyright: 2005-2020 Team Kodi
Copyright: 2005-2021 Team Kodi
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
47 changes: 47 additions & 0 deletions depends/common/dav1d/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.5)
project(dav1d)

find_package(Python3 REQUIRED)

if(NOT CPU AND CMAKE_SYSTEM_PROCESSOR)
set(CPU ${CMAKE_SYSTEM_PROCESSOR})
endif()

include(ExternalProject)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(MESON_BUILD_TYPE debug)
else()
set(MESON_BUILD_TYPE release)
endif()

list(APPEND configure_command ${CMAKE_COMMAND} -E env)
list(APPEND configure_command ANDROID_NDK=${TOOLCHAIN})
list(APPEND configure_command AR=${CMAKE_AR})
list(APPEND configure_command CC=${CMAKE_C_COMPILER})
list(APPEND configure_command CFLAGS=${CMAKE_C_FLAGS})
list(APPEND configure_command CPPFLAGS=${CMAKE_CPP_FLAGS})
list(APPEND configure_command CXX=${CMAKE_CXX_COMPILER})
list(APPEND configure_command CXXFLAGS=${CMAKE_CXX_FLAGS})
list(APPEND configure_command INSTALL_PREFIX=)
list(APPEND configure_command LDFLAGS=${CMAKE_LD_FLAGS})
list(APPEND configure_command RANLIB=${CMAKE_RANLIB})
list(APPEND configure_command meson)
list(APPEND configure_command --prefix=${CMAKE_INSTALL_PREFIX})
list(APPEND configure_command --libdir=lib)
list(APPEND configure_command --buildtype=${MESON_BUILD_TYPE})
list(APPEND configure_command --default-library=static)
list(APPEND configure_command -Denable_asm=true)
list(APPEND configure_command -Denable_tools=false)
list(APPEND configure_command -Denable_examples=false)
list(APPEND configure_command -Denable_tests=false)

externalproject_add(dav1d
SOURCE_DIR ${CMAKE_SOURCE_DIR}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${configure_command} . build
BUILD_COMMAND ninja -C ${CMAKE_SOURCE_DIR}/build
INSTALL_COMMAND ninja -C ${CMAKE_SOURCE_DIR}/build -v install
BUILD_IN_SOURCE 1)

install(CODE "execute_process(COMMAND make install_sw WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})")
1 change: 1 addition & 0 deletions depends/common/dav1d/dav1d.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
097db6f370b88bf09fec62919c0d3af64e07d58210c665ec461d63f4ec79f6a2
1 change: 1 addition & 0 deletions depends/common/dav1d/dav1d.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dav1d https://github.com/videolan/dav1d/archive/refs/tags/0.9.1.tar.gz
11 changes: 0 additions & 11 deletions depends/common/libheif/01-no-examples.patch

This file was deleted.

25 changes: 25 additions & 0 deletions depends/common/libheif/01-windows-warnings.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 956f0ee6da5f9b84a4758fb3c6fc772fc8e108db Mon Sep 17 00:00:00 2001
From: Alwin Esch <alwin.esch@web.de>
Date: Sat, 28 Aug 2021 15:15:25 +0200
Subject: [PATCH 1/4] windows-warnings

---
libheif/heif_context.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libheif/heif_context.cc b/libheif/heif_context.cc
index f208e57..0222ef0 100644
--- a/libheif/heif_context.cc
+++ b/libheif/heif_context.cc
@@ -93,7 +93,7 @@ static int32_t readvec_signed(const std::vector<uint8_t>& data, int& ptr, int le
val &= ~high_bit;

if (negative) {
- return -(high_bit - val);
+ return 0-(high_bit - val);
}
else {
return val;
--
2.25.1

24 changes: 24 additions & 0 deletions depends/common/libheif/02-remove-werror.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 5eeda141a8cb120ddcd39f179106552c2f22a60c Mon Sep 17 00:00:00 2001
From: Alwin Esch <alwin.esch@web.de>
Date: Sat, 28 Aug 2021 15:16:18 +0200
Subject: [PATCH 2/4] remove-werror

---
CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58ade87..067a3ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,6 @@ endif()

if(NOT MSVC)
add_definitions(-Wall)
- add_definitions(-Werror)
add_definitions(-Wsign-compare)
add_definitions(-Wconversion)
add_definitions(-Wno-sign-conversion)
--
2.25.1

31 changes: 0 additions & 31 deletions depends/common/libheif/02-windows-warnings.patch

This file was deleted.

22 changes: 22 additions & 0 deletions depends/common/libheif/03-disable-gdk-pixbuf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 92074c6c8cbc74353185df3d7bff23a8bdbad9fc Mon Sep 17 00:00:00 2001
From: Alwin Esch <alwin.esch@web.de>
Date: Sat, 28 Aug 2021 15:16:52 +0200
Subject: [PATCH 3/4] disable-gdk-pixbuf

---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 067a3ea..b88a457 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,4 +164,4 @@ if(WITH_EXAMPLES)
add_subdirectory (examples)
endif()
add_subdirectory (libheif)
-add_subdirectory (gdk-pixbuf)
+#add_subdirectory (gdk-pixbuf)
--
2.25.1

10 changes: 0 additions & 10 deletions depends/common/libheif/03-remove-werror.patch

This file was deleted.

9 changes: 0 additions & 9 deletions depends/common/libheif/04-disable-gdk-pixbuf.patch

This file was deleted.

28 changes: 28 additions & 0 deletions depends/common/libheif/04-fix-static-win-linkage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 660b0e46ccefdf253b9dfc119205100b29481387 Mon Sep 17 00:00:00 2001
From: Alwin Esch <alwin.esch@web.de>
Date: Sat, 28 Aug 2021 15:19:46 +0200
Subject: [PATCH 4/4] fix-static-win-linkage

---
libheif/heif.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libheif/heif.h b/libheif/heif.h
index fffc98d..e373734 100644
--- a/libheif/heif.h
+++ b/libheif/heif.h
@@ -47,9 +47,9 @@ extern "C" {

#if defined(_MSC_VER) && !defined(LIBHEIF_STATIC_BUILD)
#ifdef LIBHEIF_EXPORTS
-#define LIBHEIF_API __declspec(dllexport)
+#define LIBHEIF_API
#else
-#define LIBHEIF_API __declspec(dllimport)
+#define LIBHEIF_API
#endif
#elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
#ifdef LIBHEIF_EXPORTS
--
2.25.1

12 changes: 0 additions & 12 deletions depends/common/libheif/05-disable-x265.patch

This file was deleted.

15 changes: 0 additions & 15 deletions depends/common/libheif/06-fix-static-win-linkage.patch

This file was deleted.

1 change: 1 addition & 0 deletions depends/common/libheif/deps.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
libde265
dav1d
2 changes: 1 addition & 1 deletion depends/common/libheif/flags.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-DBUILD_SHARED_LIBS=0 -DLIBHEIF_STATIC_BUILD=1
-DBUILD_SHARED_LIBS=0 -DLIBHEIF_STATIC_BUILD=1 -DWITH_EXAMPLES=0 -DWITH_X265=0 -DWITH_RAV1E=0 -DWITH_AOM=0 -DWITH_DAV1D=1
2 changes: 1 addition & 1 deletion depends/common/libheif/libheif.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bb229e855621deb374f61bee95c4642f60c2a2496bded35df3d3c42cc6d8eefc
e1ac2abb354fdc8ccdca71363ebad7503ad731c84022cf460837f0839e171718
2 changes: 1 addition & 1 deletion depends/common/libheif/libheif.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libheif https://github.com/strukturag/libheif/releases/download/v1.6.2/libheif-1.6.2.tar.gz
libheif https://github.com/strukturag/libheif/releases/download/v1.12.0/libheif-1.12.0.tar.gz
8 changes: 3 additions & 5 deletions imagedecoder.heif/addon.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
<extension
point="kodi.imagedecoder"
library_@PLATFORM@="@LIBRARY_FILENAME@"
extension=".heif|.heic"
mimetype="image/heif|image/heic"/>
extension=".heif|.heic|.avif"
mimetype="image/heif|image/heic|image/avif"/>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">HEIF file format decoder</summary>
<description lang="en_GB">High Efficiency Image File Format (HEIF) is a file format employing HEVC (h.265) image coding for the best compression ratios currently possible.

Support for this is provided by ISO/IEC 23008-12:2017 compliant libheif.</description>
<description lang="en_GB">High Efficiency Image File Format (HEIF) is a file format employing HEVC (h.265) image coding for the best compression ratios currently possible.[CR][CR]Support for this is provided by ISO/IEC 23008-12:2017 compliant libheif.</description>
<platform>@PLATFORM@</platform>
<license>GPL-2.0-or-later</license>
<source>https://github.com/xbmc/imagedecoder.heif</source>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Kodi Media Center language file
# Addon Name: HEIF image decoder
# Addon id: imagedecoder.heif
# Addon Provider: Team Kodi
msgid ""
msgstr ""
"Project-Id-Version: KODI Addons\n"
"Report-Msgid-Bugs-To: https://github.com/xbmc/imagedecoder.heif/issues/\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Kodi Translation Team\n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/kodi-addons/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgctxt "Addon Summary"
msgid "HEIF file format decoder"
msgstr ""

msgctxt "Addon Description"
msgid "High Efficiency Image File Format (HEIF) is a file format employing HEVC (h.265) image coding for the best compression ratios currently possible.[CR][CR]Support for this is provided by ISO/IEC 23008-12:2017 compliant libheif."
msgstr ""
2 changes: 1 addition & 1 deletion src/HeifPicture.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down