Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libjpeg-turbo] Enable NEON intrinsics for ARM builds #24775

Merged
merged 2 commits into from
May 20, 2022
Merged
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
2 changes: 1 addition & 1 deletion ports/libjpeg-turbo/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vcpkg_from_github(
)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF)
set(LIBJPEGTURBO_SIMD -DWITH_SIMD=ON -DNEON_INTRINSICS=ON)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question here is if NEON_INTRNSICS are valid on all arm architectures or not.

Copy link
Member Author

@ZacWalk ZacWalk May 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are runtime checks to determine if SIMD versions of routines should be called.
The intrinsics look compatible with ARMv7 and ARMv8.
I have only tested on Windows ARM64 devices though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is consistent with what other ports do.

else()
set(LIBJPEGTURBO_SIMD -DWITH_SIMD=ON)
vcpkg_find_acquire_program(NASM)
Expand Down
2 changes: 1 addition & 1 deletion ports/libjpeg-turbo/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libjpeg-turbo",
"version": "2.1.3",
"port-version": 2,
"port-version": 3,
"description": "libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems.",
"homepage": "https://github.com/libjpeg-turbo/libjpeg-turbo",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3694,7 +3694,7 @@
},
"libjpeg-turbo": {
"baseline": "2.1.3",
"port-version": 2
"port-version": 3
},
"libjuice": {
"baseline": "1.0.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libjpeg-turbo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f3ab7c40b47aa03953467e7697d3eea7b60d624e",
"version": "2.1.3",
"port-version": 3
},
{
"git-tree": "dd9bb6eb0d4e28d2b3ef0d83b6b9ef736555621d",
"version": "2.1.3",
Expand Down