diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 1ac0f4d..6996669 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,6 @@ PODS: - Expecta (1.0.6) + - libbpg (0.9.8) - libx265 (3.0): - libx265/common (= 3.0) - libx265/core (= 3.0) @@ -23,11 +24,12 @@ PODS: - libx265/input - libx265/output - SDWebImage/Core (5.0.0-beta5) - - SDWebImageBPGCoder/bpgenc (0.4.0): + - SDWebImageBPGCoder/bpgenc (0.5.0): - libx265 - SDWebImage/Core (>= 5.0.0-beta4) - SDWebImageBPGCoder/libbpg - - SDWebImageBPGCoder/libbpg (0.4.0): + - SDWebImageBPGCoder/libbpg (0.5.0): + - libbpg - SDWebImage/Core (>= 5.0.0-beta4) - Specta (1.0.7) @@ -40,6 +42,7 @@ DEPENDENCIES: SPEC REPOS: https://github.com/cocoapods/specs.git: - Expecta + - libbpg - libx265 - SDWebImage - Specta @@ -50,11 +53,12 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 + libbpg: 0d5101762d34398ef336a0c79f4ad3f84b1417c1 libx265: 23ab716aae3eff1e6b68b3db6ace8883867691c4 SDWebImage: fd609df53c0f55fdcd4705bd14c01c9d5c348d0c - SDWebImageBPGCoder: 3c1d498041a124ed49453da4108957342ff04a03 + SDWebImageBPGCoder: 7656350098535556e450a1ee05dbdf24ccee1a13 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 PODFILE CHECKSUM: 0f81121cdc589dfdeb358147154e6bd7e7bcbd4f -COCOAPODS: 1.5.3 +COCOAPODS: 1.6.1 diff --git a/Example/SDWebImageBPGCoder.xcodeproj/project.pbxproj b/Example/SDWebImageBPGCoder.xcodeproj/project.pbxproj index 73791dd..ccdde20 100644 --- a/Example/SDWebImageBPGCoder.xcodeproj/project.pbxproj +++ b/Example/SDWebImageBPGCoder.xcodeproj/project.pbxproj @@ -304,7 +304,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-SDWebImageBPGCoder_Tests/Pods-SDWebImageBPGCoder_Tests-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-SDWebImageBPGCoder_Tests/Pods-SDWebImageBPGCoder_Tests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Expecta/Expecta.framework", "${BUILT_PRODUCTS_DIR}/Specta/Specta.framework", ); @@ -315,7 +315,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SDWebImageBPGCoder_Tests/Pods-SDWebImageBPGCoder_Tests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SDWebImageBPGCoder_Tests/Pods-SDWebImageBPGCoder_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; A405C467D52955920532A2E2 /* [CP] Embed Pods Frameworks */ = { @@ -324,20 +324,22 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-SDWebImageBPGCoder_Example/Pods-SDWebImageBPGCoder_Example-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-SDWebImageBPGCoder_Example/Pods-SDWebImageBPGCoder_Example-frameworks.sh", "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/SDWebImageBPGCoder/SDWebImageBPGCoder.framework", + "${BUILT_PRODUCTS_DIR}/libbpg/libbpg.framework", "${BUILT_PRODUCTS_DIR}/libx265/libx265.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageBPGCoder.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libbpg.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libx265.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SDWebImageBPGCoder_Example/Pods-SDWebImageBPGCoder_Example-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SDWebImageBPGCoder_Example/Pods-SDWebImageBPGCoder_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; A682DAA5F0DD701CB2D76B90 /* [CP] Check Pods Manifest.lock */ = { diff --git a/SDWebImageBPGCoder.podspec b/SDWebImageBPGCoder.podspec index d902024..d1833b4 100644 --- a/SDWebImageBPGCoder.podspec +++ b/SDWebImageBPGCoder.podspec @@ -35,12 +35,9 @@ TODO: Add long description of the pod here. s.module_map = 'SDWebImageBPGCoder/Module/SDWebImageBPGCoder.modulemap' s.subspec 'libbpg' do |ss| - ss.source_files = 'SDWebImageBPGCoder/Classes/SDImageBPGCoder.{h,m}', 'SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h', 'Vendor/libbpg/include/libbpg.h' - ss.public_header_files = 'SDWebImageBPGCoder/Classes/SDImageBPGCoder.h', 'SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h', 'Vendor/libbpg/include/libbpg.h' - ss.osx.vendored_libraries = 'Vendor/libbpg/lib/mac/libbpg.a' - ss.ios.vendored_libraries = 'Vendor/libbpg/lib/ios/libbpg.a' - ss.tvos.vendored_libraries = 'Vendor/libbpg/lib/tvos/libbpg.a' - ss.watchos.vendored_libraries = 'Vendor/libbpg/lib/watchos/libbpg.a' + ss.dependency 'libbpg' + ss.source_files = 'SDWebImageBPGCoder/Classes/SDImageBPGCoder.{h,m}', 'SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h' + ss.public_header_files = 'SDWebImageBPGCoder/Classes/SDImageBPGCoder.h', 'SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h' end s.subspec 'bpgenc' do |ss| diff --git a/SDWebImageBPGCoder/Classes/bpgenc/bpgenc.h b/SDWebImageBPGCoder/Classes/bpgenc/bpgenc.h index 2984214..4d14101 100644 --- a/SDWebImageBPGCoder/Classes/bpgenc/bpgenc.h +++ b/SDWebImageBPGCoder/Classes/bpgenc/bpgenc.h @@ -25,7 +25,11 @@ #ifndef _BPGENC_H #define _BPGENC_H -#include "libbpg.h" +#if __has_include() +#import +#else +#import "libbpg.h" +#endif typedef struct { int w, h; diff --git a/SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h b/SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h index bee142b..1ed5008 100644 --- a/SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h +++ b/SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h @@ -10,7 +10,6 @@ #endif #import -#import #if defined(USE_X265) #import #endif diff --git a/Vendor/libbpg/LICENSE b/Vendor/libbpg/LICENSE deleted file mode 100644 index 9806df5..0000000 --- a/Vendor/libbpg/LICENSE +++ /dev/null @@ -1,3 +0,0 @@ -libbpg and bpgenc are released under the LGPL license (the FFmpeg part is under the LGPL, the BPG specific part is released under the BSD license). - -BPG relies on the HEVC compression technology which may be protected by patents in some countries. Most devices already include or will include hardware HEVC support, so we suggest to use it if patents are an issue. diff --git a/Vendor/libbpg/VERSION b/Vendor/libbpg/VERSION deleted file mode 100644 index e3e1807..0000000 --- a/Vendor/libbpg/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.9.8 diff --git a/Vendor/libbpg/include/libbpg.h b/Vendor/libbpg/include/libbpg.h deleted file mode 100644 index f02b02e..0000000 --- a/Vendor/libbpg/include/libbpg.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * BPG decoder - * - * Copyright (c) 2014 Fabrice Bellard - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#ifndef _LIBBPG_H -#define _LIBBPG_H - -typedef struct BPGDecoderContext BPGDecoderContext; - -typedef enum { - BPG_FORMAT_GRAY, - BPG_FORMAT_420, /* chroma at offset (0.5, 0.5) (JPEG) */ - BPG_FORMAT_422, /* chroma at offset (0.5, 0) (JPEG) */ - BPG_FORMAT_444, - BPG_FORMAT_420_VIDEO, /* chroma at offset (0, 0.5) (MPEG2) */ - BPG_FORMAT_422_VIDEO, /* chroma at offset (0, 0) (MPEG2) */ -} BPGImageFormatEnum; - -typedef enum { - BPG_CS_YCbCr, - BPG_CS_RGB, - BPG_CS_YCgCo, - BPG_CS_YCbCr_BT709, - BPG_CS_YCbCr_BT2020, - - BPG_CS_COUNT, -} BPGColorSpaceEnum; - -typedef struct { - uint32_t width; - uint32_t height; - uint8_t format; /* see BPGImageFormatEnum */ - uint8_t has_alpha; /* TRUE if an alpha plane is present */ - uint8_t color_space; /* see BPGColorSpaceEnum */ - uint8_t bit_depth; - uint8_t premultiplied_alpha; /* TRUE if the color is alpha premultiplied */ - uint8_t has_w_plane; /* TRUE if a W plane is present (for CMYK encoding) */ - uint8_t limited_range; /* TRUE if limited range for the color */ - uint8_t has_animation; /* TRUE if the image contains animations */ - uint16_t loop_count; /* animations: number of loop, 0 = infinity */ -} BPGImageInfo; - -typedef enum { - BPG_EXTENSION_TAG_EXIF = 1, - BPG_EXTENSION_TAG_ICCP = 2, - BPG_EXTENSION_TAG_XMP = 3, - BPG_EXTENSION_TAG_THUMBNAIL = 4, - BPG_EXTENSION_TAG_ANIM_CONTROL = 5, -} BPGExtensionTagEnum; - -typedef struct BPGExtensionData { - BPGExtensionTagEnum tag; - uint32_t buf_len; - uint8_t *buf; - struct BPGExtensionData *next; -} BPGExtensionData; - -typedef enum { - BPG_OUTPUT_FORMAT_RGB24, - BPG_OUTPUT_FORMAT_RGBA32, /* not premultiplied alpha */ - BPG_OUTPUT_FORMAT_RGB48, - BPG_OUTPUT_FORMAT_RGBA64, /* not premultiplied alpha */ - BPG_OUTPUT_FORMAT_CMYK32, - BPG_OUTPUT_FORMAT_CMYK64, -} BPGDecoderOutputFormat; - -#define BPG_DECODER_INFO_BUF_SIZE 16 - -BPGDecoderContext *bpg_decoder_open(void); - -/* If enable is true, extension data are kept during the image - decoding and can be accessed after bpg_decoder_decode() with - bpg_decoder_get_extension(). By default, the extension data are - discarded. */ -void bpg_decoder_keep_extension_data(BPGDecoderContext *s, int enable); - -/* return 0 if 0K, < 0 if error */ -int bpg_decoder_decode(BPGDecoderContext *s, const uint8_t *buf, int buf_len); - -/* Return the first element of the extension data list */ -BPGExtensionData *bpg_decoder_get_extension_data(BPGDecoderContext *s); - -/* return 0 if 0K, < 0 if error */ -int bpg_decoder_get_info(BPGDecoderContext *s, BPGImageInfo *p); - -/* return 0 if 0K, < 0 if error */ -int bpg_decoder_start(BPGDecoderContext *s, BPGDecoderOutputFormat out_fmt); - -/* return the frame delay for animations as a fraction (*pnum) / (*pden) - in seconds. In case there is no animation, 0 / 1 is returned. */ -void bpg_decoder_get_frame_duration(BPGDecoderContext *s, int *pnum, int *pden); - -/* return 0 if 0K, < 0 if error */ -int bpg_decoder_get_line(BPGDecoderContext *s, void *buf); - -void bpg_decoder_close(BPGDecoderContext *s); - -/* only useful for low level access to the image data */ -uint8_t *bpg_decoder_get_data(BPGDecoderContext *s, int *pline_size, int plane); - -/* Get information from the start of the image data in 'buf' (at least - min(BPG_DECODER_INFO_BUF_SIZE, file_size) bytes must be given). - - If pfirst_md != NULL, the extension data are also parsed and the - first element of the list is returned in *pfirst_md. The list must - be freed with bpg_decoder_free_extension_data(). - - BPGImageInfo.loop_count is only set if extension data are parsed. - - Return 0 if OK, < 0 if unrecognized data. */ -int bpg_decoder_get_info_from_buf(BPGImageInfo *p, - BPGExtensionData **pfirst_md, - const uint8_t *buf, int buf_len); -/* Free the extension data returned by bpg_decoder_get_info_from_buf() */ -void bpg_decoder_free_extension_data(BPGExtensionData *first_md); - -#endif /* _LIBBPG_H */ diff --git a/Vendor/libbpg/lib/ios/libbpg.a b/Vendor/libbpg/lib/ios/libbpg.a deleted file mode 100644 index 1809267..0000000 Binary files a/Vendor/libbpg/lib/ios/libbpg.a and /dev/null differ diff --git a/Vendor/libbpg/lib/mac/libbpg.a b/Vendor/libbpg/lib/mac/libbpg.a deleted file mode 100644 index afa07b3..0000000 Binary files a/Vendor/libbpg/lib/mac/libbpg.a and /dev/null differ diff --git a/Vendor/libbpg/lib/tvos/libbpg.a b/Vendor/libbpg/lib/tvos/libbpg.a deleted file mode 100644 index f501095..0000000 Binary files a/Vendor/libbpg/lib/tvos/libbpg.a and /dev/null differ diff --git a/Vendor/libbpg/lib/watchos/libbpg.a b/Vendor/libbpg/lib/watchos/libbpg.a deleted file mode 100644 index 8030fba..0000000 Binary files a/Vendor/libbpg/lib/watchos/libbpg.a and /dev/null differ