Commit 889674ef authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

disabled video decoding under linux

parent 5ddf4e4e
...@@ -5,7 +5,7 @@ endif() ...@@ -5,7 +5,7 @@ endif()
set(the_description "GPU-accelerated Computer Vision") set(the_description "GPU-accelerated Computer Vision")
ocv_add_module(gpu opencv_imgproc opencv_calib3d opencv_objdetect opencv_video opencv_nonfree opencv_photo opencv_legacy) ocv_add_module(gpu opencv_imgproc opencv_calib3d opencv_objdetect opencv_video opencv_nonfree opencv_photo opencv_legacy)
ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/cuda" "${CMAKE_CURRENT_SOURCE_DIR}/../highgui/src") ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/cuda" "${OpenCV_SOURCE_DIR}/modules/highgui/src")
file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h") file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
file(GLOB lib_device_hdrs "include/opencv2/${name}/device/*.hpp" "include/opencv2/${name}/device/*.h") file(GLOB lib_device_hdrs "include/opencv2/${name}/device/*.hpp" "include/opencv2/${name}/device/*.h")
...@@ -21,16 +21,16 @@ source_group("Src\\Cuda" FILES ${lib_cuda} ${lib_cuda_hdrs}) ...@@ -21,16 +21,16 @@ source_group("Src\\Cuda" FILES ${lib_cuda} ${lib_cuda_hdrs})
source_group("Device" FILES ${lib_device_hdrs}) source_group("Device" FILES ${lib_device_hdrs})
source_group("Device\\Detail" FILES ${lib_device_hdrs_detail}) source_group("Device\\Detail" FILES ${lib_device_hdrs_detail})
if (HAVE_CUDA) if(HAVE_CUDA)
file(GLOB_RECURSE ncv_srcs "src/nvidia/*.cpp" "src/nvidia/*.h*") file(GLOB_RECURSE ncv_srcs "src/nvidia/*.cpp" "src/nvidia/*.h*")
file(GLOB_RECURSE ncv_cuda "src/nvidia/*.cu") file(GLOB_RECURSE ncv_cuda "src/nvidia/*.cu")
set(ncv_files ${ncv_srcs} ${ncv_cuda}) set(ncv_files ${ncv_srcs} ${ncv_cuda})
source_group("Src\\NVidia" FILES ${ncv_files}) source_group("Src\\NVidia" FILES ${ncv_files})
ocv_include_directories("src/nvidia" "src/nvidia/core" "src/nvidia/NPP_staging" ${CUDA_INCLUDE_DIRS})
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/nvidia" "${CMAKE_CURRENT_SOURCE_DIR}/src/nvidia/core" "${CMAKE_CURRENT_SOURCE_DIR}/src/nvidia/NPP_staging" ${CUDA_INCLUDE_DIRS})
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations /wd4211 /wd4201 /wd4100 /wd4505 /wd4408) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations /wd4211 /wd4201 /wd4100 /wd4505 /wd4408)
string(REPLACE "-Wsign-promo" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "-Wsign-promo" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
#set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;/EHsc-;")
if(MSVC) if(MSVC)
if(NOT ENABLE_NOISY_WARNINGS) if(NOT ENABLE_NOISY_WARNINGS)
...@@ -46,21 +46,13 @@ if (HAVE_CUDA) ...@@ -46,21 +46,13 @@ if (HAVE_CUDA)
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
if(NOT APPLE) if(WIN32)
unset(CUDA_nvcuvid_LIBRARY CACHE)
find_cuda_helper_libs(nvcuvid) find_cuda_helper_libs(nvcuvid)
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvid_LIBRARY}) set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvid_LIBRARY})
endif()
if(WIN32)
unset(CUDA_nvcuvenc_LIBRARY CACHE)
find_cuda_helper_libs(nvcuvenc) find_cuda_helper_libs(nvcuvenc)
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvenc_LIBRARY}) set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvenc_LIBRARY})
endif() endif()
if(NOT APPLE AND WITH_FFMPEG)
set(cuda_link_libs ${cuda_link_libs} ${HIGHGUI_LIBRARIES})
endif()
else() else()
set(lib_cuda "") set(lib_cuda "")
set(cuda_objs "") set(cuda_objs "")
......
...@@ -996,10 +996,12 @@ PERF_TEST_P(Video_Cn_MaxFeatures, DISABLED_Video_GMG, ...@@ -996,10 +996,12 @@ PERF_TEST_P(Video_Cn_MaxFeatures, DISABLED_Video_GMG,
} }
} }
#ifdef WIN32
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// VideoWriter // VideoWriter
PERF_TEST_P(Video, DISABLED_Video_VideoWriter, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi")) PERF_TEST_P(Video, Video_VideoWriter, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"))
{ {
declare.time(30); declare.time(30);
...@@ -1096,4 +1098,6 @@ PERF_TEST_P(Video, Video_VideoReader, Values("gpu/video/768x576.avi", "gpu/video ...@@ -1096,4 +1098,6 @@ PERF_TEST_P(Video, Video_VideoReader, Values("gpu/video/768x576.avi", "gpu/video
} }
} }
#endif
} // namespace } // namespace
#include "cuvid_video_source.h" #include "cuvid_video_source.h"
#include "cu_safe_call.h" #include "cu_safe_call.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
cv::gpu::detail::CuvidVideoSource::CuvidVideoSource(const std::string& fname) cv::gpu::detail::CuvidVideoSource::CuvidVideoSource(const std::string& fname)
{ {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "precomp.hpp" #include "precomp.hpp"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu namespace cv { namespace gpu
{ {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "ffmpeg_video_source.h" #include "ffmpeg_video_source.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
#if defined(HAVE_FFMPEG) && defined(BUILD_SHARED_LIBS) #if defined(HAVE_FFMPEG) && defined(BUILD_SHARED_LIBS)
#include "cap_ffmpeg_impl.hpp" #include "cap_ffmpeg_impl.hpp"
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "precomp.hpp" #include "precomp.hpp"
#include "thread_wrappers.h" #include "thread_wrappers.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
struct InputMediaStream_FFMPEG; struct InputMediaStream_FFMPEG;
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "frame_queue.h" #include "frame_queue.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
cv::gpu::detail::FrameQueue::FrameQueue() : cv::gpu::detail::FrameQueue::FrameQueue() :
endOfDecode_(0), endOfDecode_(0),
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "precomp.hpp" #include "precomp.hpp"
#include "thread_wrappers.h" #include "thread_wrappers.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu namespace cv { namespace gpu
{ {
......
...@@ -97,11 +97,8 @@ ...@@ -97,11 +97,8 @@
#include <cublas.h> #include <cublas.h>
#endif #endif
#ifndef __APPLE__
#include <nvcuvid.h>
#endif
#ifdef WIN32 #ifdef WIN32
#include <nvcuvid.h>
#include <NVEncoderAPI.h> #include <NVEncoderAPI.h>
#endif #endif
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "thread_wrappers.h" #include "thread_wrappers.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
#ifdef WIN32 #ifdef WIN32
#define NOMINMAX #define NOMINMAX
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "precomp.hpp" #include "precomp.hpp"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu namespace cv { namespace gpu
{ {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "video_decoder.h" #include "video_decoder.h"
#include "frame_queue.h" #include "frame_queue.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
void cv::gpu::detail::VideoDecoder::create(const VideoReader_GPU::FormatInfo& videoFormat) void cv::gpu::detail::VideoDecoder::create(const VideoReader_GPU::FormatInfo& videoFormat)
{ {
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "precomp.hpp" #include "precomp.hpp"
#include "cu_safe_call.h" #include "cu_safe_call.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu namespace cv { namespace gpu
{ {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "video_parser.h" #include "video_parser.h"
#include "cu_safe_call.h" #include "cu_safe_call.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
cv::gpu::detail::VideoParser::VideoParser(VideoDecoder* videoDecoder, FrameQueue* frameQueue) : cv::gpu::detail::VideoParser::VideoParser(VideoDecoder* videoDecoder, FrameQueue* frameQueue) :
videoDecoder_(videoDecoder), frameQueue_(frameQueue), unparsedPackets_(0), hasError_(false) videoDecoder_(videoDecoder), frameQueue_(frameQueue), unparsedPackets_(0), hasError_(false)
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#include "frame_queue.h" #include "frame_queue.h"
#include "video_decoder.h" #include "video_decoder.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__) #if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu namespace cv { namespace gpu
{ {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "precomp.hpp" #include "precomp.hpp"
#if !defined HAVE_CUDA || defined(CUDA_DISABLER) || defined(__APPLE__) #if !defined HAVE_CUDA || defined(CUDA_DISABLER) || !defined(WIN32)
class cv::gpu::VideoReader_GPU::Impl class cv::gpu::VideoReader_GPU::Impl
{ {
......
...@@ -868,11 +868,11 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, GMG, testing::Combine( ...@@ -868,11 +868,11 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, GMG, testing::Combine(
testing::Values(Channels(1), Channels(3), Channels(4)), testing::Values(Channels(1), Channels(3), Channels(4)),
WHOLE_SUBMAT)); WHOLE_SUBMAT));
#ifdef WIN32
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// VideoWriter // VideoWriter
#ifdef WIN32
PARAM_TEST_CASE(VideoWriter, cv::gpu::DeviceInfo, std::string) PARAM_TEST_CASE(VideoWriter, cv::gpu::DeviceInfo, std::string)
{ {
cv::gpu::DeviceInfo devInfo; cv::gpu::DeviceInfo devInfo;
...@@ -934,8 +934,6 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, VideoWriter, testing::Combine( ...@@ -934,8 +934,6 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, VideoWriter, testing::Combine(
ALL_DEVICES, ALL_DEVICES,
testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi")))); testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi"))));
#endif // WIN32
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// VideoReader // VideoReader
...@@ -976,4 +974,6 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, VideoReader, testing::Combine( ...@@ -976,4 +974,6 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, VideoReader, testing::Combine(
ALL_DEVICES, ALL_DEVICES,
testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi")))); testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi"))));
#endif // WIN32
#endif // HAVE_CUDA #endif // HAVE_CUDA
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment