Merge branch 'master' of https://github.com/Itseez/opencv into add_bs_tutorial
Conflicts: modules/stitching/src/motion_estimators.cpp
This commit is contained in:
commit
5f7163bff2
80
.gitattributes
vendored
80
.gitattributes
vendored
@ -1,42 +1,58 @@
|
|||||||
.git* export-ignore
|
|
||||||
|
|
||||||
* text=auto whitespace=trailing-space,space-before-tab,-indent-with-non-tab,tab-in-indent,tabwidth=4
|
* text=auto whitespace=trailing-space,space-before-tab,-indent-with-non-tab,tab-in-indent,tabwidth=4
|
||||||
|
|
||||||
*.py text
|
.git* text export-ignore
|
||||||
*.cpp text
|
|
||||||
*.hpp text
|
|
||||||
*.cxx text
|
|
||||||
*.hxx text
|
|
||||||
*.mm text
|
|
||||||
*.c text
|
|
||||||
*.h text
|
|
||||||
*.i text
|
|
||||||
*.js text
|
|
||||||
*.java text
|
|
||||||
*.scala text
|
|
||||||
*.cu text
|
|
||||||
*.cl text
|
|
||||||
*.css_t text
|
|
||||||
*.qrc text
|
|
||||||
*.qss text
|
|
||||||
*.S text
|
|
||||||
*.rst text
|
|
||||||
*.tex text
|
|
||||||
*.sty text
|
|
||||||
|
|
||||||
*.aidl text
|
*.aidl text
|
||||||
*.mk text
|
*.appxmanifest text
|
||||||
|
*.bib text
|
||||||
|
*.c text
|
||||||
|
*.cl text
|
||||||
|
*.conf text
|
||||||
|
*.cpp text
|
||||||
|
*.css_t text
|
||||||
|
*.cu text
|
||||||
|
*.cxx text
|
||||||
|
*.def text
|
||||||
|
*.filelist text
|
||||||
|
*.h text
|
||||||
|
*.hpp text
|
||||||
|
*.htm text
|
||||||
|
*.html text
|
||||||
|
*.hxx text
|
||||||
|
*.i text
|
||||||
|
*.idl text
|
||||||
|
*.java text
|
||||||
|
*.js text
|
||||||
|
*.mk text
|
||||||
|
*.mm text
|
||||||
|
*.plist text
|
||||||
|
*.properties text
|
||||||
|
*.py text
|
||||||
|
*.qrc text
|
||||||
|
*.qss text
|
||||||
|
*.S text
|
||||||
|
*.sbt text
|
||||||
|
*.scala text
|
||||||
|
*.sty text
|
||||||
|
*.tex text
|
||||||
|
*.txt text
|
||||||
|
*.xaml text
|
||||||
|
|
||||||
|
# reST underlines/overlines can look like conflict markers
|
||||||
|
*.rst text conflict-marker-size=80
|
||||||
|
|
||||||
*.cmake text whitespace=tabwidth=2
|
*.cmake text whitespace=tabwidth=2
|
||||||
*.cmakein text whitespace=tabwidth=2
|
*.cmakein text whitespace=tabwidth=2
|
||||||
*.in text whitespace=tabwidth=2
|
*.in text whitespace=tabwidth=2
|
||||||
CMakeLists.txt text whitespace=tabwidth=2
|
CMakeLists.txt text whitespace=tabwidth=2
|
||||||
|
|
||||||
*.png binary
|
*.avi binary
|
||||||
*.jpeg binary
|
*.bmp binary
|
||||||
*.jpg binary
|
|
||||||
*.exr binary
|
*.exr binary
|
||||||
*.ico binary
|
*.ico binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.jpg binary
|
||||||
|
*.png binary
|
||||||
|
|
||||||
*.a binary
|
*.a binary
|
||||||
*.so binary
|
*.so binary
|
||||||
@ -47,6 +63,7 @@ CMakeLists.txt text whitespace=tabwidth=2
|
|||||||
*.pbxproj binary
|
*.pbxproj binary
|
||||||
*.vec binary
|
*.vec binary
|
||||||
*.doc binary
|
*.doc binary
|
||||||
|
*.dia binary
|
||||||
|
|
||||||
*.xml -text whitespace=cr-at-eol
|
*.xml -text whitespace=cr-at-eol
|
||||||
*.yml -text whitespace=cr-at-eol
|
*.yml -text whitespace=cr-at-eol
|
||||||
@ -55,9 +72,12 @@ CMakeLists.txt text whitespace=tabwidth=2
|
|||||||
.cproject -text whitespace=cr-at-eol merge=union
|
.cproject -text whitespace=cr-at-eol merge=union
|
||||||
org.eclipse.jdt.core.prefs -text whitespace=cr-at-eol merge=union
|
org.eclipse.jdt.core.prefs -text whitespace=cr-at-eol merge=union
|
||||||
|
|
||||||
*.vcproj text eol=crlf merge=union
|
|
||||||
*.bat text eol=crlf
|
*.bat text eol=crlf
|
||||||
*.cmd text eol=crlf
|
*.cmd text eol=crlf
|
||||||
*.cmd.tmpl text eol=crlf
|
*.cmd.tmpl text eol=crlf
|
||||||
|
*.dsp text eol=crlf -whitespace
|
||||||
|
*.sln text eol=crlf -whitespace
|
||||||
|
*.vcproj text eol=crlf -whitespace merge=union
|
||||||
|
*.vcxproj text eol=crlf -whitespace merge=union
|
||||||
|
|
||||||
*.sh text eol=lf
|
*.sh text eol=lf
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ tegra/
|
|||||||
.*.swp
|
.*.swp
|
||||||
tags
|
tags
|
||||||
build/
|
build/
|
||||||
|
Thumbs.db
|
||||||
|
1
3rdparty/.gitattributes
vendored
Normal file
1
3rdparty/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
* -whitespace
|
2
3rdparty/ffmpeg/ffmpeg_version.cmake
vendored
2
3rdparty/ffmpeg/ffmpeg_version.cmake
vendored
@ -8,4 +8,4 @@ set(HAVE_GENTOO_FFMPEG 1)
|
|||||||
set(ALIASOF_libavcodec_VERSION 53.61.100)
|
set(ALIASOF_libavcodec_VERSION 53.61.100)
|
||||||
set(ALIASOF_libavformat_VERSION 53.32.100)
|
set(ALIASOF_libavformat_VERSION 53.32.100)
|
||||||
set(ALIASOF_libavutil_VERSION 51.35.100)
|
set(ALIASOF_libavutil_VERSION 51.35.100)
|
||||||
set(ALIASOF_libswscale_VERSION 2.1.100)
|
set(ALIASOF_libswscale_VERSION 2.1.100)
|
||||||
|
2
3rdparty/ffmpeg/make.bat
vendored
2
3rdparty/ffmpeg/make.bat
vendored
@ -1,2 +1,2 @@
|
|||||||
set path=c:\dev\msys32\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -lwsock32
|
set path=c:\dev\msys32\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -lwsock32
|
||||||
set path=c:\dev\msys64\bin;%path% & gcc -m64 -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lavcore64 -lwsock32 -lws2_32
|
set path=c:\dev\msys64\bin;%path% & gcc -m64 -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lavcore64 -lwsock32 -lws2_32
|
||||||
|
2
3rdparty/ffmpeg/readme.txt
vendored
2
3rdparty/ffmpeg/readme.txt
vendored
@ -40,5 +40,3 @@ How to update opencv_ffmpeg.dll and opencv_ffmpeg_64.dll when a new version of F
|
|||||||
|
|
||||||
8. Then, go to <opencv>\3rdparty\ffmpeg, edit make.bat
|
8. Then, go to <opencv>\3rdparty\ffmpeg, edit make.bat
|
||||||
(change paths to the actual paths to your msys32 and msys64 distributions) and then run make.bat
|
(change paths to the actual paths to your msys32 and msys64 distributions) and then run make.bat
|
||||||
|
|
||||||
|
|
||||||
|
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r2.2.0.so
vendored
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r2.2.0.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r2.3.3.so
vendored
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r2.3.3.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r3.0.1.so
vendored
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r3.0.1.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.0.so
vendored
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.0.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.3.so
vendored
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.3.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.1.1.so
vendored
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.1.1.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.2.0.so
vendored
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.2.0.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.3.0.so
vendored
Executable file
BIN
3rdparty/lib/armeabi-v7a/libnative_camera_r4.3.0.so
vendored
Executable file
Binary file not shown.
BIN
3rdparty/lib/armeabi/libnative_camera_r2.2.0.so
vendored
BIN
3rdparty/lib/armeabi/libnative_camera_r2.2.0.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi/libnative_camera_r2.3.3.so
vendored
BIN
3rdparty/lib/armeabi/libnative_camera_r2.3.3.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi/libnative_camera_r3.0.1.so
vendored
BIN
3rdparty/lib/armeabi/libnative_camera_r3.0.1.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi/libnative_camera_r4.0.0.so
vendored
BIN
3rdparty/lib/armeabi/libnative_camera_r4.0.0.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi/libnative_camera_r4.0.3.so
vendored
BIN
3rdparty/lib/armeabi/libnative_camera_r4.0.3.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi/libnative_camera_r4.1.1.so
vendored
BIN
3rdparty/lib/armeabi/libnative_camera_r4.1.1.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi/libnative_camera_r4.2.0.so
vendored
BIN
3rdparty/lib/armeabi/libnative_camera_r4.2.0.so
vendored
Binary file not shown.
BIN
3rdparty/lib/armeabi/libnative_camera_r4.3.0.so
vendored
Executable file
BIN
3rdparty/lib/armeabi/libnative_camera_r4.3.0.so
vendored
Executable file
Binary file not shown.
BIN
3rdparty/lib/mips/libnative_camera_r4.0.3.so
vendored
BIN
3rdparty/lib/mips/libnative_camera_r4.0.3.so
vendored
Binary file not shown.
BIN
3rdparty/lib/mips/libnative_camera_r4.1.1.so
vendored
BIN
3rdparty/lib/mips/libnative_camera_r4.1.1.so
vendored
Binary file not shown.
BIN
3rdparty/lib/mips/libnative_camera_r4.2.0.so
vendored
BIN
3rdparty/lib/mips/libnative_camera_r4.2.0.so
vendored
Binary file not shown.
BIN
3rdparty/lib/mips/libnative_camera_r4.3.0.so
vendored
Executable file
BIN
3rdparty/lib/mips/libnative_camera_r4.3.0.so
vendored
Executable file
Binary file not shown.
BIN
3rdparty/lib/x86/libnative_camera_r2.3.3.so
vendored
BIN
3rdparty/lib/x86/libnative_camera_r2.3.3.so
vendored
Binary file not shown.
BIN
3rdparty/lib/x86/libnative_camera_r3.0.1.so
vendored
BIN
3rdparty/lib/x86/libnative_camera_r3.0.1.so
vendored
Binary file not shown.
BIN
3rdparty/lib/x86/libnative_camera_r4.0.3.so
vendored
BIN
3rdparty/lib/x86/libnative_camera_r4.0.3.so
vendored
Binary file not shown.
BIN
3rdparty/lib/x86/libnative_camera_r4.1.1.so
vendored
BIN
3rdparty/lib/x86/libnative_camera_r4.1.1.so
vendored
Binary file not shown.
BIN
3rdparty/lib/x86/libnative_camera_r4.2.0.so
vendored
BIN
3rdparty/lib/x86/libnative_camera_r4.2.0.so
vendored
Binary file not shown.
BIN
3rdparty/lib/x86/libnative_camera_r4.3.0.so
vendored
Executable file
BIN
3rdparty/lib/x86/libnative_camera_r4.3.0.so
vendored
Executable file
Binary file not shown.
8
3rdparty/libpng/CMakeLists.txt
vendored
8
3rdparty/libpng/CMakeLists.txt
vendored
@ -9,7 +9,7 @@ else()
|
|||||||
project(${PNG_LIBRARY})
|
project(${PNG_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR})
|
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIRS})
|
||||||
|
|
||||||
file(GLOB lib_srcs *.c)
|
file(GLOB lib_srcs *.c)
|
||||||
file(GLOB lib_hdrs *.h)
|
file(GLOB lib_hdrs *.h)
|
||||||
@ -29,8 +29,12 @@ if(MSVC)
|
|||||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
|
||||||
|
if (HAVE_WINRT)
|
||||||
|
add_definitions(-DHAVE_WINRT)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(${PNG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
add_library(${PNG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
||||||
target_link_libraries(${PNG_LIBRARY} ${ZLIB_LIBRARY})
|
target_link_libraries(${PNG_LIBRARY} ${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
|
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
|
||||||
|
22
3rdparty/libpng/opencv-libpng.patch
vendored
Normal file
22
3rdparty/libpng/opencv-libpng.patch
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/3rdparty/libpng/pngpriv.h b/3rdparty/libpng/pngpriv.h
|
||||||
|
index 07b2b0b..e7824b8 100644
|
||||||
|
--- a/3rdparty/libpng/pngpriv.h
|
||||||
|
+++ b/3rdparty/libpng/pngpriv.h
|
||||||
|
@@ -360,7 +360,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
||||||
|
|
||||||
|
/* Memory model/platform independent fns */
|
||||||
|
#ifndef PNG_ABORT
|
||||||
|
-# ifdef _WINDOWS_
|
||||||
|
+# if defined(_WINDOWS_) && !defined(HAVE_WINRT)
|
||||||
|
# define PNG_ABORT() ExitProcess(0)
|
||||||
|
# else
|
||||||
|
# define PNG_ABORT() abort()
|
||||||
|
@@ -378,7 +378,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
||||||
|
# define png_memcpy _fmemcpy
|
||||||
|
# define png_memset _fmemset
|
||||||
|
#else
|
||||||
|
-# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */
|
||||||
|
+# if defined(_WINDOWS_) && !defined(HAVE_WINRT) /* Favor Windows over C runtime fns */
|
||||||
|
# define CVT_PTR(ptr) (ptr)
|
||||||
|
# define CVT_PTR_NOCHECK(ptr) (ptr)
|
||||||
|
# define png_strlen lstrlenA
|
4
3rdparty/libpng/pngpriv.h
vendored
4
3rdparty/libpng/pngpriv.h
vendored
@ -360,7 +360,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
|||||||
|
|
||||||
/* Memory model/platform independent fns */
|
/* Memory model/platform independent fns */
|
||||||
#ifndef PNG_ABORT
|
#ifndef PNG_ABORT
|
||||||
# ifdef _WINDOWS_
|
# if defined(_WINDOWS_) && !defined(HAVE_WINRT)
|
||||||
# define PNG_ABORT() ExitProcess(0)
|
# define PNG_ABORT() ExitProcess(0)
|
||||||
# else
|
# else
|
||||||
# define PNG_ABORT() abort()
|
# define PNG_ABORT() abort()
|
||||||
@ -378,7 +378,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
|||||||
# define png_memcpy _fmemcpy
|
# define png_memcpy _fmemcpy
|
||||||
# define png_memset _fmemset
|
# define png_memset _fmemset
|
||||||
#else
|
#else
|
||||||
# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */
|
# if defined(_WINDOWS_) && !defined(HAVE_WINRT) /* Favor Windows over C runtime fns */
|
||||||
# define CVT_PTR(ptr) (ptr)
|
# define CVT_PTR(ptr) (ptr)
|
||||||
# define CVT_PTR_NOCHECK(ptr) (ptr)
|
# define CVT_PTR_NOCHECK(ptr) (ptr)
|
||||||
# define png_strlen lstrlenA
|
# define png_strlen lstrlenA
|
||||||
|
2
3rdparty/libtiff/CMakeLists.txt
vendored
2
3rdparty/libtiff/CMakeLists.txt
vendored
@ -24,7 +24,7 @@ endif()
|
|||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmakein"
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmakein"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/tif_config.h" @ONLY)
|
"${CMAKE_CURRENT_BINARY_DIR}/tif_config.h" @ONLY)
|
||||||
|
|
||||||
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" ${ZLIB_INCLUDE_DIR})
|
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" ${ZLIB_INCLUDE_DIRS})
|
||||||
|
|
||||||
set(lib_srcs
|
set(lib_srcs
|
||||||
tif_aux.c
|
tif_aux.c
|
||||||
|
1
3rdparty/libtiff/tif_config.h.cmakein
vendored
1
3rdparty/libtiff/tif_config.h.cmakein
vendored
@ -168,4 +168,3 @@
|
|||||||
|
|
||||||
/* Support Deflate compression */
|
/* Support Deflate compression */
|
||||||
#define ZIP_SUPPORT 1
|
#define ZIP_SUPPORT 1
|
||||||
|
|
||||||
|
2
3rdparty/openexr/CMakeLists.txt
vendored
2
3rdparty/openexr/CMakeLists.txt
vendored
@ -22,7 +22,7 @@ set(OPENEXR_INCLUDE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Half"
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Imath"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Imath"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/IlmImf")
|
"${CMAKE_CURRENT_SOURCE_DIR}/IlmImf")
|
||||||
|
|
||||||
ocv_include_directories("${CMAKE_CURRENT_BINARY_DIR}" ${ZLIB_INCLUDE_DIR} ${OPENEXR_INCLUDE_PATHS})
|
ocv_include_directories("${CMAKE_CURRENT_BINARY_DIR}" ${ZLIB_INCLUDE_DIRS} ${OPENEXR_INCLUDE_PATHS})
|
||||||
|
|
||||||
file(GLOB lib_srcs Half/half.cpp Iex/*.cpp IlmThread/*.cpp Imath/*.cpp IlmImf/*.cpp)
|
file(GLOB lib_srcs Half/half.cpp Iex/*.cpp IlmThread/*.cpp Imath/*.cpp IlmImf/*.cpp)
|
||||||
file(GLOB lib_hdrs Half/*.h Iex/Iex*.h IlmThread/IlmThread*.h Imath/Imath*.h IlmImf/*.h)
|
file(GLOB lib_hdrs Half/*.h Iex/Iex*.h IlmThread/IlmThread*.h Imath/Imath*.h IlmImf/*.h)
|
||||||
|
2
3rdparty/tbb/.gitignore
vendored
2
3rdparty/tbb/.gitignore
vendored
@ -1 +1 @@
|
|||||||
tbb*.tgz
|
tbb*.tgz
|
||||||
|
63
3rdparty/zlib/ChangeLog
vendored
63
3rdparty/zlib/ChangeLog
vendored
@ -1,6 +1,69 @@
|
|||||||
|
|
||||||
ChangeLog file for zlib
|
ChangeLog file for zlib
|
||||||
|
|
||||||
|
Changes in 1.2.8 (28 Apr 2013)
|
||||||
|
- Update contrib/minizip/iowin32.c for Windows RT [Vollant]
|
||||||
|
- Do not force Z_CONST for C++
|
||||||
|
- Clean up contrib/vstudio [Ro§]
|
||||||
|
- Correct spelling error in zlib.h
|
||||||
|
- Fix mixed line endings in contrib/vstudio
|
||||||
|
|
||||||
|
Changes in 1.2.7.3 (13 Apr 2013)
|
||||||
|
- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc
|
||||||
|
|
||||||
|
Changes in 1.2.7.2 (13 Apr 2013)
|
||||||
|
- Change check for a four-byte type back to hexadecimal
|
||||||
|
- Fix typo in win32/Makefile.msc
|
||||||
|
- Add casts in gzwrite.c for pointer differences
|
||||||
|
|
||||||
|
Changes in 1.2.7.1 (24 Mar 2013)
|
||||||
|
- Replace use of unsafe string functions with snprintf if available
|
||||||
|
- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink]
|
||||||
|
- Fix gzgetc undefine when Z_PREFIX set [Turk]
|
||||||
|
- Eliminate use of mktemp in Makefile (not always available)
|
||||||
|
- Fix bug in 'F' mode for gzopen()
|
||||||
|
- Add inflateGetDictionary() function
|
||||||
|
- Correct comment in deflate.h
|
||||||
|
- Use _snprintf for snprintf in Microsoft C
|
||||||
|
- On Darwin, only use /usr/bin/libtool if libtool is not Apple
|
||||||
|
- Delete "--version" file if created by "ar --version" [Richard G.]
|
||||||
|
- Fix configure check for veracity of compiler error return codes
|
||||||
|
- Fix CMake compilation of static lib for MSVC2010 x64
|
||||||
|
- Remove unused variable in infback9.c
|
||||||
|
- Fix argument checks in gzlog_compress() and gzlog_write()
|
||||||
|
- Clean up the usage of z_const and respect const usage within zlib
|
||||||
|
- Clean up examples/gzlog.[ch] comparisons of different types
|
||||||
|
- Avoid shift equal to bits in type (caused endless loop)
|
||||||
|
- Fix unintialized value bug in gzputc() introduced by const patches
|
||||||
|
- Fix memory allocation error in examples/zran.c [Nor]
|
||||||
|
- Fix bug where gzopen(), gzclose() would write an empty file
|
||||||
|
- Fix bug in gzclose() when gzwrite() runs out of memory
|
||||||
|
- Check for input buffer malloc failure in examples/gzappend.c
|
||||||
|
- Add note to contrib/blast to use binary mode in stdio
|
||||||
|
- Fix comparisons of differently signed integers in contrib/blast
|
||||||
|
- Check for invalid code length codes in contrib/puff
|
||||||
|
- Fix serious but very rare decompression bug in inftrees.c
|
||||||
|
- Update inflateBack() comments, since inflate() can be faster
|
||||||
|
- Use underscored I/O function names for WINAPI_FAMILY
|
||||||
|
- Add _tr_flush_bits to the external symbols prefixed by --zprefix
|
||||||
|
- Add contrib/vstudio/vc10 pre-build step for static only
|
||||||
|
- Quote --version-script argument in CMakeLists.txt
|
||||||
|
- Don't specify --version-script on Apple platforms in CMakeLists.txt
|
||||||
|
- Fix casting error in contrib/testzlib/testzlib.c
|
||||||
|
- Fix types in contrib/minizip to match result of get_crc_table()
|
||||||
|
- Simplify contrib/vstudio/vc10 with 'd' suffix
|
||||||
|
- Add TOP support to win32/Makefile.msc
|
||||||
|
- Suport i686 and amd64 assembler builds in CMakeLists.txt
|
||||||
|
- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h
|
||||||
|
- Add vc11 and vc12 build files to contrib/vstudio
|
||||||
|
- Add gzvprintf() as an undocumented function in zlib
|
||||||
|
- Fix configure for Sun shell
|
||||||
|
- Remove runtime check in configure for four-byte integer type
|
||||||
|
- Add casts and consts to ease user conversion to C++
|
||||||
|
- Add man pages for minizip and miniunzip
|
||||||
|
- In Makefile uninstall, don't rm if preceding cd fails
|
||||||
|
- Do not return Z_BUF_ERROR if deflateParam() has nothing to write
|
||||||
|
|
||||||
Changes in 1.2.7 (2 May 2012)
|
Changes in 1.2.7 (2 May 2012)
|
||||||
- Replace use of memmove() with a simple copy for portability
|
- Replace use of memmove() with a simple copy for portability
|
||||||
- Test for existence of strerror
|
- Test for existence of strerror
|
||||||
|
6
3rdparty/zlib/README
vendored
6
3rdparty/zlib/README
vendored
@ -1,6 +1,6 @@
|
|||||||
ZLIB DATA COMPRESSION LIBRARY
|
ZLIB DATA COMPRESSION LIBRARY
|
||||||
|
|
||||||
zlib 1.2.7 is a general purpose data compression library. All the code is
|
zlib 1.2.8 is a general purpose data compression library. All the code is
|
||||||
thread safe. The data format used by the zlib library is described by RFCs
|
thread safe. The data format used by the zlib library is described by RFCs
|
||||||
(Request for Comments) 1950 to 1952 in the files
|
(Request for Comments) 1950 to 1952 in the files
|
||||||
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
|
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
|
||||||
@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
|
|||||||
issue of Dr. Dobb's Journal; a copy of the article is available at
|
issue of Dr. Dobb's Journal; a copy of the article is available at
|
||||||
http://marknelson.us/1997/01/01/zlib-engine/ .
|
http://marknelson.us/1997/01/01/zlib-engine/ .
|
||||||
|
|
||||||
The changes made in version 1.2.7 are documented in the file ChangeLog.
|
The changes made in version 1.2.8 are documented in the file ChangeLog.
|
||||||
|
|
||||||
Unsupported third party contributions are provided in directory contrib/ .
|
Unsupported third party contributions are provided in directory contrib/ .
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ Acknowledgments:
|
|||||||
|
|
||||||
Copyright notice:
|
Copyright notice:
|
||||||
|
|
||||||
(C) 1995-2012 Jean-loup Gailly and Mark Adler
|
(C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
2
3rdparty/zlib/compress.c
vendored
2
3rdparty/zlib/compress.c
vendored
@ -29,7 +29,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
|
|||||||
z_stream stream;
|
z_stream stream;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
stream.next_in = (Bytef*)source;
|
stream.next_in = (z_const Bytef *)source;
|
||||||
stream.avail_in = (uInt)sourceLen;
|
stream.avail_in = (uInt)sourceLen;
|
||||||
#ifdef MAXSEG_64K
|
#ifdef MAXSEG_64K
|
||||||
/* Check for source > 64K on 16-bit machine: */
|
/* Check for source > 64K on 16-bit machine: */
|
||||||
|
12
3rdparty/zlib/deflate.c
vendored
12
3rdparty/zlib/deflate.c
vendored
@ -1,5 +1,5 @@
|
|||||||
/* deflate.c -- compress data using the deflation algorithm
|
/* deflate.c -- compress data using the deflation algorithm
|
||||||
* Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
|
* Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -52,7 +52,7 @@
|
|||||||
#include "deflate.h"
|
#include "deflate.h"
|
||||||
|
|
||||||
const char deflate_copyright[] =
|
const char deflate_copyright[] =
|
||||||
" deflate 1.2.7 Copyright 1995-2012 Jean-loup Gailly and Mark Adler ";
|
" deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler ";
|
||||||
/*
|
/*
|
||||||
If you use the zlib library in a product, an acknowledgment is welcome
|
If you use the zlib library in a product, an acknowledgment is welcome
|
||||||
in the documentation of your product. If for some reason you cannot
|
in the documentation of your product. If for some reason you cannot
|
||||||
@ -305,7 +305,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
|||||||
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
|
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
|
||||||
s->pending_buf == Z_NULL) {
|
s->pending_buf == Z_NULL) {
|
||||||
s->status = FINISH_STATE;
|
s->status = FINISH_STATE;
|
||||||
strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
|
strm->msg = ERR_MSG(Z_MEM_ERROR);
|
||||||
deflateEnd (strm);
|
deflateEnd (strm);
|
||||||
return Z_MEM_ERROR;
|
return Z_MEM_ERROR;
|
||||||
}
|
}
|
||||||
@ -329,7 +329,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
|
|||||||
uInt str, n;
|
uInt str, n;
|
||||||
int wrap;
|
int wrap;
|
||||||
unsigned avail;
|
unsigned avail;
|
||||||
unsigned char *next;
|
z_const unsigned char *next;
|
||||||
|
|
||||||
if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
|
if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
|
||||||
return Z_STREAM_ERROR;
|
return Z_STREAM_ERROR;
|
||||||
@ -359,7 +359,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
|
|||||||
avail = strm->avail_in;
|
avail = strm->avail_in;
|
||||||
next = strm->next_in;
|
next = strm->next_in;
|
||||||
strm->avail_in = dictLength;
|
strm->avail_in = dictLength;
|
||||||
strm->next_in = (Bytef *)dictionary;
|
strm->next_in = (z_const Bytef *)dictionary;
|
||||||
fill_window(s);
|
fill_window(s);
|
||||||
while (s->lookahead >= MIN_MATCH) {
|
while (s->lookahead >= MIN_MATCH) {
|
||||||
str = s->strstart;
|
str = s->strstart;
|
||||||
@ -513,6 +513,8 @@ int ZEXPORT deflateParams(strm, level, strategy)
|
|||||||
strm->total_in != 0) {
|
strm->total_in != 0) {
|
||||||
/* Flush the last buffer: */
|
/* Flush the last buffer: */
|
||||||
err = deflate(strm, Z_BLOCK);
|
err = deflate(strm, Z_BLOCK);
|
||||||
|
if (err == Z_BUF_ERROR && s->pending == 0)
|
||||||
|
err = Z_OK;
|
||||||
}
|
}
|
||||||
if (s->level != level) {
|
if (s->level != level) {
|
||||||
s->level = level;
|
s->level = level;
|
||||||
|
2
3rdparty/zlib/deflate.h
vendored
2
3rdparty/zlib/deflate.h
vendored
@ -104,7 +104,7 @@ typedef struct internal_state {
|
|||||||
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
||||||
gz_headerp gzhead; /* gzip header information to write */
|
gz_headerp gzhead; /* gzip header information to write */
|
||||||
uInt gzindex; /* where in extra, name, or comment */
|
uInt gzindex; /* where in extra, name, or comment */
|
||||||
Byte method; /* STORED (for zip only) or DEFLATED */
|
Byte method; /* can only be DEFLATED */
|
||||||
int last_flush; /* value of flush param for previous deflate call */
|
int last_flush; /* value of flush param for previous deflate call */
|
||||||
|
|
||||||
/* used by deflate.c: */
|
/* used by deflate.c: */
|
||||||
|
22
3rdparty/zlib/gzguts.h
vendored
22
3rdparty/zlib/gzguts.h
vendored
@ -1,5 +1,5 @@
|
|||||||
/* gzguts.h -- zlib internal header definitions for gz* operations
|
/* gzguts.h -- zlib internal header definitions for gz* operations
|
||||||
* Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler
|
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -35,6 +35,13 @@
|
|||||||
# include <io.h>
|
# include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINAPI_FAMILY
|
||||||
|
# define open _open
|
||||||
|
# define read _read
|
||||||
|
# define write _write
|
||||||
|
# define close _close
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NO_DEFLATE /* for compatibility with old definition */
|
#ifdef NO_DEFLATE /* for compatibility with old definition */
|
||||||
# define NO_GZCOMPRESS
|
# define NO_GZCOMPRESS
|
||||||
#endif
|
#endif
|
||||||
@ -60,7 +67,7 @@
|
|||||||
#ifndef HAVE_VSNPRINTF
|
#ifndef HAVE_VSNPRINTF
|
||||||
# ifdef MSDOS
|
# ifdef MSDOS
|
||||||
/* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
|
/* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
|
||||||
but for now we just assume it doesn't. */
|
but for now we just assume it doesn't. */
|
||||||
# define NO_vsnprintf
|
# define NO_vsnprintf
|
||||||
# endif
|
# endif
|
||||||
# ifdef __TURBOC__
|
# ifdef __TURBOC__
|
||||||
@ -88,6 +95,14 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* unlike snprintf (which is required in C99, yet still not supported by
|
||||||
|
Microsoft more than a decade later!), _snprintf does not guarantee null
|
||||||
|
termination of the result -- however this is only used in gzlib.c where
|
||||||
|
the result is assured to fit in the space provided */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef local
|
#ifndef local
|
||||||
# define local static
|
# define local static
|
||||||
#endif
|
#endif
|
||||||
@ -127,7 +142,8 @@
|
|||||||
# define DEF_MEM_LEVEL MAX_MEM_LEVEL
|
# define DEF_MEM_LEVEL MAX_MEM_LEVEL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* default i/o buffer size -- double this for output when reading */
|
/* default i/o buffer size -- double this for output when reading (this and
|
||||||
|
twice this must be able to fit in an unsigned type) */
|
||||||
#define GZBUFSIZE 8192
|
#define GZBUFSIZE 8192
|
||||||
|
|
||||||
/* gzip modes, also provide a little integrity check on the passed structure */
|
/* gzip modes, also provide a little integrity check on the passed structure */
|
||||||
|
40
3rdparty/zlib/gzlib.c
vendored
40
3rdparty/zlib/gzlib.c
vendored
@ -1,5 +1,5 @@
|
|||||||
/* gzlib.c -- zlib functions common to reading and writing gzip files
|
/* gzlib.c -- zlib functions common to reading and writing gzip files
|
||||||
* Copyright (C) 2004, 2010, 2011, 2012 Mark Adler
|
* Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ local gzFile gz_open(path, fd, mode)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* allocate gzFile structure to return */
|
/* allocate gzFile structure to return */
|
||||||
state = malloc(sizeof(gz_state));
|
state = (gz_statep)malloc(sizeof(gz_state));
|
||||||
if (state == NULL)
|
if (state == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
state->size = 0; /* no buffers allocated yet */
|
state->size = 0; /* no buffers allocated yet */
|
||||||
@ -162,8 +162,10 @@ local gzFile gz_open(path, fd, mode)
|
|||||||
break;
|
break;
|
||||||
case 'F':
|
case 'F':
|
||||||
state->strategy = Z_FIXED;
|
state->strategy = Z_FIXED;
|
||||||
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
state->direct = 1;
|
state->direct = 1;
|
||||||
|
break;
|
||||||
default: /* could consider as an error, but just ignore */
|
default: /* could consider as an error, but just ignore */
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -194,8 +196,8 @@ local gzFile gz_open(path, fd, mode)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
len = strlen(path);
|
len = strlen((const char *)path);
|
||||||
state->path = malloc(len + 1);
|
state->path = (char *)malloc(len + 1);
|
||||||
if (state->path == NULL) {
|
if (state->path == NULL) {
|
||||||
free(state);
|
free(state);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -208,7 +210,11 @@ local gzFile gz_open(path, fd, mode)
|
|||||||
*(state->path) = 0;
|
*(state->path) = 0;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
|
||||||
|
snprintf(state->path, len + 1, "%s", (const char *)path);
|
||||||
|
#else
|
||||||
strcpy(state->path, path);
|
strcpy(state->path, path);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* compute the flags for open() */
|
/* compute the flags for open() */
|
||||||
oflag =
|
oflag =
|
||||||
@ -236,7 +242,7 @@ local gzFile gz_open(path, fd, mode)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
fd == -2 ? _wopen(path, oflag, 0666) :
|
fd == -2 ? _wopen(path, oflag, 0666) :
|
||||||
#endif
|
#endif
|
||||||
open(path, oflag, 0666));
|
open((const char *)path, oflag, 0666));
|
||||||
if (state->fd == -1) {
|
if (state->fd == -1) {
|
||||||
free(state->path);
|
free(state->path);
|
||||||
free(state);
|
free(state);
|
||||||
@ -282,9 +288,13 @@ gzFile ZEXPORT gzdopen(fd, mode)
|
|||||||
char *path; /* identifier for error messages */
|
char *path; /* identifier for error messages */
|
||||||
gzFile gz;
|
gzFile gz;
|
||||||
|
|
||||||
if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
|
if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
|
||||||
|
snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); /* for debugging */
|
||||||
|
#else
|
||||||
sprintf(path, "<fd:%d>", fd); /* for debugging */
|
sprintf(path, "<fd:%d>", fd); /* for debugging */
|
||||||
|
#endif
|
||||||
gz = gz_open(path, fd, mode);
|
gz = gz_open(path, fd, mode);
|
||||||
free(path);
|
free(path);
|
||||||
return gz;
|
return gz;
|
||||||
@ -531,7 +541,8 @@ const char * ZEXPORT gzerror(file, errnum)
|
|||||||
/* return error information */
|
/* return error information */
|
||||||
if (errnum != NULL)
|
if (errnum != NULL)
|
||||||
*errnum = state->err;
|
*errnum = state->err;
|
||||||
return state->msg == NULL ? "" : state->msg;
|
return state->err == Z_MEM_ERROR ? "out of memory" :
|
||||||
|
(state->msg == NULL ? "" : state->msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- see zlib.h -- */
|
/* -- see zlib.h -- */
|
||||||
@ -582,21 +593,24 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
|
|||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* for an out of memory error, save as static string */
|
/* for an out of memory error, return literal string when requested */
|
||||||
if (err == Z_MEM_ERROR) {
|
if (err == Z_MEM_ERROR)
|
||||||
state->msg = (char *)msg;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* construct error message with path */
|
/* construct error message with path */
|
||||||
if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) {
|
if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) ==
|
||||||
|
NULL) {
|
||||||
state->err = Z_MEM_ERROR;
|
state->err = Z_MEM_ERROR;
|
||||||
state->msg = (char *)"out of memory";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
|
||||||
|
snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
|
||||||
|
"%s%s%s", state->path, ": ", msg);
|
||||||
|
#else
|
||||||
strcpy(state->msg, state->path);
|
strcpy(state->msg, state->path);
|
||||||
strcat(state->msg, ": ");
|
strcat(state->msg, ": ");
|
||||||
strcat(state->msg, msg);
|
strcat(state->msg, msg);
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
21
3rdparty/zlib/gzread.c
vendored
21
3rdparty/zlib/gzread.c
vendored
@ -1,5 +1,5 @@
|
|||||||
/* gzread.c -- zlib functions for reading gzip files
|
/* gzread.c -- zlib functions for reading gzip files
|
||||||
* Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler
|
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -58,7 +58,8 @@ local int gz_avail(state)
|
|||||||
return -1;
|
return -1;
|
||||||
if (state->eof == 0) {
|
if (state->eof == 0) {
|
||||||
if (strm->avail_in) { /* copy what's there to the start */
|
if (strm->avail_in) { /* copy what's there to the start */
|
||||||
unsigned char *p = state->in, *q = strm->next_in;
|
unsigned char *p = state->in;
|
||||||
|
unsigned const char *q = strm->next_in;
|
||||||
unsigned n = strm->avail_in;
|
unsigned n = strm->avail_in;
|
||||||
do {
|
do {
|
||||||
*p++ = *q++;
|
*p++ = *q++;
|
||||||
@ -90,8 +91,8 @@ local int gz_look(state)
|
|||||||
/* allocate read buffers and inflate memory */
|
/* allocate read buffers and inflate memory */
|
||||||
if (state->size == 0) {
|
if (state->size == 0) {
|
||||||
/* allocate buffers */
|
/* allocate buffers */
|
||||||
state->in = malloc(state->want);
|
state->in = (unsigned char *)malloc(state->want);
|
||||||
state->out = malloc(state->want << 1);
|
state->out = (unsigned char *)malloc(state->want << 1);
|
||||||
if (state->in == NULL || state->out == NULL) {
|
if (state->in == NULL || state->out == NULL) {
|
||||||
if (state->out != NULL)
|
if (state->out != NULL)
|
||||||
free(state->out);
|
free(state->out);
|
||||||
@ -352,14 +353,14 @@ int ZEXPORT gzread(file, buf, len)
|
|||||||
|
|
||||||
/* large len -- read directly into user buffer */
|
/* large len -- read directly into user buffer */
|
||||||
else if (state->how == COPY) { /* read directly */
|
else if (state->how == COPY) { /* read directly */
|
||||||
if (gz_load(state, buf, len, &n) == -1)
|
if (gz_load(state, (unsigned char *)buf, len, &n) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* large len -- decompress directly into user buffer */
|
/* large len -- decompress directly into user buffer */
|
||||||
else { /* state->how == GZIP */
|
else { /* state->how == GZIP */
|
||||||
strm->avail_out = len;
|
strm->avail_out = len;
|
||||||
strm->next_out = buf;
|
strm->next_out = (unsigned char *)buf;
|
||||||
if (gz_decomp(state) == -1)
|
if (gz_decomp(state) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
n = state->x.have;
|
n = state->x.have;
|
||||||
@ -378,7 +379,11 @@ int ZEXPORT gzread(file, buf, len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -- see zlib.h -- */
|
/* -- see zlib.h -- */
|
||||||
#undef gzgetc
|
#ifdef Z_PREFIX_SET
|
||||||
|
# undef z_gzgetc
|
||||||
|
#else
|
||||||
|
# undef gzgetc
|
||||||
|
#endif
|
||||||
int ZEXPORT gzgetc(file)
|
int ZEXPORT gzgetc(file)
|
||||||
gzFile file;
|
gzFile file;
|
||||||
{
|
{
|
||||||
@ -518,7 +523,7 @@ char * ZEXPORT gzgets(file, buf, len)
|
|||||||
|
|
||||||
/* look for end-of-line in current output buffer */
|
/* look for end-of-line in current output buffer */
|
||||||
n = state->x.have > left ? left : state->x.have;
|
n = state->x.have > left ? left : state->x.have;
|
||||||
eol = memchr(state->x.next, '\n', n);
|
eol = (unsigned char *)memchr(state->x.next, '\n', n);
|
||||||
if (eol != NULL)
|
if (eol != NULL)
|
||||||
n = (unsigned)(eol - state->x.next) + 1;
|
n = (unsigned)(eol - state->x.next) + 1;
|
||||||
|
|
||||||
|
64
3rdparty/zlib/gzwrite.c
vendored
64
3rdparty/zlib/gzwrite.c
vendored
@ -1,5 +1,5 @@
|
|||||||
/* gzwrite.c -- zlib functions for writing gzip files
|
/* gzwrite.c -- zlib functions for writing gzip files
|
||||||
* Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler
|
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ local int gz_init(state)
|
|||||||
z_streamp strm = &(state->strm);
|
z_streamp strm = &(state->strm);
|
||||||
|
|
||||||
/* allocate input buffer */
|
/* allocate input buffer */
|
||||||
state->in = malloc(state->want);
|
state->in = (unsigned char *)malloc(state->want);
|
||||||
if (state->in == NULL) {
|
if (state->in == NULL) {
|
||||||
gz_error(state, Z_MEM_ERROR, "out of memory");
|
gz_error(state, Z_MEM_ERROR, "out of memory");
|
||||||
return -1;
|
return -1;
|
||||||
@ -28,7 +28,7 @@ local int gz_init(state)
|
|||||||
/* only need output buffer and deflate state if compressing */
|
/* only need output buffer and deflate state if compressing */
|
||||||
if (!state->direct) {
|
if (!state->direct) {
|
||||||
/* allocate output buffer */
|
/* allocate output buffer */
|
||||||
state->out = malloc(state->want);
|
state->out = (unsigned char *)malloc(state->want);
|
||||||
if (state->out == NULL) {
|
if (state->out == NULL) {
|
||||||
free(state->in);
|
free(state->in);
|
||||||
gz_error(state, Z_MEM_ERROR, "out of memory");
|
gz_error(state, Z_MEM_ERROR, "out of memory");
|
||||||
@ -168,7 +168,6 @@ int ZEXPORT gzwrite(file, buf, len)
|
|||||||
unsigned len;
|
unsigned len;
|
||||||
{
|
{
|
||||||
unsigned put = len;
|
unsigned put = len;
|
||||||
unsigned n;
|
|
||||||
gz_statep state;
|
gz_statep state;
|
||||||
z_streamp strm;
|
z_streamp strm;
|
||||||
|
|
||||||
@ -208,16 +207,19 @@ int ZEXPORT gzwrite(file, buf, len)
|
|||||||
if (len < state->size) {
|
if (len < state->size) {
|
||||||
/* copy to input buffer, compress when full */
|
/* copy to input buffer, compress when full */
|
||||||
do {
|
do {
|
||||||
|
unsigned have, copy;
|
||||||
|
|
||||||
if (strm->avail_in == 0)
|
if (strm->avail_in == 0)
|
||||||
strm->next_in = state->in;
|
strm->next_in = state->in;
|
||||||
n = state->size - strm->avail_in;
|
have = (unsigned)((strm->next_in + strm->avail_in) - state->in);
|
||||||
if (n > len)
|
copy = state->size - have;
|
||||||
n = len;
|
if (copy > len)
|
||||||
memcpy(strm->next_in + strm->avail_in, buf, n);
|
copy = len;
|
||||||
strm->avail_in += n;
|
memcpy(state->in + have, buf, copy);
|
||||||
state->x.pos += n;
|
strm->avail_in += copy;
|
||||||
buf = (char *)buf + n;
|
state->x.pos += copy;
|
||||||
len -= n;
|
buf = (const char *)buf + copy;
|
||||||
|
len -= copy;
|
||||||
if (len && gz_comp(state, Z_NO_FLUSH) == -1)
|
if (len && gz_comp(state, Z_NO_FLUSH) == -1)
|
||||||
return 0;
|
return 0;
|
||||||
} while (len);
|
} while (len);
|
||||||
@ -229,7 +231,7 @@ int ZEXPORT gzwrite(file, buf, len)
|
|||||||
|
|
||||||
/* directly compress user buffer to file */
|
/* directly compress user buffer to file */
|
||||||
strm->avail_in = len;
|
strm->avail_in = len;
|
||||||
strm->next_in = (voidp)buf;
|
strm->next_in = (z_const Bytef *)buf;
|
||||||
state->x.pos += len;
|
state->x.pos += len;
|
||||||
if (gz_comp(state, Z_NO_FLUSH) == -1)
|
if (gz_comp(state, Z_NO_FLUSH) == -1)
|
||||||
return 0;
|
return 0;
|
||||||
@ -244,6 +246,7 @@ int ZEXPORT gzputc(file, c)
|
|||||||
gzFile file;
|
gzFile file;
|
||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
|
unsigned have;
|
||||||
unsigned char buf[1];
|
unsigned char buf[1];
|
||||||
gz_statep state;
|
gz_statep state;
|
||||||
z_streamp strm;
|
z_streamp strm;
|
||||||
@ -267,12 +270,16 @@ int ZEXPORT gzputc(file, c)
|
|||||||
|
|
||||||
/* try writing to input buffer for speed (state->size == 0 if buffer not
|
/* try writing to input buffer for speed (state->size == 0 if buffer not
|
||||||
initialized) */
|
initialized) */
|
||||||
if (strm->avail_in < state->size) {
|
if (state->size) {
|
||||||
if (strm->avail_in == 0)
|
if (strm->avail_in == 0)
|
||||||
strm->next_in = state->in;
|
strm->next_in = state->in;
|
||||||
strm->next_in[strm->avail_in++] = c;
|
have = (unsigned)((strm->next_in + strm->avail_in) - state->in);
|
||||||
state->x.pos++;
|
if (have < state->size) {
|
||||||
return c & 0xff;
|
state->in[have] = c;
|
||||||
|
strm->avail_in++;
|
||||||
|
state->x.pos++;
|
||||||
|
return c & 0xff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no room in buffer or not initialized, use gz_write() */
|
/* no room in buffer or not initialized, use gz_write() */
|
||||||
@ -300,12 +307,11 @@ int ZEXPORT gzputs(file, str)
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
/* -- see zlib.h -- */
|
/* -- see zlib.h -- */
|
||||||
int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
|
int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
|
||||||
{
|
{
|
||||||
int size, len;
|
int size, len;
|
||||||
gz_statep state;
|
gz_statep state;
|
||||||
z_streamp strm;
|
z_streamp strm;
|
||||||
va_list va;
|
|
||||||
|
|
||||||
/* get internal structure */
|
/* get internal structure */
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
@ -335,25 +341,20 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
|
|||||||
/* do the printf() into the input buffer, put length in len */
|
/* do the printf() into the input buffer, put length in len */
|
||||||
size = (int)(state->size);
|
size = (int)(state->size);
|
||||||
state->in[size - 1] = 0;
|
state->in[size - 1] = 0;
|
||||||
va_start(va, format);
|
|
||||||
#ifdef NO_vsnprintf
|
#ifdef NO_vsnprintf
|
||||||
# ifdef HAS_vsprintf_void
|
# ifdef HAS_vsprintf_void
|
||||||
(void)vsprintf((char *)(state->in), format, va);
|
(void)vsprintf((char *)(state->in), format, va);
|
||||||
va_end(va);
|
|
||||||
for (len = 0; len < size; len++)
|
for (len = 0; len < size; len++)
|
||||||
if (state->in[len] == 0) break;
|
if (state->in[len] == 0) break;
|
||||||
# else
|
# else
|
||||||
len = vsprintf((char *)(state->in), format, va);
|
len = vsprintf((char *)(state->in), format, va);
|
||||||
va_end(va);
|
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# ifdef HAS_vsnprintf_void
|
# ifdef HAS_vsnprintf_void
|
||||||
(void)vsnprintf((char *)(state->in), size, format, va);
|
(void)vsnprintf((char *)(state->in), size, format, va);
|
||||||
va_end(va);
|
|
||||||
len = strlen((char *)(state->in));
|
len = strlen((char *)(state->in));
|
||||||
# else
|
# else
|
||||||
len = vsnprintf((char *)(state->in), size, format, va);
|
len = vsnprintf((char *)(state->in), size, format, va);
|
||||||
va_end(va);
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -368,6 +369,17 @@ int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ZEXPORTVA gzprintf(gzFile file, const char *format, ...)
|
||||||
|
{
|
||||||
|
va_list va;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
va_start(va, format);
|
||||||
|
ret = gzvprintf(file, format, va);
|
||||||
|
va_end(va);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#else /* !STDC && !Z_HAVE_STDARG_H */
|
#else /* !STDC && !Z_HAVE_STDARG_H */
|
||||||
|
|
||||||
/* -- see zlib.h -- */
|
/* -- see zlib.h -- */
|
||||||
@ -547,9 +559,9 @@ int ZEXPORT gzclose_w(file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* flush, free memory, and close file */
|
/* flush, free memory, and close file */
|
||||||
|
if (gz_comp(state, Z_FINISH) == -1)
|
||||||
|
ret = state->err;
|
||||||
if (state->size) {
|
if (state->size) {
|
||||||
if (gz_comp(state, Z_FINISH) == -1)
|
|
||||||
ret = state->err;
|
|
||||||
if (!state->direct) {
|
if (!state->direct) {
|
||||||
(void)deflateEnd(&(state->strm));
|
(void)deflateEnd(&(state->strm));
|
||||||
free(state->out);
|
free(state->out);
|
||||||
|
2
3rdparty/zlib/infback.c
vendored
2
3rdparty/zlib/infback.c
vendored
@ -255,7 +255,7 @@ out_func out;
|
|||||||
void FAR *out_desc;
|
void FAR *out_desc;
|
||||||
{
|
{
|
||||||
struct inflate_state FAR *state;
|
struct inflate_state FAR *state;
|
||||||
unsigned char FAR *next; /* next input */
|
z_const unsigned char FAR *next; /* next input */
|
||||||
unsigned char FAR *put; /* next output */
|
unsigned char FAR *put; /* next output */
|
||||||
unsigned have, left; /* available input and output */
|
unsigned have, left; /* available input and output */
|
||||||
unsigned long hold; /* bit buffer */
|
unsigned long hold; /* bit buffer */
|
||||||
|
6
3rdparty/zlib/inffast.c
vendored
6
3rdparty/zlib/inffast.c
vendored
@ -1,5 +1,5 @@
|
|||||||
/* inffast.c -- fast decoding
|
/* inffast.c -- fast decoding
|
||||||
* Copyright (C) 1995-2008, 2010 Mark Adler
|
* Copyright (C) 1995-2008, 2010, 2013 Mark Adler
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -69,8 +69,8 @@ z_streamp strm;
|
|||||||
unsigned start; /* inflate()'s starting value for strm->avail_out */
|
unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||||
{
|
{
|
||||||
struct inflate_state FAR *state;
|
struct inflate_state FAR *state;
|
||||||
unsigned char FAR *in; /* local strm->next_in */
|
z_const unsigned char FAR *in; /* local strm->next_in */
|
||||||
unsigned char FAR *last; /* while in < last, enough input available */
|
z_const unsigned char FAR *last; /* have enough input while in < last */
|
||||||
unsigned char FAR *out; /* local strm->next_out */
|
unsigned char FAR *out; /* local strm->next_out */
|
||||||
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
|
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
|
||||||
unsigned char FAR *end; /* while out < end, enough space available */
|
unsigned char FAR *end; /* while out < end, enough space available */
|
||||||
|
64
3rdparty/zlib/inflate.c
vendored
64
3rdparty/zlib/inflate.c
vendored
@ -93,11 +93,12 @@
|
|||||||
|
|
||||||
/* function prototypes */
|
/* function prototypes */
|
||||||
local void fixedtables OF((struct inflate_state FAR *state));
|
local void fixedtables OF((struct inflate_state FAR *state));
|
||||||
local int updatewindow OF((z_streamp strm, unsigned out));
|
local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
|
||||||
|
unsigned copy));
|
||||||
#ifdef BUILDFIXED
|
#ifdef BUILDFIXED
|
||||||
void makefixed OF((void));
|
void makefixed OF((void));
|
||||||
#endif
|
#endif
|
||||||
local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
|
local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
|
||||||
unsigned len));
|
unsigned len));
|
||||||
|
|
||||||
int ZEXPORT inflateResetKeep(strm)
|
int ZEXPORT inflateResetKeep(strm)
|
||||||
@ -375,12 +376,13 @@ void makefixed()
|
|||||||
output will fall in the output data, making match copies simpler and faster.
|
output will fall in the output data, making match copies simpler and faster.
|
||||||
The advantage may be dependent on the size of the processor's data caches.
|
The advantage may be dependent on the size of the processor's data caches.
|
||||||
*/
|
*/
|
||||||
local int updatewindow(strm, out)
|
local int updatewindow(strm, end, copy)
|
||||||
z_streamp strm;
|
z_streamp strm;
|
||||||
unsigned out;
|
const Bytef *end;
|
||||||
|
unsigned copy;
|
||||||
{
|
{
|
||||||
struct inflate_state FAR *state;
|
struct inflate_state FAR *state;
|
||||||
unsigned copy, dist;
|
unsigned dist;
|
||||||
|
|
||||||
state = (struct inflate_state FAR *)strm->state;
|
state = (struct inflate_state FAR *)strm->state;
|
||||||
|
|
||||||
@ -400,19 +402,18 @@ unsigned out;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* copy state->wsize or less output bytes into the circular window */
|
/* copy state->wsize or less output bytes into the circular window */
|
||||||
copy = out - strm->avail_out;
|
|
||||||
if (copy >= state->wsize) {
|
if (copy >= state->wsize) {
|
||||||
zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
|
zmemcpy(state->window, end - state->wsize, state->wsize);
|
||||||
state->wnext = 0;
|
state->wnext = 0;
|
||||||
state->whave = state->wsize;
|
state->whave = state->wsize;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dist = state->wsize - state->wnext;
|
dist = state->wsize - state->wnext;
|
||||||
if (dist > copy) dist = copy;
|
if (dist > copy) dist = copy;
|
||||||
zmemcpy(state->window + state->wnext, strm->next_out - copy, dist);
|
zmemcpy(state->window + state->wnext, end - copy, dist);
|
||||||
copy -= dist;
|
copy -= dist;
|
||||||
if (copy) {
|
if (copy) {
|
||||||
zmemcpy(state->window, strm->next_out - copy, copy);
|
zmemcpy(state->window, end - copy, copy);
|
||||||
state->wnext = copy;
|
state->wnext = copy;
|
||||||
state->whave = state->wsize;
|
state->whave = state->wsize;
|
||||||
}
|
}
|
||||||
@ -606,7 +607,7 @@ z_streamp strm;
|
|||||||
int flush;
|
int flush;
|
||||||
{
|
{
|
||||||
struct inflate_state FAR *state;
|
struct inflate_state FAR *state;
|
||||||
unsigned char FAR *next; /* next input */
|
z_const unsigned char FAR *next; /* next input */
|
||||||
unsigned char FAR *put; /* next output */
|
unsigned char FAR *put; /* next output */
|
||||||
unsigned have, left; /* available input and output */
|
unsigned have, left; /* available input and output */
|
||||||
unsigned long hold; /* bit buffer */
|
unsigned long hold; /* bit buffer */
|
||||||
@ -920,7 +921,7 @@ int flush;
|
|||||||
while (state->have < 19)
|
while (state->have < 19)
|
||||||
state->lens[order[state->have++]] = 0;
|
state->lens[order[state->have++]] = 0;
|
||||||
state->next = state->codes;
|
state->next = state->codes;
|
||||||
state->lencode = (code const FAR *)(state->next);
|
state->lencode = (const code FAR *)(state->next);
|
||||||
state->lenbits = 7;
|
state->lenbits = 7;
|
||||||
ret = inflate_table(CODES, state->lens, 19, &(state->next),
|
ret = inflate_table(CODES, state->lens, 19, &(state->next),
|
||||||
&(state->lenbits), state->work);
|
&(state->lenbits), state->work);
|
||||||
@ -994,7 +995,7 @@ int flush;
|
|||||||
values here (9 and 6) without reading the comments in inftrees.h
|
values here (9 and 6) without reading the comments in inftrees.h
|
||||||
concerning the ENOUGH constants, which depend on those values */
|
concerning the ENOUGH constants, which depend on those values */
|
||||||
state->next = state->codes;
|
state->next = state->codes;
|
||||||
state->lencode = (code const FAR *)(state->next);
|
state->lencode = (const code FAR *)(state->next);
|
||||||
state->lenbits = 9;
|
state->lenbits = 9;
|
||||||
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
|
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
|
||||||
&(state->lenbits), state->work);
|
&(state->lenbits), state->work);
|
||||||
@ -1003,7 +1004,7 @@ int flush;
|
|||||||
state->mode = BAD;
|
state->mode = BAD;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
state->distcode = (code const FAR *)(state->next);
|
state->distcode = (const code FAR *)(state->next);
|
||||||
state->distbits = 6;
|
state->distbits = 6;
|
||||||
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
|
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
|
||||||
&(state->next), &(state->distbits), state->work);
|
&(state->next), &(state->distbits), state->work);
|
||||||
@ -1230,7 +1231,7 @@ int flush;
|
|||||||
RESTORE();
|
RESTORE();
|
||||||
if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
|
if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
|
||||||
(state->mode < CHECK || flush != Z_FINISH)))
|
(state->mode < CHECK || flush != Z_FINISH)))
|
||||||
if (updatewindow(strm, out)) {
|
if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
|
||||||
state->mode = MEM;
|
state->mode = MEM;
|
||||||
return Z_MEM_ERROR;
|
return Z_MEM_ERROR;
|
||||||
}
|
}
|
||||||
@ -1264,6 +1265,29 @@ z_streamp strm;
|
|||||||
return Z_OK;
|
return Z_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
|
||||||
|
z_streamp strm;
|
||||||
|
Bytef *dictionary;
|
||||||
|
uInt *dictLength;
|
||||||
|
{
|
||||||
|
struct inflate_state FAR *state;
|
||||||
|
|
||||||
|
/* check state */
|
||||||
|
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
|
||||||
|
state = (struct inflate_state FAR *)strm->state;
|
||||||
|
|
||||||
|
/* copy dictionary */
|
||||||
|
if (state->whave && dictionary != Z_NULL) {
|
||||||
|
zmemcpy(dictionary, state->window + state->wnext,
|
||||||
|
state->whave - state->wnext);
|
||||||
|
zmemcpy(dictionary + state->whave - state->wnext,
|
||||||
|
state->window, state->wnext);
|
||||||
|
}
|
||||||
|
if (dictLength != Z_NULL)
|
||||||
|
*dictLength = state->whave;
|
||||||
|
return Z_OK;
|
||||||
|
}
|
||||||
|
|
||||||
int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
|
int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
|
||||||
z_streamp strm;
|
z_streamp strm;
|
||||||
const Bytef *dictionary;
|
const Bytef *dictionary;
|
||||||
@ -1271,8 +1295,6 @@ uInt dictLength;
|
|||||||
{
|
{
|
||||||
struct inflate_state FAR *state;
|
struct inflate_state FAR *state;
|
||||||
unsigned long dictid;
|
unsigned long dictid;
|
||||||
unsigned char *next;
|
|
||||||
unsigned avail;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* check state */
|
/* check state */
|
||||||
@ -1291,13 +1313,7 @@ uInt dictLength;
|
|||||||
|
|
||||||
/* copy dictionary to window using updatewindow(), which will amend the
|
/* copy dictionary to window using updatewindow(), which will amend the
|
||||||
existing dictionary if appropriate */
|
existing dictionary if appropriate */
|
||||||
next = strm->next_out;
|
ret = updatewindow(strm, dictionary + dictLength, dictLength);
|
||||||
avail = strm->avail_out;
|
|
||||||
strm->next_out = (Bytef *)dictionary + dictLength;
|
|
||||||
strm->avail_out = 0;
|
|
||||||
ret = updatewindow(strm, dictLength);
|
|
||||||
strm->avail_out = avail;
|
|
||||||
strm->next_out = next;
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
state->mode = MEM;
|
state->mode = MEM;
|
||||||
return Z_MEM_ERROR;
|
return Z_MEM_ERROR;
|
||||||
@ -1337,7 +1353,7 @@ gz_headerp head;
|
|||||||
*/
|
*/
|
||||||
local unsigned syncsearch(have, buf, len)
|
local unsigned syncsearch(have, buf, len)
|
||||||
unsigned FAR *have;
|
unsigned FAR *have;
|
||||||
unsigned char FAR *buf;
|
const unsigned char FAR *buf;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
{
|
{
|
||||||
unsigned got;
|
unsigned got;
|
||||||
|
14
3rdparty/zlib/inftrees.c
vendored
14
3rdparty/zlib/inftrees.c
vendored
@ -1,5 +1,5 @@
|
|||||||
/* inftrees.c -- generate Huffman trees for efficient decoding
|
/* inftrees.c -- generate Huffman trees for efficient decoding
|
||||||
* Copyright (C) 1995-2012 Mark Adler
|
* Copyright (C) 1995-2013 Mark Adler
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#define MAXBITS 15
|
#define MAXBITS 15
|
||||||
|
|
||||||
const char inflate_copyright[] =
|
const char inflate_copyright[] =
|
||||||
" inflate 1.2.7 Copyright 1995-2012 Mark Adler ";
|
" inflate 1.2.8 Copyright 1995-2013 Mark Adler ";
|
||||||
/*
|
/*
|
||||||
If you use the zlib library in a product, an acknowledgment is welcome
|
If you use the zlib library in a product, an acknowledgment is welcome
|
||||||
in the documentation of your product. If for some reason you cannot
|
in the documentation of your product. If for some reason you cannot
|
||||||
@ -62,7 +62,7 @@ unsigned short FAR *work;
|
|||||||
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
||||||
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||||
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
|
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
|
||||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 78, 68};
|
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78};
|
||||||
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
||||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
||||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||||
@ -208,8 +208,8 @@ unsigned short FAR *work;
|
|||||||
mask = used - 1; /* mask for comparing low */
|
mask = used - 1; /* mask for comparing low */
|
||||||
|
|
||||||
/* check available table space */
|
/* check available table space */
|
||||||
if ((type == LENS && used >= ENOUGH_LENS) ||
|
if ((type == LENS && used > ENOUGH_LENS) ||
|
||||||
(type == DISTS && used >= ENOUGH_DISTS))
|
(type == DISTS && used > ENOUGH_DISTS))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* process all codes and make table entries */
|
/* process all codes and make table entries */
|
||||||
@ -277,8 +277,8 @@ unsigned short FAR *work;
|
|||||||
|
|
||||||
/* check for enough space */
|
/* check for enough space */
|
||||||
used += 1U << curr;
|
used += 1U << curr;
|
||||||
if ((type == LENS && used >= ENOUGH_LENS) ||
|
if ((type == LENS && used > ENOUGH_LENS) ||
|
||||||
(type == DISTS && used >= ENOUGH_DISTS))
|
(type == DISTS && used > ENOUGH_DISTS))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* point entry in root table to sub-table */
|
/* point entry in root table to sub-table */
|
||||||
|
14
3rdparty/zlib/trees.c
vendored
14
3rdparty/zlib/trees.c
vendored
@ -146,8 +146,8 @@ local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
|
|||||||
local int build_bl_tree OF((deflate_state *s));
|
local int build_bl_tree OF((deflate_state *s));
|
||||||
local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
|
local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
|
||||||
int blcodes));
|
int blcodes));
|
||||||
local void compress_block OF((deflate_state *s, ct_data *ltree,
|
local void compress_block OF((deflate_state *s, const ct_data *ltree,
|
||||||
ct_data *dtree));
|
const ct_data *dtree));
|
||||||
local int detect_data_type OF((deflate_state *s));
|
local int detect_data_type OF((deflate_state *s));
|
||||||
local unsigned bi_reverse OF((unsigned value, int length));
|
local unsigned bi_reverse OF((unsigned value, int length));
|
||||||
local void bi_windup OF((deflate_state *s));
|
local void bi_windup OF((deflate_state *s));
|
||||||
@ -972,7 +972,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
|
|||||||
} else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
|
} else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
|
||||||
#endif
|
#endif
|
||||||
send_bits(s, (STATIC_TREES<<1)+last, 3);
|
send_bits(s, (STATIC_TREES<<1)+last, 3);
|
||||||
compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
|
compress_block(s, (const ct_data *)static_ltree,
|
||||||
|
(const ct_data *)static_dtree);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
s->compressed_len += 3 + s->static_len;
|
s->compressed_len += 3 + s->static_len;
|
||||||
#endif
|
#endif
|
||||||
@ -980,7 +981,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
|
|||||||
send_bits(s, (DYN_TREES<<1)+last, 3);
|
send_bits(s, (DYN_TREES<<1)+last, 3);
|
||||||
send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
|
send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
|
||||||
max_blindex+1);
|
max_blindex+1);
|
||||||
compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
|
compress_block(s, (const ct_data *)s->dyn_ltree,
|
||||||
|
(const ct_data *)s->dyn_dtree);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
s->compressed_len += 3 + s->opt_len;
|
s->compressed_len += 3 + s->opt_len;
|
||||||
#endif
|
#endif
|
||||||
@ -1057,8 +1059,8 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
|
|||||||
*/
|
*/
|
||||||
local void compress_block(s, ltree, dtree)
|
local void compress_block(s, ltree, dtree)
|
||||||
deflate_state *s;
|
deflate_state *s;
|
||||||
ct_data *ltree; /* literal tree */
|
const ct_data *ltree; /* literal tree */
|
||||||
ct_data *dtree; /* distance tree */
|
const ct_data *dtree; /* distance tree */
|
||||||
{
|
{
|
||||||
unsigned dist; /* distance of matched string */
|
unsigned dist; /* distance of matched string */
|
||||||
int lc; /* match length or unmatched char (if dist == 0) */
|
int lc; /* match length or unmatched char (if dist == 0) */
|
||||||
|
2
3rdparty/zlib/uncompr.c
vendored
2
3rdparty/zlib/uncompr.c
vendored
@ -30,7 +30,7 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen)
|
|||||||
z_stream stream;
|
z_stream stream;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
stream.next_in = (Bytef*)source;
|
stream.next_in = (z_const Bytef *)source;
|
||||||
stream.avail_in = (uInt)sourceLen;
|
stream.avail_in = (uInt)sourceLen;
|
||||||
/* Check for source > 64K on 16-bit machine: */
|
/* Check for source > 64K on 16-bit machine: */
|
||||||
if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
|
if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
|
||||||
|
33
3rdparty/zlib/zconf.h.cmakein
vendored
33
3rdparty/zlib/zconf.h.cmakein
vendored
@ -1,5 +1,5 @@
|
|||||||
/* zconf.h -- configuration of the zlib compression library
|
/* zconf.h -- configuration of the zlib compression library
|
||||||
* Copyright (C) 1995-2012 Jean-loup Gailly.
|
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -23,6 +23,7 @@
|
|||||||
# define _dist_code z__dist_code
|
# define _dist_code z__dist_code
|
||||||
# define _length_code z__length_code
|
# define _length_code z__length_code
|
||||||
# define _tr_align z__tr_align
|
# define _tr_align z__tr_align
|
||||||
|
# define _tr_flush_bits z__tr_flush_bits
|
||||||
# define _tr_flush_block z__tr_flush_block
|
# define _tr_flush_block z__tr_flush_block
|
||||||
# define _tr_init z__tr_init
|
# define _tr_init z__tr_init
|
||||||
# define _tr_stored_block z__tr_stored_block
|
# define _tr_stored_block z__tr_stored_block
|
||||||
@ -79,6 +80,7 @@
|
|||||||
# define gzopen_w z_gzopen_w
|
# define gzopen_w z_gzopen_w
|
||||||
# endif
|
# endif
|
||||||
# define gzprintf z_gzprintf
|
# define gzprintf z_gzprintf
|
||||||
|
# define gzvprintf z_gzvprintf
|
||||||
# define gzputc z_gzputc
|
# define gzputc z_gzputc
|
||||||
# define gzputs z_gzputs
|
# define gzputs z_gzputs
|
||||||
# define gzread z_gzread
|
# define gzread z_gzread
|
||||||
@ -105,6 +107,7 @@
|
|||||||
# define inflateReset z_inflateReset
|
# define inflateReset z_inflateReset
|
||||||
# define inflateReset2 z_inflateReset2
|
# define inflateReset2 z_inflateReset2
|
||||||
# define inflateSetDictionary z_inflateSetDictionary
|
# define inflateSetDictionary z_inflateSetDictionary
|
||||||
|
# define inflateGetDictionary z_inflateGetDictionary
|
||||||
# define inflateSync z_inflateSync
|
# define inflateSync z_inflateSync
|
||||||
# define inflateSyncPoint z_inflateSyncPoint
|
# define inflateSyncPoint z_inflateSyncPoint
|
||||||
# define inflateUndermine z_inflateUndermine
|
# define inflateUndermine z_inflateUndermine
|
||||||
@ -390,20 +393,14 @@ typedef uLong FAR uLongf;
|
|||||||
typedef Byte *voidp;
|
typedef Byte *voidp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ./configure may #define Z_U4 here */
|
|
||||||
|
|
||||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
# if (UINT_MAX == 0xffffffffUL)
|
# if (UINT_MAX == 0xffffffffUL)
|
||||||
# define Z_U4 unsigned
|
# define Z_U4 unsigned
|
||||||
# else
|
# elif (ULONG_MAX == 0xffffffffUL)
|
||||||
# if (ULONG_MAX == 0xffffffffUL)
|
# define Z_U4 unsigned long
|
||||||
# define Z_U4 unsigned long
|
# elif (USHRT_MAX == 0xffffffffUL)
|
||||||
# else
|
# define Z_U4 unsigned short
|
||||||
# if (USHRT_MAX == 0xffffffffUL)
|
|
||||||
# define Z_U4 unsigned short
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -427,8 +424,16 @@ typedef uLong FAR uLongf;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||||
|
# ifndef Z_SOLO
|
||||||
|
# include <stdarg.h> /* for va_list */
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include <stddef.h> /* for wchar_t */
|
# ifndef Z_SOLO
|
||||||
|
# include <stddef.h> /* for wchar_t */
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||||
@ -437,7 +442,7 @@ typedef uLong FAR uLongf;
|
|||||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||||
* equivalently requesting no 64-bit operations
|
* equivalently requesting no 64-bit operations
|
||||||
*/
|
*/
|
||||||
#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||||
# undef _LARGEFILE64_SOURCE
|
# undef _LARGEFILE64_SOURCE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -445,7 +450,7 @@ typedef uLong FAR uLongf;
|
|||||||
# define Z_HAVE_UNISTD_H
|
# define Z_HAVE_UNISTD_H
|
||||||
#endif
|
#endif
|
||||||
#ifndef Z_SOLO
|
#ifndef Z_SOLO
|
||||||
# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE)
|
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||||
# ifdef VMS
|
# ifdef VMS
|
||||||
# include <unixio.h> /* for off_t */
|
# include <unixio.h> /* for off_t */
|
||||||
|
48
3rdparty/zlib/zlib.h
vendored
48
3rdparty/zlib/zlib.h
vendored
@ -1,7 +1,7 @@
|
|||||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||||
version 1.2.7, May 2nd, 2012
|
version 1.2.8, April 28th, 2013
|
||||||
|
|
||||||
Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
|
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
@ -37,11 +37,11 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ZLIB_VERSION "1.2.7"
|
#define ZLIB_VERSION "1.2.8"
|
||||||
#define ZLIB_VERNUM 0x1270
|
#define ZLIB_VERNUM 0x1280
|
||||||
#define ZLIB_VER_MAJOR 1
|
#define ZLIB_VER_MAJOR 1
|
||||||
#define ZLIB_VER_MINOR 2
|
#define ZLIB_VER_MINOR 2
|
||||||
#define ZLIB_VER_REVISION 7
|
#define ZLIB_VER_REVISION 8
|
||||||
#define ZLIB_VER_SUBREVISION 0
|
#define ZLIB_VER_SUBREVISION 0
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -839,6 +839,21 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
|||||||
inflate().
|
inflate().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
|
||||||
|
Bytef *dictionary,
|
||||||
|
uInt *dictLength));
|
||||||
|
/*
|
||||||
|
Returns the sliding dictionary being maintained by inflate. dictLength is
|
||||||
|
set to the number of bytes in the dictionary, and that many bytes are copied
|
||||||
|
to dictionary. dictionary must have enough space, where 32768 bytes is
|
||||||
|
always enough. If inflateGetDictionary() is called with dictionary equal to
|
||||||
|
Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
||||||
|
Similary, if dictLength is Z_NULL, then it is not set.
|
||||||
|
|
||||||
|
inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
|
||||||
|
stream state is inconsistent.
|
||||||
|
*/
|
||||||
|
|
||||||
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
|
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
|
||||||
/*
|
/*
|
||||||
Skips invalid compressed data until a possible full flush point (see above
|
Skips invalid compressed data until a possible full flush point (see above
|
||||||
@ -846,7 +861,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
|
|||||||
available input is skipped. No output is provided.
|
available input is skipped. No output is provided.
|
||||||
|
|
||||||
inflateSync searches for a 00 00 FF FF pattern in the compressed data.
|
inflateSync searches for a 00 00 FF FF pattern in the compressed data.
|
||||||
All full flush points have this pattern, but not all occurences of this
|
All full flush points have this pattern, but not all occurrences of this
|
||||||
pattern are full flush points.
|
pattern are full flush points.
|
||||||
|
|
||||||
inflateSync returns Z_OK if a possible full flush point has been found,
|
inflateSync returns Z_OK if a possible full flush point has been found,
|
||||||
@ -1007,7 +1022,8 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
|
|||||||
the version of the header file.
|
the version of the header file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
|
typedef unsigned (*in_func) OF((void FAR *,
|
||||||
|
z_const unsigned char FAR * FAR *));
|
||||||
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
|
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
|
||||||
|
|
||||||
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
||||||
@ -1015,11 +1031,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
|
|||||||
out_func out, void FAR *out_desc));
|
out_func out, void FAR *out_desc));
|
||||||
/*
|
/*
|
||||||
inflateBack() does a raw inflate with a single call using a call-back
|
inflateBack() does a raw inflate with a single call using a call-back
|
||||||
interface for input and output. This is more efficient than inflate() for
|
interface for input and output. This is potentially more efficient than
|
||||||
file i/o applications in that it avoids copying between the output and the
|
inflate() for file i/o applications, in that it avoids copying between the
|
||||||
sliding window by simply making the window itself the output buffer. This
|
output and the sliding window by simply making the window itself the output
|
||||||
function trusts the application to not change the output buffer passed by
|
buffer. inflate() can be faster on modern CPUs when used with large
|
||||||
the output function, at least until inflateBack() returns.
|
buffers. inflateBack() trusts the application to not change the output
|
||||||
|
buffer passed by the output function, at least until inflateBack() returns.
|
||||||
|
|
||||||
inflateBackInit() must be called first to allocate the internal state
|
inflateBackInit() must be called first to allocate the internal state
|
||||||
and to initialize the state with the user-provided window buffer.
|
and to initialize the state with the user-provided window buffer.
|
||||||
@ -1736,6 +1753,13 @@ ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
|
|||||||
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
||||||
const char *mode));
|
const char *mode));
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||||
|
# ifndef Z_SOLO
|
||||||
|
ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
|
||||||
|
const char *format,
|
||||||
|
va_list va));
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
2
3rdparty/zlib/zutil.c
vendored
2
3rdparty/zlib/zutil.c
vendored
@ -14,7 +14,7 @@
|
|||||||
struct internal_state {int dummy;}; /* for buggy compilers */
|
struct internal_state {int dummy;}; /* for buggy compilers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char * const z_errmsg[10] = {
|
z_const char * const z_errmsg[10] = {
|
||||||
"need dictionary", /* Z_NEED_DICT 2 */
|
"need dictionary", /* Z_NEED_DICT 2 */
|
||||||
"stream end", /* Z_STREAM_END 1 */
|
"stream end", /* Z_STREAM_END 1 */
|
||||||
"", /* Z_OK 0 */
|
"", /* Z_OK 0 */
|
||||||
|
9
3rdparty/zlib/zutil.h
vendored
9
3rdparty/zlib/zutil.h
vendored
@ -1,5 +1,5 @@
|
|||||||
/* zutil.h -- internal interface and configuration of the compression library
|
/* zutil.h -- internal interface and configuration of the compression library
|
||||||
* Copyright (C) 1995-2012 Jean-loup Gailly.
|
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -44,13 +44,13 @@ typedef unsigned short ush;
|
|||||||
typedef ush FAR ushf;
|
typedef ush FAR ushf;
|
||||||
typedef unsigned long ulg;
|
typedef unsigned long ulg;
|
||||||
|
|
||||||
extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||||
/* (size given to avoid silly warnings with Visual C++) */
|
/* (size given to avoid silly warnings with Visual C++) */
|
||||||
|
|
||||||
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
|
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
|
||||||
|
|
||||||
#define ERR_RETURN(strm,err) \
|
#define ERR_RETURN(strm,err) \
|
||||||
return (strm->msg = (char*)ERR_MSG(err), (err))
|
return (strm->msg = ERR_MSG(err), (err))
|
||||||
/* To be used only when the state is known to be valid */
|
/* To be used only when the state is known to be valid */
|
||||||
|
|
||||||
/* common constants */
|
/* common constants */
|
||||||
@ -168,7 +168,8 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* provide prototypes for these when building zlib without LFS */
|
/* provide prototypes for these when building zlib without LFS */
|
||||||
#if !defined(_WIN32) && (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
#if !defined(_WIN32) && \
|
||||||
|
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||||
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
|
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
|
||||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
||||||
#endif
|
#endif
|
||||||
|
@ -200,10 +200,6 @@ OCV_OPTION(ENABLE_NOISY_WARNINGS "Show all warnings even if they are too no
|
|||||||
OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
|
OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
|
||||||
OCV_OPTION(ENABLE_WINRT_MODE "Build with Windows Runtime support" OFF IF WIN32 )
|
OCV_OPTION(ENABLE_WINRT_MODE "Build with Windows Runtime support" OFF IF WIN32 )
|
||||||
|
|
||||||
# uncategorized options
|
|
||||||
# ===================================================
|
|
||||||
OCV_OPTION(CMAKE_VERBOSE "Verbose mode" OFF )
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Get actual OpenCV version number from sources
|
# Get actual OpenCV version number from sources
|
||||||
@ -269,10 +265,6 @@ if(DEFINED CMAKE_DEBUG_POSTFIX)
|
|||||||
set(OPENCV_DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
|
set(OPENCV_DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_VERBOSE)
|
|
||||||
set(CMAKE_VERBOSE_MAKEFILE 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Path for build/platform -specific headers
|
# Path for build/platform -specific headers
|
||||||
@ -288,21 +280,10 @@ set(OPENCV_EXTRA_MODULES_PATH "" CACHE PATH "Where to look for additional OpenCV
|
|||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Autodetect if we are in a GIT repository
|
# Autodetect if we are in a GIT repository
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
find_package(Git QUIET)
|
||||||
|
|
||||||
# don't use FindGit because it requires CMake 2.8.2
|
if(GIT_FOUND)
|
||||||
set(git_names git eg) # eg = easy git
|
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --match "2.[0-9].[0-9]*"
|
||||||
# Prefer .cmd variants on Windows unless running in a Makefile in the MSYS shell
|
|
||||||
if(CMAKE_HOST_WIN32)
|
|
||||||
if(NOT CMAKE_GENERATOR MATCHES "MSYS")
|
|
||||||
set(git_names git.cmd git eg.cmd eg)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_host_program(GIT_EXECUTABLE NAMES ${git_names} PATH_SUFFIXES Git/cmd Git/bin DOC "git command line client")
|
|
||||||
mark_as_advanced(GIT_EXECUTABLE)
|
|
||||||
|
|
||||||
if(GIT_EXECUTABLE)
|
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always --dirty --match "2.[0-9].[0-9]*"
|
|
||||||
WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
|
WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
|
||||||
OUTPUT_VARIABLE OPENCV_VCSVERSION
|
OUTPUT_VARIABLE OPENCV_VCSVERSION
|
||||||
RESULT_VARIABLE GIT_RESULT
|
RESULT_VARIABLE GIT_RESULT
|
||||||
@ -479,6 +460,8 @@ include(cmake/OpenCVGenAndroidMK.cmake)
|
|||||||
# Generate OpenCVСonfig.cmake and OpenCVConfig-version.cmake for cmake projects
|
# Generate OpenCVСonfig.cmake and OpenCVConfig-version.cmake for cmake projects
|
||||||
include(cmake/OpenCVGenConfig.cmake)
|
include(cmake/OpenCVGenConfig.cmake)
|
||||||
|
|
||||||
|
# Generate Info.plist for the IOS framework
|
||||||
|
include(cmake/OpenCVGenInfoPlist.cmake)
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Summary:
|
# Summary:
|
||||||
@ -631,7 +614,7 @@ status(" OpenGL support:" HAVE_OPENGL THEN "YES (${OPENGL_LIBRARIES})" ELSE N
|
|||||||
# ========================== MEDIA IO ==========================
|
# ========================== MEDIA IO ==========================
|
||||||
status("")
|
status("")
|
||||||
status(" Media I/O: ")
|
status(" Media I/O: ")
|
||||||
status(" ZLib:" BUILD_ZLIB THEN "build (ver ${ZLIB_VERSION_STRING})" ELSE "${ZLIB_LIBRARY} (ver ${ZLIB_VERSION_STRING})")
|
status(" ZLib:" BUILD_ZLIB THEN "build (ver ${ZLIB_VERSION_STRING})" ELSE "${ZLIB_LIBRARIES} (ver ${ZLIB_VERSION_STRING})")
|
||||||
|
|
||||||
if(WITH_JPEG)
|
if(WITH_JPEG)
|
||||||
status(" JPEG:" JPEG_FOUND THEN "${JPEG_LIBRARY} (ver ${JPEG_LIB_VERSION})" ELSE "build (ver ${JPEG_LIB_VERSION})")
|
status(" JPEG:" JPEG_FOUND THEN "${JPEG_LIBRARY} (ver ${JPEG_LIB_VERSION})" ELSE "build (ver ${JPEG_LIB_VERSION})")
|
||||||
@ -736,8 +719,8 @@ if(DEFINED WITH_GIGEAPI)
|
|||||||
endif(DEFINED WITH_GIGEAPI)
|
endif(DEFINED WITH_GIGEAPI)
|
||||||
|
|
||||||
if(DEFINED WITH_QUICKTIME)
|
if(DEFINED WITH_QUICKTIME)
|
||||||
status(" QuickTime:" WITH_QUICKTIME THEN YES ELSE NO)
|
status(" QuickTime:" HAVE_QUICKTIME THEN YES ELSE NO)
|
||||||
status(" QTKit:" WITH_QUICKTIME THEN NO ELSE YES)
|
status(" QTKit:" HAVE_QTKIT THEN YES ELSE NO)
|
||||||
endif(DEFINED WITH_QUICKTIME)
|
endif(DEFINED WITH_QUICKTIME)
|
||||||
|
|
||||||
if(DEFINED WITH_UNICAP)
|
if(DEFINED WITH_UNICAP)
|
||||||
@ -826,15 +809,15 @@ endif()
|
|||||||
# ========================== python ==========================
|
# ========================== python ==========================
|
||||||
status("")
|
status("")
|
||||||
status(" Python:")
|
status(" Python:")
|
||||||
status(" Interpreter:" PYTHON_EXECUTABLE THEN "${PYTHON_EXECUTABLE} (ver ${PYTHON_VERSION_FULL})" ELSE NO)
|
status(" Interpreter:" PYTHONINTERP_FOUND THEN "${PYTHON_EXECUTABLE} (ver ${PYTHON_VERSION_STRING})" ELSE NO)
|
||||||
if(BUILD_opencv_python)
|
if(BUILD_opencv_python)
|
||||||
if(PYTHONLIBS_VERSION_STRING)
|
if(PYTHONLIBS_VERSION_STRING)
|
||||||
status(" Libraries:" HAVE_opencv_python THEN "${PYTHON_LIBRARIES} (ver ${PYTHONLIBS_VERSION_STRING})" ELSE NO)
|
status(" Libraries:" HAVE_opencv_python THEN "${PYTHON_LIBRARIES} (ver ${PYTHONLIBS_VERSION_STRING})" ELSE NO)
|
||||||
else()
|
else()
|
||||||
status(" Libraries:" HAVE_opencv_python THEN ${PYTHON_LIBRARIES} ELSE NO)
|
status(" Libraries:" HAVE_opencv_python THEN "${PYTHON_LIBRARIES}" ELSE NO)
|
||||||
endif()
|
endif()
|
||||||
status(" numpy:" PYTHON_NUMPY_INCLUDE_DIR THEN "${PYTHON_NUMPY_INCLUDE_DIR} (ver ${PYTHON_NUMPY_VERSION})" ELSE "NO (Python wrappers can not be generated)")
|
status(" numpy:" PYTHON_NUMPY_INCLUDE_DIRS THEN "${PYTHON_NUMPY_INCLUDE_DIRS} (ver ${PYTHON_NUMPY_VERSION})" ELSE "NO (Python wrappers can not be generated)")
|
||||||
status(" packages path:" PYTHON_EXECUTABLE THEN "${PYTHON_PACKAGES_PATH}" ELSE "-")
|
status(" packages path:" PYTHON_EXECUTABLE THEN "${PYTHON_PACKAGES_PATH}" ELSE "-")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# ========================== java ==========================
|
# ========================== java ==========================
|
||||||
@ -882,4 +865,3 @@ ocv_finalize_status()
|
|||||||
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree")
|
message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -3,4 +3,3 @@ add_definitions(-D__OPENCV_BUILD=1)
|
|||||||
add_subdirectory(haartraining)
|
add_subdirectory(haartraining)
|
||||||
add_subdirectory(traincascade)
|
add_subdirectory(traincascade)
|
||||||
add_subdirectory(sft)
|
add_subdirectory(sft)
|
||||||
|
|
||||||
|
@ -79,4 +79,3 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
set_target_properties(opencv_haartraining PROPERTIES FOLDER "applications")
|
set_target_properties(opencv_haartraining PROPERTIES FOLDER "applications")
|
||||||
set_target_properties(opencv_haartraining_engine PROPERTIES FOLDER "applications")
|
set_target_properties(opencv_haartraining_engine PROPERTIES FOLDER "applications")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -90,4 +90,3 @@ int icvGetIdxAt( CvMat* idx, int pos )
|
|||||||
void icvSave( const CvArr* ptr, const char* filename, int line );
|
void icvSave( const CvArr* ptr, const char* filename, int line );
|
||||||
|
|
||||||
#endif /* __CVCOMMON_H_ */
|
#endif /* __CVCOMMON_H_ */
|
||||||
|
|
||||||
|
@ -375,4 +375,3 @@ int main( int argc, char* argv[] )
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,4 +30,4 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
|
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)
|
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)
|
||||||
|
@ -159,4 +159,4 @@ std::ostream& sft::operator<<(std::ostream& out, const Config& m)
|
|||||||
<< std::setw(14) << std::left << "featureType" << m.featureType << std::endl;
|
<< std::setw(14) << std::left << "featureType" << m.featureType << std::endl;
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
@ -71,4 +71,4 @@ namespace sft
|
|||||||
# define dprintf(format, ...)
|
# define dprintf(format, ...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -135,4 +135,4 @@ std::ostream& operator<<(std::ostream& out, const Config& m);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -64,4 +64,4 @@ private:
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -165,4 +165,4 @@ int main(int argc, char** argv)
|
|||||||
fso.release();
|
fso.release();
|
||||||
std::cout << "Training complete..." << std::endl;
|
std::cout << "Training complete..." << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -34,4 +34,3 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)
|
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)
|
||||||
|
|
||||||
|
@ -4,37 +4,39 @@ endif()
|
|||||||
|
|
||||||
#INCLUDE (CheckIncludeFiles)
|
#INCLUDE (CheckIncludeFiles)
|
||||||
|
|
||||||
if (ENABLE_WINRT_MODE)
|
set(HAVE_WINRT FALSE)
|
||||||
set(HAVE_WINRT True)
|
|
||||||
|
|
||||||
# search Windows Platform SDK
|
# search Windows Platform SDK
|
||||||
message(STATUS "Checking for Windows Platfrom SDK")
|
message(STATUS "Checking for Windows Platform SDK")
|
||||||
GET_FILENAME_COMPONENT(WINDOWS_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]" ABSOLUTE CACHE)
|
GET_FILENAME_COMPONENT(WINDOWS_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]" ABSOLUTE CACHE)
|
||||||
if (WINDOWS_SDK_PATH STREQUAL "")
|
if (WINDOWS_SDK_PATH STREQUAL "")
|
||||||
message(ERROR "Windows Platform SDK 8.0 was not found!")
|
set(HAVE_MSPDK FALSE)
|
||||||
set(HAVE_WINRT False)
|
message(STATUS "Windows Platform SDK 8.0 was not found")
|
||||||
endif()
|
else()
|
||||||
|
set(HAVE_MSPDK TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
#search for Visual Studio 11.0 install directory
|
#search for Visual Studio 11.0 install directory
|
||||||
message(STATUS "Checking for Visual Studio 2012")
|
message(STATUS "Checking for Visual Studio 2012")
|
||||||
GET_FILENAME_COMPONENT(VISUAL_STUDIO_PATH [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir] REALPATH CACHE)
|
GET_FILENAME_COMPONENT(VISUAL_STUDIO_PATH [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir] REALPATH CACHE)
|
||||||
if (VISUAL_STUDIO_PATH STREQUAL "")
|
if (VISUAL_STUDIO_PATH STREQUAL "")
|
||||||
message(ERROR "Visual Studio 2012 was not found!")
|
set(HAVE_MSVC2012 FALSE)
|
||||||
set(HAVE_WINRT False)
|
message(STATUS "Visual Studio 2012 was not found")
|
||||||
endif()
|
else()
|
||||||
|
set(HAVE_MSVC2012 TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (HAVE_WINRT)
|
try_compile(HAVE_WINRT_SDK
|
||||||
TRY_COMPILE(HAVE_WINRT
|
"${OpenCV_BINARY_DIR}"
|
||||||
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
"${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp")
|
||||||
"${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp"
|
|
||||||
CMAKE_FLAGS "\"kernel.lib\" \"user32.lib\""
|
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (HAVE_WINRT)
|
if (ENABLE_WINRT_MODE AND HAVE_WINRT_SDK AND HAVE_MSVC2012 AND HAVE_MSPDK)
|
||||||
add_definitions(/DWINVER=0x0602 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=0x0602)
|
set(HAVE_WINRT TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif(ENABLE_WINRT_MODE)
|
|
||||||
|
if (HAVE_WINRT)
|
||||||
|
add_definitions(/DWINVER=0x0602 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=0x0602)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS AND BUILD_WITH_STATIC_CRT)
|
if(NOT BUILD_SHARED_LIBS AND BUILD_WITH_STATIC_CRT)
|
||||||
foreach(flag_var
|
foreach(flag_var
|
||||||
@ -96,4 +98,3 @@ if(NOT BUILD_WITH_DEBUG_INFO AND NOT MSVC)
|
|||||||
string(REPLACE "/Zi" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
string(REPLACE "/Zi" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
||||||
string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -233,6 +233,10 @@ if(MSVC)
|
|||||||
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /fp:fast") # !! important - be on the same wave with x64 compilers
|
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /fp:fast") # !! important - be on the same wave with x64 compilers
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(OPENCV_WARNINGS_ARE_ERRORS)
|
||||||
|
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /WX")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Extra link libs if the user selects building static libs:
|
# Extra link libs if the user selects building static libs:
|
||||||
@ -294,4 +298,4 @@ if(MSVC)
|
|||||||
if(NOT ENABLE_NOISY_WARNINGS)
|
if(NOT ENABLE_NOISY_WARNINGS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") #class 'std::XXX' needs to have dll-interface to be used by clients of YYY
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") #class 'std::XXX' needs to have dll-interface to be used by clients of YYY
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -2,7 +2,7 @@ if(WIN32 AND NOT PYTHON_EXECUTABLE)
|
|||||||
# search for executable with the same bitness as resulting binaries
|
# search for executable with the same bitness as resulting binaries
|
||||||
# standard FindPythonInterp always prefers executable from system path
|
# standard FindPythonInterp always prefers executable from system path
|
||||||
# this is really important because we are using the interpreter for numpy search and for choosing the install location
|
# this is really important because we are using the interpreter for numpy search and for choosing the install location
|
||||||
foreach(_CURRENT_VERSION ${Python_ADDITIONAL_VERSIONS} 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
foreach(_CURRENT_VERSION ${Python_ADDITIONAL_VERSIONS} 2.7 "${MIN_VER_PYTHON}")
|
||||||
find_host_program(PYTHON_EXECUTABLE
|
find_host_program(PYTHON_EXECUTABLE
|
||||||
NAMES python${_CURRENT_VERSION} python
|
NAMES python${_CURRENT_VERSION} python
|
||||||
PATHS
|
PATHS
|
||||||
@ -12,39 +12,15 @@ if(WIN32 AND NOT PYTHON_EXECUTABLE)
|
|||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
find_host_package(PythonInterp 2.0)
|
find_host_package(PythonInterp "${MIN_VER_PYTHON}")
|
||||||
|
|
||||||
unset(HAVE_SPHINX CACHE)
|
unset(HAVE_SPHINX CACHE)
|
||||||
if(PYTHON_EXECUTABLE)
|
|
||||||
if(PYTHON_VERSION_STRING)
|
|
||||||
set(PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
|
|
||||||
set(PYTHON_VERSION_FULL "${PYTHON_VERSION_STRING}")
|
|
||||||
else()
|
|
||||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} --version
|
|
||||||
ERROR_VARIABLE PYTHON_VERSION_FULL
|
|
||||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
|
||||||
|
|
||||||
string(REGEX MATCH "[0-9]+.[0-9]+" PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_FULL}")
|
if(PYTHONINTERP_FOUND)
|
||||||
endif()
|
set(PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
|
||||||
|
|
||||||
if("${PYTHON_VERSION_FULL}" MATCHES "[0-9]+.[0-9]+.[0-9]+")
|
|
||||||
set(PYTHON_VERSION_FULL "${CMAKE_MATCH_0}")
|
|
||||||
elseif("${PYTHON_VERSION_FULL}" MATCHES "[0-9]+.[0-9]+")
|
|
||||||
set(PYTHON_VERSION_FULL "${CMAKE_MATCH_0}")
|
|
||||||
else()
|
|
||||||
unset(PYTHON_VERSION_FULL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT ANDROID AND NOT IOS)
|
if(NOT ANDROID AND NOT IOS)
|
||||||
if(CMAKE_VERSION VERSION_GREATER 2.8.8 AND PYTHON_VERSION_FULL)
|
find_host_package(PythonLibs "${PYTHON_VERSION_STRING}" EXACT)
|
||||||
find_host_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT)
|
|
||||||
else()
|
|
||||||
find_host_package(PythonLibs ${PYTHON_VERSION_FULL})
|
|
||||||
endif()
|
|
||||||
# cmake 2.4 (at least on Ubuntu 8.04 (hardy)) don't define PYTHONLIBS_FOUND
|
|
||||||
if(NOT PYTHONLIBS_FOUND AND PYTHON_INCLUDE_PATH)
|
|
||||||
set(PYTHONLIBS_FOUND ON)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT ANDROID AND NOT IOS)
|
if(NOT ANDROID AND NOT IOS)
|
||||||
@ -78,39 +54,39 @@ if(PYTHON_EXECUTABLE)
|
|||||||
endif()
|
endif()
|
||||||
SET(PYTHON_PACKAGES_PATH "${_PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages.")
|
SET(PYTHON_PACKAGES_PATH "${_PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages.")
|
||||||
|
|
||||||
if(NOT PYTHON_NUMPY_INCLUDE_DIR)
|
if(NOT PYTHON_NUMPY_INCLUDE_DIRS)
|
||||||
# Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
|
# Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
|
||||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print(numpy.distutils.misc_util.get_numpy_include_dirs()[0])"
|
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c
|
||||||
|
"import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print(os.pathsep.join(numpy.distutils.misc_util.get_numpy_include_dirs()))"
|
||||||
RESULT_VARIABLE PYTHON_NUMPY_PROCESS
|
RESULT_VARIABLE PYTHON_NUMPY_PROCESS
|
||||||
OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
|
OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIRS
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
if(PYTHON_NUMPY_PROCESS EQUAL 0)
|
if(PYTHON_NUMPY_PROCESS EQUAL 0)
|
||||||
file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR)
|
file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIRS}" _PYTHON_NUMPY_INCLUDE_DIRS)
|
||||||
set(PYTHON_NUMPY_INCLUDE_DIR ${_PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
|
set(PYTHON_NUMPY_INCLUDE_DIRS "${_PYTHON_NUMPY_INCLUDE_DIRS}" CACHE PATH "Path to numpy headers")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PYTHON_NUMPY_INCLUDE_DIR)
|
if(PYTHON_NUMPY_INCLUDE_DIRS)
|
||||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print(numpy.version.version)"
|
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import numpy; print(numpy.version.version)"
|
||||||
RESULT_VARIABLE PYTHON_NUMPY_PROCESS
|
OUTPUT_VARIABLE PYTHON_NUMPY_VERSION
|
||||||
OUTPUT_VARIABLE PYTHON_NUMPY_VERSION
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
endif()
|
endif()
|
||||||
endif(NOT ANDROID AND NOT IOS)
|
endif(NOT ANDROID AND NOT IOS)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(BUILD_DOCS)
|
if(BUILD_DOCS)
|
||||||
find_host_program(SPHINX_BUILD sphinx-build)
|
find_host_program(SPHINX_BUILD sphinx-build)
|
||||||
if(SPHINX_BUILD)
|
if(SPHINX_BUILD)
|
||||||
execute_process(COMMAND "${SPHINX_BUILD}"
|
execute_process(COMMAND "${SPHINX_BUILD}"
|
||||||
OUTPUT_QUIET
|
OUTPUT_QUIET
|
||||||
ERROR_VARIABLE SPHINX_OUTPUT
|
ERROR_VARIABLE SPHINX_OUTPUT
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
if(SPHINX_OUTPUT MATCHES "^Sphinx v([0-9][^ \n]*)")
|
if(SPHINX_OUTPUT MATCHES "Sphinx v([0-9][^ \n]*)")
|
||||||
set(SPHINX_VERSION "${CMAKE_MATCH_1}")
|
set(SPHINX_VERSION "${CMAKE_MATCH_1}")
|
||||||
set(HAVE_SPHINX 1)
|
set(HAVE_SPHINX 1)
|
||||||
message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}")
|
message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif(BUILD_DOCS)
|
endif(BUILD_DOCS)
|
||||||
endif(PYTHON_EXECUTABLE)
|
|
||||||
|
@ -136,12 +136,20 @@ endfunction()
|
|||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
# This is auxiliary function called from set_ipp_variables()
|
# This is auxiliary function called from set_ipp_variables()
|
||||||
# to set IPP_LIBRARIES variable in IPP 7.x style
|
# to set IPP_LIBRARIES variable in IPP 7.x and 8.x style
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
function(set_ipp_new_libraries)
|
function(set_ipp_new_libraries _LATEST_VERSION)
|
||||||
set(IPP_PREFIX "ipp")
|
set(IPP_PREFIX "ipp")
|
||||||
set(IPP_SUFFIX "_l") # static not threaded libs suffix
|
|
||||||
set(IPP_THRD "_t") # static threaded libs suffix
|
if(${_LATEST_VERSION} VERSION_LESS "8.0")
|
||||||
|
set(IPP_SUFFIX "_l") # static not threaded libs suffix IPP 7.x
|
||||||
|
else()
|
||||||
|
if(WIN32)
|
||||||
|
set(IPP_SUFFIX "mt") # static not threaded libs suffix IPP 8.x for Windows
|
||||||
|
else()
|
||||||
|
set(IPP_SUFFIX "") # static not threaded libs suffix IPP 8.x for Linux/OS X
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
set(IPPCORE "core") # core functionality
|
set(IPPCORE "core") # core functionality
|
||||||
set(IPPSP "s") # signal processing
|
set(IPPSP "s") # signal processing
|
||||||
set(IPPIP "i") # image processing
|
set(IPPIP "i") # image processing
|
||||||
@ -199,7 +207,9 @@ function(set_ipp_variables _LATEST_VERSION)
|
|||||||
# set INCLUDE and LIB folders
|
# set INCLUDE and LIB folders
|
||||||
set(IPP_INCLUDE_DIRS ${IPP_ROOT_DIR}/include PARENT_SCOPE)
|
set(IPP_INCLUDE_DIRS ${IPP_ROOT_DIR}/include PARENT_SCOPE)
|
||||||
|
|
||||||
if (IPP_X64)
|
if (APPLE)
|
||||||
|
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib PARENT_SCOPE)
|
||||||
|
elseif (IPP_X64)
|
||||||
if(NOT EXISTS ${IPP_ROOT_DIR}/lib/intel64)
|
if(NOT EXISTS ${IPP_ROOT_DIR}/lib/intel64)
|
||||||
message(SEND_ERROR "IPP EM64T libraries not found")
|
message(SEND_ERROR "IPP EM64T libraries not found")
|
||||||
endif()
|
endif()
|
||||||
@ -211,8 +221,8 @@ function(set_ipp_variables _LATEST_VERSION)
|
|||||||
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32 PARENT_SCOPE)
|
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32 PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set IPP_LIBRARIES variable (7.x lib names)
|
# set IPP_LIBRARIES variable (7.x or 8.x lib names)
|
||||||
set_ipp_new_libraries()
|
set_ipp_new_libraries(${_LATEST_VERSION})
|
||||||
set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
|
set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
|
||||||
message(STATUS "IPP libs: ${IPP_LIBRARIES}")
|
message(STATUS "IPP libs: ${IPP_LIBRARIES}")
|
||||||
|
|
||||||
@ -336,4 +346,4 @@ if(WIN32 AND MINGW AND NOT IPP_LATEST_VERSION_MAJOR LESS 7)
|
|||||||
# See http://code.opencv.org/issues/1906 for additional details
|
# See http://code.opencv.org/issues/1906 for additional details
|
||||||
set(MSV_NTDLL "ntdll")
|
set(MSV_NTDLL "ntdll")
|
||||||
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX})
|
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX})
|
||||||
endif()
|
endif()
|
||||||
|
@ -5,12 +5,11 @@
|
|||||||
#--- Win32 UI ---
|
#--- Win32 UI ---
|
||||||
ocv_clear_vars(HAVE_WIN32UI)
|
ocv_clear_vars(HAVE_WIN32UI)
|
||||||
if(WITH_WIN32UI)
|
if(WITH_WIN32UI)
|
||||||
TRY_COMPILE(HAVE_WIN32UI
|
try_compile(HAVE_WIN32UI
|
||||||
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
"${OpenCV_BINARY_DIR}"
|
||||||
"${OpenCV_SOURCE_DIR}/cmake/checks/win32uitest.cpp"
|
"${OpenCV_SOURCE_DIR}/cmake/checks/win32uitest.cpp"
|
||||||
CMAKE_FLAGS "\"user32.lib\" \"gdi32.lib\""
|
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=user32;gdi32")
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
endif()
|
||||||
endif(WITH_WIN32UI)
|
|
||||||
|
|
||||||
# --- QT4 ---
|
# --- QT4 ---
|
||||||
ocv_clear_vars(HAVE_QT HAVE_QT5)
|
ocv_clear_vars(HAVE_QT HAVE_QT5)
|
||||||
@ -70,7 +69,7 @@ endif(WITH_OPENGL)
|
|||||||
if(APPLE)
|
if(APPLE)
|
||||||
if(WITH_CARBON)
|
if(WITH_CARBON)
|
||||||
set(HAVE_CARBON YES)
|
set(HAVE_CARBON YES)
|
||||||
elif(NOT IOS)
|
elseif(NOT IOS)
|
||||||
set(HAVE_COCOA YES)
|
set(HAVE_COCOA YES)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -6,22 +6,21 @@
|
|||||||
if(BUILD_ZLIB)
|
if(BUILD_ZLIB)
|
||||||
ocv_clear_vars(ZLIB_FOUND)
|
ocv_clear_vars(ZLIB_FOUND)
|
||||||
else()
|
else()
|
||||||
include(FindZLIB)
|
find_package(ZLIB "${MIN_VER_ZLIB}")
|
||||||
if(ZLIB_FOUND AND ANDROID)
|
if(ZLIB_FOUND AND ANDROID)
|
||||||
if(ZLIB_LIBRARY STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so")
|
if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so")
|
||||||
set(ZLIB_LIBRARY z)
|
|
||||||
set(ZLIB_LIBRARIES z)
|
set(ZLIB_LIBRARIES z)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT ZLIB_FOUND)
|
if(NOT ZLIB_FOUND)
|
||||||
ocv_clear_vars(ZLIB_LIBRARY ZLIB_LIBRARIES ZLIB_INCLUDE_DIR)
|
ocv_clear_vars(ZLIB_LIBRARY ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
|
||||||
|
|
||||||
set(ZLIB_LIBRARY zlib)
|
set(ZLIB_LIBRARY zlib)
|
||||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
|
||||||
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/zlib")
|
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/zlib")
|
||||||
set(ZLIB_INCLUDE_DIR "${${ZLIB_LIBRARY}_SOURCE_DIR}" "${${ZLIB_LIBRARY}_BINARY_DIR}")
|
set(ZLIB_INCLUDE_DIRS "${${ZLIB_LIBRARY}_SOURCE_DIR}" "${${ZLIB_LIBRARY}_BINARY_DIR}")
|
||||||
|
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||||
|
|
||||||
ocv_parse_header2(ZLIB "${${ZLIB_LIBRARY}_SOURCE_DIR}/zlib.h" ZLIB_VERSION)
|
ocv_parse_header2(ZLIB "${${ZLIB_LIBRARY}_SOURCE_DIR}/zlib.h" ZLIB_VERSION)
|
||||||
endif()
|
endif()
|
||||||
@ -150,7 +149,7 @@ if(WITH_JASPER)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# --- libpng (optional, should be searched after zlib) ---
|
# --- libpng (optional, should be searched after zlib) ---
|
||||||
if(WITH_PNG AND NOT IOS)
|
if(WITH_PNG)
|
||||||
if(BUILD_PNG)
|
if(BUILD_PNG)
|
||||||
ocv_clear_vars(PNG_FOUND)
|
ocv_clear_vars(PNG_FOUND)
|
||||||
else()
|
else()
|
||||||
|
@ -27,7 +27,7 @@ endif(WITH_CUDA)
|
|||||||
# --- Eigen ---
|
# --- Eigen ---
|
||||||
if(WITH_EIGEN)
|
if(WITH_EIGEN)
|
||||||
find_path(EIGEN_INCLUDE_PATH "Eigen/Core"
|
find_path(EIGEN_INCLUDE_PATH "Eigen/Core"
|
||||||
PATHS /usr/local /opt /usr $ENV{EIGEN_ROOT}/include ENV ProgramFiles ENV ProgramW6432
|
PATHS /usr/local /opt /usr $ENV{EIGEN_ROOT}/include ENV ProgramFiles ENV ProgramW6432
|
||||||
PATH_SUFFIXES include/eigen3 include/eigen2 Eigen/include/eigen3 Eigen/include/eigen2
|
PATH_SUFFIXES include/eigen3 include/eigen2 Eigen/include/eigen3 Eigen/include/eigen2
|
||||||
DOC "The path to Eigen3/Eigen2 headers"
|
DOC "The path to Eigen3/Eigen2 headers"
|
||||||
CMAKE_FIND_ROOT_PATH_BOTH)
|
CMAKE_FIND_ROOT_PATH_BOTH)
|
||||||
|
@ -3,13 +3,12 @@
|
|||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
ocv_clear_vars(HAVE_VFW)
|
ocv_clear_vars(HAVE_VFW)
|
||||||
if (WITH_VFW)
|
if(WITH_VFW)
|
||||||
TRY_COMPILE(HAVE_VFW
|
try_compile(HAVE_VFW
|
||||||
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
"${OpenCV_BINARY_DIR}"
|
||||||
"${OpenCV_SOURCE_DIR}/cmake/checks/vfwtest.cpp"
|
"${OpenCV_SOURCE_DIR}/cmake/checks/vfwtest.cpp"
|
||||||
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32"
|
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32")
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
endif(WITH_VFW)
|
||||||
endif(WITH_VFW)
|
|
||||||
|
|
||||||
# --- GStreamer ---
|
# --- GStreamer ---
|
||||||
ocv_clear_vars(HAVE_GSTREAMER)
|
ocv_clear_vars(HAVE_GSTREAMER)
|
||||||
@ -271,6 +270,10 @@ if(WITH_AVFOUNDATION)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# --- QuickTime ---
|
# --- QuickTime ---
|
||||||
if(WITH_QUICKTIME)
|
if (NOT IOS)
|
||||||
set(HAVE_QUICKTIME YES)
|
if(WITH_QUICKTIME)
|
||||||
|
set(HAVE_QUICKTIME YES)
|
||||||
|
elseif(APPLE)
|
||||||
|
set(HAVE_QTKIT YES)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -19,7 +19,7 @@ set(XIMEA_LIBRARY_DIR)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
# Try to find the XIMEA API path in registry.
|
# Try to find the XIMEA API path in registry.
|
||||||
GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE)
|
GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE)
|
||||||
|
|
||||||
if(EXISTS ${XIMEA_PATH})
|
if(EXISTS ${XIMEA_PATH})
|
||||||
set(XIMEA_FOUND 1)
|
set(XIMEA_FOUND 1)
|
||||||
# set LIB folders
|
# set LIB folders
|
||||||
@ -43,4 +43,4 @@ endif()
|
|||||||
|
|
||||||
mark_as_advanced(FORCE XIMEA_FOUND)
|
mark_as_advanced(FORCE XIMEA_FOUND)
|
||||||
mark_as_advanced(FORCE XIMEA_PATH)
|
mark_as_advanced(FORCE XIMEA_PATH)
|
||||||
mark_as_advanced(FORCE XIMEA_LIBRARY_DIR)
|
mark_as_advanced(FORCE XIMEA_LIBRARY_DIR)
|
||||||
|
4
cmake/OpenCVGenInfoPlist.cmake
Normal file
4
cmake/OpenCVGenInfoPlist.cmake
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
if(IOS)
|
||||||
|
configure_file("${OpenCV_SOURCE_DIR}/platforms/ios/Info.plist.in"
|
||||||
|
"${CMAKE_BINARY_DIR}/ios/Info.plist")
|
||||||
|
endif()
|
@ -1 +1,3 @@
|
|||||||
set(MIN_VER_CMAKE 2.8.7)
|
set(MIN_VER_CMAKE 2.8.7)
|
||||||
|
set(MIN_VER_PYTHON 2.6)
|
||||||
|
set(MIN_VER_ZLIB 1.2.3)
|
||||||
|
@ -470,8 +470,16 @@ endmacro()
|
|||||||
# ocv_create_module(<extra link dependencies>)
|
# ocv_create_module(<extra link dependencies>)
|
||||||
# ocv_create_module(SKIP_LINK)
|
# ocv_create_module(SKIP_LINK)
|
||||||
macro(ocv_create_module)
|
macro(ocv_create_module)
|
||||||
|
# The condition we ought to be testing here is whether ocv_add_precompiled_headers will
|
||||||
|
# be called at some point in the future. We can't look into the future, though,
|
||||||
|
# so this will have to do.
|
||||||
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/precomp.hpp")
|
||||||
|
get_native_precompiled_header(${the_module} precomp.hpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(${the_module} ${OPENCV_MODULE_TYPE} ${OPENCV_MODULE_${the_module}_HEADERS} ${OPENCV_MODULE_${the_module}_SOURCES}
|
add_library(${the_module} ${OPENCV_MODULE_TYPE} ${OPENCV_MODULE_${the_module}_HEADERS} ${OPENCV_MODULE_${the_module}_SOURCES}
|
||||||
"${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp")
|
"${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp"
|
||||||
|
${${the_module}_pch})
|
||||||
if(NOT the_module STREQUAL opencv_ts)
|
if(NOT the_module STREQUAL opencv_ts)
|
||||||
set_target_properties(${the_module} PROPERTIES COMPILE_DEFINITIONS OPENCV_NOSTL)
|
set_target_properties(${the_module} PROPERTIES COMPILE_DEFINITIONS OPENCV_NOSTL)
|
||||||
endif()
|
endif()
|
||||||
@ -640,7 +648,9 @@ function(ocv_add_perf_tests)
|
|||||||
set(OPENCV_PERF_${the_module}_SOURCES ${perf_srcs} ${perf_hdrs})
|
set(OPENCV_PERF_${the_module}_SOURCES ${perf_srcs} ${perf_hdrs})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(${the_target} ${OPENCV_PERF_${the_module}_SOURCES})
|
get_native_precompiled_header(${the_target} perf_precomp.hpp)
|
||||||
|
|
||||||
|
add_executable(${the_target} ${OPENCV_PERF_${the_module}_SOURCES} ${${the_target}_pch})
|
||||||
target_link_libraries(${the_target} ${OPENCV_MODULE_${the_module}_DEPS} ${perf_deps} ${OPENCV_LINKER_LIBS})
|
target_link_libraries(${the_target} ${OPENCV_MODULE_${the_module}_DEPS} ${perf_deps} ${OPENCV_LINKER_LIBS})
|
||||||
add_dependencies(opencv_perf_tests ${the_target})
|
add_dependencies(opencv_perf_tests ${the_target})
|
||||||
|
|
||||||
@ -688,7 +698,9 @@ function(ocv_add_accuracy_tests)
|
|||||||
set(OPENCV_TEST_${the_module}_SOURCES ${test_srcs} ${test_hdrs})
|
set(OPENCV_TEST_${the_module}_SOURCES ${test_srcs} ${test_hdrs})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(${the_target} ${OPENCV_TEST_${the_module}_SOURCES})
|
get_native_precompiled_header(${the_target} test_precomp.hpp)
|
||||||
|
|
||||||
|
add_executable(${the_target} ${OPENCV_TEST_${the_module}_SOURCES} ${${the_target}_pch})
|
||||||
target_link_libraries(${the_target} ${OPENCV_MODULE_${the_module}_DEPS} ${test_deps} ${OPENCV_LINKER_LIBS})
|
target_link_libraries(${the_target} ${OPENCV_MODULE_${the_module}_DEPS} ${test_deps} ${OPENCV_LINKER_LIBS})
|
||||||
add_dependencies(opencv_tests ${the_target})
|
add_dependencies(opencv_tests ${the_target})
|
||||||
|
|
||||||
|
@ -279,12 +279,9 @@ ENDMACRO(ADD_PRECOMPILED_HEADER)
|
|||||||
MACRO(GET_NATIVE_PRECOMPILED_HEADER _targetName _input)
|
MACRO(GET_NATIVE_PRECOMPILED_HEADER _targetName _input)
|
||||||
|
|
||||||
if(CMAKE_GENERATOR MATCHES "^Visual.*$")
|
if(CMAKE_GENERATOR MATCHES "^Visual.*$")
|
||||||
SET(_dummy_str "#include \"${_input}\"\n"
|
set(_dummy_str "#include \"${_input}\"\n")
|
||||||
"// This is required to suppress LNK4221. Very annoying.\n"
|
|
||||||
"void *g_${_targetName}Dummy = 0\;\n")
|
|
||||||
|
|
||||||
# Use of cxx extension for generated files (as Qt does)
|
set(${_targetName}_pch ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch.cpp)
|
||||||
SET(${_targetName}_pch ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch.cxx)
|
|
||||||
if(EXISTS ${${_targetName}_pch})
|
if(EXISTS ${${_targetName}_pch})
|
||||||
# Check if contents is the same, if not rewrite
|
# Check if contents is the same, if not rewrite
|
||||||
# todo
|
# todo
|
||||||
@ -344,11 +341,7 @@ ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER)
|
|||||||
|
|
||||||
macro(ocv_add_precompiled_header_to_target the_target pch_header)
|
macro(ocv_add_precompiled_header_to_target the_target pch_header)
|
||||||
if(PCHSupport_FOUND AND ENABLE_PRECOMPILED_HEADERS AND EXISTS "${pch_header}")
|
if(PCHSupport_FOUND AND ENABLE_PRECOMPILED_HEADERS AND EXISTS "${pch_header}")
|
||||||
if(CMAKE_GENERATOR MATCHES Visual)
|
if(CMAKE_GENERATOR MATCHES "^Visual" OR CMAKE_GENERATOR MATCHES Xcode)
|
||||||
string(REGEX REPLACE "hpp$" "cpp" ${the_target}_pch "${pch_header}")
|
|
||||||
add_native_precompiled_header(${the_target} ${pch_header})
|
|
||||||
unset(${the_target}_pch)
|
|
||||||
elseif(CMAKE_GENERATOR MATCHES Xcode)
|
|
||||||
add_native_precompiled_header(${the_target} ${pch_header})
|
add_native_precompiled_header(${the_target} ${pch_header})
|
||||||
elseif(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
|
elseif(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
|
||||||
add_precompiled_header(${the_target} ${pch_header})
|
add_precompiled_header(${the_target} ${pch_header})
|
||||||
|
@ -77,7 +77,7 @@ MACRO(ocv_check_compiler_flag LANG FLAG RESULT)
|
|||||||
if(_fname)
|
if(_fname)
|
||||||
MESSAGE(STATUS "Performing Test ${RESULT}")
|
MESSAGE(STATUS "Performing Test ${RESULT}")
|
||||||
TRY_COMPILE(${RESULT}
|
TRY_COMPILE(${RESULT}
|
||||||
${CMAKE_BINARY_DIR}
|
"${CMAKE_BINARY_DIR}"
|
||||||
"${_fname}"
|
"${_fname}"
|
||||||
COMPILE_DEFINITIONS "${FLAG}"
|
COMPILE_DEFINITIONS "${FLAG}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
@ -515,4 +515,4 @@ function(ocv_source_group group)
|
|||||||
cmake_parse_arguments(OCV_SOURCE_GROUP "" "" "GLOB" ${ARGN})
|
cmake_parse_arguments(OCV_SOURCE_GROUP "" "" "GLOB" ${ARGN})
|
||||||
file(GLOB srcs ${OCV_SOURCE_GROUP_GLOB})
|
file(GLOB srcs ${OCV_SOURCE_GROUP_GLOB})
|
||||||
source_group(${group} FILES ${srcs})
|
source_group(${group} FILES ${srcs})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
@ -11,4 +11,4 @@ int main()
|
|||||||
printf("%d.%d ", prop.major, prop.minor);
|
printf("%d.%d ", prop.major, prop.minor);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -7,4 +7,4 @@ int main()
|
|||||||
AVIFileInit();
|
AVIFileInit();
|
||||||
AVIFileExit();
|
AVIFileExit();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -32,4 +32,4 @@ foreach(cl ${cl_list})
|
|||||||
file(APPEND ${OUTPUT} "const char* ${cl_filename}=\"${lines};\n")
|
file(APPEND ${OUTPUT} "const char* ${cl_filename}=\"${lines};\n")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
file(APPEND ${OUTPUT} "}\n}\n")
|
file(APPEND ${OUTPUT} "}\n}\n")
|
||||||
|
@ -23,5 +23,3 @@ FOREACH(file ${files})
|
|||||||
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||||
ENDIF(EXISTS "$ENV{DESTDIR}${file}")
|
ENDIF(EXISTS "$ENV{DESTDIR}${file}")
|
||||||
ENDFOREACH(file)
|
ENDFOREACH(file)
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,6 +130,9 @@
|
|||||||
/* QuickTime video libraries */
|
/* QuickTime video libraries */
|
||||||
#cmakedefine HAVE_QUICKTIME
|
#cmakedefine HAVE_QUICKTIME
|
||||||
|
|
||||||
|
/* QTKit video libraries */
|
||||||
|
#cmakedefine HAVE_QTKIT
|
||||||
|
|
||||||
/* Intel Threading Building Blocks */
|
/* Intel Threading Building Blocks */
|
||||||
#cmakedefine HAVE_TBB
|
#cmakedefine HAVE_TBB
|
||||||
|
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@OPENCV_MODULE_DEFINITIONS_CONFIGMAKE@
|
@OPENCV_MODULE_DEFINITIONS_CONFIGMAKE@
|
||||||
|
@ -49,7 +49,7 @@ if(BUILD_DOCS AND HAVE_SPHINX)
|
|||||||
set(toc_file "${OPENCV_MODULE_opencv_${mod}_LOCATION}/doc/${mod}.rst")
|
set(toc_file "${OPENCV_MODULE_opencv_${mod}_LOCATION}/doc/${mod}.rst")
|
||||||
if(EXISTS "${toc_file}")
|
if(EXISTS "${toc_file}")
|
||||||
file(RELATIVE_PATH toc_file "${OpenCV_SOURCE_DIR}/modules" "${toc_file}")
|
file(RELATIVE_PATH toc_file "${OpenCV_SOURCE_DIR}/modules" "${toc_file}")
|
||||||
set(OPENCV_REFMAN_TOC "${OPENCV_REFMAN_TOC} ${toc_file}\r\n")
|
set(OPENCV_REFMAN_TOC "${OPENCV_REFMAN_TOC} ${toc_file}\n")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
3
doc/_static/insertIframe.js
vendored
3
doc/_static/insertIframe.js
vendored
@ -1,4 +1,4 @@
|
|||||||
function insertIframe (elementId, iframeSrc)
|
function insertIframe (elementId, iframeSrc)
|
||||||
{
|
{
|
||||||
var iframe;
|
var iframe;
|
||||||
if (document.createElement && (iframe = document.createElement('iframe')))
|
if (document.createElement && (iframe = document.createElement('iframe')))
|
||||||
@ -10,4 +10,3 @@ function insertIframe (elementId, iframeSrc)
|
|||||||
element.parentNode.replaceChild(iframe, element);
|
element.parentNode.replaceChild(iframe, element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
doc/_themes/blue/static/default.css_t
vendored
2
doc/_themes/blue/static/default.css_t
vendored
@ -387,4 +387,4 @@ div.sphinxsidebar #searchbox input[type="text"] {
|
|||||||
|
|
||||||
div.sphinxsidebar #searchbox input[type="submit"] {
|
div.sphinxsidebar #searchbox input[type="submit"] {
|
||||||
width:auto;
|
width:auto;
|
||||||
}
|
}
|
||||||
|
2
doc/_themes/blue/theme.conf
vendored
2
doc/_themes/blue/theme.conf
vendored
@ -28,4 +28,4 @@ feedbacklinkcolor = #ffffff
|
|||||||
bodyfont = sans-serif
|
bodyfont = sans-serif
|
||||||
headfont = 'Trebuchet MS', sans-serif
|
headfont = 'Trebuchet MS', sans-serif
|
||||||
guifont = "Lucida Sans","Lucida Sans Unicode","Lucida Grande",Verdana,Arial,Helvetica,sans-serif
|
guifont = "Lucida Sans","Lucida Sans Unicode","Lucida Grande",Verdana,Arial,Helvetica,sans-serif
|
||||||
lang = none
|
lang = none
|
||||||
|
@ -184,5 +184,3 @@ p = RSTParser()
|
|||||||
for m in opencv_module_list:
|
for m in opencv_module_list:
|
||||||
print "\n\n*************************** " + m + " *************************\n"
|
print "\n\n*************************** " + m + " *************************\n"
|
||||||
p.check_module_docs(m)
|
p.check_module_docs(m)
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,4 +39,3 @@
|
|||||||
#7 & #8 & #9
|
#7 & #8 & #9
|
||||||
\end{bmatrix}
|
\end{bmatrix}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,11 +75,11 @@
|
|||||||
% if using A4 paper. (This probably isn't strictly necessary.)
|
% if using A4 paper. (This probably isn't strictly necessary.)
|
||||||
% If using another size paper, use default 1cm margins.
|
% If using another size paper, use default 1cm margins.
|
||||||
\ifthenelse{\lengthtest { \paperwidth = 11in}}
|
\ifthenelse{\lengthtest { \paperwidth = 11in}}
|
||||||
{ \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} }
|
{ \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} }
|
||||||
{\ifthenelse{ \lengthtest{ \paperwidth = 297mm}}
|
{\ifthenelse{ \lengthtest{ \paperwidth = 297mm}}
|
||||||
{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
|
{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
|
||||||
{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
|
{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
|
||||||
}
|
}
|
||||||
|
|
||||||
% Turn off header and footer
|
% Turn off header and footer
|
||||||
% \pagestyle{empty}
|
% \pagestyle{empty}
|
||||||
|
@ -3667,4 +3667,3 @@ class YErrorBars:
|
|||||||
output.append(LineAxis(x, start, x, end, start, end, bars, False, False, **self.attr).SVG(trans))
|
output.append(LineAxis(x, start, x, end, start, end, bars, False, False, **self.attr).SVG(trans))
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ To compile it, assuming OpenCV is correctly installed, use the following command
|
|||||||
|
|
||||||
Here is a code explanation :
|
Here is a code explanation :
|
||||||
|
|
||||||
Retina definition is present in the bioinspired package and a simple include allows to use it. You can rather use the specific header : *opencv2/bioinspired.hpp* if you prefer but then include the other required openv modules : *opencv2/core.hpp* and *opencv2/highgui.hpp*
|
Retina definition is present in the bioinspired package and a simple include allows to use it. You can rather use the specific header : *opencv2/bioinspired.hpp* if you prefer but then include the other required openv modules : *opencv2/core.hpp* and *opencv2/highgui.hpp*
|
||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user