[realsense2] Update to v2.10.1 (#2956)

* [realsense2] Update to v2.10.1

Update realsense2 port to librealsense v2.10.1.

* [realsense2] Change HEAD to development

Change HEAD to development.
The latest branch of librealsense is "development".

* [realsense2] Add option to support RGB image decode using AVX2

Add option to support RGB image decode using AVX2.
This option will be deprecated in the later versions.

* [realsense2] Add debug postfix

Add debug postfix "_d".
This commit is contained in:
Tsukasa Sugiura 2018-03-08 04:01:49 +09:00 committed by Robert Schumacher
parent ae1ce5aaa7
commit a03df3f433
5 changed files with 102 additions and 29 deletions

View File

@ -1,3 +1,6 @@
Source: realsense2
Version: 2.10.0
Version: 2.10.1
Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300).
Feature: avx2
Description: rgb image decode using avx2

View File

@ -0,0 +1,67 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9425b92d..21232504 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -299,6 +299,8 @@ if(BUILD_EASYLOGGINGPP)
list(APPEND REALSENSE_HPP third-party/easyloggingpp/src/easylogging++.h)
endif()
+option(BUILD_WITH_STATIC_CRT "Build with static link CRT" ON)
+
if(WIN32)
source_group("Source Files\\Backend" FILES
src/win/win-helpers.cpp
@@ -484,15 +486,17 @@ if(WIN32)
src/proc/disparity-transform.h
)
- foreach(flag_var
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
- if(${flag_var} MATCHES "/MD")
- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
- endif(${flag_var} MATCHES "/MD")
- endforeach(flag_var)
+ if(BUILD_WITH_STATIC_CRT)
+ foreach(flag_var
+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
+ if(${flag_var} MATCHES "/MD")
+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ endif(${flag_var} MATCHES "/MD")
+ endforeach(flag_var)
+ endif()
else()
endif()
@@ -652,15 +656,17 @@ if (BUILD_WITH_TM2)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake)
find_package(libtm REQUIRED)
- foreach(flag_var
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
- if(${flag_var} MATCHES "/MD")
- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
- endif(${flag_var} MATCHES "/MD")
- endforeach(flag_var)
+ if(BUILD_WITH_STATIC_CRT)
+ foreach(flag_var
+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
+ if(${flag_var} MATCHES "/MD")
+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ endif(${flag_var} MATCHES "/MD")
+ endforeach(flag_var)
+ endif()
list(APPEND REALSENSE_HPP
src/tm2/tm-context.h

View File

@ -1,21 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6717b19..3fb373be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -453,16 +453,6 @@ if(WIN32)
src/proc/syncer-processing-block.h
src/proc/disparity-transform.h
)
-
- foreach(flag_var
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
- if(${flag_var} MATCHES "/MD")
- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
- endif(${flag_var} MATCHES "/MD")
- endforeach(flag_var)
else()
endif()

View File

@ -0,0 +1,12 @@
diff --git a/src/image.cpp b/src/image.cpp
index 47cc68d8..04a8afd3 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -8,6 +8,7 @@
#ifdef __SSSE3__
#include <tmmintrin.h> // For SSE3 intrinsic used in unpack_yuy2_sse
+#include <immintrin.h>
#endif
#pragma pack(push, 1) // All structs in this file are assumed to be byte-packed

View File

@ -3,18 +3,27 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO IntelRealSense/librealsense
REF v2.10.0
SHA512 af5f77eb69620e8485bbe0b7c82c405ed518c50b3319e4c174c002180c4842d5dbfaab354051ed4b287effac58ae93dd1160ebc27d35def58e685874a89c02ee
HEAD_REF master
REF v2.10.1
SHA512 fb00a424a5bd7335cc661261e76cf623e27a89af1033692d4cb6ed523af1295359929c235e82253911e61323cb7b82551a9223862174cb0e2363ac944b2db923
HEAD_REF development
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/crt-linkage-restriction.patch
${CMAKE_CURRENT_LIST_DIR}/build_with_static_crt.patch # https://github.com/IntelRealSense/librealsense/pull/1262
${CMAKE_CURRENT_LIST_DIR}/fix_rgb_using_avx2.patch # https://github.com/IntelRealSense/librealsense/pull/1245
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
# This option will be deprecated in the later versions.
# Please see Pull Request #1245. https://github.com/IntelRealSense/librealsense/pull/1245
set(RGB_USING_AVX2 OFF)
if("avx2" IN_LIST FEATURES)
set(RGB_USING_AVX2 ON)
endif()
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LIBRARY_LINKAGE)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@ -24,10 +33,13 @@ vcpkg_configure_cmake(
-DBUILD_GRAPHICAL_EXAMPLES=OFF
-DBUILD_PYTHON_BINDINGS=OFF
-DBUILD_UNIT_TESTS=OFF
-DBUILD_WITH_OPENMP=OFF # keep OpenMP off until librealsense issue #744 is patched
-DBUILD_SHARED_LIBS=${BUILD_SHARED}
-DBUILD_WITH_OPENMP=OFF
-DBUILD_SHARED_LIBS=${BUILD_LIBRARY_LINKAGE}
-DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE}
-DRGB_USING_AVX2=${RGB_USING_AVX2}
OPTIONS_DEBUG
"-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
-DCMAKE_DEBUG_POSTFIX="_d"
)
vcpkg_install_cmake()