Skip to content

Commit

Permalink
fixed scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Jan 12, 2024
1 parent 1c7d1bc commit 792d414
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>JxlCoder.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>2</integer>
</dict>
<key>jxlcoder.xcscheme_^#shared#^_</key>
<dict>
Expand Down
8 changes: 4 additions & 4 deletions JxlCoder.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/awxkee/jxl-coder-swift.git', :tag => "#{s.version}" }
s.ios.deployment_target = '13.0'
s.osx.deployment_target = '12.0'
s.source_files = 'Sources/jxlc/*.{swift,h,m,cpp,mm,hpp}', "Sources/JxlCoder/*.swift", 'Sources/Module/JxlCoder.h', 'Sources/Frameworks/libjxl.xcframework/ios-arm64/Headers/**/*.h'
s.source_files = 'Sources/jxlc/**/*.{swift,h,m,cpp,mm,hpp}', "Sources/JxlCoder/*.swift", 'Sources/Module/JxlCoder.h', 'Sources/Frameworks/libjxl.xcframework/ios-arm64/Headers/**/*.h'
s.swift_version = ["5.3", "5.4", "5.5"]
s.frameworks = "Foundation", "CoreGraphics", "Accelerate"
s.ios.vendored_frameworks = 'Sources/Frameworks/libbrotlicommon.xcframework', 'Sources/Frameworks/libbrotlidec.xcframework', 'Sources/Frameworks/libbrotlienc.xcframework', 'Sources/Frameworks/libhwy.xcframework', 'Sources/Frameworks/libjxl.xcframework', 'Sources/Frameworks/libjxl_threads.xcframework', 'Sources/Frameworks/libjxl_cms.xcframework', 'Sources/Frameworks/libskcms.xcframework'
s.osx.vendored_frameworks = 'Sources/Frameworks/libbrotlicommon.xcframework', 'Sources/Frameworks/libbrotlidec.xcframework', 'Sources/Frameworks/libbrotlienc.xcframework', 'Sources/Frameworks/libhwy.xcframework', 'Sources/Frameworks/libjxl.xcframework', 'Sources/Frameworks/libjxl_threads.xcframework', 'Sources/Frameworks/libjxl_cms.xcframework', 'Sources/Frameworks/libskcms.xcframework'
s.public_header_files = 'Sources/jxlc/**.h', 'Sources/jxlc/**.hpp', 'Headers/**/*.h', 'Sources/jxlc/algo/**.h'
s.public_header_files = 'Sources/jxlc/**.h', 'Sources/jxlc/**.hpp', 'Headers/**/*.h'
s.project_header_files = 'Sources/jxlc/JxlWorker.hpp'
s.pod_target_xcconfig = {
'OTHER_CXXFLAGS' => '$(inherited) -std=c++20 -ffast-math',
'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_TARGET_SRCROOT)/Sources/Frameworks/libjxl.xcframework/ios-arm64/Headers" "$(PODS_TARGET_SRCROOT)/Sources/Frameworks/libhwy.xcframework/ios-arm64/Headers" "$(PODS_TARGET_SRCROOT)/Sources/jxlc"',
'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_TARGET_SRCROOT)/Sources/Frameworks/libjxl.xcframework/ios-arm64/Headers" "$(PODS_TARGET_SRCROOT)/Sources/Frameworks/libhwy.xcframework/ios-arm64/Headers"',
'OTHER_CPLUSPLUSFLAGS' => '$(inherited) -fmodules -fcxx-modules -std=c++20 -ffast-math'
}
s.preserve_paths = "Sources/Frameworks/*.xcframework", "Sources/Frameworks/*.xcframework/**/Headers", "Sources/Frameworks/libjxl.xcframework/ios-arm64/Headers/jxl", "Sources/Frameworks/libjxl.xcframework/ios-arm64/Headers/jpegli",
"Sources/Frameworks/libjxl.xcframework/ios-arm64/Headers/libhwy", "Sources/jxlc/algo"
"Sources/Frameworks/libjxl.xcframework/ios-arm64/Headers/libhwy"
s.libraries = 'c++'
s.requires_arc = true
end
Expand Down
2 changes: 2 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ let package = Package(
dependencies: ["libbrotlicommon", "libbrotlidec", "libbrotlienc", "libhwy",
"libjxl_threads", "libjxl", "libjxl_cms", "libskcms"],
publicHeadersPath: "include",
cSettings: [.headerSearchPath("./algo")],
cxxSettings: [.headerSearchPath("./algo")],
linkerSettings: [
.linkedFramework("Accelerate")
]),
Expand Down
6 changes: 3 additions & 3 deletions Sources/jxlc/XScaler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "half.hpp"
#include <thread>
#include <vector>
#include "algo/sampler.h"
#include "sampler.h"

#define HWY_COMPILE_ONLY_STATIC

Expand All @@ -21,8 +21,8 @@

#include "hwy/foreach_target.h"
#include "hwy/highway.h"
#include "algo/sampler-inl.h"
#include "algo/math-inl.h"
#include "sampler-inl.h"
#include "math-inl.h"

using namespace half_float;
using namespace std;
Expand Down

0 comments on commit 792d414

Please sign in to comment.