mirror of
https://github.com/opencv/opencv.git
synced 2026-07-24 04:43:04 +04:00
Compare commits
235 Commits
3.3.0-cvsdk
...
3.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 4af3ca4e4d | |||
| 953160ddd6 | |||
| 5c961169cc | |||
| 94dbc35d92 | |||
| ad2e864a9a | |||
| e0489cb4a6 | |||
| 922ac1a1ec | |||
| c95a97389d | |||
| 2a8322ddbb | |||
| cfb964834c | |||
| 73c3d14a66 | |||
| f6ceeaa2e5 | |||
| 6847cc9f1c | |||
| 411d36ff13 | |||
| 63ae5f00b1 | |||
| 43e0912516 | |||
| 64533009b3 | |||
| 8aca8d90d6 | |||
| 9ca39821c8 | |||
| 2e608b1c97 | |||
| dcc63d7408 | |||
| 5e32de8173 | |||
| 2f4a3e40eb | |||
| 15aa0df23c | |||
| 3166d0c667 | |||
| 339793143c | |||
| 8be1ba708e | |||
| 0bd357e7ec | |||
| cfe849bd43 | |||
| d8c70e2e73 | |||
| 03bf0a89b5 | |||
| 1ce9ffcc7f | |||
| b1ef44b1ac | |||
| da0a36c323 | |||
| 8d6b8b45b6 | |||
| 5d699e9ba5 | |||
| 321c0ec533 | |||
| 4ad45af53f | |||
| 37a7e08b38 | |||
| bab4bc0968 | |||
| f6c4901b8f | |||
| bb6496d9e5 | |||
| c2de5cf735 | |||
| 2959e7aba9 | |||
| ce1cc352d9 | |||
| d34eec3ab3 | |||
| 2be955a0ef | |||
| 830bff1241 | |||
| 16fb74425e | |||
| 3786d30320 | |||
| adb62403ec | |||
| 50b9a5afa9 | |||
| 230f22b1cd | |||
| 06a9c16961 | |||
| d22506092e | |||
| 728bd68977 | |||
| 65519ab786 | |||
| 886b1f39d9 | |||
| cbced23de4 | |||
| e58a778bd5 | |||
| 1c49796e8e | |||
| 6b0661cca1 | |||
| 46f05f2db6 | |||
| 15a6586062 | |||
| bdb6b45c91 | |||
| 1170d74868 | |||
| 6ae5a9f07a | |||
| cc1a95d161 | |||
| fffd0f5b68 | |||
| 89480801b8 | |||
| 9deb206e74 | |||
| 27cf941284 | |||
| 04cd09a30a | |||
| 3ea889050b | |||
| b46e741c95 | |||
| 34f9c039c5 | |||
| d35422b523 | |||
| d61f5d160d | |||
| 68ef903a7c | |||
| 06407b4d14 | |||
| 12213f9985 | |||
| caa5e3b4c5 | |||
| 2e17251160 | |||
| 3f102e5d3a | |||
| aad6d28e13 | |||
| 1650c664bc | |||
| d17b099994 | |||
| 1516103a15 | |||
| bf0173bf38 | |||
| b4e300b78b | |||
| 402a77e7f7 | |||
| 2ca561f104 | |||
| 174cb06a7a | |||
| 583b327523 | |||
| 1081cee35f | |||
| 69fd57bc96 | |||
| 8e6e05ed3f | |||
| c512bf6c66 | |||
| bcff9fd067 | |||
| 0d7aeacc34 | |||
| 3515f6ec33 | |||
| 602f047fe8 | |||
| 7f3eea6325 | |||
| 878a6906cc | |||
| 0194d5a2d5 | |||
| d219709cfa | |||
| c2e281f8cf | |||
| 07334bc25c | |||
| 94fdd45b75 | |||
| 70ff3804e9 | |||
| 8741d97a4f | |||
| 432d0fd707 | |||
| e45d5446f2 | |||
| 0f91faddae | |||
| 5e6e12600f | |||
| 92f182bc3b | |||
| bc3c7e80a6 | |||
| 32683ee6e0 | |||
| 544eb4be1f | |||
| d9e092325b | |||
| ec7ce81401 | |||
| 5bc291937f | |||
| 9313978f61 | |||
| ce6b06efb9 | |||
| f01c029446 | |||
| 928552ac9e | |||
| ab58cac236 | |||
| 71496e3be4 | |||
| e63d628677 | |||
| dcb3c4ff1e | |||
| 488b5d95dc | |||
| 22f12dc93c | |||
| ad183481c0 | |||
| 08c94aa5c0 | |||
| 1989bc33a7 | |||
| 46bee83005 | |||
| 2360291c3e | |||
| 12ed7ca63e | |||
| ca479c3f5b | |||
| 02829f73e0 | |||
| a44c0fd51f | |||
| 773365405f | |||
| cb0a61b9ba | |||
| 8a9a9403a3 | |||
| 7d1140340e | |||
| 862242aa8d | |||
| 1ff6c758ec | |||
| 6ba22dea46 | |||
| 70b984434d | |||
| e5ed9cc612 | |||
| 1fbf914348 | |||
| 09436df1ad | |||
| 4bb4a349c9 | |||
| b4716b1d92 | |||
| acc8589083 | |||
| c0dc2f2bb3 | |||
| 66ab4e15db | |||
| c10d08f795 | |||
| 4b75be801e | |||
| ac64713881 | |||
| c455fc0334 | |||
| 42c0914382 | |||
| 49e1f6b161 | |||
| 1a4c22fc46 | |||
| 5f4c7372c0 | |||
| d07eb9ad60 | |||
| 5a54acef4e | |||
| e5fbb4f5d2 | |||
| 11626fe32c | |||
| 63e89bc326 | |||
| 96a3c7954d | |||
| 25af743902 | |||
| 6d1cdcf601 | |||
| dc59476c34 | |||
| 4e39d0371d | |||
| 11feae6631 | |||
| eef78f5664 | |||
| 9ef742bbf4 | |||
| 928bfe0b93 | |||
| 86e8a105a5 | |||
| a586ef725c | |||
| fe7fd4c312 | |||
| 0488d9bdb2 | |||
| 431e2e6d68 | |||
| 9439872a62 | |||
| f6dd549e58 | |||
| 454bc7a674 | |||
| 8f4b534937 | |||
| e251ed7773 | |||
| 0e6ebafdb3 | |||
| 7d17d20dce | |||
| 1d2baf0bd3 | |||
| 10e6491c22 | |||
| f448d75aa8 | |||
| 19c9174543 | |||
| df7fb00c21 | |||
| fa17267e05 | |||
| 6dd9e18b2e | |||
| 5b833db558 | |||
| fce018e7a9 | |||
| a4a47b538c | |||
| d098048aba | |||
| 309c962169 | |||
| e7d5dbfec0 | |||
| 600b7a30e6 | |||
| 526d1d6db1 | |||
| aa621d6f3c | |||
| 704c688225 | |||
| 6c71988c54 | |||
| 82811d0706 | |||
| c5b5d5c8d3 | |||
| cc862e996e | |||
| 635342ab73 | |||
| 98c78e0acd | |||
| 6833b46a05 | |||
| 0ef5c8c541 | |||
| 359bd21bd7 | |||
| fadf25acd6 | |||
| 77264dcca9 | |||
| 5448d9186a | |||
| 2a2a1dc5b4 | |||
| 4d0f789e0a | |||
| d3c14ce3ea | |||
| 42936d3227 | |||
| 3681dcef1a | |||
| b3f5e3bf94 | |||
| b66c349bba | |||
| c45d3568ae | |||
| 6a6222d21c | |||
| 880052d3f3 | |||
| 85afbd409b | |||
| 03c3e0edcf | |||
| 4f558e8b89 | |||
| 582bb3c311 | |||
| 1ed9a58b64 |
+6
-6
@@ -49,7 +49,7 @@ void extract2(const Size2D &size,
|
||||
{
|
||||
internal::assertSupportedConfiguration();
|
||||
#ifdef CAROTENE_NEON
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw32 = size.width >= 31 ? size.width - 31 : 0;
|
||||
#endif
|
||||
size_t roiw8 = size.width >= 7 ? size.width - 7 : 0;
|
||||
@@ -60,7 +60,7 @@ void extract2(const Size2D &size,
|
||||
u8 * dst = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t sj = 0u, dj = 0u;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for (; dj < roiw32; sj += 64, dj += 32)
|
||||
{
|
||||
internal::prefetch(src + sj);
|
||||
@@ -101,7 +101,7 @@ void extract3(const Size2D &size,
|
||||
{
|
||||
internal::assertSupportedConfiguration();
|
||||
#ifdef CAROTENE_NEON
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw32 = size.width >= 31 ? size.width - 31 : 0;
|
||||
#endif
|
||||
size_t roiw8 = size.width >= 7 ? size.width - 7 : 0;
|
||||
@@ -112,7 +112,7 @@ void extract3(const Size2D &size,
|
||||
u8 * dst = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t sj = 0u, dj = 0u;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for (; dj < roiw32; sj += 96, dj += 32)
|
||||
{
|
||||
internal::prefetch(src + sj);
|
||||
@@ -153,7 +153,7 @@ void extract4(const Size2D &size,
|
||||
{
|
||||
internal::assertSupportedConfiguration();
|
||||
#ifdef CAROTENE_NEON
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw32 = size.width >= 31 ? size.width - 31 : 0;
|
||||
#endif
|
||||
size_t roiw8 = size.width >= 7 ? size.width - 7 : 0;
|
||||
@@ -164,7 +164,7 @@ void extract4(const Size2D &size,
|
||||
u8 * dst = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t sj = 0u, dj = 0u;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for (; dj < roiw32; sj += 128, dj += 32)
|
||||
{
|
||||
internal::prefetch(src + sj);
|
||||
|
||||
+4
-4
@@ -240,7 +240,7 @@ void combineYUYV(const Size2D &size,
|
||||
{
|
||||
internal::assertSupportedConfiguration();
|
||||
#ifdef CAROTENE_NEON
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw32 = size.width >= 31 ? size.width - 31 : 0;
|
||||
#endif
|
||||
size_t roiw8 = size.width >= 7 ? size.width - 7 : 0;
|
||||
@@ -253,7 +253,7 @@ void combineYUYV(const Size2D &size,
|
||||
u8 * dst = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t syj = 0u, sj = 0u, dj = 0u;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for (; sj < roiw32; sj += 32, syj += 64, dj += 128)
|
||||
{
|
||||
internal::prefetch(srcy + syj);
|
||||
@@ -317,7 +317,7 @@ void combineUYVY(const Size2D &size,
|
||||
{
|
||||
internal::assertSupportedConfiguration();
|
||||
#ifdef CAROTENE_NEON
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw32 = size.width >= 31 ? size.width - 31 : 0;
|
||||
#endif
|
||||
size_t roiw8 = size.width >= 7 ? size.width - 7 : 0;
|
||||
@@ -330,7 +330,7 @@ void combineUYVY(const Size2D &size,
|
||||
u8 * dst = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t syj = 0u, sj = 0u, dj = 0u;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for (; sj < roiw32; sj += 32, syj += 64, dj += 128)
|
||||
{
|
||||
internal::prefetch(srcy + syj);
|
||||
|
||||
Vendored
+4
-4
@@ -105,12 +105,12 @@ void flip3(const Size2D & size,
|
||||
{
|
||||
using namespace internal;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
typedef typename VecTraits<T, 3>::vec128 vec128;
|
||||
#endif
|
||||
typedef typename VecTraits<T, 3>::vec64 vec64;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
u32 step_base = 16 / sizeof(T), step_base3 = step_base * 3;
|
||||
size_t roiw_base = size.width >= (step_base - 1) ? size.width - step_base + 1 : 0;
|
||||
#endif
|
||||
@@ -123,7 +123,7 @@ void flip3(const Size2D & size,
|
||||
T * dst = getRowPtr((T *)dstBase, dstStride, (flipMode & FLIP_VERTICAL_MODE) != 0 ? size.height - i - 1 : i);
|
||||
size_t j = 0, js = 0, jd = size.width * 3;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for (; j < roiw_base; j += step_base, js += step_base3, jd -= step_base3)
|
||||
{
|
||||
prefetch(src + js);
|
||||
@@ -139,7 +139,7 @@ void flip3(const Size2D & size,
|
||||
|
||||
vst3q(dst + jd - step_base3, v_dst);
|
||||
}
|
||||
#endif // ANDROID
|
||||
#endif // __ANDROID__
|
||||
|
||||
for (; j < roiw_tail; j += step_tail, js += step_tail3, jd -= step_tail3)
|
||||
{
|
||||
|
||||
Vendored
+12
-12
@@ -359,7 +359,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
}
|
||||
else //if ((wr == 4.0f) && (hr == 4.0f)) //the only scale that lasts after isSupported check
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw16 = dsize.width >= 15 ? dsize.width - 15 : 0;
|
||||
#endif
|
||||
size_t roiw8 = dsize.width >= 7 ? dsize.width - 7 : 0;
|
||||
@@ -373,7 +373,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
u8 * dst_row = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t sj = 0, dj = 0;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for ( ; dj < roiw16; dj += 16, sj += 64)
|
||||
{
|
||||
internal::prefetch(src0_row + sj);
|
||||
@@ -450,7 +450,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
{
|
||||
if ((wr == 2.0f) && (hr == 2.0f))
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw4 = dsize.width >= 3 ? (dsize.width - 3) << 2 : 0;
|
||||
#endif
|
||||
size_t roiw2 = dsize.width >= 1 ? (dsize.width - 1) << 2 : 0;
|
||||
@@ -462,7 +462,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
u8 * dst_row = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t sj = 0, dj = 0;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for ( ; dj < roiw4; dj += 16, sj += 32)
|
||||
{
|
||||
internal::prefetch(src0_row + sj);
|
||||
@@ -537,7 +537,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
}
|
||||
else if ((wr == 0.5f) && (hr == 0.5f))
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw32 = dsize.width >= 31 ? (dsize.width - 31) << 2 : 0;
|
||||
#endif
|
||||
size_t roiw16 = dsize.width >= 15 ? (dsize.width - 15) << 2 : 0;
|
||||
@@ -549,7 +549,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
u8 * dst1_row = internal::getRowPtr(dstBase, dstStride, std::min(i + 1, dsize.height - 1));
|
||||
size_t sj = 0, dj = 0;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for ( ; dj < roiw32; dj += 128, sj += 64)
|
||||
{
|
||||
internal::prefetch(src_row + sj);
|
||||
@@ -758,7 +758,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
{
|
||||
if ((wr == 2.0f) && (wr == 2.0f))
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw16 = dsize.width >= 15 ? (dsize.width - 15) * 3 : 0;
|
||||
#endif
|
||||
size_t roiw8 = dsize.width >= 7 ? (dsize.width - 7) * 3 : 0;
|
||||
@@ -770,7 +770,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
u8 * dst_row = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t sj = 0, dj = 0;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for ( ; dj < roiw16; dj += 48, sj += 96)
|
||||
{
|
||||
internal::prefetch(src0_row + sj);
|
||||
@@ -856,7 +856,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
}
|
||||
else if ((wr == 0.5f) && (hr == 0.5f))
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw32 = dsize.width >= 31 ? (dsize.width - 31) * 3 : 0;
|
||||
#endif
|
||||
size_t roiw16 = dsize.width >= 15 ? (dsize.width - 15) * 3 : 0;
|
||||
@@ -868,7 +868,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
u8 * dst1_row = internal::getRowPtr(dstBase, dstStride, std::min(i + 1, dsize.height - 1));
|
||||
size_t sj = 0, dj = 0;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for ( ; dj < roiw32; dj += 96, sj += 48)
|
||||
{
|
||||
internal::prefetch(src_row + sj);
|
||||
@@ -928,7 +928,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
}
|
||||
else //if ((hr == 4.0f) && (wr == 4.0f)) //the only scale that lasts after isSupported check
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw8 = dsize.width >= 7 ? (dsize.width - 7) * 3 : 0;
|
||||
#endif
|
||||
|
||||
@@ -941,7 +941,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
u8 * dst_row = internal::getRowPtr(dstBase, dstStride, i);
|
||||
size_t sj = 0, dj = 0;
|
||||
|
||||
#ifndef ANDROID
|
||||
#ifndef __ANDROID__
|
||||
for ( ; dj < roiw8; dj += 24, sj += 96)
|
||||
{
|
||||
internal::prefetch(src0_row + sj);
|
||||
|
||||
Vendored
+7
-5
@@ -2,19 +2,21 @@ if(NOT ANDROID)
|
||||
message("cpufeatures is ANDROID project")
|
||||
endif()
|
||||
|
||||
ocv_update(OPENCV_CPUFEATURES_TARGET_NAME libcpufeatures)
|
||||
|
||||
set(CPUFEATURES_ROOT "${CMAKE_CURRENT_SOURCE_DIR}" CACHE PATH "Android cpufeatures project sources (for example, <android-ndk>/sources/android/cpufeatures)")
|
||||
|
||||
set(CPUFEATURES_INCLUDE_DIRS ${CPUFEATURES_ROOT} CACHE INTERNAL "")
|
||||
set(CPUFEATURES_LIBRARIES cpufeatures CACHE INTERNAL "")
|
||||
set(CPUFEATURES_LIBRARIES "${OPENCV_CPUFEATURES_TARGET_NAME}" CACHE INTERNAL "")
|
||||
|
||||
if(NOT DEFINED CPUFEATURES_SOURCES)
|
||||
set(CPUFEATURES_SOURCES ${CPUFEATURES_ROOT}/cpu-features.c ${CPUFEATURES_ROOT}/cpu-features.h)
|
||||
endif()
|
||||
|
||||
include_directories(${CPUFEATURES_INCLUDE_DIRS})
|
||||
add_library(cpufeatures STATIC ${CPUFEATURES_SOURCES})
|
||||
add_library(${OPENCV_CPUFEATURES_TARGET_NAME} STATIC ${CPUFEATURES_SOURCES})
|
||||
|
||||
set_target_properties(cpufeatures
|
||||
set_target_properties(${OPENCV_CPUFEATURES_TARGET_NAME}
|
||||
PROPERTIES OUTPUT_NAME cpufeatures
|
||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME cpufeatures
|
||||
@@ -23,9 +25,9 @@ set_target_properties(cpufeatures
|
||||
)
|
||||
|
||||
if(ENABLE_SOLUTION_FOLDERS)
|
||||
set_target_properties(cpufeatures PROPERTIES FOLDER "3rdparty")
|
||||
set_target_properties(${OPENCV_CPUFEATURES_TARGET_NAME} PROPERTIES FOLDER "3rdparty")
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(cpufeatures EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${OPENCV_CPUFEATURES_TARGET_NAME} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
endif()
|
||||
|
||||
Vendored
+6
-6
@@ -1,9 +1,9 @@
|
||||
# Binary branch name: ffmpeg/master_20170418
|
||||
# Binaries were created for OpenCV: b993b9b7c7f6f5f37d10acacb2962812228410ba
|
||||
set(FFMPEG_BINARIES_COMMIT "86c4a841055f2612774e85b4292bb20e5fe8a783")
|
||||
set(FFMPEG_FILE_HASH_BIN32 "3dea5f7f009b44601fe95728328e0f9e")
|
||||
set(FFMPEG_FILE_HASH_BIN64 "9debe701975ef074bd6661981f3f0716")
|
||||
set(FFMPEG_FILE_HASH_CMAKE "208c00f03d2f6f39fa6262649e0bfc8d")
|
||||
# Binary branch name: ffmpeg/master_20170704
|
||||
# Binaries were created for OpenCV: f670a9927026629a4083e05a1612f0adcad7727e
|
||||
set(FFMPEG_BINARIES_COMMIT "a86e53eb35737a50e5100e26af3aa1d29e810890")
|
||||
set(FFMPEG_FILE_HASH_BIN32 "79c35cc654778e66237444bc562afbca")
|
||||
set(FFMPEG_FILE_HASH_BIN64 "0dc72775ec3c14d1e049f51dc1280dbb")
|
||||
set(FFMPEG_FILE_HASH_CMAKE "ec59008da403fb18ab3c1ed66aed583b")
|
||||
|
||||
function(download_win_ffmpeg script_var)
|
||||
set(${script_var} "" PARENT_SCOPE)
|
||||
|
||||
Vendored
+4
-5
@@ -16,19 +16,18 @@
|
||||
The binaries are opencv_ffmpeg.dll (version for 32-bit Windows) and
|
||||
opencv_ffmpeg_64.dll (version for 64-bit Windows).
|
||||
|
||||
See build_win32.txt for the build instructions, if you want to rebuild opencv_ffmpeg*.dll from scratch.
|
||||
|
||||
The pre-built opencv_ffmpeg*.dll is:
|
||||
* LGPL library, not BSD libraries.
|
||||
* Loaded at runtime by opencv_videoio module.
|
||||
If it succeeds, ffmpeg can be used to decode/encode videos;
|
||||
otherwise, other API is used.
|
||||
|
||||
FFMPEG build contains H264 encoder based on the OpenH264 library, that should be installed separatelly.
|
||||
FFMPEG build includes support for H264 encoder based on the OpenH264 library.
|
||||
OpenH264 Video Codec provided by Cisco Systems, Inc.
|
||||
See https://github.com/cisco/openh264/releases for details and OpenH264 license.
|
||||
Downloaded binary file can be placed into global system path (System32 or SysWOW64) or near application binaries.
|
||||
You can also specify location of binary file via OPENH264_LIBRARY_PATH environment variable.
|
||||
OpenH264 library should be installed separatelly. Downloaded binary file can be placed into global system path
|
||||
(System32 or SysWOW64) or near application binaries (check documentation of "LoadLibrary" Win32 function from MSDN).
|
||||
Or you can specify location of binary file via OPENH264_LIBRARY environment variable.
|
||||
|
||||
If LGPL/GPL software can not be supplied with your OpenCV-based product, simply exclude
|
||||
opencv_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
|
||||
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
|
||||
#define NONAMELESSUNION 1
|
||||
#endif
|
||||
#if defined(NONAMELESSSTRUCT) && \
|
||||
!defined(NONAMELESSUNION)
|
||||
#define NONAMELESSUNION 1
|
||||
#endif
|
||||
#if defined(NONAMELESSUNION) && \
|
||||
!defined(NONAMELESSSTRUCT)
|
||||
#define NONAMELESSSTRUCT 1
|
||||
#endif
|
||||
|
||||
#ifndef __ANONYMOUS_DEFINED
|
||||
#define __ANONYMOUS_DEFINED
|
||||
#if defined(__GNUC__) || defined(__GNUG__)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#define _ANONYMOUS_STRUCT __extension__
|
||||
#else
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#endif
|
||||
#ifndef NONAMELESSUNION
|
||||
#define _UNION_NAME(x)
|
||||
#define _STRUCT_NAME(x)
|
||||
#else /* NONAMELESSUNION */
|
||||
#define _UNION_NAME(x) x
|
||||
#define _STRUCT_NAME(x) x
|
||||
#endif
|
||||
#endif /* __ANONYMOUS_DEFINED */
|
||||
|
||||
#ifndef DUMMYUNIONNAME
|
||||
# ifdef NONAMELESSUNION
|
||||
# define DUMMYUNIONNAME u
|
||||
# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
|
||||
# define DUMMYUNIONNAME2 u2
|
||||
# define DUMMYUNIONNAME3 u3
|
||||
# define DUMMYUNIONNAME4 u4
|
||||
# define DUMMYUNIONNAME5 u5
|
||||
# define DUMMYUNIONNAME6 u6
|
||||
# define DUMMYUNIONNAME7 u7
|
||||
# define DUMMYUNIONNAME8 u8
|
||||
# define DUMMYUNIONNAME9 u9
|
||||
# else /* NONAMELESSUNION */
|
||||
# define DUMMYUNIONNAME
|
||||
# define DUMMYUNIONNAME1 /* Wine uses this variant */
|
||||
# define DUMMYUNIONNAME2
|
||||
# define DUMMYUNIONNAME3
|
||||
# define DUMMYUNIONNAME4
|
||||
# define DUMMYUNIONNAME5
|
||||
# define DUMMYUNIONNAME6
|
||||
# define DUMMYUNIONNAME7
|
||||
# define DUMMYUNIONNAME8
|
||||
# define DUMMYUNIONNAME9
|
||||
# endif
|
||||
#endif /* DUMMYUNIONNAME */
|
||||
|
||||
#if !defined(DUMMYUNIONNAME1) /* MinGW does not define this one */
|
||||
# ifdef NONAMELESSUNION
|
||||
# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
|
||||
# else
|
||||
# define DUMMYUNIONNAME1 /* Wine uses this variant */
|
||||
# endif
|
||||
#endif /* DUMMYUNIONNAME1 */
|
||||
|
||||
#ifndef DUMMYSTRUCTNAME
|
||||
# ifdef NONAMELESSUNION
|
||||
# define DUMMYSTRUCTNAME s
|
||||
# define DUMMYSTRUCTNAME1 s1 /* Wine uses this variant */
|
||||
# define DUMMYSTRUCTNAME2 s2
|
||||
# define DUMMYSTRUCTNAME3 s3
|
||||
# define DUMMYSTRUCTNAME4 s4
|
||||
# define DUMMYSTRUCTNAME5 s5
|
||||
# else
|
||||
# define DUMMYSTRUCTNAME
|
||||
# define DUMMYSTRUCTNAME1 /* Wine uses this variant */
|
||||
# define DUMMYSTRUCTNAME2
|
||||
# define DUMMYSTRUCTNAME3
|
||||
# define DUMMYSTRUCTNAME4
|
||||
# define DUMMYSTRUCTNAME5
|
||||
# endif
|
||||
#endif /* DUMMYSTRUCTNAME */
|
||||
|
||||
/* These are for compatibility with the Wine source tree */
|
||||
|
||||
#ifndef WINELIB_NAME_AW
|
||||
# ifdef __MINGW_NAME_AW
|
||||
# define WINELIB_NAME_AW __MINGW_NAME_AW
|
||||
# else
|
||||
# ifdef UNICODE
|
||||
# define WINELIB_NAME_AW(func) func##W
|
||||
# else
|
||||
# define WINELIB_NAME_AW(func) func##A
|
||||
# endif
|
||||
# endif
|
||||
#endif /* WINELIB_NAME_AW */
|
||||
|
||||
#ifndef DECL_WINELIB_TYPE_AW
|
||||
# ifdef __MINGW_TYPEDEF_AW
|
||||
# define DECL_WINELIB_TYPE_AW __MINGW_TYPEDEF_AW
|
||||
# else
|
||||
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
|
||||
# endif
|
||||
#endif /* DECL_WINELIB_TYPE_AW */
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#if !defined(_INC_CRT_UNICODE_MACROS)
|
||||
/* _INC_CRT_UNICODE_MACROS defined based on UNICODE flag */
|
||||
|
||||
#if defined(UNICODE)
|
||||
# define _INC_CRT_UNICODE_MACROS 1
|
||||
# define __MINGW_NAME_AW(func) func##W
|
||||
# define __MINGW_NAME_AW_EXT(func,ext) func##W##ext
|
||||
# define __MINGW_NAME_UAW(func) func##_W
|
||||
# define __MINGW_NAME_UAW_EXT(func,ext) func##_W_##ext
|
||||
# define __MINGW_STRING_AW(str) L##str /* same as TEXT() from winnt.h */
|
||||
# define __MINGW_PROCNAMEEXT_AW "W"
|
||||
#else
|
||||
# define _INC_CRT_UNICODE_MACROS 2
|
||||
# define __MINGW_NAME_AW(func) func##A
|
||||
# define __MINGW_NAME_AW_EXT(func,ext) func##A##ext
|
||||
# define __MINGW_NAME_UAW(func) func##_A
|
||||
# define __MINGW_NAME_UAW_EXT(func,ext) func##_A_##ext
|
||||
# define __MINGW_STRING_AW(str) str /* same as TEXT() from winnt.h */
|
||||
# define __MINGW_PROCNAMEEXT_AW "A"
|
||||
#endif
|
||||
|
||||
#define __MINGW_TYPEDEF_AW(type) \
|
||||
typedef __MINGW_NAME_AW(type) type;
|
||||
#define __MINGW_TYPEDEF_UAW(type) \
|
||||
typedef __MINGW_NAME_UAW(type) type;
|
||||
|
||||
#endif /* !defined(_INC_CRT_UNICODE_MACROS) */
|
||||
Vendored
-1290
File diff suppressed because it is too large
Load Diff
Vendored
-31
@@ -1,31 +0,0 @@
|
||||
#ifndef _AUDEVCOD_H
|
||||
#define _AUDEVCOD_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum _tagSND_DEVICE_ERROR {
|
||||
SNDDEV_ERROR_Open = 1,
|
||||
SNDDEV_ERROR_Close = 2,
|
||||
SNDDEV_ERROR_GetCaps = 3,
|
||||
SNDDEV_ERROR_PrepareHeader = 4,
|
||||
SNDDEV_ERROR_UnprepareHeader = 5,
|
||||
SNDDEV_ERROR_Reset = 6,
|
||||
SNDDEV_ERROR_Restart = 7,
|
||||
SNDDEV_ERROR_GetPosition = 8,
|
||||
SNDDEV_ERROR_Write = 9,
|
||||
SNDDEV_ERROR_Pause = 10,
|
||||
SNDDEV_ERROR_Stop = 11,
|
||||
SNDDEV_ERROR_Start = 12,
|
||||
SNDDEV_ERROR_AddBuffer = 13,
|
||||
SNDDEV_ERROR_Query = 14
|
||||
} SNDDEV_ERR;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Vendored
-32
@@ -1,32 +0,0 @@
|
||||
#ifndef _BDATYPES_H
|
||||
#define _BDATYPES_H
|
||||
#if __GNUC__ >= 3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*--- DirectShow Reference - DirectShow Enumerated Types */
|
||||
typedef enum {
|
||||
MEDIA_TRANSPORT_PACKET,
|
||||
MEDIA_ELEMENTARY_STREAM,
|
||||
MEDIA_MPEG2_PSI,
|
||||
MEDIA_TRANSPORT_PAYLOAD
|
||||
} MEDIA_SAMPLE_CONTENT;
|
||||
/*--- DirectShow Reference - DirectShow Structures */
|
||||
typedef struct {
|
||||
DWORD dwOffset;
|
||||
DWORD dwPacketLength;
|
||||
DWORD dwStride;
|
||||
} MPEG2_TRANSPORT_STRIDE;
|
||||
typedef struct {
|
||||
ULONG ulPID;
|
||||
MEDIA_SAMPLE_CONTENT MediaSampleContent ;
|
||||
} PID_MAP;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Vendored
-1467
File diff suppressed because it is too large
Load Diff
Vendored
-2712
File diff suppressed because it is too large
Load Diff
Vendored
-61
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Alexandre Julliard
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __DSHOW_INCLUDED__
|
||||
#define __DSHOW_INCLUDED__
|
||||
|
||||
#define AM_NOVTABLE
|
||||
|
||||
#ifndef __WINESRC__
|
||||
# include <windows.h>
|
||||
# include <windowsx.h>
|
||||
#else
|
||||
# include <windef.h>
|
||||
# include <wingdi.h>
|
||||
# include <objbase.h>
|
||||
#endif
|
||||
#include <olectl.h>
|
||||
#include <dshow/ddraw.h>
|
||||
#include <mmsystem.h>
|
||||
/* FIXME: #include <strsafe.h>*/
|
||||
|
||||
#ifndef NUMELMS
|
||||
#define NUMELMS(array) (sizeof(array)/sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#include <dshow/strmif.h>
|
||||
#include <dshow/amvideo.h>
|
||||
#ifdef DSHOW_USE_AMAUDIO
|
||||
/* FIXME: #include <amaudio.h>*/
|
||||
#endif
|
||||
#include <dshow/control.h>
|
||||
#include <dshow/evcode.h>
|
||||
#include <dshow/uuids.h>
|
||||
#include <dshow/errors.h>
|
||||
/* FIXME: #include <edevdefs.h> */
|
||||
#include <dshow/audevcod.h>
|
||||
/* FIXME: #include <dvdevcod.h> */
|
||||
|
||||
#ifndef OATRUE
|
||||
#define OATRUE (-1)
|
||||
#endif
|
||||
#ifndef OAFALSE
|
||||
#define OAFALSE (0)
|
||||
#endif
|
||||
|
||||
#endif /* __DSHOW_INCLUDED__ */
|
||||
Vendored
-1199
File diff suppressed because it is too large
Load Diff
Vendored
-75
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Maarten Lankhorst
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __DVDMEDIA_H__
|
||||
#define __DVDMEDIA_H__
|
||||
|
||||
#define AMCONTROL_USED 0x00000001
|
||||
#define AMCONTROL_PAD_TO_4x3 0x00000002
|
||||
#define AMCONTROL_PAD_TO_16x9 0x00000004
|
||||
|
||||
enum AM_MPEG2Level {
|
||||
AM_MPEG2Level_Low = 1,
|
||||
AM_MPEG2Level_Main,
|
||||
AM_MPEG2Level_High1440,
|
||||
AM_MPEG2Level_High
|
||||
};
|
||||
enum AM_MPEG2Profile {
|
||||
AM_MPEG2Profile_Simple = 1,
|
||||
AM_MPEG2Profile_Main,
|
||||
AM_MPEG2Profile_SNRScalable,
|
||||
AM_MPEG2Profile_SpatiallyScalable,
|
||||
AM_MPEG2Profile_High
|
||||
};
|
||||
typedef enum {
|
||||
AM_RATE_ChangeRate = 1,
|
||||
AM_RATE_FullDataRateMax = 2,
|
||||
AM_RATE_ReverseDecode = 3,
|
||||
AM_RATE_DecoderPosition = 4,
|
||||
AM_RATE_DecoderVersion = 5
|
||||
} AM_PROPERTY_DVD_RATE_CHANGE;
|
||||
|
||||
typedef struct tagVIDEOINFOHEADER2 {
|
||||
RECT rcSource;
|
||||
RECT rcTarget;
|
||||
DWORD dwBitRate;
|
||||
DWORD dwBitErrorRate;
|
||||
REFERENCE_TIME AvgTimePerFrame;
|
||||
DWORD dwInterlaceFlags;
|
||||
DWORD dwCopyProtectFlags;
|
||||
DWORD dwPictAspectRatioX;
|
||||
DWORD dwPictAspectRatioY;
|
||||
union {
|
||||
DWORD dwControlFlags;
|
||||
DWORD dwReserved1;
|
||||
} DUMMYUNIONNAME;
|
||||
DWORD dwReserved2;
|
||||
BITMAPINFOHEADER bmiHeader;
|
||||
} VIDEOINFOHEADER2;
|
||||
|
||||
typedef struct tagMPEG2VIDEOINFO {
|
||||
VIDEOINFOHEADER2 hdr;
|
||||
DWORD dwStartTimeCode;
|
||||
DWORD cbSequenceHeader;
|
||||
DWORD dwProfile;
|
||||
DWORD dwLevel;
|
||||
DWORD dwFlags;
|
||||
DWORD dwSequenceHeader[1];
|
||||
} MPEG2VIDEOINFO;
|
||||
|
||||
#endif /* __DVDMEDIA_H__ */
|
||||
Vendored
-169
@@ -1,169 +0,0 @@
|
||||
#ifndef _ERRORS_H
|
||||
#define _ERRORS_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*--- DirectShow Reference - Constants and GUIDs - Error and Success Codes */
|
||||
#define VFW_S_NO_MORE_ITEMS 0x00040103
|
||||
#define VFW_S_DUPLICATE_NAME 0x0004022D
|
||||
#define VFW_S_STATE_INTERMEDIATE 0x00040237
|
||||
#define VFW_S_PARTIAL_RENDER 0x00040242
|
||||
#define VFW_S_SOME_DATA_IGNORED 0x00040245
|
||||
#define VFW_S_CONNECTIONS_DEFERRED 0x00040246
|
||||
#define VFW_S_RESOURCE_NOT_NEEDED 0x00040250
|
||||
#define VFW_S_MEDIA_TYPE_IGNORED 0x00040254
|
||||
#define VFW_S_VIDEO_NOT_RENDERED 0x00040257
|
||||
#define VFW_S_AUDIO_NOT_RENDERED 0x00040258
|
||||
#define VFW_S_RPZA 0x0004025A
|
||||
#define VFW_S_ESTIMATED 0x00040260
|
||||
#define VFW_S_RESERVED 0x00040263
|
||||
#define VFW_S_STREAM_OFF 0x00040267
|
||||
#define VFW_S_CANT_CUE 0x00040268
|
||||
#define VFW_S_NOPREVIEWPIN 0x0004027E
|
||||
#define VFW_S_DVD_NON_ONE_SEQUENTIAL 0x00040280
|
||||
#define VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE 0x0004028C
|
||||
#define VFW_S_DVD_NOT_ACCURATE 0x0004028D
|
||||
#define VFW_E_INVALIDMEDIATYPE 0x80040200
|
||||
#define VFW_E_INVALIDSUBTYPE 0x80040201
|
||||
#define VFW_E_NEED_OWNER 0x80040202
|
||||
#define VFW_E_ENUM_OUT_OF_SYNC 0x80040203
|
||||
#define VFW_E_ALREADY_CONNECTED 0x80040204
|
||||
#define VFW_E_FILTER_ACTIVE 0x80040205
|
||||
#define VFW_E_NO_TYPES 0x80040206
|
||||
#define VFW_E_NO_ACCEPTABLE_TYPES 0x80040207
|
||||
#define VFW_E_INVALID_DIRECTION 0x80040208
|
||||
#define VFW_E_NOT_CONNECTED 0x80040209
|
||||
#define VFW_E_NO_ALLOCATOR 0x8004020A
|
||||
#define VFW_E_RUNTIME_ERROR 0x8004020B
|
||||
#define VFW_E_BUFFER_NOTSET 0x8004020C
|
||||
#define VFW_E_BUFFER_OVERFLOW 0x8004020D
|
||||
#define VFW_E_BADALIGN 0x8004020E
|
||||
#define VFW_E_ALREADY_COMMITTED 0x8004020F
|
||||
#define VFW_E_BUFFERS_OUTSTANDING 0x80040210
|
||||
#define VFW_E_NOT_COMMITTED 0x80040211
|
||||
#define VFW_E_SIZENOTSET 0x80040212
|
||||
#define VFW_E_NO_CLOCK 0x80040213
|
||||
#define VFW_E_NO_SINK 0x80040214
|
||||
#define VFW_E_NO_INTERFACE 0x80040215
|
||||
#define VFW_E_NOT_FOUND 0x80040216
|
||||
#define VFW_E_CANNOT_CONNECT 0x80040217
|
||||
#define VFW_E_CANNOT_RENDER 0x80040218
|
||||
#define VFW_E_CHANGING_FORMAT 0x80040219
|
||||
#define VFW_E_NO_COLOR_KEY_SET 0x8004021A
|
||||
#define VFW_E_NOT_OVERLAY_CONNECTION 0x8004021B
|
||||
#define VFW_E_NOT_SAMPLE_CONNECTION 0x8004021C
|
||||
#define VFW_E_PALETTE_SET 0x8004021D
|
||||
#define VFW_E_COLOR_KEY_SET 0x8004021E
|
||||
#define VFW_E_NO_COLOR_KEY_FOUND 0x8004021F
|
||||
#define VFW_E_NO_PALETTE_AVAILABLE 0x80040220
|
||||
#define VFW_E_NO_DISPLAY_PALETTE 0x80040221
|
||||
#define VFW_E_TOO_MANY_COLORS 0x80040222
|
||||
#define VFW_E_STATE_CHANGED 0x80040223
|
||||
#define VFW_E_NOT_STOPPED 0x80040224
|
||||
#define VFW_E_NOT_PAUSED 0x80040225
|
||||
#define VFW_E_NOT_RUNNING 0x80040226
|
||||
#define VFW_E_WRONG_STATE 0x80040227
|
||||
#define VFW_E_START_TIME_AFTER_END 0x80040228
|
||||
#define VFW_E_INVALID_RECT 0x80040229
|
||||
#define VFW_E_TYPE_NOT_ACCEPTED 0x8004022A
|
||||
#define VFW_E_SAMPLE_REJECTED 0x8004022B
|
||||
#define VFW_E_SAMPLE_REJECTED_EOS 0x8004022C
|
||||
#define VFW_E_DUPLICATE_NAME 0x8004022D
|
||||
#define VFW_E_TIMEOUT 0x8004022E
|
||||
#define VFW_E_INVALID_FILE_FORMAT 0x8004022F
|
||||
#define VFW_E_ENUM_OUT_OF_RANGE 0x80040230
|
||||
#define VFW_E_CIRCULAR_GRAPH 0x80040231
|
||||
#define VFW_E_NOT_ALLOWED_TO_SAVE 0x80040232
|
||||
#define VFW_E_TIME_ALREADY_PASSED 0x80040233
|
||||
#define VFW_E_ALREADY_CANCELLED 0x80040234
|
||||
#define VFW_E_CORRUPT_GRAPH_FILE 0x80040235
|
||||
#define VFW_E_ADVISE_ALREADY_SET 0x80040236
|
||||
#define VFW_E_NO_MODEX_AVAILABLE 0x80040238
|
||||
#define VFW_E_NO_ADVISE_SET 0x80040239
|
||||
#define VFW_E_NO_FULLSCREEN 0x8004023A
|
||||
#define VFW_E_IN_FULLSCREEN_MODE 0x8004023B
|
||||
#define VFW_E_UNKNOWN_FILE_TYPE 0x80040240
|
||||
#define VFW_E_CANNOT_LOAD_SOURCE_FILTER 0x80040241
|
||||
#define VFW_E_FILE_TOO_SHORT 0x80040243
|
||||
#define VFW_E_INVALID_FILE_VERSION 0x80040244
|
||||
#define VFW_E_INVALID_CLSID 0x80040247
|
||||
#define VFW_E_INVALID_MEDIA_TYPE 0x80040248
|
||||
#define VFW_E_SAMPLE_TIME_NOT_SET 0x80040249
|
||||
#define VFW_E_MEDIA_TIME_NOT_SET 0x80040251
|
||||
#define VFW_E_NO_TIME_FORMAT_SET 0x80040252
|
||||
#define VFW_E_MONO_AUDIO_HW 0x80040253
|
||||
#define VFW_E_NO_DECOMPRESSOR 0x80040255
|
||||
#define VFW_E_NO_AUDIO_HARDWARE 0x80040256
|
||||
#define VFW_E_RPZA 0x80040259
|
||||
#define VFW_E_PROCESSOR_NOT_SUITABLE 0x8004025B
|
||||
#define VFW_E_UNSUPPORTED_AUDIO 0x8004025C
|
||||
#define VFW_E_UNSUPPORTED_VIDEO 0x8004025D
|
||||
#define VFW_E_MPEG_NOT_CONSTRAINED 0x8004025E
|
||||
#define VFW_E_NOT_IN_GRAPH 0x8004025F
|
||||
#define VFW_E_NO_TIME_FORMAT 0x80040261
|
||||
#define VFW_E_READ_ONLY 0x80040262
|
||||
#define VFW_E_BUFFER_UNDERFLOW 0x80040264
|
||||
#define VFW_E_UNSUPPORTED_STREAM 0x80040265
|
||||
#define VFW_E_NO_TRANSPORT 0x80040266
|
||||
#define VFW_E_BAD_VIDEOCD 0x80040269
|
||||
#define VFW_S_NO_STOP_TIME 0x80040270
|
||||
#define VFW_E_OUT_OF_VIDEO_MEMORY 0x80040271
|
||||
#define VFW_E_VP_NEGOTIATION_FAILED 0x80040272
|
||||
#define VFW_E_DDRAW_CAPS_NOT_SUITABLE 0x80040273
|
||||
#define VFW_E_NO_VP_HARDWARE 0x80040274
|
||||
#define VFW_E_NO_CAPTURE_HARDWARE 0x80040275
|
||||
#define VFW_E_DVD_OPERATION_INHIBITED 0x80040276
|
||||
#define VFW_E_DVD_INVALIDDOMAIN 0x80040277
|
||||
#define VFW_E_DVD_NO_BUTTON 0x80040278
|
||||
#define VFW_E_DVD_GRAPHNOTREADY 0x80040279
|
||||
#define VFW_E_DVD_RENDERFAIL 0x8004027A
|
||||
#define VFW_E_DVD_DECNOTENOUGH 0x8004027B
|
||||
#define VFW_E_DDRAW_VERSION_NOT_SUITABLE 0x8004027C
|
||||
#define VFW_E_COPYPROT_FAILED 0x8004027D
|
||||
#define VFW_E_TIME_EXPIRED 0x8004027F
|
||||
#define VFW_E_DVD_WRONG_SPEED 0x80040281
|
||||
#define VFW_E_DVD_MENU_DOES_NOT_EXIST 0x80040282
|
||||
#define VFW_E_DVD_CMD_CANCELLED 0x80040283
|
||||
#define VFW_E_DVD_STATE_WRONG_VERSION 0x80040284
|
||||
#define VFW_E_DVD_STATE_CORRUPT 0x80040285
|
||||
#define VFW_E_DVD_STATE_WRONG_DISC 0x80040286
|
||||
#define VFW_E_DVD_INCOMPATIBLE_REGION 0x80040287
|
||||
#define VFW_E_DVD_NO_ATTRIBUTES 0x80040288
|
||||
#define VFW_E_DVD_NO_GOUP_PGC 0x80040289
|
||||
#define VFW_E_DVD_LOW_PARENTAL_LEVEL 0x8004028A
|
||||
#define VFW_E_DVD_NOT_IN_KARAOKE_MODE 0x8004028B
|
||||
#define VFW_E_FRAME_STEP_UNSUPPORTED 0x8004028E
|
||||
#define VFW_E_DVD_STREAM_DISABLED 0x8004028F
|
||||
#define VFW_E_DVD_TITLE_UNKNOWN 0x80040290
|
||||
#define VFW_E_DVD_INVALID_DISC 0x80040291
|
||||
#define VFW_E_DVD_NO_RESUME_INFORMATION 0x80040292
|
||||
#define VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD 0x80040293
|
||||
#define VFW_E_PIN_ALREADY_BLOCKED 0x80040294
|
||||
#define VFW_E_CERTIFICATION_FAILURE 0x80040295
|
||||
#define VFW_E_VMR_NOT_IN_MIXER_MODE 0x80040296
|
||||
#define VFW_E_VMR_NO_AP_SUPPLIED 0x80040297
|
||||
#define VFW_E_VMR_NO_DEINTERLACE_HW 0x80040298
|
||||
#define VFW_E_VMR_NO_PROCAMP_HW 0x80040299
|
||||
#define VFW_E_DVD_VMR9_INCOMPATIBLEDEC 0x8004029A
|
||||
#define VFW_E_NO_COPP_HW 0x8004029B
|
||||
#define VFW_E_BAD_KEY 0x800403F2
|
||||
/*--- DirectShow Reference - Functions */
|
||||
#define MAX_ERROR_TEXT_LEN 160
|
||||
/*--- DirectShow Reference - Functions */
|
||||
DWORD WINAPI AMGetErrorTextA(HRESULT,CHAR*,DWORD);
|
||||
DWORD WINAPI AMGetErrorTextW(HRESULT,WCHAR*,DWORD);
|
||||
#ifdef UNICODE
|
||||
#define AMGetErrorText AMGetErrorTextW
|
||||
#else
|
||||
#define AMGetErrorText AMGetErrorTextA
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Vendored
-68
@@ -1,68 +0,0 @@
|
||||
#ifndef _EVCODE_H
|
||||
#define _EVCODE_H
|
||||
#if __GNUC__ >=3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*--- DirectShow Reference - Constants and GUIDs - Event Notification Codes */
|
||||
#define EC_ACTIVATE 0x0013
|
||||
#define EC_BUFFERING_DATA 0x0011
|
||||
#define EC_BUILT 0x0300
|
||||
#define EC_CLOCK_CHANGED 0x000D
|
||||
#define EC_CLOCK_UNSET 0x0051
|
||||
#define EC_CODECAPI_EVENT 0x0057
|
||||
#define EC_COMPLETE 0x0001
|
||||
#define EC_DEVICE_LOST 0x001F
|
||||
#define EC_DISPLAY_CHANGED 0x0016
|
||||
#define EC_END_OF_SEGMENT 0x001C
|
||||
#define EC_ERROR_STILLPLAYING 0x0008
|
||||
#define EC_ERRORABORT 0x0003
|
||||
#define EC_EXTDEVICE_MODE_CHANGE 0x0031
|
||||
#define EC_FULLSCREEN_LOST 0x0012
|
||||
#define EC_GRAPH_CHANGED 0x0050
|
||||
#define EC_LENGTH_CHANGED 0x001E
|
||||
#define EC_NEED_RESTART 0x0014
|
||||
#define EC_NOTIFY_WINDOW 0x0019
|
||||
#define EC_OLE_EVENT 0x0018
|
||||
#define EC_OPENING_FILE 0x0010
|
||||
#define EC_PALETTE_CHANGED 0x0009
|
||||
#define EC_PAUSED 0x000E
|
||||
#define EC_PREPROCESS_COMPLETE 0x0056
|
||||
#define EC_QUALITY_CHANGE 0x000B
|
||||
#define EC_REPAINT 0x0005
|
||||
#define EC_SEGMENT_STARTED 0x001D
|
||||
#define EC_SHUTTING_DOWN 0x000C
|
||||
#define EC_SNDDEV_IN_ERROR 0x0200
|
||||
#define EC_SNDDEV_OUT_ERROR 0x0201
|
||||
#define EC_STARVATION 0x0017
|
||||
#define EC_STATE_CHANGE 0x0032
|
||||
#define EC_STEP_COMPLETE 0x0024
|
||||
#define EC_STREAM_CONTROL_STARTED 0x001B
|
||||
#define EC_STREAM_CONTROL_STOPPED 0x001A
|
||||
#define EC_STREAM_ERROR_STILLPLAYING 0x0007
|
||||
#define EC_STREAM_ERROR_STOPPED 0x0006
|
||||
#define EC_TIMECODE_AVAILABLE 0x0030
|
||||
#define EC_UNBUILT 0x0301
|
||||
#define EC_USERABORT 0x0002
|
||||
#define EC_VIDEO_SIZE_CHANGED 0x000A
|
||||
#define EC_VMR_RENDERDEVICE_SET 0x0053
|
||||
#define EC_VMR_SURFACE_FLIPPED 0x0054
|
||||
#define EC_VMR_RECONNECTION_FAILED 0x0055
|
||||
#define EC_WINDOW_DESTROYED 0x0015
|
||||
#define EC_WMT_EVENT 0x0252
|
||||
#define EC_WMT_INDEX_EVENT 0x0251
|
||||
#define EC_USER 0x8000
|
||||
/*--- DirectShow Reference - DirectShow Structures */
|
||||
typedef struct {
|
||||
HRESULT hrStatus;
|
||||
void *pData;
|
||||
} AM_WMT_EVENT_DATA;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Vendored
-191
@@ -1,191 +0,0 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PACK,
|
||||
0x36523B13,0x8EE5,0x11d1,0x8C,0xA3,0x00,0x60,0xB0,0x57,0x66,0x4A)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PES,
|
||||
0xe06d8020,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_WMDRM_TRANSPORT,
|
||||
0x18BEC4EA,0x4676,0x450e,0xB4,0x78,0x0C,0xD8,0x4C,0x54,0xB3,0x27)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_VIDEO,
|
||||
0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_MPEG2_VIDEO,
|
||||
0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_VIDEOINFO2,
|
||||
0xf72a76A0L,0xeb0a,0x11d0,0xac,0xe4,0x0,0x0,0xc0,0xcc,0x16,0xba)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PROGRAM,
|
||||
0xe06d8022,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT,
|
||||
0xe06d8023,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_AUDIO,
|
||||
0xe06d802b,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3,
|
||||
0xe06d802c,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_SUBPICTURE,
|
||||
0xe06d802d,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_LPCM_AUDIO,
|
||||
0xe06d8032,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIATYPE_DVD_ENCRYPTED_PACK,
|
||||
0xed0b916a,0x044d,0x11d1,0xaa,0x78,0x00,0xc0,0x04f,0xc3,0x1d,0x60)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIATYPE_DVD_NAVIGATION,
|
||||
0xe06d802e,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PCI,
|
||||
0xe06d802f,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_DSI,
|
||||
0xe06d8030,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PROVIDER,
|
||||
0xe06d8031,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_MPEG2Video,
|
||||
0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_DolbyAC3,
|
||||
0xe06d80e4,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_MPEG2Audio,
|
||||
0xe06d80e5,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_DVD_LPCMAudio,
|
||||
0xe06d80e6,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_AC3,
|
||||
0xBFABE720,0x6E1F,0x11D0,0xBC,0xF2,0x44,0x45,0x53,0x54,0x00,0x00)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_DvdSubPic,
|
||||
0xac390460,0x43af,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_CopyProt,
|
||||
0x0E8A0A40,0x6AEF,0x11D0,0x9E,0xD0,0x00,0xA0,0x24,0xCA,0x19,0xB3)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_TSRateChange,
|
||||
0xa503c5c0,0x1d1d,0x11d1,0xad,0x80,0x44,0x45,0x53,0x54,0x0,0x0)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_MPEG4_MediaType_Attributes,
|
||||
0xff6c4bfa,0x7a9,0x4c7b,0xa2,0x37,0x67,0x2f,0x9d,0x68,0x6,0x5f)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_CAPTURE,
|
||||
0x65E8773DL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_RENDER,
|
||||
0x65E8773EL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_DATACOMPRESSOR,
|
||||
0x1E84C900L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_AUDIO,
|
||||
0x6994AD04L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_VIDEO,
|
||||
0x6994AD05L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_TVTUNER,
|
||||
0xa799a800L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_CROSSBAR,
|
||||
0xa799a801L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_TVAUDIO,
|
||||
0xa799a802L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC,
|
||||
0x07dad660L,0x22f1,0x11d1,0xa9,0xf4,0x00,0xc0,0x4f,0xbb,0xde,0x8f)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_SPLITTER,
|
||||
0x0A4252A0L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsInterfaceHandler,
|
||||
0xD3ABC7E0L,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsDataTypeHandler,
|
||||
0x5FFBAA02L,0x49A3,0x11D0,0x9F,0x36,0x00,0xAA,0x00,0xA2,0x16,0xA1)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsPin,
|
||||
0xb61178d1L,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsControl,
|
||||
0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsPinFactory,
|
||||
0xCD5EBE6BL,0x8B6E,0x11D1,0x8A,0xE0,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_INTERFACESETID_Standard,
|
||||
0x1A8766A0L,0x62CE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
|
||||
#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_SECTIONS,
|
||||
0x455f176c,0x4b06,0x47ce,0x9a,0xef,0x8c,0xae,0xf7,0x3d,0xf7,0xb5)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_VERSIONED_TABLES,
|
||||
0x1ed988b0,0x3ffc,0x4523,0x87,0x25,0x34,0x7b,0xee,0xc1,0xa8,0xa0)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ATSC_SI,
|
||||
0xb3c7397c,0xd303,0x414d,0xb3,0x3c,0x4e,0xd2,0xc9,0xd2,0x97,0x33)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVB_SI,
|
||||
0xe9dd31a3,0x221d,0x4adb,0x85,0x32,0x9a,0xf3,0x9,0xc1,0xa4,0x8)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ISDB_SI,
|
||||
0xe89ad298,0x3601,0x4b06,0xaa,0xec,0x9d,0xde,0xed,0xcc,0x5b,0xd0)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_TIF_SI,
|
||||
0xec232eb2,0xcb96,0x4191,0xb2,0x26,0xe,0xa1,0x29,0xf3,0x82,0x50)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2DATA,
|
||||
0xc892e55b,0x252d,0x42b5,0xa3,0x16,0xd9,0x97,0xe7,0xa5,0xd9,0x95)
|
||||
#endif
|
||||
/* ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) ||
|
||||
(NTDDI_VERSION >= NTDDI_WS03SP1) */
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT_STRIDE,
|
||||
0x138aa9a4,0x1ee2,0x4c5b,0x98,0x8e,0x19,0xab,0xfd,0xbc,0x8a,0x11)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_UDCR_TRANSPORT,
|
||||
0x18BEC4EA,0x4676,0x450e,0xB4,0x78,0x0C,0xD8,0x4C,0x54,0xB3,0x27)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PBDA_TRANSPORT_RAW,
|
||||
0x0d7aed42,0xcb9a,0x11db,0x97,0x5,0x0,0x50,0x56,0xc0,0x0,0x8)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PBDA_TRANSPORT_PROCESSED,
|
||||
0xaf748dd4,0xd80,0x11db,0x97,0x5,0x0,0x50,0x56,0xc0,0x0,0x8)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DTS,
|
||||
0xe06d8033,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_SDDS,
|
||||
0xe06d8034,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_DVD_RateChange,
|
||||
0x3577eb09,0x9582,0x477f,0xb2,0x9c,0xb0,0xc4,0x52,0xa4,0xff,0x9a)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_DvdKaraoke,
|
||||
0xae4720ae,0xaa71,0x42d8,0xb8,0x2a,0xff,0xfd,0xf5,0x8b,0x76,0xfd)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_FrameStep,
|
||||
0xc830acbd,0xab07,0x492f,0x88,0x52,0x45,0xb6,0x98,0x7c,0x29,0x79)
|
||||
#endif /* NTDDI_VERSION >= NTDDI_WINXP */
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WS03SP1)
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC_MI,
|
||||
0x9c24a977,0x951,0x451a,0x80,0x6,0xe,0x49,0xbd,0x28,0xcd,0x5f)
|
||||
#endif /* NTDDI_VERSION >= NTDDI_WS03SP1 */
|
||||
|
||||
Vendored
-9392
File diff suppressed because it is too large
Load Diff
Vendored
-368
@@ -1,368 +0,0 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#ifndef OUR_GUID_ENTRY
|
||||
#define OUR_GUID_ENTRY(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8);
|
||||
#endif
|
||||
|
||||
#define MEDIATYPE_NULL GUID_NULL
|
||||
#define MEDIASUBTYPE_NULL GUID_NULL
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_None,0xe436eb8e,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_Video,0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_Audio,0x73647561,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_Text,0x73747874,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_Midi,0x7364696D,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_Stream,0xe436eb83,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_Interleaved,0x73766169,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_File,0x656c6966,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_ScriptCommand,0x73636d64,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_AUXLine21Data,0x670aea80,0x3a82,0x11d0,0xb7,0x9b,0x0,0xaa,0x0,0x37,0x67,0xa7)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_VBI,0xf72a76e1,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_Timecode,0x482dee3,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_LMRT,0x74726c6d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_URL_STREAM,0x736c7275,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_CLPL,0x4C504C43,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_YUYV,0x56595559,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IYUV,0x56555949,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_YVU9,0x39555659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Y411,0x31313459,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Y41P,0x50313459,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_YUY2,0x32595559,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_YVYU,0x55595659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_UYVY,0x59565955,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Y211,0x31313259,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_CLJR,0x524a4c43,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IF09,0x39304649,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_CPLA,0x414c5043,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MJPG,0x47504A4D,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_TVMJ,0x4A4D5654,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_WAKE,0x454B4157,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_CFCC,0x43434643,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IJPG,0x47504A49,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Plum,0x6D756C50,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVCS,0x53435644,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVSD,0x44535644,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MDVF,0x4656444D,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB1,0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB4,0xe436eb79,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB8,0xe436eb7a,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB565,0xe436eb7b,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB555,0xe436eb7c,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB24,0xe436eb7d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB32,0xe436eb7e,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB1555,0x297c55af,0xe209,0x4cb3,0xb7,0x57,0xc7,0x6d,0x6b,0x9c,0x88,0xa8)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB4444,0x6e6415e6,0x5c24,0x425f,0x93,0xcd,0x80,0x10,0x2b,0x3d,0x1c,0xca)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB32,0x773c9ac0,0x3274,0x11d0,0xb7,0x24,0x0,0xaa,0x0,0x6c,0x1a,0x1)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_A2R10G10B10,0x2f8bb76d,0xb644,0x4550,0xac,0xf3,0xd3,0x0c,0xaa,0x65,0xd5,0xc5)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_A2B10G10R10,0x576f7893,0xbdf6,0x48c4,0x87,0x5f,0xae,0x7b,0x81,0x83,0x45,0x67)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AYUV,0x56555941,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AI44,0x34344941,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IA44,0x34344149,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB32_D3D_DX7_RT,0x32335237,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB16_D3D_DX7_RT,0x36315237,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB32_D3D_DX7_RT,0x38384137,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB4444_D3D_DX7_RT,0x34344137,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB1555_D3D_DX7_RT,0x35314137,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB32_D3D_DX9_RT,0x32335239,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RGB16_D3D_DX9_RT,0x36315239,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB32_D3D_DX9_RT,0x38384139,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB4444_D3D_DX9_RT,0x34344139,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB1555_D3D_DX9_RT,0x35314139,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
|
||||
#define MEDIASUBTYPE_HASALPHA(mt) (((mt).subtype==MEDIASUBTYPE_ARGB4444) || ((mt).subtype==MEDIASUBTYPE_ARGB32) || ((mt).subtype==MEDIASUBTYPE_AYUV) || ((mt).subtype==MEDIASUBTYPE_AI44) || ((mt).subtype==MEDIASUBTYPE_IA44) || ((mt).subtype==MEDIASUBTYPE_ARGB1555) || ((mt).subtype==MEDIASUBTYPE_ARGB32_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB4444_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB1555_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB32_D3D_DX9_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB4444_D3D_DX9_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB1555_D3D_DX9_RT))
|
||||
#define MEDIASUBTYPE_HASALPHA7(mt) (((mt).subtype==MEDIASUBTYPE_ARGB32_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB4444_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB1555_D3D_DX7_RT))
|
||||
#define MEDIASUBTYPE_D3D_DX7_RT(mt) (((mt).subtype==MEDIASUBTYPE_ARGB32_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB4444_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB1555_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_RGB32_D3D_DX7_RT) || ((mt).subtype==MEDIASUBTYPE_RGB16_D3D_DX7_RT))
|
||||
#define MEDIASUBTYPE_HASALPHA9(mt) (((mt).subtype==MEDIASUBTYPE_ARGB32_D3D_DX9_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB4444_D3D_DX9_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB1555_D3D_DX9_RT))
|
||||
#define MEDIASUBTYPE_D3D_DX9_RT(mt) (((mt).subtype==MEDIASUBTYPE_ARGB32_D3D_DX9_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB4444_D3D_DX9_RT) || ((mt).subtype==MEDIASUBTYPE_ARGB1555_D3D_DX9_RT) || ((mt).subtype==MEDIASUBTYPE_RGB32_D3D_DX9_RT) || ((mt).subtype==MEDIASUBTYPE_RGB16_D3D_DX9_RT))
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_YV12,0x32315659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_NV12,0x3231564E,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IMC1,0x31434D49,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IMC2,0x32434D49,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IMC3,0x33434D49,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IMC4,0x34434D49,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_S340,0x30343353,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_S342,0x32343353,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Overlay,0xe436eb7f,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Packet,0xe436eb80,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Payload,0xe436eb81,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1AudioPayload,0x00000050,0x0000,0x0010,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_MPEG1SystemStream,0xe436eb82,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1System,0xe436eb84,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1VideoCD,0xe436eb85,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Video,0xe436eb86,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Audio,0xe436eb87,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Avi,0xe436eb88,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Asf,0x3db80f90,0x9412,0x11d1,0xad,0xed,0x0,0x0,0xf8,0x75,0x4b,0x99)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_QTMovie,0xe436eb89,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_QTRpza,0x617a7072,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_QTSmc,0x20636d73,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_QTRle,0x20656c72,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_QTJpeg,0x6765706a,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_PCMAudio_Obsolete,0xe436eb8a,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_PCM,0x00000001,0x0000,0x0010,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_WAVE,0xe436eb8b,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AU,0xe436eb8c,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AIFF,0xe436eb8d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_dvsd,0x64737664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_dvhd,0x64687664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_dvsl,0x6c737664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_dv25,0x35327664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_dv50,0x30357664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_dvh1,0x31687664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_BytePair,0x6e8d4a22,0x310c,0x11d0,0xb7,0x9a,0x0,0xaa,0x0,0x37,0x67,0xa7)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_GOPPacket,0x6e8d4a23,0x310c,0x11d0,0xb7,0x9a,0x0,0xaa,0x0,0x37,0x67,0xa7)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_VBIRawData,0x6e8d4a24,0x310c,0x11d0,0xb7,0x9a,0x0,0xaa,0x0,0x37,0x67,0xa7)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_TELETEXT,0xf72a76e3,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_WSS,0x2791D576,0x8E7A,0x466F,0x9E,0x90,0x5D,0x3F,0x30,0x83,0x73,0x8B)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_VPS,0xa1b3f620,0x9792,0x4d8d,0x81,0xa4,0x86,0xaf,0x25,0x77,0x20,0x90)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DRM_Audio,0x00000009,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_IEEE_FLOAT,0x00000003,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3_SPDIF,0x00000092,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_RAW_SPORT,0x00000240,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_SPDIF_TAG_241h,0x00000241,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DssVideo,0xa0af4f81,0xe163,0x11d0,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DssAudio,0xa0af4f82,0xe163,0x11d0,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_VPVideo,0x5a9b6a40,0x1a22,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_VPVBI,0x5a9b6a41,0x1a22,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(CLSID_CaptureGraphBuilder,0xBF87B6E0,0x8C27,0x11d0,0xB3,0xF0,0x0,0xAA,0x00,0x37,0x61,0xC5)
|
||||
OUR_GUID_ENTRY(CLSID_CaptureGraphBuilder2,0xBF87B6E1,0x8C27,0x11d0,0xB3,0xF0,0x0,0xAA,0x00,0x37,0x61,0xC5)
|
||||
OUR_GUID_ENTRY(CLSID_ProtoFilterGraph,0xe436ebb0,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_SystemClock,0xe436ebb1,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_FilterMapper,0xe436ebb2,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_FilterGraph,0xe436ebb3,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_FilterGraphNoThread,0xe436ebb8,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_MPEG1Doc,0xe4bbd160,0x4269,0x11ce,0x83,0x8d,0x0,0xaa,0x0,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(CLSID_FileSource,0x701722e0,0x8ae3,0x11ce,0xa8,0x5c,0x00,0xaa,0x00,0x2f,0xea,0xb5)
|
||||
OUR_GUID_ENTRY(CLSID_MPEG1PacketPlayer,0x26c25940,0x4ca9,0x11ce,0xa8,0x28,0x0,0xaa,0x0,0x2f,0xea,0xb5)
|
||||
OUR_GUID_ENTRY(CLSID_MPEG1Splitter,0x336475d0,0x942a,0x11ce,0xa8,0x70,0x00,0xaa,0x00,0x2f,0xea,0xb5)
|
||||
OUR_GUID_ENTRY(CLSID_CMpegVideoCodec,0xfeb50740,0x7bef,0x11ce,0x9b,0xd9,0x0,0x0,0xe2,0x2,0x59,0x9c)
|
||||
OUR_GUID_ENTRY(CLSID_CMpegAudioCodec,0x4a2286e0,0x7bef,0x11ce,0x9b,0xd9,0x0,0x0,0xe2,0x2,0x59,0x9c)
|
||||
OUR_GUID_ENTRY(CLSID_TextRender,0xe30629d3,0x27e5,0x11ce,0x87,0x5d,0x0,0x60,0x8c,0xb7,0x80,0x66)
|
||||
OUR_GUID_ENTRY(CLSID_InfTee,0xf8388a40,0xd5bb,0x11d0,0xbe,0x5a,0x0,0x80,0xc7,0x6,0x56,0x8e)
|
||||
OUR_GUID_ENTRY(CLSID_AviSplitter,0x1b544c20,0xfd0b,0x11ce,0x8c,0x63,0x0,0xaa,0x00,0x44,0xb5,0x1e)
|
||||
OUR_GUID_ENTRY(CLSID_AviReader,0x1b544c21,0xfd0b,0x11ce,0x8c,0x63,0x0,0xaa,0x00,0x44,0xb5,0x1e)
|
||||
OUR_GUID_ENTRY(CLSID_VfwCapture,0x1b544c22,0xfd0b,0x11ce,0x8c,0x63,0x0,0xaa,0x00,0x44,0xb5,0x1e)
|
||||
OUR_GUID_ENTRY(CLSID_CaptureProperties,0x1B544c22,0xFD0B,0x11ce,0x8C,0x63,0x00,0xAA,0x00,0x44,0xB5,0x1F)
|
||||
OUR_GUID_ENTRY(CLSID_FGControl,0xe436ebb4,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_MOVReader,0x44584800,0xf8ee,0x11ce,0xb2,0xd4,0x00,0xdd,0x1,0x10,0x1b,0x85)
|
||||
OUR_GUID_ENTRY(CLSID_QuickTimeParser,0xd51bd5a0,0x7548,0x11cf,0xa5,0x20,0x0,0x80,0xc7,0x7e,0xf5,0x8a)
|
||||
OUR_GUID_ENTRY(CLSID_QTDec,0xfdfe9681,0x74a3,0x11d0,0xaf,0xa7,0x0,0xaa,0x0,0xb6,0x7a,0x42)
|
||||
OUR_GUID_ENTRY(CLSID_AVIDoc,0xd3588ab0,0x0781,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0xb,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_VideoRenderer,0x70e102b0,0x5556,0x11ce,0x97,0xc0,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(CLSID_Colour,0x1643e180,0x90f5,0x11ce,0x97,0xd5,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(CLSID_Dither,0x1da08500,0x9edc,0x11cf,0xbc,0x10,0x00,0xaa,0x00,0xac,0x74,0xf6)
|
||||
OUR_GUID_ENTRY(CLSID_ModexRenderer,0x7167665,0x5011,0x11cf,0xbf,0x33,0x0,0xaa,0x0,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(CLSID_AudioRender,0xe30629d1,0x27e5,0x11ce,0x87,0x5d,0x0,0x60,0x8c,0xb7,0x80,0x66)
|
||||
OUR_GUID_ENTRY(CLSID_AudioProperties,0x05589faf,0xc356,0x11ce,0xbf,0x01,0x0,0xaa,0x0,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(CLSID_DSoundRender,0x79376820,0x07D0,0x11CF,0xA2,0x4D,0x0,0x20,0xAF,0xD7,0x97,0x67)
|
||||
OUR_GUID_ENTRY(CLSID_AudioRecord,0xe30629d2,0x27e5,0x11ce,0x87,0x5d,0x0,0x60,0x8c,0xb7,0x80,0x66)
|
||||
OUR_GUID_ENTRY(CLSID_AudioInputMixerProperties,0x2ca8ca52,0x3c3f,0x11d2,0xb7,0x3d,0x0,0xc0,0x4f,0xb6,0xbd,0x3d)
|
||||
OUR_GUID_ENTRY(CLSID_AVIDec,0xcf49d4e0,0x1115,0x11ce,0xb0,0x3a,0x0,0x20,0xaf,0xb,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_AVIDraw,0xa888df60,0x1e90,0x11cf,0xac,0x98,0x0,0xaa,0x0,0x4c,0xf,0xa9)
|
||||
OUR_GUID_ENTRY(CLSID_ACMWrapper,0x6a08cf80,0x0e18,0x11cf,0xa2,0x4d,0x0,0x20,0xaf,0xd7,0x97,0x67)
|
||||
OUR_GUID_ENTRY(CLSID_AsyncReader,0xe436ebb5,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_URLReader,0xe436ebb6,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_PersistMonikerPID,0xe436ebb7,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70)
|
||||
OUR_GUID_ENTRY(CLSID_AVICo,0xd76e2820,0x1563,0x11cf,0xac,0x98,0x0,0xaa,0x0,0x4c,0xf,0xa9)
|
||||
OUR_GUID_ENTRY(CLSID_FileWriter,0x8596e5f0,0xda5,0x11d0,0xbd,0x21,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_AviDest,0xe2510970,0xf137,0x11ce,0x8b,0x67,0x0,0xaa,0x0,0xa3,0xf1,0xa6)
|
||||
OUR_GUID_ENTRY(CLSID_AviMuxProptyPage,0xc647b5c0,0x157c,0x11d0,0xbd,0x23,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_AviMuxProptyPage1,0xa9ae910,0x85c0,0x11d0,0xbd,0x42,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_AVIMIDIRender,0x07b65360,0xc445,0x11ce,0xaf,0xde,0x00,0xaa,0x00,0x6c,0x14,0xf4)
|
||||
OUR_GUID_ENTRY(CLSID_WMAsfReader,0x187463a0,0x5bb7,0x11d3,0xac,0xbe,0x0,0x80,0xc7,0x5e,0x24,0x6e)
|
||||
OUR_GUID_ENTRY(CLSID_WMAsfWriter,0x7c23220e,0x55bb,0x11d3,0x8b,0x16,0x0,0xc0,0x4f,0xb6,0xbd,0x3d)
|
||||
OUR_GUID_ENTRY(CLSID_MPEG2Demultiplexer,0xafb6c280,0x2c41,0x11d3,0x8a,0x60,0x00,0x00,0xf8,0x1e,0x0e,0x4a)
|
||||
OUR_GUID_ENTRY(CLSID_MMSPLITTER,0x3ae86b20,0x7be8,0x11d1,0xab,0xe6,0x00,0xa0,0xc9,0x05,0xf3,0x75)
|
||||
OUR_GUID_ENTRY(CLSID_StreamBufferSink,0x2db47ae5,0xcf39,0x43c2,0xb4,0xd6,0xc,0xd8,0xd9,0x9,0x46,0xf4)
|
||||
OUR_GUID_ENTRY(CLSID_StreamBufferSource,0xc9f5fe02,0xf851,0x4eb5,0x99,0xee,0xad,0x60,0x2a,0xf1,0xe6,0x19)
|
||||
OUR_GUID_ENTRY(CLSID_StreamBufferConfig,0xfa8a68b2,0xc864,0x4ba2,0xad,0x53,0xd3,0x87,0x6a,0x87,0x49,0x4b)
|
||||
OUR_GUID_ENTRY(CLSID_Mpeg2VideoStreamAnalyzer,0x6cfad761,0x735d,0x4aa5,0x8a,0xfc,0xaf,0x91,0xa7,0xd6,0x1e,0xba)
|
||||
OUR_GUID_ENTRY(CLSID_StreamBufferRecordingAttributes,0xccaa63ac,0x1057,0x4778,0xae,0x92,0x12,0x6,0xab,0x9a,0xce,0xe6)
|
||||
OUR_GUID_ENTRY(CLSID_StreamBufferComposeRecording,0xd682c4ba,0xa90a,0x42fe,0xb9,0xe1,0x3,0x10,0x98,0x49,0xc4,0x23)
|
||||
OUR_GUID_ENTRY(CLSID_DVVideoCodec,0xb1b77c00,0xc3e4,0x11cf,0xaf,0x79,0x0,0xaa,0x0,0xb6,0x7a,0x42)
|
||||
OUR_GUID_ENTRY(CLSID_DVVideoEnc,0x13aa3650,0xbb6f,0x11d0,0xaf,0xb9,0x0,0xaa,0x0,0xb6,0x7a,0x42)
|
||||
OUR_GUID_ENTRY(CLSID_DVSplitter,0x4eb31670,0x9fc6,0x11cf,0xaf,0x6e,0x0,0xaa,0x0,0xb6,0x7a,0x42)
|
||||
OUR_GUID_ENTRY(CLSID_DVMux,0x129d7e40,0xc10d,0x11d0,0xaf,0xb9,0x0,0xaa,0x0,0xb6,0x7a,0x42)
|
||||
OUR_GUID_ENTRY(CLSID_SeekingPassThru,0x60af76c,0x68dd,0x11d0,0x8f,0xc1,0x0,0xc0,0x4f,0xd9,0x18,0x9d)
|
||||
OUR_GUID_ENTRY(CLSID_Line21Decoder,0x6e8d4a20,0x310c,0x11d0,0xb7,0x9a,0x0,0xaa,0x0,0x37,0x67,0xa7)
|
||||
OUR_GUID_ENTRY(CLSID_Line21Decoder2,0xe4206432,0x01a1,0x4bee,0xb3,0xe1,0x37,0x02,0xc8,0xed,0xc5,0x74)
|
||||
OUR_GUID_ENTRY(CLSID_OverlayMixer,0xcd8743a1,0x3736,0x11d0,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
OUR_GUID_ENTRY(CLSID_VBISurfaces,0x814b9800,0x1c88,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(CLSID_WSTDecoder,0x70bc06e0,0x5666,0x11d3,0xa1,0x84,0x0,0x10,0x5a,0xef,0x9f,0x33)
|
||||
OUR_GUID_ENTRY(CLSID_MjpegDec,0x301056d0,0x6dff,0x11d2,0x9e,0xeb,0x0,0x60,0x8,0x3,0x9e,0x37)
|
||||
OUR_GUID_ENTRY(CLSID_MJPGEnc,0xb80ab0a0,0x7416,0x11d2,0x9e,0xeb,0x0,0x60,0x8,0x3,0x9e,0x37)
|
||||
OUR_GUID_ENTRY(CLSID_SystemDeviceEnum,0x62BE5D10,0x60EB,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_CDeviceMoniker,0x4315D437,0x5B8C,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_VideoInputDeviceCategory,0x860BB310,0x5D01,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_CVidCapClassManager,0x860BB310,0x5D01,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_LegacyAmFilterCategory,0x083863F1,0x70DE,0x11d0,0xBD,0x40,0x00,0xA0,0xC9,0x11,0xCE,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_CQzFilterClassManager,0x083863F1,0x70DE,0x11d0,0xBD,0x40,0x00,0xA0,0xC9,0x11,0xCE,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_VideoCompressorCategory,0x33d9a760,0x90c8,0x11d0,0xbd,0x43,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_CIcmCoClassManager,0x33d9a760,0x90c8,0x11d0,0xbd,0x43,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_AudioCompressorCategory,0x33d9a761,0x90c8,0x11d0,0xbd,0x43,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_CAcmCoClassManager,0x33d9a761,0x90c8,0x11d0,0xbd,0x43,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_AudioInputDeviceCategory,0x33d9a762,0x90c8,0x11d0,0xbd,0x43,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_CWaveinClassManager,0x33d9a762,0x90c8,0x11d0,0xbd,0x43,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_AudioRendererCategory,0xe0f158e1,0xcb04,0x11d0,0xbd,0x4e,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_CWaveOutClassManager,0xe0f158e1,0xcb04,0x11d0,0xbd,0x4e,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_MidiRendererCategory,0x4EfE2452,0x168A,0x11d1,0xBC,0x76,0x0,0xc0,0x4F,0xB9,0x45,0x3B)
|
||||
OUR_GUID_ENTRY(CLSID_CMidiOutClassManager,0x4EfE2452,0x168A,0x11d1,0xBC,0x76,0x0,0xc0,0x4F,0xB9,0x45,0x3B)
|
||||
OUR_GUID_ENTRY(CLSID_TransmitCategory,0xcc7bfb41,0xf175,0x11d1,0xa3,0x92,0x0,0xe0,0x29,0x1f,0x39,0x59)
|
||||
OUR_GUID_ENTRY(CLSID_DeviceControlCategory,0xcc7bfb46,0xf175,0x11d1,0xa3,0x92,0x0,0xe0,0x29,0x1f,0x39,0x59)
|
||||
OUR_GUID_ENTRY(CLSID_ActiveMovieCategories,0xda4e3da0,0xd07d,0x11d0,0xbd,0x50,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_DVDHWDecodersCategory,0x2721AE20,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
OUR_GUID_ENTRY(CLSID_MediaEncoderCategory,0x7D22E920,0x5CA9,0x4787,0x8C,0x2B,0xA6,0x77,0x9B,0xD1,0x17,0x81)
|
||||
OUR_GUID_ENTRY(CLSID_MediaMultiplexerCategory,0x236C9559,0xADCE,0x4736,0xBF,0x72,0xBA,0xB3,0x4E,0x39,0x21,0x96)
|
||||
OUR_GUID_ENTRY(CLSID_FilterMapper2,0xcda42200,0xbd88,0x11d0,0xbd,0x4e,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_MemoryAllocator,0x1e651cc0,0xb199,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45)
|
||||
OUR_GUID_ENTRY(CLSID_MediaPropertyBag,0xcdbd8d00,0xc193,0x11d0,0xbd,0x4e,0x0,0xa0,0xc9,0x11,0xce,0x86)
|
||||
OUR_GUID_ENTRY(CLSID_DvdGraphBuilder,0xFCC152B7,0xF372,0x11d0,0x8E,0x00,0x00,0xC0,0x4F,0xD7,0xC0,0x8B)
|
||||
OUR_GUID_ENTRY(CLSID_DVDNavigator,0x9b8c4620,0x2c1a,0x11d0,0x84,0x93,0x0,0xa0,0x24,0x38,0xad,0x48)
|
||||
OUR_GUID_ENTRY(CLSID_DVDState,0xf963c5cf,0xa659,0x4a93,0x96,0x38,0xca,0xf3,0xcd,0x27,0x7d,0x13)
|
||||
OUR_GUID_ENTRY(CLSID_SmartTee,0xcc58e280,0x8aa1,0x11d1,0xb3,0xf1,0x0,0xaa,0x0,0x37,0x61,0xc5)
|
||||
OUR_GUID_ENTRY(FORMAT_None,0x0F6417D6,0xc318,0x11d0,0xa4,0x3f,0x00,0xa0,0xc9,0x22,0x31,0x96)
|
||||
OUR_GUID_ENTRY(FORMAT_VideoInfo,0x05589f80,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(FORMAT_VideoInfo2,0xf72a76A0,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(FORMAT_WaveFormatEx,0x05589f81,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(FORMAT_MPEGVideo,0x05589f82,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(FORMAT_MPEGStreams,0x05589f83,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(FORMAT_DvInfo,0x05589f84,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(CLSID_DirectDrawProperties,0x944d4c00,0xdd52,0x11ce,0xbf,0x0e,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(CLSID_PerformanceProperties,0x59ce6880,0xacf8,0x11cf,0xb5,0x6e,0x00,0x80,0xc7,0xc4,0xb6,0x8a)
|
||||
OUR_GUID_ENTRY(CLSID_QualityProperties,0x418afb70,0xf8b8,0x11ce,0xaa,0xc6,0x00,0x20,0xaf,0x0b,0x99,0xa3)
|
||||
OUR_GUID_ENTRY(IID_IBaseVideoMixer,0x61ded640,0xe912,0x11ce,0xa0,0x99,0x00,0xaa,0x00,0x47,0x9a,0x58)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawVideo,0x36d39eb0,0xdd75,0x11ce,0xbf,0x0e,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(IID_IQualProp,0x1bd0ecb0,0xf8e2,0x11ce,0xaa,0xc6,0x00,0x20,0xaf,0x0b,0x99,0xa3)
|
||||
OUR_GUID_ENTRY(CLSID_VPObject,0xce292861,0xfc88,0x11d0,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
OUR_GUID_ENTRY(IID_IVPObject,0xce292862,0xfc88,0x11d0,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
OUR_GUID_ENTRY(IID_IVPControl,0x25df12c1,0x3de0,0x11d1,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
OUR_GUID_ENTRY(CLSID_VPVBIObject,0x814b9801,0x1c88,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(IID_IVPVBIObject,0x814b9802,0x1c88,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(IID_IVPConfig,0xbc29a660,0x30e3,0x11d0,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
OUR_GUID_ENTRY(IID_IVPNotify,0xc76794a1,0xd6c5,0x11d0,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
OUR_GUID_ENTRY(IID_IVPNotify2,0xebf47183,0x8764,0x11d1,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
OUR_GUID_ENTRY(IID_IVPVBIConfig,0xec529b00,0x1a1f,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(IID_IVPVBINotify,0xec529b01,0x1a1f,0x11d1,0xba,0xd9,0x0,0x60,0x97,0x44,0x11,0x1a)
|
||||
OUR_GUID_ENTRY(IID_IMixerPinConfig,0x593cdde1,0x759,0x11d1,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
OUR_GUID_ENTRY(IID_IMixerPinConfig2,0xebf47182,0x8764,0x11d1,0x9e,0x69,0x0,0xc0,0x4f,0xd7,0xc1,0x5b)
|
||||
#ifndef __DDRAW_INCLUDED__
|
||||
OUR_GUID_ENTRY(CLSID_DirectDraw,0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35)
|
||||
OUR_GUID_ENTRY(CLSID_DirectDrawClipper,0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56)
|
||||
OUR_GUID_ENTRY(IID_IDirectDraw,0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
|
||||
OUR_GUID_ENTRY(IID_IDirectDraw2,0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawSurface,0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawSurface2,0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawSurface3,0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawSurface4,0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawSurface7,0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawPalette,0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawClipper,0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8)
|
||||
#endif
|
||||
#ifndef __DVP_INCLUDED__
|
||||
OUR_GUID_ENTRY(IID_IDDVideoPortContainer,0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
|
||||
#endif
|
||||
#ifndef __DDKM_INCLUDED__
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawKernel,0x8D56C120,0x6A08,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8)
|
||||
OUR_GUID_ENTRY(IID_IDirectDrawSurfaceKernel,0x60755DA0,0x6A40,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8)
|
||||
#endif
|
||||
OUR_GUID_ENTRY(CLSID_ModexProperties,0x0618aa30,0x6bc4,0x11cf,0xbf,0x36,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(IID_IFullScreenVideo,0xdd1d7110,0x7836,0x11cf,0xbf,0x47,0x00,0xaa,0x00,0x55,0x59,0x5a)
|
||||
OUR_GUID_ENTRY(IID_IFullScreenVideoEx,0x53479470,0xf1dd,0x11cf,0xbc,0x42,0x00,0xaa,0x00,0xac,0x74,0xf6)
|
||||
OUR_GUID_ENTRY(CLSID_DVDecPropertiesPage,0x101193c0,0xbfe,0x11d0,0xaf,0x91,0x0,0xaa,0x0,0xb6,0x7a,0x42)
|
||||
OUR_GUID_ENTRY(CLSID_DVEncPropertiesPage,0x4150f050,0xbb6f,0x11d0,0xaf,0xb9,0x0,0xaa,0x0,0xb6,0x7a,0x42)
|
||||
OUR_GUID_ENTRY(CLSID_DVMuxPropertyPage,0x4db880e0,0xc10d,0x11d0,0xaf,0xb9,0x0,0xaa,0x0,0xb6,0x7a,0x42)
|
||||
OUR_GUID_ENTRY(IID_IAMDirectSound,0x546f4260,0xd53e,0x11cf,0xb3,0xf0,0x0,0xaa,0x0,0x37,0x61,0xc5)
|
||||
OUR_GUID_ENTRY(IID_IMpegAudioDecoder,0xb45dd570,0x3c77,0x11d1,0xab,0xe1,0x00,0xa0,0xc9,0x05,0xf3,0x75)
|
||||
OUR_GUID_ENTRY(IID_IAMLine21Decoder,0x6e8d4a21,0x310c,0x11d0,0xb7,0x9a,0x0,0xaa,0x0,0x37,0x67,0xa7)
|
||||
OUR_GUID_ENTRY(IID_IAMWstDecoder,0xc056de21,0x75c2,0x11d3,0xa1,0x84,0x0,0x10,0x5a,0xef,0x9f,0x33)
|
||||
OUR_GUID_ENTRY(CLSID_WstDecoderPropertyPage,0x4e27f80,0x91e4,0x11d3,0xa1,0x84,0x0,0x10,0x5a,0xef,0x9f,0x33)
|
||||
OUR_GUID_ENTRY(FORMAT_AnalogVideo,0x482dde0,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_AnalogVideo,0x482dde1,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_NTSC_M,0x482dde2,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_B,0x482dde5,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_D,0x482dde6,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_G,0x482dde7,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_H,0x482dde8,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_I,0x482dde9,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_M,0x482ddea,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_N,0x482ddeb,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_N_COMBO,0x482ddec,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_B,0x482ddf0,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_D,0x482ddf1,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_G,0x482ddf2,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_H,0x482ddf3,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_K,0x482ddf4,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_K1,0x482ddf5,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_L,0x482ddf6,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_AnalogAudio,0x482dee1,0x7817,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
|
||||
#include "dshow/ksuuids.h"
|
||||
|
||||
OUR_GUID_ENTRY(TIME_FORMAT_NONE,0L,0,0,0,0,0,0,0,0,0,0)
|
||||
OUR_GUID_ENTRY(TIME_FORMAT_FRAME,0x7b785570,0x8c82,0x11cf,0xbc,0xc,0x0,0xaa,0x0,0xac,0x74,0xf6)
|
||||
OUR_GUID_ENTRY(TIME_FORMAT_BYTE,0x7b785571,0x8c82,0x11cf,0xbc,0xc,0x0,0xaa,0x0,0xac,0x74,0xf6)
|
||||
OUR_GUID_ENTRY(TIME_FORMAT_SAMPLE,0x7b785572,0x8c82,0x11cf,0xbc,0xc,0x0,0xaa,0x0,0xac,0x74,0xf6)
|
||||
OUR_GUID_ENTRY(TIME_FORMAT_FIELD,0x7b785573,0x8c82,0x11cf,0xbc,0xc,0x0,0xaa,0x0,0xac,0x74,0xf6)
|
||||
OUR_GUID_ENTRY(TIME_FORMAT_MEDIA_TIME,0x7b785574,0x8c82,0x11cf,0xbc,0xc,0x0,0xaa,0x0,0xac,0x74,0xf6)
|
||||
OUR_GUID_ENTRY(AMPROPSETID_Pin,0x9b00f101,0x1567,0x11d1,0xb3,0xf1,0x0,0xaa,0x0,0x37,0x61,0xc5)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_CAPTURE,0xfb6c4281,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_PREVIEW,0xfb6c4282,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_ANALOGVIDEOIN,0xfb6c4283,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_VBI,0xfb6c4284,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_VIDEOPORT,0xfb6c4285,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_NABTS,0xfb6c4286,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_EDS,0xfb6c4287,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_TELETEXT,0xfb6c4288,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_CC,0xfb6c4289,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_STILL,0xfb6c428a,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_TIMECODE,0xfb6c428b,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(PIN_CATEGORY_VIDEOPORT_VBI,0xfb6c428c,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba)
|
||||
OUR_GUID_ENTRY(LOOK_UPSTREAM_ONLY,0xac798be0,0x98e3,0x11d1,0xb3,0xf1,0x0,0xaa,0x0,0x37,0x61,0xc5)
|
||||
OUR_GUID_ENTRY(LOOK_DOWNSTREAM_ONLY,0xac798be1,0x98e3,0x11d1,0xb3,0xf1,0x0,0xaa,0x0,0x37,0x61,0xc5)
|
||||
OUR_GUID_ENTRY(CLSID_TVTunerFilterPropertyPage,0x266eee41,0x6c63,0x11cf,0x8a,0x3,0x0,0xaa,0x0,0x6e,0xcb,0x65)
|
||||
OUR_GUID_ENTRY(CLSID_CrossbarFilterPropertyPage,0x71f96461,0x78f3,0x11d0,0xa1,0x8c,0x0,0xa0,0xc9,0x11,0x89,0x56)
|
||||
OUR_GUID_ENTRY(CLSID_TVAudioFilterPropertyPage,0x71f96463,0x78f3,0x11d0,0xa1,0x8c,0x0,0xa0,0xc9,0x11,0x89,0x56)
|
||||
OUR_GUID_ENTRY(CLSID_VideoProcAmpPropertyPage,0x71f96464,0x78f3,0x11d0,0xa1,0x8c,0x0,0xa0,0xc9,0x11,0x89,0x56)
|
||||
OUR_GUID_ENTRY(CLSID_CameraControlPropertyPage,0x71f96465,0x78f3,0x11d0,0xa1,0x8c,0x0,0xa0,0xc9,0x11,0x89,0x56)
|
||||
OUR_GUID_ENTRY(CLSID_AnalogVideoDecoderPropertyPage,0x71f96466,0x78f3,0x11d0,0xa1,0x8c,0x0,0xa0,0xc9,0x11,0x89,0x56)
|
||||
OUR_GUID_ENTRY(CLSID_VideoStreamConfigPropertyPage,0x71f96467,0x78f3,0x11d0,0xa1,0x8c,0x0,0xa0,0xc9,0x11,0x89,0x56)
|
||||
OUR_GUID_ENTRY(CLSID_AudioRendererAdvancedProperties,0x37e92a92,0xd9aa,0x11d2,0xbf,0x84,0x8e,0xf2,0xb1,0x55,0x5a,0xed)
|
||||
OUR_GUID_ENTRY(CLSID_VideoMixingRenderer,0xB87BEB7B,0x8D29,0x423f,0xAE,0x4D,0x65,0x82,0xC1,0x01,0x75,0xAC)
|
||||
OUR_GUID_ENTRY(CLSID_VideoRendererDefault,0x6BC1CFFA,0x8FC1,0x4261,0xAC,0x22,0xCF,0xB4,0xCC,0x38,0xDB,0x50)
|
||||
OUR_GUID_ENTRY(CLSID_AllocPresenter,0x99d54f63,0x1a69,0x41ae,0xaa,0x4d,0xc9,0x76,0xeb,0x3f,0x07,0x13)
|
||||
OUR_GUID_ENTRY(CLSID_AllocPresenterDDXclMode,0x4444ac9e,0x242e,0x471b,0xa3,0xc7,0x45,0xdc,0xd4,0x63,0x52,0xbc)
|
||||
OUR_GUID_ENTRY(CLSID_VideoPortManager,0x6f26a6cd,0x967b,0x47fd,0x87,0x4a,0x7a,0xed,0x2c,0x9d,0x25,0xa2)
|
||||
OUR_GUID_ENTRY(CLSID_VideoMixingRenderer9,0x51b4abf3,0x748f,0x4e3b,0xa2,0x76,0xc8,0x28,0x33,0x0e,0x92,0x6a)
|
||||
OUR_GUID_ENTRY(CLSID_ATSCNetworkProvider,0x0dad2fdd,0x5fd7,0x11d3,0x8f,0x50,0x00,0xc0,0x4f,0x79,0x71,0xe2)
|
||||
OUR_GUID_ENTRY(CLSID_ATSCNetworkPropertyPage,0xe3444d16,0x5ac4,0x4386,0x88,0xdf,0x13,0xfd,0x23,0x0e,0x1d,0xda)
|
||||
OUR_GUID_ENTRY(CLSID_DVBSNetworkProvider,0xfa4b375a,0x45b4,0x4d45,0x84,0x40,0x26,0x39,0x57,0xb1,0x16,0x23)
|
||||
OUR_GUID_ENTRY(CLSID_DVBTNetworkProvider,0x216c62df,0x6d7f,0x4e9a,0x85,0x71,0x5,0xf1,0x4e,0xdb,0x76,0x6a)
|
||||
OUR_GUID_ENTRY(CLSID_DVBCNetworkProvider,0xdc0c0fe7,0x485,0x4266,0xb9,0x3f,0x68,0xfb,0xf8,0xe,0xd8,0x34)
|
||||
OUR_GUID_ENTRY(CLSID_DShowTVEFilter,0x05500280,0xFAA5,0x4DF9,0x82,0x46,0xBF,0xC2,0x3A,0xC5,0xCE,0xA8)
|
||||
OUR_GUID_ENTRY(CLSID_TVEFilterTuneProperties,0x05500281,0xFAA5,0x4DF9,0x82,0x46,0xBF,0xC2,0x3A,0xC5,0xCE,0xA8)
|
||||
OUR_GUID_ENTRY(CLSID_TVEFilterCCProperties,0x05500282,0xFAA5,0x4DF9,0x82,0x46,0xBF,0xC2,0x3A,0xC5,0xCE,0xA8)
|
||||
OUR_GUID_ENTRY(CLSID_TVEFilterStatsProperties,0x05500283,0xFAA5,0x4DF9,0x82,0x46,0xBF,0xC2,0x3A,0xC5,0xCE,0xA8)
|
||||
OUR_GUID_ENTRY(CLSID_IVideoEncoderProxy,0xb43c4eec,0x8c32,0x4791,0x91,0x2,0x50,0x8a,0xda,0x5e,0xe8,0xe7)
|
||||
OUR_GUID_ENTRY(CLSID_ICodecAPIProxy,0x7ff0997a,0x1999,0x4286,0xa7,0x3c,0x62,0x2b,0x88,0x14,0xe7,0xeb)
|
||||
OUR_GUID_ENTRY(CLSID_IVideoEncoderCodecAPIProxy,0xb05dabd9,0x56e5,0x4fdc,0xaf,0xa4,0x8a,0x47,0xe9,0x1f,0x1c,0x9c)
|
||||
|
||||
#ifndef __ENCODER_API_GUIDS__
|
||||
#define __ENCODER_API_GUIDS__
|
||||
OUR_GUID_ENTRY(ENCAPIPARAM_BITRATE,0x49cc4c43,0xca83,0x4ad4,0xa9,0xaf,0xf3,0x69,0x6a,0xf6,0x66,0xdf)
|
||||
OUR_GUID_ENTRY(ENCAPIPARAM_PEAK_BITRATE,0x703f16a9,0x3d48,0x44a1,0xb0,0x77,0x1,0x8d,0xff,0x91,0x5d,0x19)
|
||||
OUR_GUID_ENTRY(ENCAPIPARAM_BITRATE_MODE,0xee5fb25c,0xc713,0x40d1,0x9d,0x58,0xc0,0xd7,0x24,0x1e,0x25,0xf)
|
||||
OUR_GUID_ENTRY(CODECAPI_CHANGELISTS,0x62b12acf,0xf6b0,0x47d9,0x94,0x56,0x96,0xf2,0x2c,0x4e,0x0b,0x9d)
|
||||
OUR_GUID_ENTRY(CODECAPI_VIDEO_ENCODER,0x7112e8e1,0x3d03,0x47ef,0x8e,0x60,0x03,0xf1,0xcf,0x53,0x73,0x01)
|
||||
OUR_GUID_ENTRY(CODECAPI_AUDIO_ENCODER,0xb9d19a3e,0xf897,0x429c,0xbc,0x46,0x81,0x38,0xb7,0x27,0x2b,0x2d)
|
||||
OUR_GUID_ENTRY(CODECAPI_SETALLDEFAULTS,0x6c5e6a7c,0xacf8,0x4f55,0xa9,0x99,0x1a,0x62,0x81,0x09,0x05,0x1b)
|
||||
OUR_GUID_ENTRY(CODECAPI_ALLSETTINGS,0x6a577e92,0x83e1,0x4113,0xad,0xc2,0x4f,0xce,0xc3,0x2f,0x83,0xa1)
|
||||
OUR_GUID_ENTRY(CODECAPI_SUPPORTSEVENTS,0x0581af97,0x7693,0x4dbd,0x9d,0xca,0x3f,0x9e,0xbd,0x65,0x85,0xa1)
|
||||
OUR_GUID_ENTRY(CODECAPI_CURRENTCHANGELIST,0x1cb14e83,0x7d72,0x4657,0x83,0xfd,0x47,0xa2,0xc5,0xb9,0xd1,0x3d)
|
||||
#endif
|
||||
|
||||
#undef OUR_GUID_ENTRY
|
||||
Vendored
-301
@@ -1,301 +0,0 @@
|
||||
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006 Alexander Chemeris
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_INTTYPES_H_ // [
|
||||
#define _MSC_INTTYPES_H_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <msc_stdint.h>
|
||||
|
||||
// 7.8 Format conversion of integer types
|
||||
|
||||
typedef struct {
|
||||
intmax_t quot;
|
||||
intmax_t rem;
|
||||
} imaxdiv_t;
|
||||
|
||||
// 7.8.1 Macros for format specifiers
|
||||
|
||||
// The fprintf macros for signed integers are:
|
||||
#define PRId8 "d"
|
||||
#define PRIi8 "i"
|
||||
#define PRIdLEAST8 "d"
|
||||
#define PRIiLEAST8 "i"
|
||||
#define PRIdFAST8 "d"
|
||||
#define PRIiFAST8 "i"
|
||||
|
||||
#define PRId16 "hd"
|
||||
#define PRIi16 "hi"
|
||||
#define PRIdLEAST16 "hd"
|
||||
#define PRIiLEAST16 "hi"
|
||||
#define PRIdFAST16 "hd"
|
||||
#define PRIiFAST16 "hi"
|
||||
|
||||
#define PRId32 "I32d"
|
||||
#define PRIi32 "I32i"
|
||||
#define PRIdLEAST32 "I32d"
|
||||
#define PRIiLEAST32 "I32i"
|
||||
#define PRIdFAST32 "I32d"
|
||||
#define PRIiFAST32 "I32i"
|
||||
|
||||
#define PRId64 "I64d"
|
||||
#define PRIi64 "I64i"
|
||||
#define PRIdLEAST64 "I64d"
|
||||
#define PRIiLEAST64 "I64i"
|
||||
#define PRIdFAST64 "I64d"
|
||||
#define PRIiFAST64 "I64i"
|
||||
|
||||
#define PRIdMAX "I64d"
|
||||
#define PRIiMAX "I64i"
|
||||
|
||||
#define PRIdPTR "Id"
|
||||
#define PRIiPTR "Ii"
|
||||
|
||||
// The fprintf macros for unsigned integers are:
|
||||
#define PRIo8 "o"
|
||||
#define PRIu8 "u"
|
||||
#define PRIx8 "x"
|
||||
#define PRIX8 "X"
|
||||
#define PRIoLEAST8 "o"
|
||||
#define PRIuLEAST8 "u"
|
||||
#define PRIxLEAST8 "x"
|
||||
#define PRIXLEAST8 "X"
|
||||
#define PRIoFAST8 "o"
|
||||
#define PRIuFAST8 "u"
|
||||
#define PRIxFAST8 "x"
|
||||
#define PRIXFAST8 "X"
|
||||
|
||||
#define PRIo16 "ho"
|
||||
#define PRIu16 "hu"
|
||||
#define PRIx16 "hx"
|
||||
#define PRIX16 "hX"
|
||||
#define PRIoLEAST16 "ho"
|
||||
#define PRIuLEAST16 "hu"
|
||||
#define PRIxLEAST16 "hx"
|
||||
#define PRIXLEAST16 "hX"
|
||||
#define PRIoFAST16 "ho"
|
||||
#define PRIuFAST16 "hu"
|
||||
#define PRIxFAST16 "hx"
|
||||
#define PRIXFAST16 "hX"
|
||||
|
||||
#define PRIo32 "I32o"
|
||||
#define PRIu32 "I32u"
|
||||
#define PRIx32 "I32x"
|
||||
#define PRIX32 "I32X"
|
||||
#define PRIoLEAST32 "I32o"
|
||||
#define PRIuLEAST32 "I32u"
|
||||
#define PRIxLEAST32 "I32x"
|
||||
#define PRIXLEAST32 "I32X"
|
||||
#define PRIoFAST32 "I32o"
|
||||
#define PRIuFAST32 "I32u"
|
||||
#define PRIxFAST32 "I32x"
|
||||
#define PRIXFAST32 "I32X"
|
||||
|
||||
#define PRIo64 "I64o"
|
||||
#define PRIu64 "I64u"
|
||||
#define PRIx64 "I64x"
|
||||
#define PRIX64 "I64X"
|
||||
#define PRIoLEAST64 "I64o"
|
||||
#define PRIuLEAST64 "I64u"
|
||||
#define PRIxLEAST64 "I64x"
|
||||
#define PRIXLEAST64 "I64X"
|
||||
#define PRIoFAST64 "I64o"
|
||||
#define PRIuFAST64 "I64u"
|
||||
#define PRIxFAST64 "I64x"
|
||||
#define PRIXFAST64 "I64X"
|
||||
|
||||
#define PRIoMAX "I64o"
|
||||
#define PRIuMAX "I64u"
|
||||
#define PRIxMAX "I64x"
|
||||
#define PRIXMAX "I64X"
|
||||
|
||||
#define PRIoPTR "Io"
|
||||
#define PRIuPTR "Iu"
|
||||
#define PRIxPTR "Ix"
|
||||
#define PRIXPTR "IX"
|
||||
|
||||
// The fscanf macros for signed integers are:
|
||||
#define SCNd8 "d"
|
||||
#define SCNi8 "i"
|
||||
#define SCNdLEAST8 "d"
|
||||
#define SCNiLEAST8 "i"
|
||||
#define SCNdFAST8 "d"
|
||||
#define SCNiFAST8 "i"
|
||||
|
||||
#define SCNd16 "hd"
|
||||
#define SCNi16 "hi"
|
||||
#define SCNdLEAST16 "hd"
|
||||
#define SCNiLEAST16 "hi"
|
||||
#define SCNdFAST16 "hd"
|
||||
#define SCNiFAST16 "hi"
|
||||
|
||||
#define SCNd32 "ld"
|
||||
#define SCNi32 "li"
|
||||
#define SCNdLEAST32 "ld"
|
||||
#define SCNiLEAST32 "li"
|
||||
#define SCNdFAST32 "ld"
|
||||
#define SCNiFAST32 "li"
|
||||
|
||||
#define SCNd64 "I64d"
|
||||
#define SCNi64 "I64i"
|
||||
#define SCNdLEAST64 "I64d"
|
||||
#define SCNiLEAST64 "I64i"
|
||||
#define SCNdFAST64 "I64d"
|
||||
#define SCNiFAST64 "I64i"
|
||||
|
||||
#define SCNdMAX "I64d"
|
||||
#define SCNiMAX "I64i"
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define SCNdPTR "I64d"
|
||||
# define SCNiPTR "I64i"
|
||||
#else // _WIN64 ][
|
||||
# define SCNdPTR "ld"
|
||||
# define SCNiPTR "li"
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// The fscanf macros for unsigned integers are:
|
||||
#define SCNo8 "o"
|
||||
#define SCNu8 "u"
|
||||
#define SCNx8 "x"
|
||||
#define SCNX8 "X"
|
||||
#define SCNoLEAST8 "o"
|
||||
#define SCNuLEAST8 "u"
|
||||
#define SCNxLEAST8 "x"
|
||||
#define SCNXLEAST8 "X"
|
||||
#define SCNoFAST8 "o"
|
||||
#define SCNuFAST8 "u"
|
||||
#define SCNxFAST8 "x"
|
||||
#define SCNXFAST8 "X"
|
||||
|
||||
#define SCNo16 "ho"
|
||||
#define SCNu16 "hu"
|
||||
#define SCNx16 "hx"
|
||||
#define SCNX16 "hX"
|
||||
#define SCNoLEAST16 "ho"
|
||||
#define SCNuLEAST16 "hu"
|
||||
#define SCNxLEAST16 "hx"
|
||||
#define SCNXLEAST16 "hX"
|
||||
#define SCNoFAST16 "ho"
|
||||
#define SCNuFAST16 "hu"
|
||||
#define SCNxFAST16 "hx"
|
||||
#define SCNXFAST16 "hX"
|
||||
|
||||
#define SCNo32 "lo"
|
||||
#define SCNu32 "lu"
|
||||
#define SCNx32 "lx"
|
||||
#define SCNX32 "lX"
|
||||
#define SCNoLEAST32 "lo"
|
||||
#define SCNuLEAST32 "lu"
|
||||
#define SCNxLEAST32 "lx"
|
||||
#define SCNXLEAST32 "lX"
|
||||
#define SCNoFAST32 "lo"
|
||||
#define SCNuFAST32 "lu"
|
||||
#define SCNxFAST32 "lx"
|
||||
#define SCNXFAST32 "lX"
|
||||
|
||||
#define SCNo64 "I64o"
|
||||
#define SCNu64 "I64u"
|
||||
#define SCNx64 "I64x"
|
||||
#define SCNX64 "I64X"
|
||||
#define SCNoLEAST64 "I64o"
|
||||
#define SCNuLEAST64 "I64u"
|
||||
#define SCNxLEAST64 "I64x"
|
||||
#define SCNXLEAST64 "I64X"
|
||||
#define SCNoFAST64 "I64o"
|
||||
#define SCNuFAST64 "I64u"
|
||||
#define SCNxFAST64 "I64x"
|
||||
#define SCNXFAST64 "I64X"
|
||||
|
||||
#define SCNoMAX "I64o"
|
||||
#define SCNuMAX "I64u"
|
||||
#define SCNxMAX "I64x"
|
||||
#define SCNXMAX "I64X"
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define SCNoPTR "I64o"
|
||||
# define SCNuPTR "I64u"
|
||||
# define SCNxPTR "I64x"
|
||||
# define SCNXPTR "I64X"
|
||||
#else // _WIN64 ][
|
||||
# define SCNoPTR "lo"
|
||||
# define SCNuPTR "lu"
|
||||
# define SCNxPTR "lx"
|
||||
# define SCNXPTR "lX"
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.8.2 Functions for greatest-width integer types
|
||||
|
||||
// 7.8.2.1 The imaxabs function
|
||||
#define imaxabs _abs64
|
||||
|
||||
// 7.8.2.2 The imaxdiv function
|
||||
|
||||
// This is modified version of div() function from Microsoft's div.c found
|
||||
// in %MSVC.NET%\crt\src\div.c
|
||||
#ifdef STATIC_IMAXDIV // [
|
||||
static
|
||||
#else // STATIC_IMAXDIV ][
|
||||
_inline
|
||||
#endif // STATIC_IMAXDIV ]
|
||||
imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
|
||||
{
|
||||
imaxdiv_t result;
|
||||
|
||||
result.quot = numer / denom;
|
||||
result.rem = numer % denom;
|
||||
|
||||
if (numer < 0 && result.rem > 0) {
|
||||
// did division wrong; must fix up
|
||||
++result.quot;
|
||||
result.rem -= denom;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 7.8.2.3 The strtoimax and strtoumax functions
|
||||
#define strtoimax _strtoi64
|
||||
#define strtoumax _strtoui64
|
||||
|
||||
// 7.8.2.4 The wcstoimax and wcstoumax functions
|
||||
#define wcstoimax _wcstoi64
|
||||
#define wcstoumax _wcstoui64
|
||||
|
||||
|
||||
#endif // _MSC_INTTYPES_H_ ]
|
||||
Vendored
-219
@@ -1,219 +0,0 @@
|
||||
// ISO C9x compliant stdint.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006 Alexander Chemeris
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_STDINT_H_ // [
|
||||
#define _MSC_STDINT_H_
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
// For Visual Studio 6 in C++ mode wrap <wchar.h> include with 'extern "C++" {}'
|
||||
// or compiler give many errors like this:
|
||||
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
|
||||
#if (_MSC_VER < 1300) && defined(__cplusplus)
|
||||
extern "C++" {
|
||||
#endif
|
||||
# include <wchar.h>
|
||||
#if (_MSC_VER < 1300) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ || _MSC_VER >= 1600
|
||||
#include "stdint.h"
|
||||
#else
|
||||
|
||||
// 7.18.1 Integer types
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
typedef __int8 int8_t;
|
||||
typedef __int16 int16_t;
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int64_t int_least64_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
typedef int8_t int_fast8_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
#ifdef _WIN64 // [
|
||||
typedef __int64 intptr_t;
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else // _WIN64 ][
|
||||
typedef int intptr_t;
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
|
||||
|
||||
// 7.18.2 Limits of specified-width integer types
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
|
||||
|
||||
// 7.18.2.1 Limits of exact-width integer types
|
||||
#define INT8_MIN _I8_MIN
|
||||
#define INT8_MAX _I8_MAX
|
||||
#define INT16_MIN _I16_MIN
|
||||
#define INT16_MAX _I16_MAX
|
||||
#define INT32_MIN _I32_MIN
|
||||
#define INT32_MAX _I32_MAX
|
||||
#define INT64_MIN _I64_MIN
|
||||
#define INT64_MAX _I64_MAX
|
||||
#define UINT8_MAX _UI8_MAX
|
||||
#define UINT16_MAX _UI16_MAX
|
||||
#define UINT32_MAX _UI32_MAX
|
||||
#define UINT64_MAX _UI64_MAX
|
||||
|
||||
// 7.18.2.2 Limits of minimum-width integer types
|
||||
#define INT_LEAST8_MIN INT8_MIN
|
||||
#define INT_LEAST8_MAX INT8_MAX
|
||||
#define INT_LEAST16_MIN INT16_MIN
|
||||
#define INT_LEAST16_MAX INT16_MAX
|
||||
#define INT_LEAST32_MIN INT32_MIN
|
||||
#define INT_LEAST32_MAX INT32_MAX
|
||||
#define INT_LEAST64_MIN INT64_MIN
|
||||
#define INT_LEAST64_MAX INT64_MAX
|
||||
#define UINT_LEAST8_MAX UINT8_MAX
|
||||
#define UINT_LEAST16_MAX UINT16_MAX
|
||||
#define UINT_LEAST32_MAX UINT32_MAX
|
||||
#define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
// 7.18.2.3 Limits of fastest minimum-width integer types
|
||||
#define INT_FAST8_MIN INT8_MIN
|
||||
#define INT_FAST8_MAX INT8_MAX
|
||||
#define INT_FAST16_MIN INT16_MIN
|
||||
#define INT_FAST16_MAX INT16_MAX
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
#define INT_FAST64_MIN INT64_MIN
|
||||
#define INT_FAST64_MAX INT64_MAX
|
||||
#define UINT_FAST8_MAX UINT8_MAX
|
||||
#define UINT_FAST16_MAX UINT16_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
// 7.18.2.4 Limits of integer types capable of holding object pointers
|
||||
#ifdef _WIN64 // [
|
||||
# define INTPTR_MIN INT64_MIN
|
||||
# define INTPTR_MAX INT64_MAX
|
||||
# define UINTPTR_MAX UINT64_MAX
|
||||
#else // _WIN64 ][
|
||||
# define INTPTR_MIN INT32_MIN
|
||||
# define INTPTR_MAX INT32_MAX
|
||||
# define UINTPTR_MAX UINT32_MAX
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.18.2.5 Limits of greatest-width integer types
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
#define INTMAX_MAX INT64_MAX
|
||||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
// 7.18.3 Limits of other integer types
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define PTRDIFF_MIN _I64_MIN
|
||||
# define PTRDIFF_MAX _I64_MAX
|
||||
#else // _WIN64 ][
|
||||
# define PTRDIFF_MIN _I32_MIN
|
||||
# define PTRDIFF_MAX _I32_MAX
|
||||
#endif // _WIN64 ]
|
||||
|
||||
#define SIG_ATOMIC_MIN INT_MIN
|
||||
#define SIG_ATOMIC_MAX INT_MAX
|
||||
|
||||
#ifndef SIZE_MAX // [
|
||||
# ifdef _WIN64 // [
|
||||
# define SIZE_MAX _UI64_MAX
|
||||
# else // _WIN64 ][
|
||||
# define SIZE_MAX _UI32_MAX
|
||||
# endif // _WIN64 ]
|
||||
#endif // SIZE_MAX ]
|
||||
|
||||
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
|
||||
#ifndef WCHAR_MIN // [
|
||||
# define WCHAR_MIN 0
|
||||
#endif // WCHAR_MIN ]
|
||||
#ifndef WCHAR_MAX // [
|
||||
# define WCHAR_MAX _UI16_MAX
|
||||
#endif // WCHAR_MAX ]
|
||||
|
||||
#define WINT_MIN 0
|
||||
#define WINT_MAX _UI16_MAX
|
||||
|
||||
#endif // __STDC_LIMIT_MACROS ]
|
||||
|
||||
|
||||
// 7.18.4 Limits of other integer types
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
|
||||
|
||||
// 7.18.4.1 Macros for minimum-width integer constants
|
||||
|
||||
#define INT8_C(val) val
|
||||
#define INT16_C(val) val
|
||||
#define INT32_C(val) val##L
|
||||
#define INT64_C(val) val##i64
|
||||
|
||||
#define UINT8_C(val) val
|
||||
#define UINT16_C(val) val
|
||||
#define UINT32_C(val) val##UL
|
||||
#define UINT64_C(val) val##Ui64
|
||||
|
||||
// 7.18.4.2 Macros for greatest-width integer constants
|
||||
#define INTMAX_C INT64_C
|
||||
#define UINTMAX_C UINT64_C
|
||||
|
||||
#endif // __STDC_CONSTANT_MACROS ]
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _MSC_STDINT_H_ ]
|
||||
Vendored
+1
-1
@@ -59,7 +59,7 @@ inline ivx::Context& getOpenVXHALContext()
|
||||
static thread_local ivx::Context instance = ivx::Context::create();
|
||||
#else //__cplusplus >= 201103L || _MSC_VER >= 1800
|
||||
//CXX98
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
static __declspec(thread) ivx::Context instance = ivx::Context::create();
|
||||
#else
|
||||
static __thread ivx::Context instance = ivx::Context::create();
|
||||
|
||||
+8
-1
@@ -18,7 +18,7 @@ endif()
|
||||
include(cmake/OpenCVMinDepVersions.cmake)
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES Xcode AND XCODE_VERSION VERSION_GREATER 4.3)
|
||||
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
|
||||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
||||
#Required to resolve linker error issues due to incompatibility with CMake v3.0+ policies.
|
||||
@@ -551,6 +551,7 @@ if(UNIX)
|
||||
endif()
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
if(NOT APPLE)
|
||||
CHECK_INCLUDE_FILE(pthread.h HAVE_LIBPTHREAD)
|
||||
@@ -566,6 +567,12 @@ if(UNIX)
|
||||
else()
|
||||
set(HAVE_LIBPTHREAD YES)
|
||||
endif()
|
||||
|
||||
CHECK_SYMBOL_EXISTS(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
|
||||
CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H)
|
||||
if(HAVE_MALLOC_H)
|
||||
CHECK_SYMBOL_EXISTS(memalign malloc.h HAVE_MEMALIGN)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(cmake/OpenCVPCHSupport.cmake)
|
||||
|
||||
@@ -238,7 +238,7 @@ if(X86 OR X86_64)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CPU_DISPATCH)
|
||||
set(CPU_DISPATCH "SSE4_1;AVX;FP16;AVX2" CACHE STRING "${HELP_CPU_DISPATCH}")
|
||||
set(CPU_DISPATCH "SSE4_1;SSE4_2;AVX;FP16;AVX2" CACHE STRING "${HELP_CPU_DISPATCH}")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CPU_BASELINE)
|
||||
|
||||
@@ -18,9 +18,9 @@ if(ENABLE_CCACHE AND NOT CMAKE_COMPILER_IS_CCACHE)
|
||||
message(STATUS "Unable to compile program with enabled ccache, reverting...")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${__OLD_RULE_LAUNCH_COMPILE}")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Looking for ccache - not found")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Looking for ccache - not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -203,7 +203,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
endif()
|
||||
|
||||
set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
|
||||
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0 -DDEBUG -D_DEBUG")
|
||||
if(NOT " ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} " MATCHES "-O")
|
||||
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0")
|
||||
endif()
|
||||
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -DDEBUG -D_DEBUG")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
||||
@@ -160,7 +160,7 @@ if(MSVC)
|
||||
set(OpenCV_RUNTIME vc12)
|
||||
elseif(MSVC_VERSION EQUAL 1900)
|
||||
set(OpenCV_RUNTIME vc14)
|
||||
elseif(MSVC_VERSION EQUAL 1910)
|
||||
elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911)
|
||||
set(OpenCV_RUNTIME vc15)
|
||||
endif()
|
||||
elseif(MINGW)
|
||||
@@ -188,7 +188,7 @@ if(ENABLE_CXX11)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++11 instead of -std=gnu++11
|
||||
if(XCMAKE_CXX11_COMPILE_FEATURES)
|
||||
if(CMAKE_CXX11_COMPILE_FEATURES)
|
||||
set(HAVE_CXX11 ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -127,13 +127,18 @@ endif(WITH_GIGEAPI)
|
||||
# --- Aravis SDK ---
|
||||
ocv_clear_vars(HAVE_ARAVIS_API)
|
||||
if(WITH_ARAVIS)
|
||||
find_path(ARAVIS_INCLUDE_PATH "arv.h"
|
||||
PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432
|
||||
PATH_SUFFIXES include "aravis-0.6" "aravis-0.4"
|
||||
DOC "The path to Aravis SDK headers")
|
||||
find_library(ARAVIS_LIBRARIES NAMES "aravis-0.6" "aravis-0.4" )
|
||||
if(ARAVIS_LIBRARIES AND ARAVIS_INCLUDE_PATH)
|
||||
set(HAVE_ARAVIS_API TRUE)
|
||||
check_module(glib-2.0 HAVE_ARAVIS_GLIB VIDEOIO)
|
||||
if(HAVE_ARAVIS_GLIB)
|
||||
find_path(ARAVIS_INCLUDE_PATH "arv.h"
|
||||
PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432
|
||||
PATH_SUFFIXES include "aravis-0.6" "aravis-0.4"
|
||||
DOC "The path to Aravis SDK headers")
|
||||
find_library(ARAVIS_LIBRARIES NAMES "aravis-0.6" "aravis-0.4" )
|
||||
if(ARAVIS_LIBRARIES AND ARAVIS_INCLUDE_PATH)
|
||||
set(HAVE_ARAVIS_API TRUE)
|
||||
endif()
|
||||
else()
|
||||
message("Can not build Aravis support without glib2")
|
||||
endif()
|
||||
endif(WITH_ARAVIS)
|
||||
|
||||
@@ -252,8 +257,11 @@ endif(WITH_FFMPEG)
|
||||
|
||||
# --- VideoInput/DirectShow ---
|
||||
if(WITH_DSHOW)
|
||||
# always have VideoInput on Windows
|
||||
set(HAVE_DSHOW 1)
|
||||
if(MSVC_VERSION GREATER 1499)
|
||||
set(HAVE_DSHOW 1)
|
||||
elseif(NOT HAVE_DSHOW)
|
||||
check_include_file(DShow.h HAVE_DSHOW)
|
||||
endif()
|
||||
endif(WITH_DSHOW)
|
||||
|
||||
# --- VideoInput/Microsoft Media Foundation ---
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
set(MIN_VER_CMAKE 2.8.7)
|
||||
set(MIN_VER_CMAKE 2.8.12.2)
|
||||
set(MIN_VER_CUDA 6.5)
|
||||
set(MIN_VER_PYTHON2 2.6)
|
||||
set(MIN_VER_PYTHON3 3.2)
|
||||
|
||||
@@ -223,11 +223,13 @@ macro(ocv_add_module _name)
|
||||
if(NOT BUILD_${the_module})
|
||||
return() # extra protection from redefinition
|
||||
endif()
|
||||
if((NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD AND NOT ${the_module} STREQUAL opencv_world) OR NOT ${BUILD_opencv_world})
|
||||
project(${the_module})
|
||||
if(NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD OR NOT ${BUILD_opencv_world})
|
||||
if (NOT ${the_module} STREQUAL opencv_world)
|
||||
project(${the_module})
|
||||
endif()
|
||||
add_definitions(
|
||||
-D_USE_MATH_DEFINES # M_PI constant in MSVS
|
||||
-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS # to use C libraries from C++ code (ffmpeg)
|
||||
-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS # to use C libraries from C++ code (ffmpeg)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -323,10 +323,7 @@ MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
|
||||
|
||||
get_target_property(_sources ${_targetName} SOURCES)
|
||||
foreach(src ${_sources})
|
||||
if(NOT "${src}" MATCHES "\\.mm$"
|
||||
AND NOT "${src}" MATCHES "\\.h$" AND NOT "${src}" MATCHES "\\.hpp$" # header files
|
||||
AND NOT "${src}" MATCHES "^\$" # CMake generator expressions
|
||||
)
|
||||
if("${src}" MATCHES "\\.c(pp|xx)?$")
|
||||
get_source_file_property(oldProps "${src}" COMPILE_FLAGS)
|
||||
get_source_file_property(oldProps2 "${src}" COMPILE_DEFINITIONS)
|
||||
if(NOT oldProps AND NOT oldProps2)
|
||||
|
||||
+16
-9
@@ -2,21 +2,22 @@ include(CMakeParseArguments)
|
||||
|
||||
# Debugging function
|
||||
function(ocv_cmake_dump_vars)
|
||||
set(VARS "")
|
||||
get_cmake_property(_variableNames VARIABLES)
|
||||
get_cmake_property(__variableNames VARIABLES)
|
||||
cmake_parse_arguments(DUMP "" "TOFILE" "" ${ARGN})
|
||||
set(regex "${DUMP_UNPARSED_ARGUMENTS}")
|
||||
string(TOLOWER "${regex}" regex_lower)
|
||||
foreach(_variableName ${_variableNames})
|
||||
string(TOLOWER "${_variableName}" _variableName_lower)
|
||||
if(_variableName MATCHES "${regex}" OR _variableName_lower MATCHES "${regex_lower}")
|
||||
set(VARS "${VARS}${_variableName}=${${_variableName}}\n")
|
||||
set(__VARS "")
|
||||
foreach(__variableName ${__variableNames})
|
||||
string(TOLOWER "${__variableName}" __variableName_lower)
|
||||
if((__variableName MATCHES "${regex}" OR __variableName_lower MATCHES "${regex_lower}")
|
||||
AND NOT __variableName_lower MATCHES "^__")
|
||||
set(__VARS "${__VARS}${__variableName}=${${__variableName}}\n")
|
||||
endif()
|
||||
endforeach()
|
||||
if(DUMP_TOFILE)
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/${DUMP_TOFILE} "${VARS}")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/${DUMP_TOFILE} "${__VARS}")
|
||||
else()
|
||||
message(AUTHOR_WARNING "${VARS}")
|
||||
message(AUTHOR_WARNING "${__VARS}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -532,6 +533,12 @@ macro(ocv_finalize_status)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${OPENCV_BUILD_INFO_FILE}" "${OPENCV_MODULE_opencv_core_BINARY_DIR}/version_string.inc" OUTPUT_QUIET)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
install(FILES "${OpenCV_SOURCE_DIR}/platforms/scripts/valgrind.supp"
|
||||
"${OpenCV_SOURCE_DIR}/platforms/scripts/valgrind_3rdparty.supp"
|
||||
DESTINATION "${OPENCV_OTHER_INSTALL_PATH}" COMPONENT "dev")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
@@ -1115,7 +1122,7 @@ macro(ocv_add_testdata basedir dest_subdir)
|
||||
endif()
|
||||
if(INSTALL_TESTS)
|
||||
install(DIRECTORY ${basedir}/
|
||||
DESTINATION ${OPENCV_TEST_DATA_INSTALL_PATH}/contrib/text
|
||||
DESTINATION ${OPENCV_TEST_DATA_INSTALL_PATH}/${dest_subdir}
|
||||
COMPONENT "tests"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#if (defined WIN32 || defined _WIN32) && defined(_M_ARM)
|
||||
#if defined _WIN32 && defined(_M_ARM)
|
||||
# include <Intrin.h>
|
||||
# include <arm_neon.h>
|
||||
# define CV_NEON 1
|
||||
|
||||
@@ -78,7 +78,7 @@ if(MSVC)
|
||||
set(OpenCV_RUNTIME vc12)
|
||||
elseif(MSVC_VERSION EQUAL 1900)
|
||||
set(OpenCV_RUNTIME vc14)
|
||||
elseif(MSVC_VERSION EQUAL 1910)
|
||||
elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911)
|
||||
set(OpenCV_RUNTIME vc15)
|
||||
endif()
|
||||
elseif(MINGW)
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ if(HAVE_DOC_GENERATOR)
|
||||
endforeach()
|
||||
ocv_list_sort(BASE_MODULES)
|
||||
ocv_list_sort(EXTRA_MODULES)
|
||||
set(FIXED_ORDER_MODULES core imgproc imgcodecs videoio highgui video calib3d features2d objdetect ml flann photo stitching)
|
||||
set(FIXED_ORDER_MODULES core imgproc imgcodecs videoio highgui video calib3d features2d objdetect dnn ml flann photo stitching)
|
||||
list(REMOVE_ITEM BASE_MODULES ${FIXED_ORDER_MODULES})
|
||||
set(BASE_MODULES ${FIXED_ORDER_MODULES} ${BASE_MODULES})
|
||||
endif(HAVE_DOC_GENERATOR)
|
||||
|
||||
@@ -38,7 +38,7 @@ class PatternMaker:
|
||||
r = spacing / self.radius_rate
|
||||
for x in range(1,self.cols+1):
|
||||
for y in range(1,self.rows+1):
|
||||
dot = SVG("circle", cx=x * spacing, cy=y * spacing, r=r, fill="black")
|
||||
dot = SVG("circle", cx=x * spacing, cy=y * spacing, r=r, fill="black", stroke="none")
|
||||
self.g.append(dot)
|
||||
|
||||
def makeACirclesPattern(self):
|
||||
@@ -46,7 +46,7 @@ class PatternMaker:
|
||||
r = spacing / self.radius_rate
|
||||
for i in range(0,self.rows):
|
||||
for j in range(0,self.cols):
|
||||
dot = SVG("circle", cx= ((j*2 + i%2)*spacing) + spacing, cy=self.height - (i * spacing + spacing), r=r, fill="black")
|
||||
dot = SVG("circle", cx= ((j*2 + i%2)*spacing) + spacing, cy=self.height - (i * spacing + spacing), r=r, fill="black", stroke="none")
|
||||
self.g.append(dot)
|
||||
|
||||
def makeCheckerboardPattern(self):
|
||||
@@ -56,7 +56,7 @@ class PatternMaker:
|
||||
for x in range(0,self.cols):
|
||||
for y in range(0,self.rows):
|
||||
if x%2 == y%2:
|
||||
square = SVG("rect", x=x * spacing + xspacing, y=y * spacing + yspacing, width=spacing, height=spacing, fill="black")
|
||||
square = SVG("rect", x=x * spacing + xspacing, y=y * spacing + yspacing, width=spacing, height=spacing, fill="black", stroke="none")
|
||||
self.g.append(square)
|
||||
|
||||
def save(self):
|
||||
|
||||
@@ -51,7 +51,7 @@ Otherwise open it using **cap.open()**.
|
||||
|
||||
You can also access some of the features of this video using **cap.get(propId)** method where propId
|
||||
is a number from 0 to 18. Each number denotes a property of the video (if it is applicable to that
|
||||
video) and full details can be seen here: cv::VideoCapture::get() .
|
||||
video) and full details can be seen here: cv::VideoCapture::get().
|
||||
Some of these values can be modified using **cap.set(propId, value)**. Value is the new value you
|
||||
want.
|
||||
|
||||
@@ -66,7 +66,7 @@ Playing Video from file
|
||||
-----------------------
|
||||
|
||||
It is same as capturing from Camera, just change camera index with video file name. Also while
|
||||
displaying the frame, use appropriate time for cv2.waitKey(). If it is too less, video will be very
|
||||
displaying the frame, use appropriate time for `cv2.waitKey()`. If it is too less, video will be very
|
||||
fast and if it is too high, video will be slow (Well, that is how you can display videos in slow
|
||||
motion). 25 milliseconds will be OK in normal cases.
|
||||
@code{.py}
|
||||
@@ -95,7 +95,7 @@ Saving a Video
|
||||
--------------
|
||||
|
||||
So we capture a video, process it frame-by-frame and we want to save that video. For images, it is
|
||||
very simple, just use cv2.imwrite(). Here a little more work is required.
|
||||
very simple, just use `cv2.imwrite()`. Here a little more work is required.
|
||||
|
||||
This time we create a **VideoWriter** object. We should specify the output file name (eg:
|
||||
output.avi). Then we should specify the **FourCC** code (details in next paragraph). Then number of
|
||||
@@ -109,10 +109,10 @@ platform dependent. Following codecs works fine for me.
|
||||
- In Fedora: DIVX, XVID, MJPG, X264, WMV1, WMV2. (XVID is more preferable. MJPG results in high
|
||||
size video. X264 gives very small size video)
|
||||
- In Windows: DIVX (More to be tested and added)
|
||||
- In OSX : *(I don't have access to OSX. Can some one fill this?)*
|
||||
- In OSX: MJPG (.mp4), DIVX (.avi), X264 (.mkv).
|
||||
|
||||
FourCC code is passed as cv2.VideoWriter_fourcc('M','J','P','G') or
|
||||
cv2.VideoWriter_fourcc(\*'MJPG') for MJPG.
|
||||
FourCC code is passed as `cv2.VideoWriter_fourcc('M','J','P','G')` or
|
||||
`cv2.VideoWriter_fourcc(*'MJPG')` for MJPG.
|
||||
|
||||
Below code capture from a Camera, flip every frame in vertical direction and saves it.
|
||||
@code{.py}
|
||||
|
||||
@@ -41,7 +41,7 @@ version of OpenCV always. For example, at the time of writing this tutorial, yum
|
||||
contain much better support. Also, there may be chance of problems with camera support, video
|
||||
playback etc depending upon the drivers, ffmpeg, gstreamer packages present etc.
|
||||
|
||||
So my personnel preference is next method, i.e. compiling from source. Also at some point of time,
|
||||
So my personal preference is next method, i.e. compiling from source. Also at some point in time,
|
||||
if you want to contribute to OpenCV, you will need this.
|
||||
|
||||
Installing OpenCV from source
|
||||
|
||||
+3
-1
@@ -192,10 +192,12 @@ object in multiple ways:
|
||||
|
||||

|
||||
|
||||
- For small matrices you may use comma separated initializers:
|
||||
- For small matrices you may use comma separated initializers or initializer lists (C++11 support is required in the last case):
|
||||
|
||||
@snippet mat_the_basic_image_container.cpp comma
|
||||
|
||||
@snippet mat_the_basic_image_container.cpp list
|
||||
|
||||

|
||||
|
||||
- Create a new header for an existing *Mat* object and @ref cv::Mat::clone or @ref cv::Mat::copyTo it.
|
||||
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,26 @@
|
||||
Deep Neural Networks (dnn module) {#tutorial_table_of_content_dnn}
|
||||
=====================================
|
||||
|
||||
- @subpage tutorial_dnn_googlenet
|
||||
|
||||
*Compatibility:* \> OpenCV 3.3
|
||||
|
||||
*Author:* Vitaliy Lyudvichenko
|
||||
|
||||
In this tutorial you will learn how to use opencv_dnn module for image classification by using GoogLeNet trained network from Caffe model zoo.
|
||||
|
||||
- @subpage tutorial_dnn_halide
|
||||
|
||||
*Compatibility:* \> OpenCV 3.3
|
||||
|
||||
*Author:* Dmitry Kurtaev
|
||||
|
||||
This tutorial guidelines how to run your models in OpenCV deep learning module using Halide language backend
|
||||
|
||||
- @subpage tutorial_dnn_halide_scheduling
|
||||
|
||||
*Compatibility:* \> OpenCV 3.3
|
||||
|
||||
*Author:* Dmitry Kurtaev
|
||||
|
||||
In this tutorial we describe the ways to schedule your networks using Halide backend in OpenCV deep learning module.
|
||||
@@ -43,7 +43,7 @@ In this tutorial we will study the *corner* features, specifically.
|
||||
- Let's look for corners. Since corners represents a variation in the gradient in the image, we
|
||||
will look for this "variation".
|
||||
- Consider a grayscale image \f$I\f$. We are going to sweep a window \f$w(x,y)\f$ (with displacements \f$u\f$
|
||||
in the x direction and \f$v\f$ in the right direction) \f$I\f$ and will calculate the variation of
|
||||
in the x direction and \f$v\f$ in the y direction) \f$I\f$ and will calculate the variation of
|
||||
intensity.
|
||||
|
||||
\f[E(u,v) = \sum _{x,y} w(x,y)[ I(x+u,y+v) - I(x,y)]^{2}\f]
|
||||
|
||||
@@ -58,6 +58,10 @@ As always, we would be happy to hear your comments and receive your contribution
|
||||
Ever wondered
|
||||
how your digital camera detects people's faces? Look here to find out!
|
||||
|
||||
- @subpage tutorial_table_of_content_dnn
|
||||
|
||||
These tutorials show how to use dnn module effectively.
|
||||
|
||||
- @subpage tutorial_table_of_content_ml
|
||||
|
||||
Use the powerful
|
||||
|
||||
@@ -237,7 +237,8 @@ enum { SOLVEPNP_ITERATIVE = 0,
|
||||
SOLVEPNP_P3P = 2, //!< Complete Solution Classification for the Perspective-Three-Point Problem @cite gao2003complete
|
||||
SOLVEPNP_DLS = 3, //!< A Direct Least-Squares (DLS) Method for PnP @cite hesch2011direct
|
||||
SOLVEPNP_UPNP = 4, //!< Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation @cite penate2013exhaustive
|
||||
SOLVEPNP_AP3P = 5 //!< An Efficient Algebraic Solution to the Perspective-Three-Point Problem @cite Ke17
|
||||
SOLVEPNP_AP3P = 5, //!< An Efficient Algebraic Solution to the Perspective-Three-Point Problem @cite Ke17
|
||||
SOLVEPNP_MAX_COUNT //!< Used for count
|
||||
};
|
||||
|
||||
enum { CALIB_CB_ADAPTIVE_THRESH = 1,
|
||||
@@ -627,6 +628,13 @@ makes the function resistant to outliers.
|
||||
@note
|
||||
- An example of how to use solvePNPRansac for object detection can be found at
|
||||
opencv_source_code/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/
|
||||
- The default method used to estimate the camera pose for the Minimal Sample Sets step
|
||||
is #SOLVEPNP_EPNP. Exceptions are:
|
||||
- if you choose #SOLVEPNP_P3P or #SOLVEPNP_AP3P, these methods will be used.
|
||||
- if the number of input points is equal to 4, #SOLVEPNP_P3P is used.
|
||||
- The method used to estimate the camera pose using all the inliers is defined by the
|
||||
flags parameters unless it is equal to #SOLVEPNP_P3P or #SOLVEPNP_AP3P. In this case,
|
||||
the method #SOLVEPNP_EPNP will be used instead.
|
||||
*/
|
||||
CV_EXPORTS_W bool solvePnPRansac( InputArray objectPoints, InputArray imagePoints,
|
||||
InputArray cameraMatrix, InputArray distCoeffs,
|
||||
|
||||
@@ -1518,7 +1518,7 @@ static double cvCalibrateCamera2Internal( const CvMat* objectPoints,
|
||||
mask[ 5] = !(flags & CALIB_FIX_K2);
|
||||
if( flags & CALIB_FIX_TANGENT_DIST )
|
||||
{
|
||||
mask[6] = mask[7] = 1;
|
||||
mask[6] = mask[7] = 0;
|
||||
}
|
||||
mask[ 8] = !(flags & CALIB_FIX_K3);
|
||||
mask[ 9] = !(flags & CALIB_FIX_K4);
|
||||
@@ -2780,15 +2780,16 @@ void cv::reprojectImageTo3D( InputArray _disparity,
|
||||
Mat _3dImage = __3dImage.getMat();
|
||||
|
||||
const double bigZ = 10000.;
|
||||
double q[4][4];
|
||||
Mat _Q(4, 4, CV_64F, q);
|
||||
Matx44d _Q;
|
||||
Q.convertTo(_Q, CV_64F);
|
||||
|
||||
int x, cols = disparity.cols;
|
||||
CV_Assert( cols >= 0 );
|
||||
|
||||
std::vector<float> _sbuf(cols+1), _dbuf(cols*3+1);
|
||||
float* sbuf = &_sbuf[0], *dbuf = &_dbuf[0];
|
||||
std::vector<float> _sbuf(cols);
|
||||
std::vector<Vec3f> _dbuf(cols);
|
||||
float* sbuf = &_sbuf[0];
|
||||
Vec3f* dbuf = &_dbuf[0];
|
||||
double minDisparity = FLT_MAX;
|
||||
|
||||
// NOTE: here we quietly assume that at least one pixel in the disparity map is not defined.
|
||||
@@ -2798,9 +2799,8 @@ void cv::reprojectImageTo3D( InputArray _disparity,
|
||||
|
||||
for( int y = 0; y < disparity.rows; y++ )
|
||||
{
|
||||
float *sptr = sbuf, *dptr = dbuf;
|
||||
double qx = q[0][1]*y + q[0][3], qy = q[1][1]*y + q[1][3];
|
||||
double qz = q[2][1]*y + q[2][3], qw = q[3][1]*y + q[3][3];
|
||||
float* sptr = sbuf;
|
||||
Vec3f* dptr = dbuf;
|
||||
|
||||
if( stype == CV_8UC1 )
|
||||
{
|
||||
@@ -2821,42 +2821,36 @@ void cv::reprojectImageTo3D( InputArray _disparity,
|
||||
sptr[x] = (float)sptr0[x];
|
||||
}
|
||||
else
|
||||
sptr = (float*)disparity.ptr<float>(y);
|
||||
sptr = disparity.ptr<float>(y);
|
||||
|
||||
if( dtype == CV_32FC3 )
|
||||
dptr = _3dImage.ptr<float>(y);
|
||||
dptr = _3dImage.ptr<Vec3f>(y);
|
||||
|
||||
for( x = 0; x < cols; x++, qx += q[0][0], qy += q[1][0], qz += q[2][0], qw += q[3][0] )
|
||||
for( x = 0; x < cols; x++)
|
||||
{
|
||||
double d = sptr[x];
|
||||
double iW = 1./(qw + q[3][2]*d);
|
||||
double X = (qx + q[0][2]*d)*iW;
|
||||
double Y = (qy + q[1][2]*d)*iW;
|
||||
double Z = (qz + q[2][2]*d)*iW;
|
||||
if( fabs(d-minDisparity) <= FLT_EPSILON )
|
||||
Z = bigZ;
|
||||
Vec4d homg_pt = _Q*Vec4d(x, y, d, 1.0);
|
||||
dptr[x] = Vec3d(homg_pt.val);
|
||||
dptr[x] /= homg_pt[3];
|
||||
|
||||
dptr[x*3] = (float)X;
|
||||
dptr[x*3+1] = (float)Y;
|
||||
dptr[x*3+2] = (float)Z;
|
||||
if( fabs(d-minDisparity) <= FLT_EPSILON )
|
||||
dptr[x][2] = bigZ;
|
||||
}
|
||||
|
||||
if( dtype == CV_16SC3 )
|
||||
{
|
||||
short* dptr0 = _3dImage.ptr<short>(y);
|
||||
for( x = 0; x < cols*3; x++ )
|
||||
Vec3s* dptr0 = _3dImage.ptr<Vec3s>(y);
|
||||
for( x = 0; x < cols; x++ )
|
||||
{
|
||||
int ival = cvRound(dptr[x]);
|
||||
dptr0[x] = cv::saturate_cast<short>(ival);
|
||||
dptr0[x] = dptr[x];
|
||||
}
|
||||
}
|
||||
else if( dtype == CV_32SC3 )
|
||||
{
|
||||
int* dptr0 = _3dImage.ptr<int>(y);
|
||||
for( x = 0; x < cols*3; x++ )
|
||||
Vec3i* dptr0 = _3dImage.ptr<Vec3i>(y);
|
||||
for( x = 0; x < cols; x++ )
|
||||
{
|
||||
int ival = cvRound(dptr[x]);
|
||||
dptr0[x] = ival;
|
||||
dptr0[x] = dptr[x];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints,
|
||||
ipoints = ipoints0;
|
||||
|
||||
int npoints = std::max(opoints.checkVector(3, CV_32F), opoints.checkVector(3, CV_64F));
|
||||
CV_Assert( npoints >= 0 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F)) );
|
||||
CV_Assert( npoints >= 4 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F)) );
|
||||
|
||||
CV_Assert(opoints.isContinuous());
|
||||
CV_Assert(opoints.depth() == CV_32F || opoints.depth() == CV_64F);
|
||||
@@ -279,6 +279,31 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints,
|
||||
ransac_kernel_method = SOLVEPNP_P3P;
|
||||
}
|
||||
|
||||
if( model_points == npoints )
|
||||
{
|
||||
bool result = solvePnP(opoints, ipoints, cameraMatrix, distCoeffs, _rvec, _tvec, useExtrinsicGuess, ransac_kernel_method);
|
||||
|
||||
if(!result)
|
||||
{
|
||||
if( _inliers.needed() )
|
||||
_inliers.release();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(_inliers.needed())
|
||||
{
|
||||
_inliers.create(npoints, 1, CV_32S);
|
||||
Mat _local_inliers = _inliers.getMat();
|
||||
for(int i = 0; i < npoints; i++)
|
||||
{
|
||||
_local_inliers.at<int>(i) = i;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Ptr<PointSetRegistrator::Callback> cb; // pointer to callback
|
||||
cb = makePtr<PnPRansacCallback>( cameraMatrix, distCoeffs, ransac_kernel_method, useExtrinsicGuess, rvec, tvec);
|
||||
|
||||
@@ -293,26 +318,6 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints,
|
||||
int result = createRANSACPointSetRegistrator(cb, model_points,
|
||||
param1, param2, param3)->run(opoints, ipoints, _local_model, _mask_local_inliers);
|
||||
|
||||
if( result > 0 )
|
||||
{
|
||||
vector<Point3d> opoints_inliers;
|
||||
vector<Point2d> ipoints_inliers;
|
||||
opoints = opoints.reshape(3);
|
||||
ipoints = ipoints.reshape(2);
|
||||
opoints.convertTo(opoints_inliers, CV_64F);
|
||||
ipoints.convertTo(ipoints_inliers, CV_64F);
|
||||
|
||||
const uchar* mask = _mask_local_inliers.ptr<uchar>();
|
||||
int npoints1 = compressElems(&opoints_inliers[0], mask, 1, npoints);
|
||||
compressElems(&ipoints_inliers[0], mask, 1, npoints);
|
||||
|
||||
opoints_inliers.resize(npoints1);
|
||||
ipoints_inliers.resize(npoints1);
|
||||
result = solvePnP(opoints_inliers, ipoints_inliers, cameraMatrix,
|
||||
distCoeffs, rvec, tvec, false,
|
||||
(flags == SOLVEPNP_P3P || flags == SOLVEPNP_AP3P) ? SOLVEPNP_EPNP : flags) ? 1 : -1;
|
||||
}
|
||||
|
||||
if( result <= 0 || _local_model.rows <= 0)
|
||||
{
|
||||
_rvec.assign(rvec); // output rotation vector
|
||||
@@ -323,10 +328,38 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints,
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
vector<Point3d> opoints_inliers;
|
||||
vector<Point2d> ipoints_inliers;
|
||||
opoints = opoints.reshape(3);
|
||||
ipoints = ipoints.reshape(2);
|
||||
opoints.convertTo(opoints_inliers, CV_64F);
|
||||
ipoints.convertTo(ipoints_inliers, CV_64F);
|
||||
|
||||
const uchar* mask = _mask_local_inliers.ptr<uchar>();
|
||||
int npoints1 = compressElems(&opoints_inliers[0], mask, 1, npoints);
|
||||
compressElems(&ipoints_inliers[0], mask, 1, npoints);
|
||||
|
||||
opoints_inliers.resize(npoints1);
|
||||
ipoints_inliers.resize(npoints1);
|
||||
result = solvePnP(opoints_inliers, ipoints_inliers, cameraMatrix,
|
||||
distCoeffs, rvec, tvec, useExtrinsicGuess,
|
||||
(flags == SOLVEPNP_P3P || flags == SOLVEPNP_AP3P) ? SOLVEPNP_EPNP : flags) ? 1 : -1;
|
||||
|
||||
if( result <= 0 )
|
||||
{
|
||||
_rvec.assign(_local_model.col(0)); // output rotation vector
|
||||
_tvec.assign(_local_model.col(1)); // output translation vector
|
||||
|
||||
if( _inliers.needed() )
|
||||
_inliers.release();
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_rvec.assign(rvec); // output rotation vector
|
||||
_tvec.assign(tvec); // output translation vector
|
||||
}
|
||||
|
||||
if(_inliers.needed())
|
||||
|
||||
@@ -197,7 +197,7 @@ prefilterXSobel( const Mat& src, Mat& dst, int ftzero )
|
||||
{
|
||||
int x, y;
|
||||
const int OFS = 256*4, TABSZ = OFS*2 + 256;
|
||||
uchar tab[TABSZ];
|
||||
uchar tab[TABSZ] = { 0 };
|
||||
Size size = src.size();
|
||||
|
||||
for( x = 0; x < TABSZ; x++ )
|
||||
@@ -227,7 +227,7 @@ prefilterXSobel( const Mat& src, Mat& dst, int ftzero )
|
||||
v_int16x8 ftz2 = v_setall_s16((short)(ftzero*2));
|
||||
v_int16x8 z = v_setzero_s16();
|
||||
|
||||
for(; x <= size.width-8; x += 8 )
|
||||
for(; x <= (size.width - 1) - 8; x += 8 )
|
||||
{
|
||||
v_int16x8 s00 = v_reinterpret_as_s16(v_load_expand(srow0 + x + 1));
|
||||
v_int16x8 s01 = v_reinterpret_as_s16(v_load_expand(srow0 + x - 1));
|
||||
|
||||
@@ -61,22 +61,22 @@ public:
|
||||
eps[SOLVEPNP_DLS] = 1.0e-2;
|
||||
eps[SOLVEPNP_UPNP] = 1.0e-2;
|
||||
totalTestsCount = 10;
|
||||
pointsCount = 500;
|
||||
}
|
||||
~CV_solvePnPRansac_Test() {}
|
||||
protected:
|
||||
void generate3DPointCloud(vector<Point3f>& points, Point3f pmin = Point3f(-1,
|
||||
-1, 5), Point3f pmax = Point3f(1, 1, 10))
|
||||
void generate3DPointCloud(vector<Point3f>& points,
|
||||
Point3f pmin = Point3f(-1, -1, 5),
|
||||
Point3f pmax = Point3f(1, 1, 10))
|
||||
{
|
||||
const Point3f delta = pmax - pmin;
|
||||
RNG rng = ::theRNG(); // fix the seed to use "fixed" input 3D points
|
||||
|
||||
for (size_t i = 0; i < points.size(); i++)
|
||||
{
|
||||
Point3f p(float(rand()) / RAND_MAX, float(rand()) / RAND_MAX,
|
||||
float(rand()) / RAND_MAX);
|
||||
p.x *= delta.x;
|
||||
p.y *= delta.y;
|
||||
p.z *= delta.z;
|
||||
p = p + pmin;
|
||||
points[i] = p;
|
||||
float _x = rng.uniform(pmin.x, pmax.x);
|
||||
float _y = rng.uniform(pmin.y, pmax.y);
|
||||
float _z = rng.uniform(pmin.z, pmax.z);
|
||||
points[i] = Point3f(_x, _y, _z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,8 +138,7 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
solvePnPRansac(points, projectedPoints, intrinsics, distCoeffs, rvec, tvec,
|
||||
false, 500, 0.5f, 0.99, inliers, method);
|
||||
solvePnPRansac(points, projectedPoints, intrinsics, distCoeffs, rvec, tvec, false, pointsCount, 0.5f, 0.99, inliers, method);
|
||||
|
||||
bool isTestSuccess = inliers.size() >= points.size()*0.95;
|
||||
|
||||
@@ -158,26 +157,25 @@ protected:
|
||||
ts->set_failed_test_info(cvtest::TS::OK);
|
||||
|
||||
vector<Point3f> points, points_dls;
|
||||
const int pointsCount = 500;
|
||||
points.resize(pointsCount);
|
||||
generate3DPointCloud(points);
|
||||
|
||||
const int methodsCount = 6;
|
||||
RNG rng = ts->get_rng();
|
||||
|
||||
|
||||
for (int mode = 0; mode < 2; mode++)
|
||||
{
|
||||
for (int method = 0; method < methodsCount; method++)
|
||||
for (int method = 0; method < SOLVEPNP_MAX_COUNT; method++)
|
||||
{
|
||||
double maxError = 0;
|
||||
int successfulTestsCount = 0;
|
||||
for (int testIndex = 0; testIndex < totalTestsCount; testIndex++)
|
||||
{
|
||||
if (runTest(rng, mode, method, points, eps, maxError))
|
||||
{
|
||||
successfulTestsCount++;
|
||||
}
|
||||
}
|
||||
//cout << maxError << " " << successfulTestsCount << endl;
|
||||
if (successfulTestsCount < 0.7*totalTestsCount)
|
||||
{
|
||||
ts->printf( cvtest::TS::LOG, "Invalid accuracy for method %d, failed %d tests from %d, maximum error equals %f, distortion mode equals %d\n",
|
||||
@@ -190,8 +188,9 @@ protected:
|
||||
}
|
||||
}
|
||||
}
|
||||
double eps[6];
|
||||
double eps[SOLVEPNP_MAX_COUNT];
|
||||
int totalTestsCount;
|
||||
int pointsCount;
|
||||
};
|
||||
|
||||
class CV_solvePnP_Test : public CV_solvePnPRansac_Test
|
||||
@@ -201,7 +200,7 @@ public:
|
||||
{
|
||||
eps[SOLVEPNP_ITERATIVE] = 1.0e-6;
|
||||
eps[SOLVEPNP_EPNP] = 1.0e-6;
|
||||
eps[SOLVEPNP_P3P] = 1.0e-4;
|
||||
eps[SOLVEPNP_P3P] = 2.0e-4;
|
||||
eps[SOLVEPNP_AP3P] = 1.0e-4;
|
||||
eps[SOLVEPNP_DLS] = 1.0e-4;
|
||||
eps[SOLVEPNP_UPNP] = 1.0e-4;
|
||||
@@ -216,38 +215,53 @@ protected:
|
||||
Mat trueRvec, trueTvec;
|
||||
Mat intrinsics, distCoeffs;
|
||||
generateCameraMatrix(intrinsics, rng);
|
||||
if (method == 4) intrinsics.at<double>(1,1) = intrinsics.at<double>(0,0);
|
||||
if (method == SOLVEPNP_DLS)
|
||||
{
|
||||
intrinsics.at<double>(1,1) = intrinsics.at<double>(0,0);
|
||||
}
|
||||
if (mode == 0)
|
||||
{
|
||||
distCoeffs = Mat::zeros(4, 1, CV_64FC1);
|
||||
}
|
||||
else
|
||||
{
|
||||
generateDistCoeffs(distCoeffs, rng);
|
||||
}
|
||||
generatePose(trueRvec, trueTvec, rng);
|
||||
|
||||
std::vector<Point3f> opoints;
|
||||
if (method == 2 || method == 5)
|
||||
switch(method)
|
||||
{
|
||||
opoints = std::vector<Point3f>(points.begin(), points.begin()+4);
|
||||
case SOLVEPNP_P3P:
|
||||
case SOLVEPNP_AP3P:
|
||||
opoints = std::vector<Point3f>(points.begin(), points.begin()+4);
|
||||
break;
|
||||
case SOLVEPNP_UPNP:
|
||||
opoints = std::vector<Point3f>(points.begin(), points.begin()+50);
|
||||
break;
|
||||
default:
|
||||
opoints = points;
|
||||
break;
|
||||
}
|
||||
else if(method == 3)
|
||||
{
|
||||
opoints = std::vector<Point3f>(points.begin(), points.begin()+50);
|
||||
}
|
||||
else
|
||||
opoints = points;
|
||||
|
||||
vector<Point2f> projectedPoints;
|
||||
projectedPoints.resize(opoints.size());
|
||||
projectPoints(Mat(opoints), trueRvec, trueTvec, intrinsics, distCoeffs, projectedPoints);
|
||||
|
||||
solvePnP(opoints, projectedPoints, intrinsics, distCoeffs, rvec, tvec,
|
||||
false, method);
|
||||
bool isEstimateSuccess = solvePnP(opoints, projectedPoints, intrinsics, distCoeffs, rvec, tvec, false, method);
|
||||
if (isEstimateSuccess == false)
|
||||
{
|
||||
return isEstimateSuccess;
|
||||
}
|
||||
|
||||
double rvecDiff = norm(rvec-trueRvec), tvecDiff = norm(tvec-trueTvec);
|
||||
bool isTestSuccess = rvecDiff < epsilon[method] && tvecDiff < epsilon[method];
|
||||
|
||||
double error = rvecDiff > tvecDiff ? rvecDiff : tvecDiff;
|
||||
if (error > maxError)
|
||||
{
|
||||
maxError = error;
|
||||
}
|
||||
|
||||
return isTestSuccess;
|
||||
}
|
||||
@@ -258,7 +272,7 @@ class CV_solveP3P_Test : public CV_solvePnPRansac_Test
|
||||
public:
|
||||
CV_solveP3P_Test()
|
||||
{
|
||||
eps[SOLVEPNP_P3P] = 1.0e-4;
|
||||
eps[SOLVEPNP_P3P] = 2.0e-4;
|
||||
eps[SOLVEPNP_AP3P] = 1.0e-4;
|
||||
totalTestsCount = 1000;
|
||||
}
|
||||
@@ -311,12 +325,11 @@ class CV_solveP3P_Test : public CV_solvePnPRansac_Test
|
||||
ts->set_failed_test_info(cvtest::TS::OK);
|
||||
|
||||
vector<Point3f> points, points_dls;
|
||||
const int pointsCount = 500;
|
||||
points.resize(pointsCount);
|
||||
generate3DPointCloud(points);
|
||||
|
||||
const int methodsCount = 2;
|
||||
int methods[methodsCount] = {SOLVEPNP_P3P, SOLVEPNP_AP3P};
|
||||
int methods[] = {SOLVEPNP_P3P, SOLVEPNP_AP3P};
|
||||
RNG rng = ts->get_rng();
|
||||
|
||||
for (int mode = 0; mode < 2; mode++)
|
||||
@@ -330,7 +343,6 @@ class CV_solveP3P_Test : public CV_solvePnPRansac_Test
|
||||
if (runTest(rng, mode, methods[method], points, eps, maxError))
|
||||
successfulTestsCount++;
|
||||
}
|
||||
//cout << maxError << " " << successfulTestsCount << endl;
|
||||
if (successfulTestsCount < 0.7*totalTestsCount)
|
||||
{
|
||||
ts->printf( cvtest::TS::LOG, "Invalid accuracy for method %d, failed %d tests from %d, maximum error equals %f, distortion mode equals %d\n",
|
||||
|
||||
@@ -29,16 +29,13 @@ CV_UndistortTest::~CV_UndistortTest() {}
|
||||
|
||||
void CV_UndistortTest::generate3DPointCloud(vector<Point3f>& points, Point3f pmin, Point3f pmax)
|
||||
{
|
||||
const Point3f delta = pmax - pmin;
|
||||
RNG rng_Point = ::theRNG(); // fix the seed to use "fixed" input 3D points
|
||||
for (size_t i = 0; i < points.size(); i++)
|
||||
{
|
||||
Point3f p(float(rand()) / RAND_MAX, float(rand()) / RAND_MAX,
|
||||
float(rand()) / RAND_MAX);
|
||||
p.x *= delta.x;
|
||||
p.y *= delta.y;
|
||||
p.z *= delta.z;
|
||||
p = p + pmin;
|
||||
points[i] = p;
|
||||
float _x = rng_Point.uniform(pmin.x, pmax.x);
|
||||
float _y = rng_Point.uniform(pmin.y, pmax.y);
|
||||
float _z = rng_Point.uniform(pmin.z, pmax.z);
|
||||
points[i] = Point3f(_x, _y, _z);
|
||||
}
|
||||
}
|
||||
void CV_UndistortTest::generateCameraMatrix(Mat& cameraMatrix)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
set(the_description "The Core Functionality")
|
||||
|
||||
ocv_add_dispatched_file(mathfuncs_core SSE2 AVX AVX2)
|
||||
ocv_add_dispatched_file(stat SSE4_2 AVX2)
|
||||
|
||||
ocv_add_module(core
|
||||
"${OPENCV_HAL_LINKER_LIBS}"
|
||||
@@ -44,6 +45,16 @@ endif()
|
||||
if(ITT_INCLUDE_DIRS)
|
||||
ocv_module_include_directories(${ITT_INCLUDE_DIRS})
|
||||
endif()
|
||||
if(HAVE_POSIX_MEMALIGN)
|
||||
ocv_append_sourge_file_compile_definitions(${CMAKE_CURRENT_SOURCE_DIR}/src/alloc.cpp "HAVE_POSIX_MEMALIGN=1")
|
||||
endif()
|
||||
if(HAVE_MALLOC_H)
|
||||
ocv_append_sourge_file_compile_definitions(${CMAKE_CURRENT_SOURCE_DIR}/src/alloc.cpp "HAVE_MALLOC_H=1")
|
||||
endif()
|
||||
if(HAVE_MEMALIGN)
|
||||
ocv_append_sourge_file_compile_definitions(${CMAKE_CURRENT_SOURCE_DIR}/src/alloc.cpp "HAVE_MEMALIGN=1")
|
||||
endif()
|
||||
|
||||
ocv_create_module(${extra_libs})
|
||||
|
||||
ocv_target_link_libraries(${the_module}
|
||||
|
||||
@@ -273,6 +273,9 @@ of p and len.
|
||||
*/
|
||||
CV_EXPORTS_W int borderInterpolate(int p, int len, int borderType);
|
||||
|
||||
/** @example copyMakeBorder_demo.cpp
|
||||
An example using copyMakeBorder function
|
||||
*/
|
||||
/** @brief Forms a border around an image.
|
||||
|
||||
The function copies the source image into the middle of the destination image. The areas to the
|
||||
@@ -471,6 +474,9 @@ The function can also be emulated with a matrix expression, for example:
|
||||
*/
|
||||
CV_EXPORTS_W void scaleAdd(InputArray src1, double alpha, InputArray src2, OutputArray dst);
|
||||
|
||||
/** @example AddingImagesTrackbar.cpp
|
||||
|
||||
*/
|
||||
/** @brief Calculates the weighted sum of two arrays.
|
||||
|
||||
The function addWeighted calculates the weighted sum of two arrays as follows:
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
#ifndef OPENCV_CORE_BUFFER_POOL_HPP
|
||||
#define OPENCV_CORE_BUFFER_POOL_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4265)
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
@@ -28,4 +33,8 @@ public:
|
||||
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // OPENCV_CORE_BUFFER_POOL_HPP
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
# define CV_FMA3 1
|
||||
#endif
|
||||
|
||||
#if (defined WIN32 || defined _WIN32) && defined(_M_ARM)
|
||||
#if defined _WIN32 && defined(_M_ARM)
|
||||
# include <Intrin.h>
|
||||
# include <arm_neon.h>
|
||||
# define CV_NEON 1
|
||||
@@ -111,18 +111,24 @@ struct VZeroUpperGuard {
|
||||
#define __CV_AVX_GUARD VZeroUpperGuard __vzeroupper_guard; (void)__vzeroupper_guard;
|
||||
#endif
|
||||
|
||||
#ifdef __CV_AVX_GUARD
|
||||
#define CV_AVX_GUARD __CV_AVX_GUARD
|
||||
#else
|
||||
#define CV_AVX_GUARD
|
||||
#endif
|
||||
|
||||
#endif // __OPENCV_BUILD
|
||||
|
||||
|
||||
|
||||
#if !defined __OPENCV_BUILD // Compatibility code
|
||||
|
||||
#if !defined __OPENCV_BUILD /* Compatibility code */ \
|
||||
&& !defined __CUDACC__ /* do not include SSE/AVX/NEON headers for NVCC compiler */
|
||||
#if defined __SSE2__ || defined _M_X64 || (defined _M_IX86_FP && _M_IX86_FP >= 2)
|
||||
# include <emmintrin.h>
|
||||
# define CV_MMX 1
|
||||
# define CV_SSE 1
|
||||
# define CV_SSE2 1
|
||||
#elif (defined WIN32 || defined _WIN32) && defined(_M_ARM)
|
||||
#elif defined _WIN32 && defined(_M_ARM)
|
||||
# include <Intrin.h>
|
||||
# include <arm_neon.h>
|
||||
# define CV_NEON 1
|
||||
@@ -131,7 +137,7 @@ struct VZeroUpperGuard {
|
||||
# define CV_NEON 1
|
||||
#endif
|
||||
|
||||
#endif // !__OPENCV_BUILD (Compatibility code)
|
||||
#endif // !__OPENCV_BUILD && !__CUDACC (Compatibility code)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ Cv64suf;
|
||||
# define DISABLE_OPENCV_24_COMPATIBILITY
|
||||
#endif
|
||||
|
||||
#if (defined WIN32 || defined _WIN32 || defined WINCE || defined __CYGWIN__) && defined CVAPI_EXPORTS
|
||||
#if (defined _WIN32 || defined WINCE || defined __CYGWIN__) && defined CVAPI_EXPORTS
|
||||
# define CV_EXPORTS __declspec(dllexport)
|
||||
#elif defined __GNUC__ && __GNUC__ >= 4
|
||||
# define CV_EXPORTS __attribute__ ((visibility ("default")))
|
||||
@@ -327,6 +327,17 @@ Cv64suf;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************************\
|
||||
* Thread sanitizer *
|
||||
\****************************************************************************************/
|
||||
#ifndef CV_THREAD_SANITIZER
|
||||
# if defined(__has_feature)
|
||||
# if __has_feature(thread_sanitizer)
|
||||
# define CV_THREAD_SANITIZER
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************************\
|
||||
* exchange-add operation for atomic operations on reference counters *
|
||||
\****************************************************************************************/
|
||||
@@ -374,13 +385,13 @@ Cv64suf;
|
||||
/****************************************************************************************\
|
||||
* C++ 11 *
|
||||
\****************************************************************************************/
|
||||
#ifndef CV_CXX_11
|
||||
# if __cplusplus >= 201103L || defined(_MSC_VER) && _MSC_VER >= 1600
|
||||
# define CV_CXX_11 1
|
||||
#ifndef CV_CXX11
|
||||
# if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||
# define CV_CXX11 1
|
||||
# endif
|
||||
#else
|
||||
# if CV_CXX_11 == 0
|
||||
# undef CV_CXX_11
|
||||
# if CV_CXX11 == 0
|
||||
# undef CV_CXX11
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -390,7 +401,7 @@ Cv64suf;
|
||||
\****************************************************************************************/
|
||||
|
||||
#ifndef CV_CXX_MOVE_SEMANTICS
|
||||
# if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER) && _MSC_VER >= 1600
|
||||
# if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_MSC_VER) && _MSC_VER >= 1600)
|
||||
# define CV_CXX_MOVE_SEMANTICS 1
|
||||
# elif defined(__clang)
|
||||
# if __has_feature(cxx_rvalue_references)
|
||||
|
||||
@@ -53,12 +53,9 @@
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
# include <string>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
// import useful primitives from stl
|
||||
#ifndef OPENCV_NOSTL_TRANSITIONAL
|
||||
# include <algorithm>
|
||||
# include <utility>
|
||||
# include <cstdlib> //for abs(int)
|
||||
@@ -81,21 +78,6 @@ namespace cv
|
||||
using std::log;
|
||||
}
|
||||
|
||||
#else
|
||||
namespace cv
|
||||
{
|
||||
template<typename T> static inline T min(T a, T b) { return a < b ? a : b; }
|
||||
template<typename T> static inline T max(T a, T b) { return a > b ? a : b; }
|
||||
template<typename T> static inline T abs(T a) { return a < 0 ? -a : a; }
|
||||
template<typename T> static inline void swap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
|
||||
|
||||
template<> inline uchar abs(uchar a) { return a; }
|
||||
template<> inline ushort abs(ushort a) { return a; }
|
||||
template<> inline unsigned abs(unsigned a) { return a; }
|
||||
template<> inline uint64 abs(uint64 a) { return a; }
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace cv {
|
||||
|
||||
//! @addtogroup core_utils
|
||||
@@ -555,7 +537,6 @@ public:
|
||||
|
||||
String toLowerCase() const;
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
String(const std::string& str);
|
||||
String(const std::string& str, size_t pos, size_t len = npos);
|
||||
String& operator=(const std::string& str);
|
||||
@@ -564,7 +545,6 @@ public:
|
||||
|
||||
friend String operator+ (const String& lhs, const std::string& rhs);
|
||||
friend String operator+ (const std::string& lhs, const String& rhs);
|
||||
#endif
|
||||
|
||||
private:
|
||||
char* cstr_;
|
||||
@@ -1049,21 +1029,10 @@ static inline bool operator>= (const String& lhs, const char* rhs) { return lh
|
||||
|
||||
} // cv
|
||||
|
||||
#ifndef OPENCV_NOSTL_TRANSITIONAL
|
||||
namespace std
|
||||
{
|
||||
static inline void swap(cv::String& a, cv::String& b) { a.swap(b); }
|
||||
}
|
||||
#else
|
||||
namespace cv
|
||||
{
|
||||
template<> inline
|
||||
void swap<cv::String>(cv::String& a, cv::String& b)
|
||||
{
|
||||
a.swap(b);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "opencv2/core/ptr.inl.hpp"
|
||||
|
||||
|
||||
@@ -44,10 +44,8 @@
|
||||
#ifndef OPENCV_CORE_CVSTDINL_HPP
|
||||
#define OPENCV_CORE_CVSTDINL_HPP
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
# include <complex>
|
||||
# include <ostream>
|
||||
#endif
|
||||
#include <complex>
|
||||
#include <ostream>
|
||||
|
||||
//! @cond IGNORED
|
||||
|
||||
@@ -58,7 +56,6 @@
|
||||
|
||||
namespace cv
|
||||
{
|
||||
#ifndef OPENCV_NOSTL
|
||||
|
||||
template<typename _Tp> class DataType< std::complex<_Tp> >
|
||||
{
|
||||
@@ -156,9 +153,7 @@ FileNode::operator std::string() const
|
||||
template<> inline
|
||||
void operator >> (const FileNode& n, std::string& value)
|
||||
{
|
||||
String val;
|
||||
read(n, val, val);
|
||||
value = val;
|
||||
read(n, value, std::string());
|
||||
}
|
||||
|
||||
template<> inline
|
||||
@@ -280,7 +275,6 @@ static inline std::ostream& operator << (std::ostream& out, const MatSize& msize
|
||||
return out;
|
||||
}
|
||||
|
||||
#endif // OPENCV_NOSTL
|
||||
} // cv
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
@@ -899,6 +899,15 @@ inline _Tpvec operator >= (const _Tpvec& a, const _Tpvec& b) \
|
||||
OPENCV_HAL_IMPL_SSE_FLT_CMP_OP(v_float32x4, ps)
|
||||
OPENCV_HAL_IMPL_SSE_FLT_CMP_OP(v_float64x2, pd)
|
||||
|
||||
#define OPENCV_HAL_IMPL_SSE_64BIT_CMP_OP(_Tpvec, cast) \
|
||||
inline _Tpvec operator == (const _Tpvec& a, const _Tpvec& b) \
|
||||
{ return cast(v_reinterpret_as_f64(a) == v_reinterpret_as_f64(b)); } \
|
||||
inline _Tpvec operator != (const _Tpvec& a, const _Tpvec& b) \
|
||||
{ return cast(v_reinterpret_as_f64(a) != v_reinterpret_as_f64(b)); }
|
||||
|
||||
OPENCV_HAL_IMPL_SSE_64BIT_CMP_OP(v_uint64x2, v_reinterpret_as_u64);
|
||||
OPENCV_HAL_IMPL_SSE_64BIT_CMP_OP(v_int64x2, v_reinterpret_as_s64);
|
||||
|
||||
OPENCV_HAL_IMPL_SSE_BIN_FUNC(v_uint8x16, v_add_wrap, _mm_add_epi8)
|
||||
OPENCV_HAL_IMPL_SSE_BIN_FUNC(v_int8x16, v_add_wrap, _mm_add_epi8)
|
||||
OPENCV_HAL_IMPL_SSE_BIN_FUNC(v_uint16x8, v_add_wrap, _mm_add_epi16)
|
||||
@@ -1520,6 +1529,35 @@ inline void v_load_deinterleave(const unsigned* ptr, v_uint32x4& a, v_uint32x4&
|
||||
v_transpose4x4(u0, u1, u2, u3, a, b, c, d);
|
||||
}
|
||||
|
||||
inline void v_load_deinterleave(const uint64 *ptr, v_uint64x2& a, v_uint64x2& b, v_uint64x2& c)
|
||||
{
|
||||
__m128i t0 = _mm_loadu_si128((const __m128i*)ptr);
|
||||
__m128i t1 = _mm_loadu_si128((const __m128i*)(ptr + 2));
|
||||
__m128i t2 = _mm_loadu_si128((const __m128i*)(ptr + 4));
|
||||
|
||||
a = v_uint64x2(_mm_unpacklo_epi64(t0, _mm_unpackhi_epi64(t1, t1)));
|
||||
b = v_uint64x2(_mm_unpacklo_epi64(_mm_unpackhi_epi64(t0, t0), t2));
|
||||
c = v_uint64x2(_mm_unpacklo_epi64(t1, _mm_unpackhi_epi64(t2, t2)));
|
||||
}
|
||||
|
||||
inline void v_load_deinterleave(const int64 *ptr, v_int64x2& a, v_int64x2& b, v_int64x2& c)
|
||||
{
|
||||
v_uint64x2 t0, t1, t2;
|
||||
v_load_deinterleave((const uint64*)ptr, t0, t1, t2);
|
||||
a = v_reinterpret_as_s64(t0);
|
||||
b = v_reinterpret_as_s64(t1);
|
||||
c = v_reinterpret_as_s64(t2);
|
||||
}
|
||||
|
||||
inline void v_load_deinterleave(const double *ptr, v_float64x2& a, v_float64x2& b, v_float64x2& c)
|
||||
{
|
||||
v_uint64x2 t0, t1, t2;
|
||||
v_load_deinterleave((const uint64*)ptr, t0, t1, t2);
|
||||
a = v_reinterpret_as_f64(t0);
|
||||
b = v_reinterpret_as_f64(t1);
|
||||
c = v_reinterpret_as_f64(t2);
|
||||
}
|
||||
|
||||
// 2-channel, float only
|
||||
inline void v_load_deinterleave(const float* ptr, v_float32x4& a, v_float32x4& b)
|
||||
{
|
||||
@@ -1717,6 +1755,27 @@ inline void v_store_interleave(float* ptr, const v_float32x4& a, const v_float32
|
||||
_mm_storeu_ps((ptr + 4), u1);
|
||||
}
|
||||
|
||||
inline void v_store_interleave(uint64 *ptr, const v_uint64x2& a, const v_uint64x2& b, const v_uint64x2& c)
|
||||
{
|
||||
__m128i t0 = _mm_unpacklo_epi64(a.val, b.val);
|
||||
__m128i t1 = _mm_unpacklo_epi64(c.val, _mm_unpackhi_epi64(a.val, a.val));
|
||||
__m128i t2 = _mm_unpackhi_epi64(b.val, c.val);
|
||||
|
||||
_mm_storeu_si128((__m128i*)ptr, t0);
|
||||
_mm_storeu_si128((__m128i*)(ptr + 2), t1);
|
||||
_mm_storeu_si128((__m128i*)(ptr + 4), t2);
|
||||
}
|
||||
|
||||
inline void v_store_interleave(int64 *ptr, const v_int64x2& a, const v_int64x2& b, const v_int64x2& c)
|
||||
{
|
||||
v_store_interleave((uint64*)ptr, v_reinterpret_as_u64(a), v_reinterpret_as_u64(b), v_reinterpret_as_u64(c));
|
||||
}
|
||||
|
||||
inline void v_store_interleave(double *ptr, const v_float64x2& a, const v_float64x2& b, const v_float64x2& c)
|
||||
{
|
||||
v_store_interleave((uint64*)ptr, v_reinterpret_as_u64(a), v_reinterpret_as_u64(b), v_reinterpret_as_u64(c));
|
||||
}
|
||||
|
||||
#define OPENCV_HAL_IMPL_SSE_LOADSTORE_INTERLEAVE(_Tpvec, _Tp, suffix, _Tpuvec, _Tpu, usuffix) \
|
||||
inline void v_load_deinterleave( const _Tp* ptr, _Tpvec& a0, \
|
||||
_Tpvec& b0, _Tpvec& c0 ) \
|
||||
|
||||
@@ -985,6 +985,12 @@ public:
|
||||
*/
|
||||
template<typename _Tp> explicit Mat(const std::vector<_Tp>& vec, bool copyData=false);
|
||||
|
||||
#ifdef CV_CXX11
|
||||
/** @overload
|
||||
*/
|
||||
template<typename _Tp> explicit Mat(const std::initializer_list<_Tp> list);
|
||||
#endif
|
||||
|
||||
#ifdef CV_CXX_STD_ARRAY
|
||||
/** @overload
|
||||
*/
|
||||
@@ -1466,7 +1472,7 @@ public:
|
||||
*/
|
||||
void release();
|
||||
|
||||
//! deallocates the matrix data
|
||||
//! internal use function, consider to use 'release' method instead; deallocates the matrix data
|
||||
void deallocate();
|
||||
//! internal use function; properly re-allocates _size, _step arrays
|
||||
void copySize(const Mat& m);
|
||||
@@ -2174,6 +2180,10 @@ public:
|
||||
explicit Mat_(const Point3_<typename DataType<_Tp>::channel_type>& pt, bool copyData=true);
|
||||
explicit Mat_(const MatCommaInitializer_<_Tp>& commaInitializer);
|
||||
|
||||
#ifdef CV_CXX11
|
||||
Mat_(std::initializer_list<_Tp> values);
|
||||
#endif
|
||||
|
||||
#ifdef CV_CXX_STD_ARRAY
|
||||
template <std::size_t _Nm> explicit Mat_(const std::array<_Tp, _Nm>& arr, bool copyData=false);
|
||||
#endif
|
||||
@@ -2973,9 +2983,7 @@ public:
|
||||
typedef const uchar** pointer;
|
||||
typedef uchar* reference;
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
#endif
|
||||
|
||||
//! default constructor
|
||||
MatConstIterator();
|
||||
@@ -3040,9 +3048,7 @@ public:
|
||||
typedef const _Tp* pointer;
|
||||
typedef const _Tp& reference;
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
#endif
|
||||
|
||||
//! default constructor
|
||||
MatConstIterator_();
|
||||
@@ -3093,9 +3099,7 @@ public:
|
||||
typedef _Tp* pointer;
|
||||
typedef _Tp& reference;
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
#endif
|
||||
|
||||
//! the default constructor
|
||||
MatIterator_();
|
||||
@@ -3229,9 +3233,7 @@ template<typename _Tp> class SparseMatConstIterator_ : public SparseMatConstIter
|
||||
{
|
||||
public:
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
#endif
|
||||
|
||||
//! the default constructor
|
||||
SparseMatConstIterator_();
|
||||
@@ -3265,9 +3267,7 @@ template<typename _Tp> class SparseMatIterator_ : public SparseMatConstIterator_
|
||||
{
|
||||
public:
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
#endif
|
||||
|
||||
//! the default constructor
|
||||
SparseMatIterator_();
|
||||
|
||||
@@ -574,6 +574,18 @@ Mat::Mat(const std::vector<_Tp>& vec, bool copyData)
|
||||
Mat((int)vec.size(), 1, DataType<_Tp>::type, (uchar*)&vec[0]).copyTo(*this);
|
||||
}
|
||||
|
||||
#ifdef CV_CXX11
|
||||
template<typename _Tp> inline
|
||||
Mat::Mat(const std::initializer_list<_Tp> list)
|
||||
: flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows((int)list.size()),
|
||||
cols(1), data(0), datastart(0), dataend(0), datalimit(0), allocator(0), u(0), size(&rows), step(0)
|
||||
{
|
||||
if(list.size() == 0)
|
||||
return;
|
||||
Mat((int)list.size(), 1, DataType<_Tp>::type, (uchar*)list.begin()).copyTo(*this);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CV_CXX_STD_ARRAY
|
||||
template<typename _Tp, std::size_t _Nm> inline
|
||||
Mat::Mat(const std::array<_Tp, _Nm>& arr, bool copyData)
|
||||
@@ -1577,6 +1589,13 @@ Mat_<_Tp>::Mat_(const std::vector<_Tp>& vec, bool copyData)
|
||||
: Mat(vec, copyData)
|
||||
{}
|
||||
|
||||
#ifdef CV_CXX11
|
||||
template<typename _Tp> inline
|
||||
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
|
||||
: Mat(list)
|
||||
{}
|
||||
#endif
|
||||
|
||||
#ifdef CV_CXX_STD_ARRAY
|
||||
template<typename _Tp> template<std::size_t _Nm> inline
|
||||
Mat_<_Tp>::Mat_(const std::array<_Tp, _Nm>& arr, bool copyData)
|
||||
|
||||
@@ -53,6 +53,10 @@
|
||||
#include "opencv2/core/traits.hpp"
|
||||
#include "opencv2/core/saturate.hpp"
|
||||
|
||||
#ifdef CV_CXX11
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
@@ -77,12 +81,21 @@ If you need a more flexible type, use Mat . The elements of the matrix M are acc
|
||||
M(i,j) notation. Most of the common matrix operations (see also @ref MatrixExpressions ) are
|
||||
available. To do an operation on Matx that is not implemented, you can easily convert the matrix to
|
||||
Mat and backwards:
|
||||
@code
|
||||
@code{.cpp}
|
||||
Matx33f m(1, 2, 3,
|
||||
4, 5, 6,
|
||||
7, 8, 9);
|
||||
cout << sum(Mat(m*m.t())) << endl;
|
||||
@endcode
|
||||
@endcode
|
||||
Except of the plain constructor which takes a list of elements, Matx can be initialized from a C-array:
|
||||
@code{.cpp}
|
||||
float values[] = { 1, 2, 3};
|
||||
Matx31f m(values);
|
||||
@endcode
|
||||
In case if C++11 features are avaliable, std::initializer_list can be also used to initizlize Matx:
|
||||
@code{.cpp}
|
||||
Matx31f m = { 1, 2, 3};
|
||||
@endcode
|
||||
*/
|
||||
template<typename _Tp, int m, int n> class Matx
|
||||
{
|
||||
@@ -125,6 +138,10 @@ public:
|
||||
_Tp v12, _Tp v13, _Tp v14, _Tp v15); //!< 1x16, 4x4 or 16x1 matrix
|
||||
explicit Matx(const _Tp* vals); //!< initialize from a plain array
|
||||
|
||||
#ifdef CV_CXX11
|
||||
Matx(std::initializer_list<_Tp>); //!< initialize from an initializer list
|
||||
#endif
|
||||
|
||||
static Matx all(_Tp alpha);
|
||||
static Matx zeros();
|
||||
static Matx ones();
|
||||
@@ -327,6 +344,10 @@ public:
|
||||
Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9, _Tp v10, _Tp v11, _Tp v12, _Tp v13); //!< 14-element vector constructor
|
||||
explicit Vec(const _Tp* values);
|
||||
|
||||
#ifdef CV_CXX11
|
||||
Vec(std::initializer_list<_Tp>);
|
||||
#endif
|
||||
|
||||
Vec(const Vec<_Tp, cn>& v);
|
||||
|
||||
static Vec all(_Tp alpha);
|
||||
@@ -616,6 +637,19 @@ Matx<_Tp, m, n>::Matx(const _Tp* values)
|
||||
for( int i = 0; i < channels; i++ ) val[i] = values[i];
|
||||
}
|
||||
|
||||
#ifdef CV_CXX11
|
||||
template<typename _Tp, int m, int n> inline
|
||||
Matx<_Tp, m, n>::Matx(std::initializer_list<_Tp> list)
|
||||
{
|
||||
CV_DbgAssert(list.size() == channels);
|
||||
int i = 0;
|
||||
for(const auto& elem : list)
|
||||
{
|
||||
val[i++] = elem;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename _Tp, int m, int n> inline
|
||||
Matx<_Tp, m, n> Matx<_Tp, m, n>::all(_Tp alpha)
|
||||
{
|
||||
@@ -957,6 +991,12 @@ template<typename _Tp, int cn> inline
|
||||
Vec<_Tp, cn>::Vec(const _Tp* values)
|
||||
: Matx<_Tp, cn, 1>(values) {}
|
||||
|
||||
#ifdef CV_CXX11
|
||||
template<typename _Tp, int cn> inline
|
||||
Vec<_Tp, cn>::Vec(std::initializer_list<_Tp> list)
|
||||
: Matx<_Tp, cn, 1>(list) {}
|
||||
#endif
|
||||
|
||||
template<typename _Tp, int cn> inline
|
||||
Vec<_Tp, cn>::Vec(const Vec<_Tp, cn>& m)
|
||||
: Matx<_Tp, cn, 1>(m.val) {}
|
||||
@@ -1081,7 +1121,7 @@ Vec<_Tp, cn> normalize(const Vec<_Tp, cn>& v)
|
||||
|
||||
|
||||
|
||||
//////////////////////////////// matx comma initializer //////////////////////////////////
|
||||
//////////////////////////////// vec comma initializer //////////////////////////////////
|
||||
|
||||
|
||||
template<typename _Tp, typename _T2, int cn> static inline
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#ifdef HAVE_CLAMDBLAS
|
||||
|
||||
#ifndef CL_RUNTIME_EXPORT
|
||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
|
||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
|
||||
#define CL_RUNTIME_EXPORT __declspec(dllimport)
|
||||
#else
|
||||
#define CL_RUNTIME_EXPORT
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#ifdef HAVE_CLAMDFFT
|
||||
|
||||
#ifndef CL_RUNTIME_EXPORT
|
||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
|
||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
|
||||
#define CL_RUNTIME_EXPORT __declspec(dllimport)
|
||||
#else
|
||||
#define CL_RUNTIME_EXPORT
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#else // HAVE_OPENCL_STATIC
|
||||
|
||||
#ifndef CL_RUNTIME_EXPORT
|
||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
|
||||
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined _WIN32 || defined WINCE)
|
||||
#define CL_RUNTIME_EXPORT __declspec(dllimport)
|
||||
#else
|
||||
#define CL_RUNTIME_EXPORT
|
||||
|
||||
@@ -462,6 +462,11 @@ public:
|
||||
*/
|
||||
static String getDefaultObjectName(const String& filename);
|
||||
|
||||
/** @brief Returns the current format.
|
||||
* @returns The current format, see FileStorage::Mode
|
||||
*/
|
||||
CV_WRAP int getFormat() const;
|
||||
|
||||
Ptr<CvFileStorage> fs; //!< the underlying C FileStorage structure
|
||||
String elname; //!< the currently written element
|
||||
std::vector<char> structs; //!< the stack of written structures
|
||||
@@ -570,9 +575,7 @@ public:
|
||||
operator double() const;
|
||||
//! returns the node content as text string
|
||||
operator String() const;
|
||||
#ifndef OPENCV_NOSTL
|
||||
operator std::string() const;
|
||||
#endif
|
||||
|
||||
//! returns pointer to the underlying file node
|
||||
CvFileNode* operator *();
|
||||
@@ -714,6 +717,7 @@ CV_EXPORTS void read(const FileNode& node, int& value, int default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, float& value, float default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, double& value, double default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, String& value, const String& default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, std::string& value, const std::string& default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, Mat& mat, const Mat& default_mat = Mat() );
|
||||
CV_EXPORTS void read(const FileNode& node, SparseMat& mat, const SparseMat& default_mat = SparseMat() );
|
||||
CV_EXPORTS void read(const FileNode& node, std::vector<KeyPoint>& keypoints);
|
||||
|
||||
@@ -301,6 +301,8 @@ public:
|
||||
Size_& operator = (const Size_& sz);
|
||||
//! the area (width*height)
|
||||
_Tp area() const;
|
||||
//! true if empty
|
||||
bool empty() const;
|
||||
|
||||
//! conversion of another data type.
|
||||
template<typename _Tp2> operator Size_<_Tp2>() const;
|
||||
@@ -400,6 +402,8 @@ public:
|
||||
Size_<_Tp> size() const;
|
||||
//! area (width*height) of the rectangle
|
||||
_Tp area() const;
|
||||
//! true if empty
|
||||
bool empty() const;
|
||||
|
||||
//! conversion to another data type
|
||||
template<typename _Tp2> operator Rect_<_Tp2>() const;
|
||||
@@ -1599,6 +1603,13 @@ _Tp Size_<_Tp>::area() const
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename _Tp> inline
|
||||
bool Size_<_Tp>::empty() const
|
||||
{
|
||||
return width <= 0 || height <= 0;
|
||||
}
|
||||
|
||||
|
||||
template<typename _Tp> static inline
|
||||
Size_<_Tp>& operator *= (Size_<_Tp>& a, _Tp b)
|
||||
{
|
||||
@@ -1741,6 +1752,12 @@ _Tp Rect_<_Tp>::area() const
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename _Tp> inline
|
||||
bool Rect_<_Tp>::empty() const
|
||||
{
|
||||
return width <= 0 || height <= 0;
|
||||
}
|
||||
|
||||
template<typename _Tp> template<typename _Tp2> inline
|
||||
Rect_<_Tp>::operator Rect_<_Tp2>() const
|
||||
{
|
||||
@@ -1803,12 +1820,17 @@ Rect_<_Tp>& operator &= ( Rect_<_Tp>& a, const Rect_<_Tp>& b )
|
||||
template<typename _Tp> static inline
|
||||
Rect_<_Tp>& operator |= ( Rect_<_Tp>& a, const Rect_<_Tp>& b )
|
||||
{
|
||||
_Tp x1 = std::min(a.x, b.x);
|
||||
_Tp y1 = std::min(a.y, b.y);
|
||||
a.width = std::max(a.x + a.width, b.x + b.width) - x1;
|
||||
a.height = std::max(a.y + a.height, b.y + b.height) - y1;
|
||||
a.x = x1;
|
||||
a.y = y1;
|
||||
if (a.empty()) {
|
||||
a = b;
|
||||
}
|
||||
else if (!b.empty()) {
|
||||
_Tp x1 = std::min(a.x, b.x);
|
||||
_Tp y1 = std::min(a.y, b.y);
|
||||
a.width = std::max(a.x + a.width, b.x + b.width) - x1;
|
||||
a.height = std::max(a.y + a.height, b.y + b.height) - y1;
|
||||
a.x = x1;
|
||||
a.y = y1;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
#ifdef HAVE_IPL
|
||||
# ifndef __IPL_H__
|
||||
# if defined WIN32 || defined _WIN32
|
||||
# if defined _WIN32
|
||||
# include <ipl.h>
|
||||
# else
|
||||
# include <ipl/ipl.h>
|
||||
@@ -65,7 +65,7 @@
|
||||
#include <float.h>
|
||||
#endif // SKIP_INCLUDES
|
||||
|
||||
#if defined WIN32 || defined _WIN32
|
||||
#if defined _WIN32
|
||||
# define CV_CDECL __cdecl
|
||||
# define CV_STDCALL __stdcall
|
||||
#else
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include "opencv2/core.hpp"
|
||||
#include <ostream>
|
||||
|
||||
#ifdef CV_CXX_11
|
||||
#ifdef CV_CXX11
|
||||
#include <functional>
|
||||
#endif
|
||||
|
||||
@@ -444,6 +444,23 @@ static inline size_t alignSize(size_t sz, int n)
|
||||
return (sz + n-1) & -n;
|
||||
}
|
||||
|
||||
/** @brief Integer division with result round up.
|
||||
|
||||
Use this function instead of `ceil((float)a / b)` expressions.
|
||||
|
||||
@sa alignSize
|
||||
*/
|
||||
static inline int divUp(int a, unsigned int b)
|
||||
{
|
||||
CV_DbgAssert(a >= 0);
|
||||
return (a + b - 1) / b;
|
||||
}
|
||||
/** @overload */
|
||||
static inline size_t divUp(size_t a, unsigned int b)
|
||||
{
|
||||
return (a + b - 1) / b;
|
||||
}
|
||||
|
||||
/** @brief Enables or disables the optimized code.
|
||||
|
||||
The function can be used to dynamically turn on and off optimized code (code that uses SSE2, AVX,
|
||||
@@ -482,7 +499,7 @@ public:
|
||||
*/
|
||||
CV_EXPORTS void parallel_for_(const Range& range, const ParallelLoopBody& body, double nstripes=-1.);
|
||||
|
||||
#ifdef CV_CXX_11
|
||||
#ifdef CV_CXX11
|
||||
class ParallelLoopBodyLambdaWrapper : public ParallelLoopBody
|
||||
{
|
||||
private:
|
||||
@@ -1022,7 +1039,6 @@ template<typename _Tp, size_t fixed_size> inline
|
||||
AutoBuffer<_Tp, fixed_size>::operator const _Tp* () const
|
||||
{ return ptr; }
|
||||
|
||||
#ifndef OPENCV_NOSTL
|
||||
template<> inline std::string CommandLineParser::get<std::string>(int index, bool space_delete) const
|
||||
{
|
||||
return get<String>(index, space_delete);
|
||||
@@ -1031,7 +1047,6 @@ template<> inline std::string CommandLineParser::get<std::string>(const String&
|
||||
{
|
||||
return get<String>(name, space_delete);
|
||||
}
|
||||
#endif // OPENCV_NOSTL
|
||||
|
||||
//! @endcond
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#define CV_VERSION_MAJOR 3
|
||||
#define CV_VERSION_MINOR 3
|
||||
#define CV_VERSION_REVISION 0
|
||||
#define CV_VERSION_STATUS "-cvsdk"
|
||||
#define CV_VERSION_STATUS ""
|
||||
|
||||
#define CVAUX_STR_EXP(__A) #__A
|
||||
#define CVAUX_STR(__A) CVAUX_STR_EXP(__A)
|
||||
|
||||
@@ -65,6 +65,10 @@ public class Rect {
|
||||
return width * height;
|
||||
}
|
||||
|
||||
public boolean empty() {
|
||||
return width <= 0 || height <= 0;
|
||||
}
|
||||
|
||||
public boolean contains(Point p) {
|
||||
return x <= p.x && p.x < x + width && y <= p.y && p.y < y + height;
|
||||
}
|
||||
|
||||
@@ -65,6 +65,10 @@ public class Rect2d {
|
||||
return width * height;
|
||||
}
|
||||
|
||||
public boolean empty() {
|
||||
return width <= 0 || height <= 0;
|
||||
}
|
||||
|
||||
public boolean contains(Point p) {
|
||||
return x <= p.x && p.x < x + width && y <= p.y && p.y < y + height;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ public class Size {
|
||||
return width * height;
|
||||
}
|
||||
|
||||
public boolean empty() {
|
||||
return width <= 0 || height <= 0;
|
||||
}
|
||||
|
||||
public Size clone() {
|
||||
return new Size(width, height);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,10 @@ using namespace perf;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::get;
|
||||
|
||||
#define HAMMING_NORM_SIZES cv::Size(640, 480), cv::Size(1920, 1080)
|
||||
#define HAMMING_NORM_TYPES CV_8UC1
|
||||
|
||||
CV_FLAGS(NormType, NORM_INF, NORM_L1, NORM_L2, NORM_TYPE_MASK, NORM_RELATIVE, NORM_MINMAX)
|
||||
CV_FLAGS(NormType, NORM_HAMMING2, NORM_HAMMING, NORM_INF, NORM_L1, NORM_L2, NORM_TYPE_MASK, NORM_RELATIVE, NORM_MINMAX)
|
||||
typedef std::tr1::tuple<Size, MatType, NormType> Size_MatType_NormType_t;
|
||||
typedef perf::TestBaseWithParam<Size_MatType_NormType_t> Size_MatType_NormType;
|
||||
|
||||
@@ -103,6 +105,60 @@ PERF_TEST_P(Size_MatType_NormType, norm2_mask,
|
||||
SANITY_CHECK(n, 1e-5, ERROR_RELATIVE);
|
||||
}
|
||||
|
||||
namespace {
|
||||
typedef std::tr1::tuple<NormType, MatType, Size> PerfHamming_t;
|
||||
typedef perf::TestBaseWithParam<PerfHamming_t> PerfHamming;
|
||||
|
||||
PERF_TEST_P(PerfHamming, norm,
|
||||
testing::Combine(
|
||||
testing::Values(NORM_HAMMING, NORM_HAMMING2),
|
||||
testing::Values(HAMMING_NORM_TYPES),
|
||||
testing::Values(HAMMING_NORM_SIZES)
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<2>(GetParam());
|
||||
int matType = get<1>(GetParam());
|
||||
int normType = get<0>(GetParam());
|
||||
|
||||
Mat src(sz, matType);
|
||||
double n;
|
||||
|
||||
declare.in(src, WARMUP_RNG);
|
||||
|
||||
TEST_CYCLE() n = norm(src, normType);
|
||||
|
||||
(void)n;
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
PERF_TEST_P(PerfHamming, norm2,
|
||||
testing::Combine(
|
||||
testing::Values(NORM_HAMMING, NORM_HAMMING2),
|
||||
testing::Values(HAMMING_NORM_TYPES),
|
||||
testing::Values(HAMMING_NORM_SIZES)
|
||||
)
|
||||
)
|
||||
{
|
||||
Size sz = get<2>(GetParam());
|
||||
int matType = get<1>(GetParam());
|
||||
int normType = get<0>(GetParam());
|
||||
|
||||
Mat src1(sz, matType);
|
||||
Mat src2(sz, matType);
|
||||
double n;
|
||||
|
||||
declare.in(src1, src2, WARMUP_RNG);
|
||||
|
||||
TEST_CYCLE() n = norm(src1, src2, normType);
|
||||
|
||||
(void)n;
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
PERF_TEST_P(Size_MatType_NormType, normalize,
|
||||
testing::Combine(
|
||||
testing::Values(TYPICAL_MAT_SIZES),
|
||||
|
||||
+25
-622
@@ -42,35 +42,50 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
#define CV_USE_SYSTEM_MALLOC 1
|
||||
#ifdef HAVE_POSIX_MEMALIGN
|
||||
#include <stdlib.h>
|
||||
#elif defined HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace cv {
|
||||
|
||||
static void* OutOfMemoryError(size_t size)
|
||||
{
|
||||
CV_Error_(CV_StsNoMem, ("Failed to allocate %lu bytes", (unsigned long)size));
|
||||
CV_Error_(CV_StsNoMem, ("Failed to allocate %llu bytes", (unsigned long long)size));
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if CV_USE_SYSTEM_MALLOC
|
||||
|
||||
#if defined WIN32 || defined _WIN32
|
||||
void deleteThreadAllocData() {}
|
||||
#endif
|
||||
|
||||
void* fastMalloc( size_t size )
|
||||
{
|
||||
#ifdef HAVE_POSIX_MEMALIGN
|
||||
void* ptr = NULL;
|
||||
if(posix_memalign(&ptr, CV_MALLOC_ALIGN, size))
|
||||
ptr = NULL;
|
||||
if(!ptr)
|
||||
return OutOfMemoryError(size);
|
||||
return ptr;
|
||||
#elif defined HAVE_MEMALIGN
|
||||
void* ptr = memalign(CV_MALLOC_ALIGN, size);
|
||||
if(!ptr)
|
||||
return OutOfMemoryError(size);
|
||||
return ptr;
|
||||
#else
|
||||
uchar* udata = (uchar*)malloc(size + sizeof(void*) + CV_MALLOC_ALIGN);
|
||||
if(!udata)
|
||||
return OutOfMemoryError(size);
|
||||
uchar** adata = alignPtr((uchar**)udata + 1, CV_MALLOC_ALIGN);
|
||||
adata[-1] = udata;
|
||||
return adata;
|
||||
#endif
|
||||
}
|
||||
|
||||
void fastFree(void* ptr)
|
||||
{
|
||||
#if defined HAVE_POSIX_MEMALIGN || defined HAVE_MEMALIGN
|
||||
free(ptr);
|
||||
#else
|
||||
if(ptr)
|
||||
{
|
||||
uchar* udata = ((uchar**)ptr)[-1];
|
||||
@@ -78,621 +93,10 @@ void fastFree(void* ptr)
|
||||
((uchar*)ptr - udata) <= (ptrdiff_t)(sizeof(void*)+CV_MALLOC_ALIGN));
|
||||
free(udata);
|
||||
}
|
||||
}
|
||||
|
||||
#else //CV_USE_SYSTEM_MALLOC
|
||||
|
||||
#if 0
|
||||
#define SANITY_CHECK(block) \
|
||||
CV_Assert(((size_t)(block) & (MEM_BLOCK_SIZE-1)) == 0 && \
|
||||
(unsigned)(block)->binIdx <= (unsigned)MAX_BIN && \
|
||||
(block)->signature == MEM_BLOCK_SIGNATURE)
|
||||
#else
|
||||
#define SANITY_CHECK(block)
|
||||
#endif
|
||||
|
||||
#define STAT(stmt)
|
||||
|
||||
#ifdef WIN32
|
||||
#if (_WIN32_WINNT >= 0x0602)
|
||||
#include <synchapi.h>
|
||||
#endif
|
||||
|
||||
struct CriticalSection
|
||||
{
|
||||
CriticalSection()
|
||||
{
|
||||
#if (_WIN32_WINNT >= 0x0600)
|
||||
InitializeCriticalSectionEx(&cs, 1000, 0);
|
||||
#else
|
||||
InitializeCriticalSection(&cs);
|
||||
#endif
|
||||
}
|
||||
~CriticalSection() { DeleteCriticalSection(&cs); }
|
||||
void lock() { EnterCriticalSection(&cs); }
|
||||
void unlock() { LeaveCriticalSection(&cs); }
|
||||
bool trylock() { return TryEnterCriticalSection(&cs) != 0; }
|
||||
|
||||
CRITICAL_SECTION cs;
|
||||
};
|
||||
|
||||
void* SystemAlloc(size_t size)
|
||||
{
|
||||
void* ptr = malloc(size);
|
||||
return ptr ? ptr : OutOfMemoryError(size);
|
||||
}
|
||||
|
||||
void SystemFree(void* ptr, size_t)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
#else //WIN32
|
||||
|
||||
#include <sys/mman.h>
|
||||
|
||||
struct CriticalSection
|
||||
{
|
||||
CriticalSection() { pthread_mutex_init(&mutex, 0); }
|
||||
~CriticalSection() { pthread_mutex_destroy(&mutex); }
|
||||
void lock() { pthread_mutex_lock(&mutex); }
|
||||
void unlock() { pthread_mutex_unlock(&mutex); }
|
||||
bool trylock() { return pthread_mutex_trylock(&mutex) == 0; }
|
||||
|
||||
pthread_mutex_t mutex;
|
||||
};
|
||||
|
||||
void* SystemAlloc(size_t size)
|
||||
{
|
||||
#ifndef MAP_ANONYMOUS
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
||||
#endif
|
||||
void* ptr = 0;
|
||||
ptr = mmap(ptr, size, (PROT_READ | PROT_WRITE), MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
|
||||
return ptr != MAP_FAILED ? ptr : OutOfMemoryError(size);
|
||||
}
|
||||
|
||||
void SystemFree(void* ptr, size_t size)
|
||||
{
|
||||
munmap(ptr, size);
|
||||
}
|
||||
#endif //WIN32
|
||||
|
||||
struct AutoLock
|
||||
{
|
||||
AutoLock(CriticalSection& _cs) : cs(&_cs) { cs->lock(); }
|
||||
~AutoLock() { cs->unlock(); }
|
||||
CriticalSection* cs;
|
||||
};
|
||||
|
||||
const size_t MEM_BLOCK_SIGNATURE = 0x01234567;
|
||||
const int MEM_BLOCK_SHIFT = 14;
|
||||
const size_t MEM_BLOCK_SIZE = 1 << MEM_BLOCK_SHIFT;
|
||||
const size_t HDR_SIZE = 128;
|
||||
const size_t MAX_BLOCK_SIZE = MEM_BLOCK_SIZE - HDR_SIZE;
|
||||
const int MAX_BIN = 28;
|
||||
|
||||
static const int binSizeTab[MAX_BIN+1] =
|
||||
{ 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 128, 160, 192, 256, 320, 384, 480, 544, 672, 768,
|
||||
896, 1056, 1328, 1600, 2688, 4048, 5408, 8128, 16256 };
|
||||
|
||||
struct MallocTables
|
||||
{
|
||||
void initBinTab()
|
||||
{
|
||||
int i, j = 0, n;
|
||||
for( i = 0; i <= MAX_BIN; i++ )
|
||||
{
|
||||
n = binSizeTab[i]>>3;
|
||||
for( ; j <= n; j++ )
|
||||
binIdx[j] = (uchar)i;
|
||||
}
|
||||
}
|
||||
int bin(size_t size)
|
||||
{
|
||||
assert( size <= MAX_BLOCK_SIZE );
|
||||
return binIdx[(size + 7)>>3];
|
||||
}
|
||||
|
||||
MallocTables()
|
||||
{
|
||||
initBinTab();
|
||||
}
|
||||
|
||||
uchar binIdx[MAX_BLOCK_SIZE/8+1];
|
||||
};
|
||||
|
||||
MallocTables mallocTables;
|
||||
|
||||
struct Node
|
||||
{
|
||||
Node* next;
|
||||
};
|
||||
|
||||
struct ThreadData;
|
||||
|
||||
struct Block
|
||||
{
|
||||
Block(Block* _next)
|
||||
{
|
||||
signature = MEM_BLOCK_SIGNATURE;
|
||||
prev = 0;
|
||||
next = _next;
|
||||
privateFreeList = publicFreeList = 0;
|
||||
bumpPtr = endPtr = 0;
|
||||
objSize = 0;
|
||||
threadData = 0;
|
||||
data = (uchar*)this + HDR_SIZE;
|
||||
}
|
||||
|
||||
~Block() {}
|
||||
|
||||
void init(Block* _prev, Block* _next, int _objSize, ThreadData* _threadData)
|
||||
{
|
||||
prev = _prev;
|
||||
if(prev)
|
||||
prev->next = this;
|
||||
next = _next;
|
||||
if(next)
|
||||
next->prev = this;
|
||||
objSize = _objSize;
|
||||
binIdx = mallocTables.bin(objSize);
|
||||
threadData = _threadData;
|
||||
privateFreeList = publicFreeList = 0;
|
||||
bumpPtr = data;
|
||||
int nobjects = MAX_BLOCK_SIZE/objSize;
|
||||
endPtr = bumpPtr + nobjects*objSize;
|
||||
almostEmptyThreshold = (nobjects + 1)/2;
|
||||
allocated = 0;
|
||||
}
|
||||
|
||||
bool isFilled() const { return allocated > almostEmptyThreshold; }
|
||||
|
||||
size_t signature;
|
||||
Block* prev;
|
||||
Block* next;
|
||||
Node* privateFreeList;
|
||||
Node* publicFreeList;
|
||||
uchar* bumpPtr;
|
||||
uchar* endPtr;
|
||||
uchar* data;
|
||||
ThreadData* threadData;
|
||||
int objSize;
|
||||
int binIdx;
|
||||
int allocated;
|
||||
int almostEmptyThreshold;
|
||||
CriticalSection cs;
|
||||
};
|
||||
|
||||
struct BigBlock
|
||||
{
|
||||
BigBlock(int bigBlockSize, BigBlock* _next)
|
||||
{
|
||||
first = alignPtr((Block*)(this+1), MEM_BLOCK_SIZE);
|
||||
next = _next;
|
||||
nblocks = (int)(((char*)this + bigBlockSize - (char*)first)/MEM_BLOCK_SIZE);
|
||||
Block* p = 0;
|
||||
for( int i = nblocks-1; i >= 0; i-- )
|
||||
p = ::new((uchar*)first + i*MEM_BLOCK_SIZE) Block(p);
|
||||
}
|
||||
|
||||
~BigBlock()
|
||||
{
|
||||
for( int i = nblocks-1; i >= 0; i-- )
|
||||
((Block*)((uchar*)first+i*MEM_BLOCK_SIZE))->~Block();
|
||||
}
|
||||
|
||||
BigBlock* next;
|
||||
Block* first;
|
||||
int nblocks;
|
||||
};
|
||||
|
||||
struct BlockPool
|
||||
{
|
||||
BlockPool(int _bigBlockSize=1<<20) : pool(0), bigBlockSize(_bigBlockSize)
|
||||
{
|
||||
}
|
||||
|
||||
~BlockPool()
|
||||
{
|
||||
AutoLock lock(cs);
|
||||
while( pool )
|
||||
{
|
||||
BigBlock* nextBlock = pool->next;
|
||||
pool->~BigBlock();
|
||||
SystemFree(pool, bigBlockSize);
|
||||
pool = nextBlock;
|
||||
}
|
||||
}
|
||||
|
||||
Block* alloc()
|
||||
{
|
||||
AutoLock lock(cs);
|
||||
Block* block;
|
||||
if( !freeBlocks )
|
||||
{
|
||||
BigBlock* bblock = ::new(SystemAlloc(bigBlockSize)) BigBlock(bigBlockSize, pool);
|
||||
assert( bblock != 0 );
|
||||
freeBlocks = bblock->first;
|
||||
pool = bblock;
|
||||
}
|
||||
block = freeBlocks;
|
||||
freeBlocks = freeBlocks->next;
|
||||
if( freeBlocks )
|
||||
freeBlocks->prev = 0;
|
||||
STAT(stat.bruttoBytes += MEM_BLOCK_SIZE);
|
||||
return block;
|
||||
}
|
||||
|
||||
void free(Block* block)
|
||||
{
|
||||
AutoLock lock(cs);
|
||||
block->prev = 0;
|
||||
block->next = freeBlocks;
|
||||
freeBlocks = block;
|
||||
STAT(stat.bruttoBytes -= MEM_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
CriticalSection cs;
|
||||
Block* freeBlocks;
|
||||
BigBlock* pool;
|
||||
int bigBlockSize;
|
||||
int blocksPerBigBlock;
|
||||
};
|
||||
|
||||
BlockPool mallocPool;
|
||||
|
||||
enum { START=0, FREE=1, GC=2 };
|
||||
|
||||
struct ThreadData
|
||||
{
|
||||
ThreadData() { for(int i = 0; i <= MAX_BIN; i++) bins[i][START] = bins[i][FREE] = bins[i][GC] = 0; }
|
||||
~ThreadData()
|
||||
{
|
||||
// mark all the thread blocks as abandoned or even release them
|
||||
for( int i = 0; i <= MAX_BIN; i++ )
|
||||
{
|
||||
Block *bin = bins[i][START], *block = bin;
|
||||
bins[i][START] = bins[i][FREE] = bins[i][GC] = 0;
|
||||
if( block )
|
||||
{
|
||||
do
|
||||
{
|
||||
Block* next = block->next;
|
||||
int allocated = block->allocated;
|
||||
{
|
||||
AutoLock lock(block->cs);
|
||||
block->next = block->prev = 0;
|
||||
block->threadData = 0;
|
||||
Node *node = block->publicFreeList;
|
||||
for( ; node != 0; node = node->next )
|
||||
allocated--;
|
||||
}
|
||||
if( allocated == 0 )
|
||||
mallocPool.free(block);
|
||||
block = next;
|
||||
}
|
||||
while( block != bin );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void moveBlockToFreeList( Block* block )
|
||||
{
|
||||
int i = block->binIdx;
|
||||
Block*& freePtr = bins[i][FREE];
|
||||
CV_DbgAssert( block->next->prev == block && block->prev->next == block );
|
||||
if( block != freePtr )
|
||||
{
|
||||
Block*& gcPtr = bins[i][GC];
|
||||
if( gcPtr == block )
|
||||
gcPtr = block->next;
|
||||
if( block->next != block )
|
||||
{
|
||||
block->prev->next = block->next;
|
||||
block->next->prev = block->prev;
|
||||
}
|
||||
block->next = freePtr->next;
|
||||
block->prev = freePtr;
|
||||
freePtr = block->next->prev = block->prev->next = block;
|
||||
}
|
||||
}
|
||||
|
||||
Block* bins[MAX_BIN+1][3];
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef WINCE
|
||||
# define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
|
||||
#endif //WINCE
|
||||
|
||||
static DWORD tlsKey;
|
||||
static ThreadData* get()
|
||||
{
|
||||
ThreadData* data;
|
||||
if( tlsKey == TLS_OUT_OF_INDEXES )
|
||||
tlsKey = TlsAlloc();
|
||||
data = (ThreadData*)TlsGetValue(tlsKey);
|
||||
if( !data )
|
||||
{
|
||||
data = new ThreadData;
|
||||
TlsSetValue(tlsKey, data);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
#else //WIN32
|
||||
static void deleteData(void* data)
|
||||
{
|
||||
delete (ThreadData*)data;
|
||||
}
|
||||
|
||||
static pthread_key_t tlsKey;
|
||||
static ThreadData* get()
|
||||
{
|
||||
ThreadData* data;
|
||||
if( !tlsKey )
|
||||
pthread_key_create(&tlsKey, deleteData);
|
||||
data = (ThreadData*)pthread_getspecific(tlsKey);
|
||||
if( !data )
|
||||
{
|
||||
data = new ThreadData;
|
||||
pthread_setspecific(tlsKey, data);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
#endif //WIN32
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
DWORD ThreadData::tlsKey = TLS_OUT_OF_INDEXES;
|
||||
|
||||
void deleteThreadAllocData()
|
||||
{
|
||||
if( ThreadData::tlsKey != TLS_OUT_OF_INDEXES )
|
||||
delete (ThreadData*)TlsGetValue( ThreadData::tlsKey );
|
||||
}
|
||||
|
||||
#else //WIN32
|
||||
pthread_key_t ThreadData::tlsKey = 0;
|
||||
#endif //WIN32
|
||||
|
||||
#if 0
|
||||
static void checkList(ThreadData* tls, int idx)
|
||||
{
|
||||
Block* block = tls->bins[idx][START];
|
||||
if( !block )
|
||||
{
|
||||
CV_DbgAssert( tls->bins[idx][FREE] == 0 && tls->bins[idx][GC] == 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
bool gcInside = false;
|
||||
bool freeInside = false;
|
||||
do
|
||||
{
|
||||
if( tls->bins[idx][FREE] == block )
|
||||
freeInside = true;
|
||||
if( tls->bins[idx][GC] == block )
|
||||
gcInside = true;
|
||||
block = block->next;
|
||||
}
|
||||
while( block != tls->bins[idx][START] );
|
||||
CV_DbgAssert( gcInside && freeInside );
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define checkList(tls, idx)
|
||||
#endif
|
||||
|
||||
void* fastMalloc( size_t size )
|
||||
{
|
||||
if( size > MAX_BLOCK_SIZE )
|
||||
{
|
||||
size_t size1 = size + sizeof(uchar*)*2 + MEM_BLOCK_SIZE;
|
||||
uchar* udata = (uchar*)SystemAlloc(size1);
|
||||
uchar** adata = alignPtr((uchar**)udata + 2, MEM_BLOCK_SIZE);
|
||||
adata[-1] = udata;
|
||||
adata[-2] = (uchar*)size1;
|
||||
return adata;
|
||||
}
|
||||
|
||||
{
|
||||
ThreadData* tls = ThreadData::get();
|
||||
int idx = mallocTables.bin(size);
|
||||
Block*& startPtr = tls->bins[idx][START];
|
||||
Block*& gcPtr = tls->bins[idx][GC];
|
||||
Block*& freePtr = tls->bins[idx][FREE], *block = freePtr;
|
||||
checkList(tls, idx);
|
||||
size = binSizeTab[idx];
|
||||
STAT(
|
||||
stat.nettoBytes += size;
|
||||
stat.mallocCalls++;
|
||||
);
|
||||
uchar* data = 0;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
if( block )
|
||||
{
|
||||
// try to find non-full block
|
||||
for(;;)
|
||||
{
|
||||
CV_DbgAssert( block->next->prev == block && block->prev->next == block );
|
||||
if( block->bumpPtr )
|
||||
{
|
||||
data = block->bumpPtr;
|
||||
if( (block->bumpPtr += size) >= block->endPtr )
|
||||
block->bumpPtr = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if( block->privateFreeList )
|
||||
{
|
||||
data = (uchar*)block->privateFreeList;
|
||||
block->privateFreeList = block->privateFreeList->next;
|
||||
break;
|
||||
}
|
||||
|
||||
if( block == startPtr )
|
||||
break;
|
||||
block = block->next;
|
||||
}
|
||||
#if 0
|
||||
avg_k += _k;
|
||||
avg_nk++;
|
||||
if( avg_nk == 1000 )
|
||||
{
|
||||
printf("avg search iters per 1e3 allocs = %g\n", (double)avg_k/avg_nk );
|
||||
avg_k = avg_nk = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
freePtr = block;
|
||||
if( !data )
|
||||
{
|
||||
block = gcPtr;
|
||||
for( int k = 0; k < 2; k++ )
|
||||
{
|
||||
SANITY_CHECK(block);
|
||||
CV_DbgAssert( block->next->prev == block && block->prev->next == block );
|
||||
if( block->publicFreeList )
|
||||
{
|
||||
{
|
||||
AutoLock lock(block->cs);
|
||||
block->privateFreeList = block->publicFreeList;
|
||||
block->publicFreeList = 0;
|
||||
}
|
||||
Node* node = block->privateFreeList;
|
||||
for(;node != 0; node = node->next)
|
||||
--block->allocated;
|
||||
data = (uchar*)block->privateFreeList;
|
||||
block->privateFreeList = block->privateFreeList->next;
|
||||
gcPtr = block->next;
|
||||
if( block->allocated+1 <= block->almostEmptyThreshold )
|
||||
tls->moveBlockToFreeList(block);
|
||||
break;
|
||||
}
|
||||
block = block->next;
|
||||
}
|
||||
if( !data )
|
||||
gcPtr = block;
|
||||
}
|
||||
}
|
||||
|
||||
if( data )
|
||||
break;
|
||||
block = mallocPool.alloc();
|
||||
block->init(startPtr ? startPtr->prev : block, startPtr ? startPtr : block, (int)size, tls);
|
||||
if( !startPtr )
|
||||
startPtr = gcPtr = freePtr = block;
|
||||
checkList(tls, block->binIdx);
|
||||
SANITY_CHECK(block);
|
||||
}
|
||||
|
||||
++block->allocated;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
void fastFree( void* ptr )
|
||||
{
|
||||
if( ((size_t)ptr & (MEM_BLOCK_SIZE-1)) == 0 )
|
||||
{
|
||||
if( ptr != 0 )
|
||||
{
|
||||
void* origPtr = ((void**)ptr)[-1];
|
||||
size_t sz = (size_t)((void**)ptr)[-2];
|
||||
SystemFree( origPtr, sz );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
ThreadData* tls = ThreadData::get();
|
||||
Node* node = (Node*)ptr;
|
||||
Block* block = (Block*)((size_t)ptr & -(int)MEM_BLOCK_SIZE);
|
||||
assert( block->signature == MEM_BLOCK_SIGNATURE );
|
||||
|
||||
if( block->threadData == tls )
|
||||
{
|
||||
STAT(
|
||||
stat.nettoBytes -= block->objSize;
|
||||
stat.freeCalls++;
|
||||
float ratio = (float)stat.nettoBytes/stat.bruttoBytes;
|
||||
if( stat.minUsageRatio > ratio )
|
||||
stat.minUsageRatio = ratio;
|
||||
);
|
||||
|
||||
SANITY_CHECK(block);
|
||||
|
||||
bool prevFilled = block->isFilled();
|
||||
--block->allocated;
|
||||
if( !block->isFilled() && (block->allocated == 0 || prevFilled) )
|
||||
{
|
||||
if( block->allocated == 0 )
|
||||
{
|
||||
int idx = block->binIdx;
|
||||
Block*& startPtr = tls->bins[idx][START];
|
||||
Block*& freePtr = tls->bins[idx][FREE];
|
||||
Block*& gcPtr = tls->bins[idx][GC];
|
||||
|
||||
if( block == block->next )
|
||||
{
|
||||
CV_DbgAssert( startPtr == block && freePtr == block && gcPtr == block );
|
||||
startPtr = freePtr = gcPtr = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( freePtr == block )
|
||||
freePtr = block->next;
|
||||
if( gcPtr == block )
|
||||
gcPtr = block->next;
|
||||
if( startPtr == block )
|
||||
startPtr = block->next;
|
||||
block->prev->next = block->next;
|
||||
block->next->prev = block->prev;
|
||||
}
|
||||
mallocPool.free(block);
|
||||
checkList(tls, idx);
|
||||
return;
|
||||
}
|
||||
|
||||
tls->moveBlockToFreeList(block);
|
||||
}
|
||||
node->next = block->privateFreeList;
|
||||
block->privateFreeList = node;
|
||||
}
|
||||
else
|
||||
{
|
||||
AutoLock lock(block->cs);
|
||||
SANITY_CHECK(block);
|
||||
|
||||
node->next = block->publicFreeList;
|
||||
block->publicFreeList = node;
|
||||
if( block->threadData == 0 )
|
||||
{
|
||||
// take ownership of the abandoned block.
|
||||
// note that it can happen at the same time as
|
||||
// ThreadData::deleteData() marks the blocks as abandoned,
|
||||
// so this part of the algorithm needs to be checked for data races
|
||||
int idx = block->binIdx;
|
||||
block->threadData = tls;
|
||||
Block*& startPtr = tls->bins[idx][START];
|
||||
|
||||
if( startPtr )
|
||||
{
|
||||
block->next = startPtr;
|
||||
block->prev = startPtr->prev;
|
||||
block->next->prev = block->prev->next = block;
|
||||
}
|
||||
else
|
||||
startPtr = tls->bins[idx][FREE] = tls->bins[idx][GC] = block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif //CV_USE_SYSTEM_MALLOC
|
||||
|
||||
}
|
||||
} // namespace
|
||||
|
||||
CV_IMPL void* cvAlloc( size_t size )
|
||||
{
|
||||
@@ -704,5 +108,4 @@ CV_IMPL void cvFree_( void* ptr )
|
||||
cv::fastFree( ptr );
|
||||
}
|
||||
|
||||
|
||||
/* End of file. */
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2014-2015, Itseez Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// * The name of the copyright holders may not be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// This software is provided by the copyright holders and contributors "as is" and
|
||||
// any express or implied warranties, including, but not limited to, the implied
|
||||
// warranties of merchantability and fitness for a particular purpose are disclaimed.
|
||||
// In no event shall the Intel Corporation or contributors be liable for any direct,
|
||||
// indirect, incidental, special, exemplary, or consequential damages
|
||||
// (including, but not limited to, procurement of substitute goods or services;
|
||||
// loss of use, data, or profits; or business interruption) however caused
|
||||
// and on any theory of liability, whether in contract, strict liability,
|
||||
// or tort (including negligence or otherwise) arising in any way out of
|
||||
// the use of this software, even if advised of the possibility of such damage.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "convert.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace opt_AVX2
|
||||
{
|
||||
|
||||
void cvtScale_s16s32f32Line_AVX2(const short* src, int* dst, float scale, float shift, int width)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
__m256 scale256 = _mm256_set1_ps(scale);
|
||||
__m256 shift256 = _mm256_set1_ps(shift);
|
||||
const int shuffle = 0xD8;
|
||||
|
||||
for (; x <= width - 16; x += 16)
|
||||
{
|
||||
__m256i v_src = _mm256_loadu_si256((const __m256i *)(src + x));
|
||||
v_src = _mm256_permute4x64_epi64(v_src, shuffle);
|
||||
__m256i v_src_lo = _mm256_srai_epi32(_mm256_unpacklo_epi16(v_src, v_src), 16);
|
||||
__m256i v_src_hi = _mm256_srai_epi32(_mm256_unpackhi_epi16(v_src, v_src), 16);
|
||||
__m256 v_dst0 = _mm256_add_ps(_mm256_mul_ps(_mm256_cvtepi32_ps(v_src_lo), scale256), shift256);
|
||||
__m256 v_dst1 = _mm256_add_ps(_mm256_mul_ps(_mm256_cvtepi32_ps(v_src_hi), scale256), shift256);
|
||||
_mm256_storeu_si256((__m256i *)(dst + x), _mm256_cvtps_epi32(v_dst0));
|
||||
_mm256_storeu_si256((__m256i *)(dst + x + 8), _mm256_cvtps_epi32(v_dst1));
|
||||
}
|
||||
|
||||
for (; x < width; x++)
|
||||
dst[x] = saturate_cast<int>(src[x] * scale + shift);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* End of file. */
|
||||
+52
-211
@@ -1489,41 +1489,22 @@ struct cvtScale_SIMD<uchar, schar, float>
|
||||
}
|
||||
};
|
||||
|
||||
#if CV_SSE4_1
|
||||
#if CV_TRY_SSE4_1
|
||||
|
||||
template <>
|
||||
struct cvtScale_SIMD<uchar, ushort, float>
|
||||
{
|
||||
cvtScale_SIMD()
|
||||
{
|
||||
haveSSE = checkHardwareSupport(CV_CPU_SSE4_1);
|
||||
haveSSE = CV_CPU_HAS_SUPPORT_SSE4_1;
|
||||
}
|
||||
|
||||
int operator () (const uchar * src, ushort * dst, int width, float scale, float shift) const
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
if (!haveSSE)
|
||||
return x;
|
||||
|
||||
__m128i v_zero = _mm_setzero_si128();
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_unpacklo_epi8(_mm_loadl_epi64((__m128i const *)(src + x)), v_zero);
|
||||
__m128 v_src_f = _mm_cvtepi32_ps(_mm_unpacklo_epi16(v_src, v_zero));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
v_src_f = _mm_cvtepi32_ps(_mm_unpackhi_epi16(v_src, v_zero));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
if (haveSSE)
|
||||
return opt_SSE4_1::cvtScale_SIMD_u8u16f32_SSE41(src, dst, width, scale, shift);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool haveSSE;
|
||||
@@ -1720,41 +1701,22 @@ struct cvtScale_SIMD<schar, schar, float>
|
||||
}
|
||||
};
|
||||
|
||||
#if CV_SSE4_1
|
||||
#if CV_TRY_SSE4_1
|
||||
|
||||
template <>
|
||||
struct cvtScale_SIMD<schar, ushort, float>
|
||||
{
|
||||
cvtScale_SIMD()
|
||||
{
|
||||
haveSSE = checkHardwareSupport(CV_CPU_SSE4_1);
|
||||
haveSSE = CV_CPU_HAS_SUPPORT_SSE4_1;
|
||||
}
|
||||
|
||||
int operator () (const schar * src, ushort * dst, int width, float scale, float shift) const
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
if (!haveSSE)
|
||||
return x;
|
||||
|
||||
__m128i v_zero = _mm_setzero_si128();
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_srai_epi16(_mm_unpacklo_epi8(v_zero, _mm_loadl_epi64((__m128i const *)(src + x))), 8);
|
||||
__m128 v_src_f = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_src), 16));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
v_src_f = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpackhi_epi16(v_zero, v_src), 16));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
if (haveSSE)
|
||||
return opt_SSE4_1::cvtScale_SIMD_s8u16f32_SSE41(src, dst, width, scale, shift);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool haveSSE;
|
||||
@@ -1952,41 +1914,22 @@ struct cvtScale_SIMD<ushort, schar, float>
|
||||
}
|
||||
};
|
||||
|
||||
#if CV_SSE4_1
|
||||
#if CV_TRY_SSE4_1
|
||||
|
||||
template <>
|
||||
struct cvtScale_SIMD<ushort, ushort, float>
|
||||
{
|
||||
cvtScale_SIMD()
|
||||
{
|
||||
haveSSE = checkHardwareSupport(CV_CPU_SSE4_1);
|
||||
haveSSE = CV_CPU_HAS_SUPPORT_SSE4_1;
|
||||
}
|
||||
|
||||
int operator () (const ushort * src, ushort * dst, int width, float scale, float shift) const
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
if (!haveSSE)
|
||||
return x;
|
||||
|
||||
__m128i v_zero = _mm_setzero_si128();
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_loadu_si128((__m128i const *)(src + x));
|
||||
__m128 v_src_f = _mm_cvtepi32_ps(_mm_unpacklo_epi16(v_src, v_zero));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
v_src_f = _mm_cvtepi32_ps(_mm_unpackhi_epi16(v_src, v_zero));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
if (haveSSE)
|
||||
return opt_SSE4_1::cvtScale_SIMD_u16u16f32_SSE41(src, dst, width, scale, shift);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool haveSSE;
|
||||
@@ -2183,41 +2126,22 @@ struct cvtScale_SIMD<short, schar, float>
|
||||
}
|
||||
};
|
||||
|
||||
#if CV_SSE4_1
|
||||
#if CV_TRY_SSE4_1
|
||||
|
||||
template <>
|
||||
struct cvtScale_SIMD<short, ushort, float>
|
||||
{
|
||||
cvtScale_SIMD()
|
||||
{
|
||||
haveSSE = checkHardwareSupport(CV_CPU_SSE4_1);
|
||||
haveSSE = CV_CPU_HAS_SUPPORT_SSE4_1;
|
||||
}
|
||||
|
||||
int operator () (const short * src, ushort * dst, int width, float scale, float shift) const
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
if (!haveSSE)
|
||||
return x;
|
||||
|
||||
__m128i v_zero = _mm_setzero_si128();
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_loadu_si128((__m128i const *)(src + x));
|
||||
__m128 v_src_f = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_src), 16));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
v_src_f = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpackhi_epi16(v_zero, v_src), 16));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
if (haveSSE)
|
||||
return opt_SSE4_1::cvtScale_SIMD_s16u16f32_SSE41(src, dst, width, scale, shift);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool haveSSE;
|
||||
@@ -2412,39 +2336,22 @@ struct cvtScale_SIMD<int, schar, float>
|
||||
}
|
||||
};
|
||||
|
||||
#if CV_SSE4_1
|
||||
#if CV_TRY_SSE4_1
|
||||
|
||||
template <>
|
||||
struct cvtScale_SIMD<int, ushort, float>
|
||||
{
|
||||
cvtScale_SIMD()
|
||||
{
|
||||
haveSSE = checkHardwareSupport(CV_CPU_SSE4_1);
|
||||
haveSSE = CV_CPU_HAS_SUPPORT_SSE4_1;
|
||||
}
|
||||
|
||||
int operator () (const int * src, ushort * dst, int width, float scale, float shift) const
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
if (!haveSSE)
|
||||
return x;
|
||||
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_loadu_si128((__m128i const *)(src + x));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(v_src), v_scale), v_shift);
|
||||
|
||||
v_src = _mm_loadu_si128((__m128i const *)(src + x + 4));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(v_src), v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
if (haveSSE)
|
||||
return opt_SSE4_1::cvtScale_SIMD_s32u16f32_SSE41(src, dst, width, scale, shift);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool haveSSE;
|
||||
@@ -2629,39 +2536,22 @@ struct cvtScale_SIMD<float, schar, float>
|
||||
}
|
||||
};
|
||||
|
||||
#if CV_SSE4_1
|
||||
#if CV_TRY_SSE4_1
|
||||
|
||||
template <>
|
||||
struct cvtScale_SIMD<float, ushort, float>
|
||||
{
|
||||
cvtScale_SIMD()
|
||||
{
|
||||
haveSSE = checkHardwareSupport(CV_CPU_SSE4_1);
|
||||
haveSSE = CV_CPU_HAS_SUPPORT_SSE4_1;
|
||||
}
|
||||
|
||||
int operator () (const float * src, ushort * dst, int width, float scale, float shift) const
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
if (!haveSSE)
|
||||
return x;
|
||||
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128 v_src = _mm_loadu_ps(src + x);
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src, v_scale), v_shift);
|
||||
|
||||
v_src = _mm_loadu_ps(src + x + 4);
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
if (haveSSE)
|
||||
return opt_SSE4_1::cvtScale_SIMD_f32u16f32_SSE41(src, dst, width, scale, shift);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool haveSSE;
|
||||
@@ -2842,41 +2732,22 @@ struct cvtScale_SIMD<double, schar, float>
|
||||
}
|
||||
};
|
||||
|
||||
#if CV_SSE4_1
|
||||
#if CV_TRY_SSE4_1
|
||||
|
||||
template <>
|
||||
struct cvtScale_SIMD<double, ushort, float>
|
||||
{
|
||||
cvtScale_SIMD()
|
||||
{
|
||||
haveSSE = checkHardwareSupport(CV_CPU_SSE4_1);
|
||||
haveSSE = CV_CPU_HAS_SUPPORT_SSE4_1;
|
||||
}
|
||||
|
||||
int operator () (const double * src, ushort * dst, int width, float scale, float shift) const
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
if (!haveSSE)
|
||||
return x;
|
||||
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128 v_src = _mm_movelh_ps(_mm_cvtpd_ps(_mm_loadu_pd(src + x)),
|
||||
_mm_cvtpd_ps(_mm_loadu_pd(src + x + 2)));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src, v_scale), v_shift);
|
||||
|
||||
v_src = _mm_movelh_ps(_mm_cvtpd_ps(_mm_loadu_pd(src + x + 4)),
|
||||
_mm_cvtpd_ps(_mm_loadu_pd(src + x + 6)));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
if (haveSSE)
|
||||
return opt_SSE4_1::cvtScale_SIMD_f64u16f32_SSE41(src, dst, width, scale, shift);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool haveSSE;
|
||||
@@ -3803,24 +3674,11 @@ cvtScale_<short, int, float>( const short* src, size_t sstep,
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
#if CV_AVX2
|
||||
if (USE_AVX2)
|
||||
#if CV_TRY_AVX2
|
||||
if (CV_CPU_HAS_SUPPORT_AVX2)
|
||||
{
|
||||
__m256 scale256 = _mm256_set1_ps(scale);
|
||||
__m256 shift256 = _mm256_set1_ps(shift);
|
||||
const int shuffle = 0xD8;
|
||||
|
||||
for ( ; x <= size.width - 16; x += 16)
|
||||
{
|
||||
__m256i v_src = _mm256_loadu_si256((const __m256i *)(src + x));
|
||||
v_src = _mm256_permute4x64_epi64(v_src, shuffle);
|
||||
__m256i v_src_lo = _mm256_srai_epi32(_mm256_unpacklo_epi16(v_src, v_src), 16);
|
||||
__m256i v_src_hi = _mm256_srai_epi32(_mm256_unpackhi_epi16(v_src, v_src), 16);
|
||||
__m256 v_dst0 = _mm256_add_ps(_mm256_mul_ps(_mm256_cvtepi32_ps(v_src_lo), scale256), shift256);
|
||||
__m256 v_dst1 = _mm256_add_ps(_mm256_mul_ps(_mm256_cvtepi32_ps(v_src_hi), scale256), shift256);
|
||||
_mm256_storeu_si256((__m256i *)(dst + x), _mm256_cvtps_epi32(v_dst0));
|
||||
_mm256_storeu_si256((__m256i *)(dst + x + 8), _mm256_cvtps_epi32(v_dst1));
|
||||
}
|
||||
opt_AVX2::cvtScale_s16s32f32Line_AVX2(src, dst, scale, shift, size.width);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#if CV_SSE2
|
||||
@@ -3933,37 +3791,20 @@ struct Cvt_SIMD<double, schar>
|
||||
}
|
||||
};
|
||||
|
||||
#if CV_SSE4_1
|
||||
#if CV_TRY_SSE4_1
|
||||
|
||||
template <>
|
||||
struct Cvt_SIMD<double, ushort>
|
||||
{
|
||||
bool haveSIMD;
|
||||
Cvt_SIMD() { haveSIMD = checkHardwareSupport(CV_CPU_SSE4_1); }
|
||||
Cvt_SIMD() { haveSIMD = CV_CPU_HAS_SUPPORT_SSE4_1; }
|
||||
|
||||
int operator() (const double * src, ushort * dst, int width) const
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
if (!haveSIMD)
|
||||
return x;
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128 v_src0 = _mm_cvtpd_ps(_mm_loadu_pd(src + x));
|
||||
__m128 v_src1 = _mm_cvtpd_ps(_mm_loadu_pd(src + x + 2));
|
||||
__m128 v_src2 = _mm_cvtpd_ps(_mm_loadu_pd(src + x + 4));
|
||||
__m128 v_src3 = _mm_cvtpd_ps(_mm_loadu_pd(src + x + 6));
|
||||
|
||||
v_src0 = _mm_movelh_ps(v_src0, v_src1);
|
||||
v_src1 = _mm_movelh_ps(v_src2, v_src3);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_src0),
|
||||
_mm_cvtps_epi32(v_src1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
if (haveSIMD)
|
||||
return opt_SSE4_1::Cvt_SIMD_f64u16_SSE41(src, dst, width);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -170,4 +170,19 @@ namespace opt_FP16
|
||||
void cvtScaleHalf_SIMD32f16f( const float* src, size_t sstep, short* dst, size_t dstep, cv::Size size );
|
||||
void cvtScaleHalf_SIMD16f32f( const short* src, size_t sstep, float* dst, size_t dstep, cv::Size size );
|
||||
}
|
||||
namespace opt_AVX2
|
||||
{
|
||||
void cvtScale_s16s32f32Line_AVX2(const short* src, int* dst, float scale, float shift, int width);
|
||||
}
|
||||
namespace opt_SSE4_1
|
||||
{
|
||||
int cvtScale_SIMD_u8u16f32_SSE41(const uchar * src, ushort * dst, int width, float scale, float shift);
|
||||
int cvtScale_SIMD_s8u16f32_SSE41(const schar * src, ushort * dst, int width, float scale, float shift);
|
||||
int cvtScale_SIMD_u16u16f32_SSE41(const ushort * src, ushort * dst, int width, float scale, float shift);
|
||||
int cvtScale_SIMD_s16u16f32_SSE41(const short * src, ushort * dst, int width, float scale, float shift);
|
||||
int cvtScale_SIMD_s32u16f32_SSE41(const int * src, ushort * dst, int width, float scale, float shift);
|
||||
int cvtScale_SIMD_f32u16f32_SSE41(const float * src, ushort * dst, int width, float scale, float shift);
|
||||
int cvtScale_SIMD_f64u16f32_SSE41(const double * src, ushort * dst, int width, float scale, float shift);
|
||||
int Cvt_SIMD_f64u16_SSE41(const double * src, ushort * dst, int width);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2014-2015, Itseez Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// * The name of the copyright holders may not be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// This software is provided by the copyright holders and contributors "as is" and
|
||||
// any express or implied warranties, including, but not limited to, the implied
|
||||
// warranties of merchantability and fitness for a particular purpose are disclaimed.
|
||||
// In no event shall the Intel Corporation or contributors be liable for any direct,
|
||||
// indirect, incidental, special, exemplary, or consequential damages
|
||||
// (including, but not limited to, procurement of substitute goods or services;
|
||||
// loss of use, data, or profits; or business interruption) however caused
|
||||
// and on any theory of liability, whether in contract, strict liability,
|
||||
// or tort (including negligence or otherwise) arising in any way out of
|
||||
// the use of this software, even if advised of the possibility of such damage.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "convert.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace opt_SSE4_1
|
||||
{
|
||||
|
||||
int cvtScale_SIMD_u8u16f32_SSE41(const uchar * src, ushort * dst, int width, float scale, float shift)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
__m128i v_zero = _mm_setzero_si128();
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_unpacklo_epi8(_mm_loadl_epi64((__m128i const *)(src + x)), v_zero);
|
||||
__m128 v_src_f = _mm_cvtepi32_ps(_mm_unpacklo_epi16(v_src, v_zero));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
v_src_f = _mm_cvtepi32_ps(_mm_unpackhi_epi16(v_src, v_zero));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int cvtScale_SIMD_s8u16f32_SSE41(const schar * src, ushort * dst, int width, float scale, float shift)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
__m128i v_zero = _mm_setzero_si128();
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_srai_epi16(_mm_unpacklo_epi8(v_zero, _mm_loadl_epi64((__m128i const *)(src + x))), 8);
|
||||
__m128 v_src_f = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_src), 16));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
v_src_f = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpackhi_epi16(v_zero, v_src), 16));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int cvtScale_SIMD_u16u16f32_SSE41(const ushort * src, ushort * dst, int width, float scale, float shift)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
__m128i v_zero = _mm_setzero_si128();
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_loadu_si128((__m128i const *)(src + x));
|
||||
__m128 v_src_f = _mm_cvtepi32_ps(_mm_unpacklo_epi16(v_src, v_zero));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
v_src_f = _mm_cvtepi32_ps(_mm_unpackhi_epi16(v_src, v_zero));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int cvtScale_SIMD_s16u16f32_SSE41(const short * src, ushort * dst, int width, float scale, float shift)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
__m128i v_zero = _mm_setzero_si128();
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_loadu_si128((__m128i const *)(src + x));
|
||||
__m128 v_src_f = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_src), 16));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
v_src_f = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpackhi_epi16(v_zero, v_src), 16));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src_f, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int cvtScale_SIMD_s32u16f32_SSE41(const int * src, ushort * dst, int width, float scale, float shift)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128i v_src = _mm_loadu_si128((__m128i const *)(src + x));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(v_src), v_scale), v_shift);
|
||||
|
||||
v_src = _mm_loadu_si128((__m128i const *)(src + x + 4));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(v_src), v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int cvtScale_SIMD_f32u16f32_SSE41(const float * src, ushort * dst, int width, float scale, float shift)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128 v_src = _mm_loadu_ps(src + x);
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src, v_scale), v_shift);
|
||||
|
||||
v_src = _mm_loadu_ps(src + x + 4);
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int cvtScale_SIMD_f64u16f32_SSE41(const double * src, ushort * dst, int width, float scale, float shift)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
__m128 v_scale = _mm_set1_ps(scale), v_shift = _mm_set1_ps(shift);
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128 v_src = _mm_movelh_ps(_mm_cvtpd_ps(_mm_loadu_pd(src + x)),
|
||||
_mm_cvtpd_ps(_mm_loadu_pd(src + x + 2)));
|
||||
__m128 v_dst_0 = _mm_add_ps(_mm_mul_ps(v_src, v_scale), v_shift);
|
||||
|
||||
v_src = _mm_movelh_ps(_mm_cvtpd_ps(_mm_loadu_pd(src + x + 4)),
|
||||
_mm_cvtpd_ps(_mm_loadu_pd(src + x + 6)));
|
||||
__m128 v_dst_1 = _mm_add_ps(_mm_mul_ps(v_src, v_scale), v_shift);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_dst_0),
|
||||
_mm_cvtps_epi32(v_dst_1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int Cvt_SIMD_f64u16_SSE41(const double * src, ushort * dst, int width)
|
||||
{
|
||||
int x = 0;
|
||||
|
||||
for ( ; x <= width - 8; x += 8)
|
||||
{
|
||||
__m128 v_src0 = _mm_cvtpd_ps(_mm_loadu_pd(src + x));
|
||||
__m128 v_src1 = _mm_cvtpd_ps(_mm_loadu_pd(src + x + 2));
|
||||
__m128 v_src2 = _mm_cvtpd_ps(_mm_loadu_pd(src + x + 4));
|
||||
__m128 v_src3 = _mm_cvtpd_ps(_mm_loadu_pd(src + x + 6));
|
||||
|
||||
v_src0 = _mm_movelh_ps(v_src0, v_src1);
|
||||
v_src1 = _mm_movelh_ps(v_src2, v_src3);
|
||||
|
||||
__m128i v_dst = _mm_packus_epi32(_mm_cvtps_epi32(v_src0),
|
||||
_mm_cvtps_epi32(v_src1));
|
||||
_mm_storeu_si128((__m128i *)(dst + x), v_dst);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file. */
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
# include <windows.h>
|
||||
const char dir_separators[] = "/\\";
|
||||
const char native_separator = '\\';
|
||||
@@ -139,7 +139,7 @@ const char native_separator = '/';
|
||||
|
||||
static bool isDir(const cv::String& path, DIR* dir)
|
||||
{
|
||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
DWORD attributes;
|
||||
BOOL status = TRUE;
|
||||
if (dir)
|
||||
|
||||
@@ -60,7 +60,6 @@ void MatAllocator::unmap(UMatData* u) const
|
||||
if(u->urefcount == 0 && u->refcount == 0)
|
||||
{
|
||||
deallocate(u);
|
||||
u = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,8 +460,11 @@ void Mat::copySize(const Mat& m)
|
||||
void Mat::deallocate()
|
||||
{
|
||||
if(u)
|
||||
(u->currAllocator ? u->currAllocator : allocator ? allocator : getDefaultAllocator())->unmap(u);
|
||||
u = NULL;
|
||||
{
|
||||
UMatData* u_ = u;
|
||||
u = NULL;
|
||||
(u_->currAllocator ? u_->currAllocator : allocator ? allocator : getDefaultAllocator())->unmap(u_);
|
||||
}
|
||||
}
|
||||
|
||||
Mat::Mat(const Mat& m, const Range& _rowRange, const Range& _colRange)
|
||||
@@ -3404,11 +3406,6 @@ static TransposeInplaceFunc transposeInplaceTab[] =
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
|
||||
static inline int divUp(int a, int b)
|
||||
{
|
||||
return (a + b - 1) / b;
|
||||
}
|
||||
|
||||
static bool ocl_transpose( InputArray _src, OutputArray _dst )
|
||||
{
|
||||
const ocl::Device & dev = ocl::Device::getDefault();
|
||||
|
||||
@@ -174,24 +174,6 @@ static uint64 crc64( const uchar* data, size_t size, uint64 crc0=0 )
|
||||
return ~crc;
|
||||
}
|
||||
|
||||
struct HashKey
|
||||
{
|
||||
typedef uint64 part;
|
||||
HashKey(part _a, part _b) : a(_a), b(_b) {}
|
||||
part a, b;
|
||||
};
|
||||
|
||||
inline bool operator == (const HashKey& h1, const HashKey& h2)
|
||||
{
|
||||
return h1.a == h2.a && h1.b == h2.b;
|
||||
}
|
||||
|
||||
inline bool operator < (const HashKey& h1, const HashKey& h2)
|
||||
{
|
||||
return h1.a < h2.a || (h1.a == h2.a && h1.b < h2.b);
|
||||
}
|
||||
|
||||
|
||||
bool haveOpenCL()
|
||||
{
|
||||
#ifdef HAVE_OPENCL
|
||||
@@ -1351,7 +1333,7 @@ struct Context::Impl
|
||||
const String& buildflags, String& errmsg)
|
||||
{
|
||||
size_t limit = getProgramCountLimit();
|
||||
String key = Program::getPrefix(buildflags);
|
||||
String key = cv::format("codehash=%08llx ", src.hash()) + Program::getPrefix(buildflags);
|
||||
{
|
||||
cv::AutoLock lock(program_cache_mutex);
|
||||
phash_t::iterator it = phash.find(key);
|
||||
|
||||
@@ -578,7 +578,7 @@ static void* initOpenCLAndLoad(const char* funcname)
|
||||
return funcname && handle ? dlsym(handle, funcname) : 0;
|
||||
}
|
||||
|
||||
#elif (defined WIN32 || defined _WIN32) && defined(HAVE_OPENCL)
|
||||
#elif defined _WIN32 && defined(HAVE_OPENCL)
|
||||
|
||||
#ifndef _WIN32_WINNT // This is needed for the declaration of TryEnterCriticalSection in winbase.h with Visual Studio 2005 (and older?)
|
||||
#define _WIN32_WINNT 0x0400 // http://msdn.microsoft.com/en-us/library/ms686857(VS.85).aspx
|
||||
|
||||
@@ -1590,7 +1590,7 @@ void cv::ogl::render(const ogl::Arrays& arr, InputArray indices, int mode, Scala
|
||||
#endif // HAVE_OPENCL
|
||||
|
||||
#if defined(HAVE_OPENGL)
|
||||
# if defined(ANDROID)
|
||||
# if defined(__ANDROID__)
|
||||
# include <EGL/egl.h>
|
||||
# elif defined(__linux__)
|
||||
# include <GL/glx.h>
|
||||
@@ -1655,11 +1655,11 @@ Context& initializeContextFromGL()
|
||||
|
||||
cl_context_properties properties[] =
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
CL_CONTEXT_PLATFORM, (cl_context_properties)platforms[i],
|
||||
CL_GL_CONTEXT_KHR, (cl_context_properties)wglGetCurrentContext(),
|
||||
CL_WGL_HDC_KHR, (cl_context_properties)wglGetCurrentDC(),
|
||||
#elif defined(ANDROID)
|
||||
#elif defined(__ANDROID__)
|
||||
CL_CONTEXT_PLATFORM, (cl_context_properties)platforms[i],
|
||||
CL_GL_CONTEXT_KHR, (cl_context_properties)eglGetCurrentContext(),
|
||||
CL_EGL_DISPLAY_KHR, (cl_context_properties)eglGetCurrentDisplay(),
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#include <opencv2/core/utils/trace.private.hpp>
|
||||
|
||||
#if defined WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
#include <windows.h>
|
||||
#undef small
|
||||
#undef min
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#if defined ANDROID
|
||||
#if defined __ANDROID__
|
||||
#include <sys/sysconf.h>
|
||||
#elif defined __APPLE__
|
||||
#include <sys/sysctl.h>
|
||||
@@ -590,7 +590,7 @@ int cv::getThreadNum(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
static inline int getNumberOfCPUsImpl()
|
||||
{
|
||||
FILE* cpuPossible = fopen("/sys/devices/system/cpu/possible", "r");
|
||||
@@ -632,7 +632,7 @@ static inline int getNumberOfCPUsImpl()
|
||||
|
||||
int cv::getNumberOfCPUs(void)
|
||||
{
|
||||
#if defined WIN32 || defined _WIN32
|
||||
#if defined _WIN32
|
||||
SYSTEM_INFO sysinfo;
|
||||
#if (defined(_M_ARM) || defined(_M_X64) || defined(WINRT)) && _WIN32_WINNT >= 0x501
|
||||
GetNativeSystemInfo( &sysinfo );
|
||||
@@ -641,7 +641,7 @@ int cv::getNumberOfCPUs(void)
|
||||
#endif
|
||||
|
||||
return (int)sysinfo.dwNumberOfProcessors;
|
||||
#elif defined ANDROID
|
||||
#elif defined __ANDROID__
|
||||
static int ncpus = getNumberOfCPUsImpl();
|
||||
return ncpus;
|
||||
#elif defined __linux__
|
||||
|
||||
@@ -527,7 +527,7 @@ void ThreadManager::setNumOfThreads(size_t n)
|
||||
|
||||
size_t ThreadManager::defaultNumberOfThreads()
|
||||
{
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
// many modern phones/tables have 4-core CPUs. Let's use no more
|
||||
// than 2 threads by default not to overheat the devices
|
||||
const unsigned int default_number_of_threads = 2;
|
||||
|
||||
@@ -3665,7 +3665,6 @@ static char* icvJSONParseValue( CvFileStorage* fs, char* ptr, CvFileNode* node )
|
||||
{
|
||||
CV_PARSE_ERROR( "Unrecognized value" );
|
||||
}
|
||||
ptr++;
|
||||
}
|
||||
|
||||
return ptr;
|
||||
@@ -3781,6 +3780,7 @@ static char* icvJSONParseMap( CvFileStorage* fs, char* ptr, CvFileNode* node )
|
||||
ptr = icvJSONParseMap( fs, ptr, child );
|
||||
else
|
||||
ptr = icvJSONParseValue( fs, ptr, child );
|
||||
child->tag |= CV_NODE_NAMED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4270,11 +4270,25 @@ cvOpenFileStorage( const char* query, CvMemStorage* dststorage, int flags, const
|
||||
|
||||
if( fmt == CV_STORAGE_FORMAT_AUTO && filename )
|
||||
{
|
||||
const char* dot_pos = strrchr( filename, '.' );
|
||||
const char* dot_pos = NULL;
|
||||
const char* dot_pos2 = NULL;
|
||||
// like strrchr() implementation, but save two last positions simultaneously
|
||||
for (const char* pos = filename; pos[0] != 0; pos++)
|
||||
{
|
||||
if (pos[0] == '.')
|
||||
{
|
||||
dot_pos2 = dot_pos;
|
||||
dot_pos = pos;
|
||||
}
|
||||
}
|
||||
if (cv_strcasecmp(dot_pos, ".gz") && dot_pos2 != NULL)
|
||||
{
|
||||
dot_pos = dot_pos2;
|
||||
}
|
||||
fs->fmt
|
||||
= cv_strcasecmp( dot_pos, ".xml" )
|
||||
= (cv_strcasecmp(dot_pos, ".xml") || cv_strcasecmp(dot_pos, ".xml.gz"))
|
||||
? CV_STORAGE_FORMAT_XML
|
||||
: cv_strcasecmp( dot_pos, ".json" )
|
||||
: (cv_strcasecmp(dot_pos, ".json") || cv_strcasecmp(dot_pos, ".json.gz"))
|
||||
? CV_STORAGE_FORMAT_JSON
|
||||
: CV_STORAGE_FORMAT_YAML
|
||||
;
|
||||
@@ -6920,6 +6934,12 @@ FileNode FileStorage::root(int streamidx) const
|
||||
return isOpened() ? FileNode(fs, cvGetRootFileNode(fs, streamidx)) : FileNode();
|
||||
}
|
||||
|
||||
int FileStorage::getFormat() const
|
||||
{
|
||||
CV_Assert(!fs.empty());
|
||||
return fs->fmt & FORMAT_MASK;
|
||||
}
|
||||
|
||||
FileStorage& operator << (FileStorage& fs, const String& str)
|
||||
{
|
||||
CV_TRACE_REGION_VERBOSE();
|
||||
@@ -7374,22 +7394,21 @@ size_t FileNode::size() const
|
||||
void read(const FileNode& node, int& value, int default_value)
|
||||
{
|
||||
value = !node.node ? default_value :
|
||||
CV_NODE_IS_INT(node.node->tag) ? node.node->data.i :
|
||||
CV_NODE_IS_REAL(node.node->tag) ? cvRound(node.node->data.f) : 0x7fffffff;
|
||||
CV_NODE_IS_INT(node.node->tag) ? node.node->data.i : std::numeric_limits<int>::max();
|
||||
}
|
||||
|
||||
void read(const FileNode& node, float& value, float default_value)
|
||||
{
|
||||
value = !node.node ? default_value :
|
||||
CV_NODE_IS_INT(node.node->tag) ? (float)node.node->data.i :
|
||||
CV_NODE_IS_REAL(node.node->tag) ? (float)node.node->data.f : 1e30f;
|
||||
CV_NODE_IS_REAL(node.node->tag) ? saturate_cast<float>(node.node->data.f) : std::numeric_limits<float>::max();
|
||||
}
|
||||
|
||||
void read(const FileNode& node, double& value, double default_value)
|
||||
{
|
||||
value = !node.node ? default_value :
|
||||
CV_NODE_IS_INT(node.node->tag) ? (double)node.node->data.i :
|
||||
CV_NODE_IS_REAL(node.node->tag) ? node.node->data.f : 1e300;
|
||||
CV_NODE_IS_REAL(node.node->tag) ? node.node->data.f : std::numeric_limits<double>::max();
|
||||
}
|
||||
|
||||
void read(const FileNode& node, String& value, const String& default_value)
|
||||
@@ -7397,6 +7416,11 @@ void read(const FileNode& node, String& value, const String& default_value)
|
||||
value = !node.node ? default_value : CV_NODE_IS_STRING(node.node->tag) ? String(node.node->data.str.ptr) : String();
|
||||
}
|
||||
|
||||
void read(const FileNode& node, std::string& value, const std::string& default_value)
|
||||
{
|
||||
value = !node.node ? default_value : CV_NODE_IS_STRING(node.node->tag) ? std::string(node.node->data.str.ptr) : default_value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -148,10 +148,6 @@ BinaryFunc getCopyMaskFunc(size_t esz);
|
||||
/* maximal average node_count/hash_size ratio beyond which hash table is resized */
|
||||
#define CV_SPARSE_HASH_RATIO 3
|
||||
|
||||
#if defined WIN32 || defined _WIN32
|
||||
void deleteThreadAllocData();
|
||||
#endif
|
||||
|
||||
inline Size getContinuousSize_( int flags, int cols, int rows, int widthScale )
|
||||
{
|
||||
int64 sz = (int64)cols * rows * widthScale;
|
||||
@@ -288,7 +284,7 @@ struct CoreTLSData
|
||||
TLSData<CoreTLSData>& getCoreTlsData();
|
||||
|
||||
#if defined(BUILD_SHARED_LIBS)
|
||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
#define CL_RUNTIME_EXPORT __declspec(dllexport)
|
||||
#elif defined __GNUC__ && __GNUC__ >= 4
|
||||
#define CL_RUNTIME_EXPORT __attribute__ ((visibility ("default")))
|
||||
|
||||
@@ -48,14 +48,12 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
#if defined WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
#include <windows.h>
|
||||
#undef small
|
||||
#undef min
|
||||
#undef max
|
||||
#undef abs
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#if defined __SSE2__ || (defined _M_IX86_FP && 2 == _M_IX86_FP)
|
||||
|
||||
+126
-941
File diff suppressed because it is too large
Load Diff
+25
-168
@@ -53,16 +53,6 @@
|
||||
namespace cv
|
||||
{
|
||||
|
||||
template<typename T> static inline Scalar rawToScalar(const T& v)
|
||||
{
|
||||
Scalar s;
|
||||
typedef typename DataType<T>::channel_type T1;
|
||||
int i, n = DataType<T>::channels;
|
||||
for( i = 0; i < n; i++ )
|
||||
s.val[i] = ((T1*)&v)[i];
|
||||
return s;
|
||||
}
|
||||
|
||||
/****************************************************************************************\
|
||||
* sum *
|
||||
\****************************************************************************************/
|
||||
@@ -1557,7 +1547,7 @@ static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv
|
||||
|
||||
bool haveMask = _mask.kind() != _InputArray::NONE;
|
||||
int nz = haveMask ? -1 : (int)_src.total();
|
||||
Scalar mean, stddev;
|
||||
Scalar mean(0), stddev(0);
|
||||
const int cn = _src.channels();
|
||||
if (cn > 4)
|
||||
return false;
|
||||
@@ -1749,6 +1739,13 @@ static bool ipp_meanStdDev(Mat& src, OutputArray _mean, OutputArray _sdv, Mat& m
|
||||
|
||||
#if IPP_VERSION_X100 >= 700
|
||||
int cn = src.channels();
|
||||
|
||||
#if IPP_VERSION_X100 < 201801
|
||||
// IPP_DISABLE: C3C functions can read outside of allocated memory
|
||||
if (cn > 1)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
size_t total_size = src.total();
|
||||
int rows = src.size[0], cols = rows ? (int)(total_size/rows) : 0;
|
||||
if( src.dims == 2 || (src.isContinuous() && mask.isContinuous() && cols > 0 && (size_t)rows*cols == total_size) )
|
||||
@@ -2187,7 +2184,7 @@ static bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int*
|
||||
{
|
||||
const ocl::Device & dev = ocl::Device::getDefault();
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
if (dev.isNVidia())
|
||||
return false;
|
||||
#endif
|
||||
@@ -2540,6 +2537,12 @@ static bool ipp_minMaxIdx(Mat &src, double* _minVal, double* _maxVal, int* _minI
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// cv::minMaxIdx problem with index positions on AVX
|
||||
#if IPP_VERSION_X100 < 201810
|
||||
if(!mask.empty() && _maxIdx && ipp::getIppFeatures()&ippCPUID_AVX)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
IppStatus status;
|
||||
IppDataType dataType = ippiGetDataType(src.depth());
|
||||
float minVal = 0;
|
||||
@@ -2571,7 +2574,7 @@ static bool ipp_minMaxIdx(Mat &src, double* _minVal, double* _maxVal, int* _minI
|
||||
size.width *= src.channels();
|
||||
|
||||
status = ippMinMaxFun(src.ptr(), (int)src.step, size, dataType, pMinVal, pMaxVal, pMinIdx, pMaxIdx, (Ipp8u*)mask.ptr(), (int)mask.step);
|
||||
if(status < 0 || status == ippStsNoOperation)
|
||||
if(status < 0)
|
||||
return false;
|
||||
if(_minVal)
|
||||
*_minVal = minVal;
|
||||
@@ -2579,7 +2582,8 @@ static bool ipp_minMaxIdx(Mat &src, double* _minVal, double* _maxVal, int* _minI
|
||||
*_maxVal = maxVal;
|
||||
if(_minIdx)
|
||||
{
|
||||
if(!mask.empty() && !minIdx.y && !minIdx.x)
|
||||
// Should be just ippStsNoOperation check, but there is a bug in the function so we need additional checks
|
||||
if(status == ippStsNoOperation && !mask.empty() && !pMinIdx->x && !pMinIdx->y)
|
||||
{
|
||||
_minIdx[0] = -1;
|
||||
_minIdx[1] = -1;
|
||||
@@ -2592,7 +2596,8 @@ static bool ipp_minMaxIdx(Mat &src, double* _minVal, double* _maxVal, int* _minI
|
||||
}
|
||||
if(_maxIdx)
|
||||
{
|
||||
if(!mask.empty() && !maxIdx.y && !maxIdx.x)
|
||||
// Should be just ippStsNoOperation check, but there is a bug in the function so we need additional checks
|
||||
if(status == ippStsNoOperation && !mask.empty() && !pMaxIdx->x && !pMaxIdx->y)
|
||||
{
|
||||
_maxIdx[0] = -1;
|
||||
_maxIdx[1] = -1;
|
||||
@@ -2981,7 +2986,7 @@ static bool ocl_norm( InputArray _src, int normType, InputArray _mask, double &
|
||||
{
|
||||
const ocl::Device & d = ocl::Device::getDefault();
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
if (d.isNVidia())
|
||||
return false;
|
||||
#endif
|
||||
@@ -3323,7 +3328,7 @@ namespace cv {
|
||||
|
||||
static bool ocl_norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask, double & result )
|
||||
{
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
if (ocl::Device::getDefault().isNVidia())
|
||||
return false;
|
||||
#endif
|
||||
@@ -4249,7 +4254,7 @@ cvNorm( const void* imgA, const void* imgB, int normType, const void* maskarr )
|
||||
|
||||
namespace cv { namespace hal {
|
||||
|
||||
static const uchar popCountTable[] =
|
||||
extern const uchar popCountTable[256] =
|
||||
{
|
||||
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
|
||||
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
|
||||
@@ -4285,154 +4290,6 @@ static const uchar popCountTable4[] =
|
||||
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
|
||||
};
|
||||
|
||||
#if CV_AVX2
|
||||
static inline int _mm256_extract_epi32_(__m256i reg, const int i)
|
||||
{
|
||||
CV_DECL_ALIGNED(32) int reg_data[8];
|
||||
CV_DbgAssert(0 <= i && i < 8);
|
||||
_mm256_store_si256((__m256i*)reg_data, reg);
|
||||
return reg_data[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
int normHamming(const uchar* a, int n)
|
||||
{
|
||||
int i = 0;
|
||||
int result = 0;
|
||||
#if CV_AVX2
|
||||
if(USE_AVX2)
|
||||
{
|
||||
__m256i _r0 = _mm256_setzero_si256();
|
||||
__m256i _0 = _mm256_setzero_si256();
|
||||
__m256i _popcnt_table = _mm256_setr_epi8(0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
|
||||
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4);
|
||||
__m256i _popcnt_mask = _mm256_set1_epi8(0x0F);
|
||||
|
||||
for(; i <= n - 32; i+= 32)
|
||||
{
|
||||
__m256i _a0 = _mm256_loadu_si256((const __m256i*)(a + i));
|
||||
|
||||
__m256i _popc0 = _mm256_shuffle_epi8(_popcnt_table, _mm256_and_si256(_a0, _popcnt_mask));
|
||||
__m256i _popc1 = _mm256_shuffle_epi8(_popcnt_table,
|
||||
_mm256_and_si256(_mm256_srli_epi16(_a0, 4), _popcnt_mask));
|
||||
|
||||
_r0 = _mm256_add_epi32(_r0, _mm256_sad_epu8(_0, _mm256_add_epi8(_popc0, _popc1)));
|
||||
}
|
||||
_r0 = _mm256_add_epi32(_r0, _mm256_shuffle_epi32(_r0, 2));
|
||||
result = _mm256_extract_epi32_(_mm256_add_epi32(_r0, _mm256_permute2x128_si256(_r0, _r0, 1)), 0);
|
||||
}
|
||||
#endif // CV_AVX2
|
||||
|
||||
#if CV_POPCNT
|
||||
if(checkHardwareSupport(CV_CPU_POPCNT))
|
||||
{
|
||||
# if defined CV_POPCNT_U64
|
||||
for(; i <= n - 8; i += 8)
|
||||
{
|
||||
result += (int)CV_POPCNT_U64(*(uint64*)(a + i));
|
||||
}
|
||||
# endif
|
||||
for(; i <= n - 4; i += 4)
|
||||
{
|
||||
result += CV_POPCNT_U32(*(uint*)(a + i));
|
||||
}
|
||||
}
|
||||
#endif // CV_POPCNT
|
||||
|
||||
#if CV_SIMD128
|
||||
if(hasSIMD128())
|
||||
{
|
||||
v_uint32x4 t = v_setzero_u32();
|
||||
for(; i <= n - v_uint8x16::nlanes; i += v_uint8x16::nlanes)
|
||||
{
|
||||
t += v_popcount(v_load(a + i));
|
||||
}
|
||||
result += v_reduce_sum(t);
|
||||
}
|
||||
#endif // CV_SIMD128
|
||||
|
||||
for(; i <= n - 4; i += 4)
|
||||
{
|
||||
result += popCountTable[a[i]] + popCountTable[a[i+1]] +
|
||||
popCountTable[a[i+2]] + popCountTable[a[i+3]];
|
||||
}
|
||||
for(; i < n; i++)
|
||||
{
|
||||
result += popCountTable[a[i]];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int normHamming(const uchar* a, const uchar* b, int n)
|
||||
{
|
||||
int i = 0;
|
||||
int result = 0;
|
||||
#if CV_AVX2
|
||||
if(USE_AVX2)
|
||||
{
|
||||
__m256i _r0 = _mm256_setzero_si256();
|
||||
__m256i _0 = _mm256_setzero_si256();
|
||||
__m256i _popcnt_table = _mm256_setr_epi8(0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
|
||||
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4);
|
||||
__m256i _popcnt_mask = _mm256_set1_epi8(0x0F);
|
||||
|
||||
for(; i <= n - 32; i+= 32)
|
||||
{
|
||||
__m256i _a0 = _mm256_loadu_si256((const __m256i*)(a + i));
|
||||
__m256i _b0 = _mm256_loadu_si256((const __m256i*)(b + i));
|
||||
|
||||
__m256i _xor = _mm256_xor_si256(_a0, _b0);
|
||||
|
||||
__m256i _popc0 = _mm256_shuffle_epi8(_popcnt_table, _mm256_and_si256(_xor, _popcnt_mask));
|
||||
__m256i _popc1 = _mm256_shuffle_epi8(_popcnt_table,
|
||||
_mm256_and_si256(_mm256_srli_epi16(_xor, 4), _popcnt_mask));
|
||||
|
||||
_r0 = _mm256_add_epi32(_r0, _mm256_sad_epu8(_0, _mm256_add_epi8(_popc0, _popc1)));
|
||||
}
|
||||
_r0 = _mm256_add_epi32(_r0, _mm256_shuffle_epi32(_r0, 2));
|
||||
result = _mm256_extract_epi32_(_mm256_add_epi32(_r0, _mm256_permute2x128_si256(_r0, _r0, 1)), 0);
|
||||
}
|
||||
#endif // CV_AVX2
|
||||
|
||||
#if CV_POPCNT
|
||||
if(checkHardwareSupport(CV_CPU_POPCNT))
|
||||
{
|
||||
# if defined CV_POPCNT_U64
|
||||
for(; i <= n - 8; i += 8)
|
||||
{
|
||||
result += (int)CV_POPCNT_U64(*(uint64*)(a + i) ^ *(uint64*)(b + i));
|
||||
}
|
||||
# endif
|
||||
for(; i <= n - 4; i += 4)
|
||||
{
|
||||
result += CV_POPCNT_U32(*(uint*)(a + i) ^ *(uint*)(b + i));
|
||||
}
|
||||
}
|
||||
#endif // CV_POPCNT
|
||||
|
||||
#if CV_SIMD128
|
||||
if(hasSIMD128())
|
||||
{
|
||||
v_uint32x4 t = v_setzero_u32();
|
||||
for(; i <= n - v_uint8x16::nlanes; i += v_uint8x16::nlanes)
|
||||
{
|
||||
t += v_popcount(v_load(a + i) ^ v_load(b + i));
|
||||
}
|
||||
result += v_reduce_sum(t);
|
||||
}
|
||||
#endif // CV_SIMD128
|
||||
|
||||
for(; i <= n - 4; i += 4)
|
||||
{
|
||||
result += popCountTable[a[i] ^ b[i]] + popCountTable[a[i+1] ^ b[i+1]] +
|
||||
popCountTable[a[i+2] ^ b[i+2]] + popCountTable[a[i+3] ^ b[i+3]];
|
||||
}
|
||||
for(; i < n; i++)
|
||||
{
|
||||
result += popCountTable[a[i] ^ b[i]];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int normHamming(const uchar* a, int n, int cellSize)
|
||||
{
|
||||
@@ -4469,11 +4326,11 @@ int normHamming(const uchar* a, const uchar* b, int n, int cellSize)
|
||||
return -1;
|
||||
int i = 0;
|
||||
int result = 0;
|
||||
#if CV_ENABLE_UNROLLED
|
||||
#if CV_ENABLE_UNROLLED
|
||||
for( ; i <= n - 4; i += 4 )
|
||||
result += tab[a[i] ^ b[i]] + tab[a[i+1] ^ b[i+1]] +
|
||||
tab[a[i+2] ^ b[i+2]] + tab[a[i+3] ^ b[i+3]];
|
||||
#endif
|
||||
#endif
|
||||
for( ; i < n; i++ )
|
||||
result += tab[a[i] ^ b[i]];
|
||||
return result;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
#include "stat.simd.hpp"
|
||||
#include "stat.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
|
||||
|
||||
namespace cv { namespace hal {
|
||||
|
||||
int normHamming(const uchar* a, int n)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
CV_CPU_DISPATCH(normHamming, (a, n),
|
||||
CV_CPU_DISPATCH_MODES_ALL);
|
||||
}
|
||||
|
||||
int normHamming(const uchar* a, const uchar* b, int n)
|
||||
{
|
||||
CV_INSTRUMENT_REGION()
|
||||
|
||||
CV_CPU_DISPATCH(normHamming, (a, b, n),
|
||||
CV_CPU_DISPATCH_MODES_ALL);
|
||||
}
|
||||
|
||||
}} //cv::hal
|
||||
@@ -0,0 +1,171 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#include "opencv2/core/hal/intrin.hpp"
|
||||
|
||||
namespace cv { namespace hal {
|
||||
|
||||
extern const uchar popCountTable[256];
|
||||
|
||||
CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
|
||||
|
||||
// forward declarations
|
||||
int normHamming(const uchar* a, int n);
|
||||
int normHamming(const uchar* a, const uchar* b, int n);
|
||||
|
||||
#ifndef CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY
|
||||
|
||||
#if CV_AVX2
|
||||
static inline int _mm256_extract_epi32_(__m256i reg, const int i)
|
||||
{
|
||||
CV_DECL_ALIGNED(32) int reg_data[8];
|
||||
CV_DbgAssert(0 <= i && i < 8);
|
||||
_mm256_store_si256((__m256i*)reg_data, reg);
|
||||
return reg_data[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
int normHamming(const uchar* a, int n)
|
||||
{
|
||||
CV_AVX_GUARD;
|
||||
|
||||
int i = 0;
|
||||
int result = 0;
|
||||
#if CV_AVX2
|
||||
{
|
||||
__m256i _r0 = _mm256_setzero_si256();
|
||||
__m256i _0 = _mm256_setzero_si256();
|
||||
__m256i _popcnt_table = _mm256_setr_epi8(0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
|
||||
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4);
|
||||
__m256i _popcnt_mask = _mm256_set1_epi8(0x0F);
|
||||
|
||||
for(; i <= n - 32; i+= 32)
|
||||
{
|
||||
__m256i _a0 = _mm256_loadu_si256((const __m256i*)(a + i));
|
||||
|
||||
__m256i _popc0 = _mm256_shuffle_epi8(_popcnt_table, _mm256_and_si256(_a0, _popcnt_mask));
|
||||
__m256i _popc1 = _mm256_shuffle_epi8(_popcnt_table,
|
||||
_mm256_and_si256(_mm256_srli_epi16(_a0, 4), _popcnt_mask));
|
||||
|
||||
_r0 = _mm256_add_epi32(_r0, _mm256_sad_epu8(_0, _mm256_add_epi8(_popc0, _popc1)));
|
||||
}
|
||||
_r0 = _mm256_add_epi32(_r0, _mm256_shuffle_epi32(_r0, 2));
|
||||
result = _mm256_extract_epi32_(_mm256_add_epi32(_r0, _mm256_permute2x128_si256(_r0, _r0, 1)), 0);
|
||||
}
|
||||
#endif // CV_AVX2
|
||||
|
||||
#if CV_POPCNT
|
||||
{
|
||||
# if defined CV_POPCNT_U64
|
||||
for(; i <= n - 8; i += 8)
|
||||
{
|
||||
result += (int)CV_POPCNT_U64(*(uint64*)(a + i));
|
||||
}
|
||||
# endif
|
||||
for(; i <= n - 4; i += 4)
|
||||
{
|
||||
result += CV_POPCNT_U32(*(uint*)(a + i));
|
||||
}
|
||||
}
|
||||
#endif // CV_POPCNT
|
||||
|
||||
#if CV_SIMD128
|
||||
{
|
||||
v_uint32x4 t = v_setzero_u32();
|
||||
for(; i <= n - v_uint8x16::nlanes; i += v_uint8x16::nlanes)
|
||||
{
|
||||
t += v_popcount(v_load(a + i));
|
||||
}
|
||||
result += v_reduce_sum(t);
|
||||
}
|
||||
#endif // CV_SIMD128
|
||||
#if CV_ENABLE_UNROLLED
|
||||
for(; i <= n - 4; i += 4)
|
||||
{
|
||||
result += popCountTable[a[i]] + popCountTable[a[i+1]] +
|
||||
popCountTable[a[i+2]] + popCountTable[a[i+3]];
|
||||
}
|
||||
#endif
|
||||
for(; i < n; i++)
|
||||
{
|
||||
result += popCountTable[a[i]];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int normHamming(const uchar* a, const uchar* b, int n)
|
||||
{
|
||||
CV_AVX_GUARD;
|
||||
|
||||
int i = 0;
|
||||
int result = 0;
|
||||
#if CV_AVX2
|
||||
{
|
||||
__m256i _r0 = _mm256_setzero_si256();
|
||||
__m256i _0 = _mm256_setzero_si256();
|
||||
__m256i _popcnt_table = _mm256_setr_epi8(0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
|
||||
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4);
|
||||
__m256i _popcnt_mask = _mm256_set1_epi8(0x0F);
|
||||
|
||||
for(; i <= n - 32; i+= 32)
|
||||
{
|
||||
__m256i _a0 = _mm256_loadu_si256((const __m256i*)(a + i));
|
||||
__m256i _b0 = _mm256_loadu_si256((const __m256i*)(b + i));
|
||||
|
||||
__m256i _xor = _mm256_xor_si256(_a0, _b0);
|
||||
|
||||
__m256i _popc0 = _mm256_shuffle_epi8(_popcnt_table, _mm256_and_si256(_xor, _popcnt_mask));
|
||||
__m256i _popc1 = _mm256_shuffle_epi8(_popcnt_table,
|
||||
_mm256_and_si256(_mm256_srli_epi16(_xor, 4), _popcnt_mask));
|
||||
|
||||
_r0 = _mm256_add_epi32(_r0, _mm256_sad_epu8(_0, _mm256_add_epi8(_popc0, _popc1)));
|
||||
}
|
||||
_r0 = _mm256_add_epi32(_r0, _mm256_shuffle_epi32(_r0, 2));
|
||||
result = _mm256_extract_epi32_(_mm256_add_epi32(_r0, _mm256_permute2x128_si256(_r0, _r0, 1)), 0);
|
||||
}
|
||||
#endif // CV_AVX2
|
||||
|
||||
#if CV_POPCNT
|
||||
{
|
||||
# if defined CV_POPCNT_U64
|
||||
for(; i <= n - 8; i += 8)
|
||||
{
|
||||
result += (int)CV_POPCNT_U64(*(uint64*)(a + i) ^ *(uint64*)(b + i));
|
||||
}
|
||||
# endif
|
||||
for(; i <= n - 4; i += 4)
|
||||
{
|
||||
result += CV_POPCNT_U32(*(uint*)(a + i) ^ *(uint*)(b + i));
|
||||
}
|
||||
}
|
||||
#endif // CV_POPCNT
|
||||
|
||||
#if CV_SIMD128
|
||||
{
|
||||
v_uint32x4 t = v_setzero_u32();
|
||||
for(; i <= n - v_uint8x16::nlanes; i += v_uint8x16::nlanes)
|
||||
{
|
||||
t += v_popcount(v_load(a + i) ^ v_load(b + i));
|
||||
}
|
||||
result += v_reduce_sum(t);
|
||||
}
|
||||
#endif // CV_SIMD128
|
||||
#if CV_ENABLE_UNROLLED
|
||||
for(; i <= n - 4; i += 4)
|
||||
{
|
||||
result += popCountTable[a[i] ^ b[i]] + popCountTable[a[i+1] ^ b[i+1]] +
|
||||
popCountTable[a[i+2] ^ b[i+2]] + popCountTable[a[i+3] ^ b[i+3]];
|
||||
}
|
||||
#endif
|
||||
for(; i < n; i++)
|
||||
{
|
||||
result += popCountTable[a[i] ^ b[i]];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY
|
||||
|
||||
CV_CPU_OPTIMIZATION_NAMESPACE_END
|
||||
}} //cv::hal
|
||||
+38
-30
@@ -66,20 +66,20 @@ Mutex* __initialization_mutex_initializer = &getInitializationMutex();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined ANDROID || defined __linux__ || defined __FreeBSD__
|
||||
#if defined __ANDROID__ || defined __linux__ || defined __FreeBSD__
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
# include <elf.h>
|
||||
#if defined ANDROID || defined __linux__
|
||||
#if defined __ANDROID__ || defined __linux__
|
||||
# include <linux/auxvec.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined ANDROID && defined HAVE_CPUFEATURES
|
||||
#if defined __ANDROID__ && defined HAVE_CPUFEATURES
|
||||
# include <cpu-features.h>
|
||||
#endif
|
||||
|
||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
#ifndef _WIN32_WINNT // This is needed for the declaration of TryEnterCriticalSection in winbase.h with Visual Studio 2005 (and older?)
|
||||
#define _WIN32_WINNT 0x0400 // http://msdn.microsoft.com/en-us/library/ms686857(VS.85).aspx
|
||||
#endif
|
||||
@@ -206,12 +206,12 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#if defined ANDROID
|
||||
#if defined __ANDROID__
|
||||
#include <sys/sysconf.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
# include <android/log.h>
|
||||
#endif
|
||||
|
||||
@@ -655,7 +655,7 @@ bool useOptimized(void)
|
||||
|
||||
int64 getTickCount(void)
|
||||
{
|
||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
LARGE_INTEGER counter;
|
||||
QueryPerformanceCounter( &counter );
|
||||
return (int64)counter.QuadPart;
|
||||
@@ -675,7 +675,7 @@ int64 getTickCount(void)
|
||||
|
||||
double getTickFrequency(void)
|
||||
{
|
||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
LARGE_INTEGER freq;
|
||||
QueryPerformanceFrequency(&freq);
|
||||
return (double)freq.QuadPart;
|
||||
@@ -737,7 +737,7 @@ int64 getCPUTickCount(void)
|
||||
|
||||
#endif
|
||||
|
||||
#elif defined _MSC_VER && defined WIN32 && defined _M_IX86
|
||||
#elif defined _MSC_VER && defined _WIN32 && defined _M_IX86
|
||||
|
||||
int64 getCPUTickCount(void)
|
||||
{
|
||||
@@ -799,7 +799,7 @@ String tempfile( const char* suffix )
|
||||
const char *temp_dir = getenv("OPENCV_TEMP_PATH");
|
||||
#endif
|
||||
|
||||
#if defined WIN32 || defined _WIN32
|
||||
#if defined _WIN32
|
||||
#ifdef WINRT
|
||||
RoInitialize(RO_INIT_MULTITHREADED);
|
||||
std::wstring temp_dir = GetTempPathWinRT();
|
||||
@@ -833,7 +833,7 @@ String tempfile( const char* suffix )
|
||||
fname = temp_file;
|
||||
#endif
|
||||
# else
|
||||
# ifdef ANDROID
|
||||
# ifdef __ANDROID__
|
||||
//char defaultTemplate[] = "/mnt/sdcard/__opencv_temp.XXXXXX";
|
||||
char defaultTemplate[] = "/data/local/tmp/__opencv_temp.XXXXXX";
|
||||
# else
|
||||
@@ -1124,7 +1124,7 @@ bool __termination = false;
|
||||
namespace cv
|
||||
{
|
||||
|
||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||
#if defined _WIN32 || defined WINCE
|
||||
|
||||
struct Mutex::Impl
|
||||
{
|
||||
@@ -1210,7 +1210,7 @@ bool Mutex::trylock() { return impl->trylock(); }
|
||||
|
||||
//////////////////////////////// thread-local storage ////////////////////////////////
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4505) // unreferenced local function has been removed
|
||||
#endif
|
||||
@@ -1229,16 +1229,16 @@ public:
|
||||
void SetData(void *pData);
|
||||
|
||||
private:
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#ifndef WINRT
|
||||
DWORD tlsKey;
|
||||
#endif
|
||||
#else // WIN32
|
||||
#else // _WIN32
|
||||
pthread_key_t tlsKey;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#ifdef WINRT
|
||||
static __declspec( thread ) void* tlsData = NULL; // using C++11 thread attribute for local thread data
|
||||
TlsAbstraction::TlsAbstraction() {}
|
||||
@@ -1270,7 +1270,7 @@ void TlsAbstraction::SetData(void *pData)
|
||||
CV_Assert(TlsSetValue(tlsKey, pData) == TRUE);
|
||||
}
|
||||
#endif
|
||||
#else // WIN32
|
||||
#else // _WIN32
|
||||
TlsAbstraction::TlsAbstraction()
|
||||
{
|
||||
CV_Assert(pthread_key_create(&tlsKey, NULL) == 0);
|
||||
@@ -1306,7 +1306,8 @@ struct ThreadData
|
||||
class TlsStorage
|
||||
{
|
||||
public:
|
||||
TlsStorage()
|
||||
TlsStorage() :
|
||||
tlsSlotsSize(0)
|
||||
{
|
||||
tlsSlots.reserve(32);
|
||||
threads.reserve(32);
|
||||
@@ -1351,9 +1352,10 @@ public:
|
||||
size_t reserveSlot()
|
||||
{
|
||||
AutoLock guard(mtxGlobalAccess);
|
||||
CV_Assert(tlsSlotsSize == tlsSlots.size());
|
||||
|
||||
// Find unused slots
|
||||
for(size_t slot = 0; slot < tlsSlots.size(); slot++)
|
||||
for(size_t slot = 0; slot < tlsSlotsSize; slot++)
|
||||
{
|
||||
if(!tlsSlots[slot])
|
||||
{
|
||||
@@ -1363,15 +1365,16 @@ public:
|
||||
}
|
||||
|
||||
// Create new slot
|
||||
tlsSlots.push_back(1);
|
||||
return (tlsSlots.size()-1);
|
||||
tlsSlots.push_back(1); tlsSlotsSize++;
|
||||
return tlsSlotsSize - 1;
|
||||
}
|
||||
|
||||
// Release TLS storage index and pass associated data to caller
|
||||
void releaseSlot(size_t slotIdx, std::vector<void*> &dataVec, bool keepSlot = false)
|
||||
{
|
||||
AutoLock guard(mtxGlobalAccess);
|
||||
CV_Assert(tlsSlots.size() > slotIdx);
|
||||
CV_Assert(tlsSlotsSize == tlsSlots.size());
|
||||
CV_Assert(tlsSlotsSize > slotIdx);
|
||||
|
||||
for(size_t i = 0; i < threads.size(); i++)
|
||||
{
|
||||
@@ -1393,7 +1396,9 @@ public:
|
||||
// Get data by TLS storage index
|
||||
void* getData(size_t slotIdx) const
|
||||
{
|
||||
CV_Assert(tlsSlots.size() > slotIdx);
|
||||
#ifndef CV_THREAD_SANITIZER
|
||||
CV_Assert(tlsSlotsSize > slotIdx);
|
||||
#endif
|
||||
|
||||
ThreadData* threadData = (ThreadData*)tls.GetData();
|
||||
if(threadData && threadData->slots.size() > slotIdx)
|
||||
@@ -1406,7 +1411,8 @@ public:
|
||||
void gather(size_t slotIdx, std::vector<void*> &dataVec)
|
||||
{
|
||||
AutoLock guard(mtxGlobalAccess);
|
||||
CV_Assert(tlsSlots.size() > slotIdx);
|
||||
CV_Assert(tlsSlotsSize == tlsSlots.size());
|
||||
CV_Assert(tlsSlotsSize > slotIdx);
|
||||
|
||||
for(size_t i = 0; i < threads.size(); i++)
|
||||
{
|
||||
@@ -1422,7 +1428,9 @@ public:
|
||||
// Set data to storage index
|
||||
void setData(size_t slotIdx, void* pData)
|
||||
{
|
||||
CV_Assert(tlsSlots.size() > slotIdx && pData != NULL);
|
||||
#ifndef CV_THREAD_SANITIZER
|
||||
CV_Assert(tlsSlotsSize > slotIdx);
|
||||
#endif
|
||||
|
||||
ThreadData* threadData = (ThreadData*)tls.GetData();
|
||||
if(!threadData)
|
||||
@@ -1438,9 +1446,8 @@ public:
|
||||
|
||||
if(slotIdx >= threadData->slots.size())
|
||||
{
|
||||
AutoLock guard(mtxGlobalAccess);
|
||||
while(slotIdx >= threadData->slots.size())
|
||||
threadData->slots.push_back(NULL);
|
||||
AutoLock guard(mtxGlobalAccess); // keep synchronization with gather() calls
|
||||
threadData->slots.resize(slotIdx + 1, NULL);
|
||||
}
|
||||
threadData->slots[slotIdx] = pData;
|
||||
}
|
||||
@@ -1449,6 +1456,8 @@ private:
|
||||
TlsAbstraction tls; // TLS abstraction layer instance
|
||||
|
||||
Mutex mtxGlobalAccess; // Shared objects operation guard
|
||||
size_t tlsSlotsSize; // equal to tlsSlots.size() in synchronized sections
|
||||
// without synchronization this counter doesn't desrease - it is used for slotIdx sanity checks
|
||||
std::vector<int> tlsSlots; // TLS keys state
|
||||
std::vector<ThreadData*> threads; // Array for all allocated data. Thread data pointers are placed here to allow data cleanup
|
||||
};
|
||||
@@ -1511,7 +1520,7 @@ TLSData<CoreTLSData>& getCoreTlsData()
|
||||
CV_SINGLETON_LAZY_INIT_REF(TLSData<CoreTLSData>, new TLSData<CoreTLSData>())
|
||||
}
|
||||
|
||||
#if defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
|
||||
#if defined CVAPI_EXPORTS && defined _WIN32 && !defined WINCE
|
||||
#ifdef WINRT
|
||||
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||
#endif
|
||||
@@ -1532,7 +1541,6 @@ BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID lpReserved)
|
||||
{
|
||||
// Not allowed to free resources if lpReserved is non-null
|
||||
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms682583.aspx
|
||||
cv::deleteThreadAllocData();
|
||||
cv::getTlsStorage().releaseThread();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,8 +411,9 @@ UMat::~UMat()
|
||||
|
||||
void UMat::deallocate()
|
||||
{
|
||||
u->currAllocator->deallocate(u);
|
||||
UMatData* u_ = u;
|
||||
u = NULL;
|
||||
u_->currAllocator->deallocate(u_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ OCL_TEST_P(Mul, Mat_Scale)
|
||||
OCL_OFF(cv::multiply(src1_roi, src2_roi, dst1_roi, val[0]));
|
||||
OCL_ON(cv::multiply(usrc1_roi, usrc2_roi, udst1_roi, val[0]));
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
Near(udst1_roi.depth() >= CV_32F ? 2e-1 : 1);
|
||||
#else
|
||||
Near(udst1_roi.depth() >= CV_32F ? 1e-3 : 1);
|
||||
|
||||
@@ -1932,3 +1932,77 @@ TEST(Compare, regression_8999)
|
||||
compare(A, B, C, CMP_LT);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
TEST(Core_minMaxIdx, regression_9207_1)
|
||||
{
|
||||
const int rows = 4;
|
||||
const int cols = 3;
|
||||
uchar mask_[rows*cols] = {
|
||||
255, 255, 255,
|
||||
255, 0, 255,
|
||||
0, 255, 255,
|
||||
0, 0, 255
|
||||
};
|
||||
uchar src_[rows*cols] = {
|
||||
1, 1, 1,
|
||||
1, 1, 1,
|
||||
2, 1, 1,
|
||||
2, 2, 1
|
||||
};
|
||||
Mat mask(Size(cols, rows), CV_8UC1, mask_);
|
||||
Mat src(Size(cols, rows), CV_8UC1, src_);
|
||||
double minVal = -0.0, maxVal = -0.0;
|
||||
int minIdx[2] = { -2, -2 }, maxIdx[2] = { -2, -2 };
|
||||
minMaxIdx(src, &minVal, &maxVal, minIdx, maxIdx, mask);
|
||||
EXPECT_EQ(0, minIdx[0]);
|
||||
EXPECT_EQ(0, minIdx[1]);
|
||||
EXPECT_EQ(0, maxIdx[0]);
|
||||
EXPECT_EQ(0, maxIdx[1]);
|
||||
}
|
||||
|
||||
|
||||
TEST(Core_minMaxIdx, regression_9207_2)
|
||||
{
|
||||
const int rows = 13;
|
||||
const int cols = 15;
|
||||
uchar mask_[rows*cols] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,
|
||||
0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,
|
||||
255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255,
|
||||
255, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 255, 255,
|
||||
255, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 255, 255, 255, 0,
|
||||
255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 0,
|
||||
255, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 255, 255, 0,
|
||||
255, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 255, 0,
|
||||
255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
uchar src_[15*13] = {
|
||||
5, 5, 5, 5, 5, 6, 5, 2, 0, 4, 6, 6, 4, 1, 0,
|
||||
6, 5, 4, 4, 5, 6, 6, 5, 2, 0, 4, 6, 5, 2, 0,
|
||||
3, 2, 1, 1, 2, 4, 6, 6, 4, 2, 3, 4, 4, 2, 0,
|
||||
1, 0, 0, 0, 0, 1, 4, 5, 4, 4, 4, 4, 3, 2, 0,
|
||||
0, 0, 0, 0, 0, 0, 2, 3, 4, 4, 4, 3, 2, 1, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 3, 2, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 3, 3, 1, 0, 1,
|
||||
0, 0, 0, 0, 0, 0, 1, 4, 5, 6, 5, 4, 3, 2, 0,
|
||||
1, 0, 0, 0, 0, 0, 3, 5, 5, 4, 3, 4, 4, 3, 0,
|
||||
2, 0, 0, 0, 0, 2, 5, 6, 5, 2, 2, 5, 4, 3, 0
|
||||
};
|
||||
Mat mask(Size(cols, rows), CV_8UC1, mask_);
|
||||
Mat src(Size(cols, rows), CV_8UC1, src_);
|
||||
double minVal = -0.0, maxVal = -0.0;
|
||||
int minIdx[2] = { -2, -2 }, maxIdx[2] = { -2, -2 };
|
||||
minMaxIdx(src, &minVal, &maxVal, minIdx, maxIdx, mask);
|
||||
EXPECT_EQ(0, minIdx[0]);
|
||||
EXPECT_EQ(14, minIdx[1]);
|
||||
EXPECT_EQ(0, maxIdx[0]);
|
||||
EXPECT_EQ(14, maxIdx[1]);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user