Comments (22)
just not sure how to properly test...
I will need to confirm, but I think I have 10.9 or 10.10 as lowest versions of macOS I still keep on my old Mac Pro just for this kind of scenario. If I can be of any assistance hit me up.
from melatonin_blur.
Those seems to be macOS 14.0+
from melatonin_blur.
Still getting these warnings on ee269d3 it compiles tho, so it might be correctly not using these in reality, but maybe they should be protected by macros / availability guards
from melatonin_blur.
Thanks for reporting.
I couldn't easily find versioning information on Accelerate functions. Did you see any Apple information about this, or is it just the experience you made compiling?
from melatonin_blur.
Ah right, I always forget they are specified this way. Also the header specifies
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
I've was always confused about if that was when the function was added/became available to the SDK or where it's currently available.
Assuming the latter, I'll pick an alternate implementation for < 11.0, just not sure how to properly test...
from melatonin_blur.
I'm targeting 10.13 (High Sierra) and it seems to compile fine. I'll look into adding a runtime check.
Did you run into problems compiling?
from melatonin_blur.
Thanks! I'll ping the issue when I get something to try!
from melatonin_blur.
I'm getting other compilation issues as well, and yes, i've added Accelerate.framework
from melatonin_blur.
Looks like I have some work to do here! Sorry about that, was just working hard on finding the best performing solutions, now I need to work on compatibility, it seems!
from melatonin_blur.
Probably the route to go is have things fall back to the included Gin implementation at runtime where needed (until i find time to benchmark alternatives).
from melatonin_blur.
I've tried to add (JUCE_MAC && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_VERSION_13_3)
for those methods but it seems like this doesn't work:
static void argb (const juce::Image& srcImage, juce::Image& dstImage, size_t radius)
{
jassert (srcImage.getFormat() == juce::Image::PixelFormat::ARGB);
#if (JUCE_MAC && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_VERSION_13_3) || JUCE_IOS
auto kernel = createFloatKernel (radius);
const auto w = (unsigned int) srcImage.getWidth();
const auto h = (unsigned int) srcImage.getHeight();
juce::Image::BitmapData srcData (srcImage, juce::Image::BitmapData::readWrite);
juce::Image::BitmapData dstData (dstImage, juce::Image::BitmapData::readWrite);
// vImageSepConvolve isn't happy operating in-place
vImage_Buffer src = { srcData.getLinePointer (0), h, w, (size_t) srcData.lineStride };
vImage_Buffer dst = { dstData.getLinePointer (0), h, w, (size_t) dstData.lineStride };
vImageSepConvolve_ARGB8888 (&src, &dst, nullptr, 0, 0, kernel.data(), (unsigned int) kernel.size(), kernel.data(), (unsigned int) kernel.size(), 0, Pixel_8888 { 0, 0, 0, 0 }, kvImageEdgeExtend);
#else
stackBlur::ginRGBA (img, radius); // There seems to be missing a non in-place blur in gin
#endif
from melatonin_blur.
Probably the route to go is have things fall back to the included Gin implementation at runtime where needed (until i find time to benchmark alternatives).
Or provide a good simd convolution alternative.
from melatonin_blur.
Or provide a good simd convolution alternative.
There are couple people interested in building SIMD variations of the vector implementation, so I'm betting this will happen!
from melatonin_blur.
Ok, I have a draft implementation to make all the vImage stuff conditional at both compile and run time #16
I'm going to have to get #6 done first before merging, to ensure it's happy on at least macOS 11/12/13 and Windows. Don't want any more breakage!
from melatonin_blur.
@kunitoki You should be good to go, I merged the compatibility changes in #16.
I still would like to see some evidence that the runtime checks are needed (i.e. if i can compile vImageSepConvolve on one machine, will it work on earlier targets before the API was available?) but I went the conservative route for now.
#19 and #20 are both followups for the compatibility work. Off to ADC now though!
from melatonin_blur.
Hello, I'm trying to compile on 10.14.6 mac Intel Xcode 11.3.1 and got the following compile error:
vImage.h:44:9: error: use of undeclared identifier 'vImageSepConvolve_Planar8'
Just to be sure, can you confirm you only want to target macOS 11+?
from melatonin_blur.
@kmolcard I opened a new issue for this, it should run happily on 10.14 (when compiled with something newer) but it looks like we'd need to put in a few more conditionals for it to actually compile there. I'll track the issue here: #37
from melatonin_blur.
thanks for the reply, definitely willing to help you on this if you are interesed
from melatonin_blur.
Sure! You'll just have to navigate the mess that is implementations.h and do some preprocessor juggling so MELATONIN_BLUR_VIMAGE is only set for > 11.0.
Maybe one note we should make somewhere is.. by compiling on older OS, I believe this will exclude newer macs from taking advantage of the newer/faster APIs since the code paths that run those APIs won't be available in the binary.
Also related: I'm working on a better/faster fallback implementation for older OSes/machines.
from melatonin_blur.
Thx — I meant to ask, is this on a Projucer project, exported to xcode?
from melatonin_blur.
Yes
from melatonin_blur.
#53 should handle those warnings still showing up (despite being guarded at runtime)
from melatonin_blur.
Related Issues (20)
- Drop and Inner shadows need to account for desktop/context scale HOT 1
- Drop/inner shadows when colors have alpha need tests
- Add a few tests for non-rectangular shapes (stars, etc)
- Alpha transparency for DropShadow is being provided twice and incorrect HOT 1
- Support for stroked vs. filled paths HOT 1
- Add a default constructor and setColor/Radius/Spread/etc methods
- Cache the single color blur to make shadow color changes "free"
- Moving a path should not invalidate its cached shadow (just change its origin)
- Allow compilation on macOS < 11.0
- Demo Component
- Stroked Path tests
- Text Shadows
- PNG support
- Floating point parameters
- Windows and CMake: Identify and list exactly which IPP libraries to target_link_libraries to benefit melatonin_blur HOT 1
- Translating paths by a floating point number breaks cache
- Dynamic / Progressive Blur
- Create one Shadow class which can be either a Drop Shadow or an Inner Shadow based on a constructor paramerer HOT 1
- Using spread will mess up the aspect ratio of the shadow HOT 1
- Gradient drop shadows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from melatonin_blur.