iOS images unpremult SIMD support

Support for SIMD instructions for unpremult

First checkin, using rive::int16x4 instructions : 1 pixel at a time
Further checkin, using rive::int16x4 instructions : 2 pixels at a time
Last checkin, avoid computation when opaque pixels (assume there will be enough opaque pixels to warrant this)

Thanks to Chris for the SIMD instructions usage in rive

More checkins: move the decode and unpremult to the rive decoder - this requires modifications to build files. The benefits are we are now running tests on this path. However, there are some issues with decoding two images for tests:

"../../test/assets/bad.jpg" ... Apple Preview app cannot open this image, however, the current test says that it should be not null
And
"../../test/assets/bad.png", Apple Preview app can load this images, however, the current test says that it should be null

Diffs=
e992059d6 iOS images unpremult SIMD support (#7875)

Co-authored-by: rivessamr <suki@rive.app>
This commit is contained in:
rivessamr
2024-08-21 18:29:40 +00:00
parent f0647c10a1
commit a8b7f00bed
12 changed files with 280 additions and 77 deletions

View File

@@ -71,13 +71,13 @@ defines({ 'NDEBUG' })
optimize('On')
filter({ 'options:with_rive_layout' })
do
defines({ 'YOGA_EXPORT=' })
includedirs({ yoga })
links({
'rive_yoga',
})
end
do
defines({ 'YOGA_EXPORT=' })
includedirs({ yoga })
links({
'rive_yoga',
})
end
-- Clean Function --
newaction({