disabled video decoding under linux

This commit is contained in:
Vladislav Vinogradov 2012-12-13 13:48:24 +04:00
parent 5ddf4e4ed7
commit 889674ef43
17 changed files with 30 additions and 37 deletions

View File

@ -5,7 +5,7 @@ endif()
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_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_device_hdrs "include/opencv2/${name}/device/*.hpp" "include/opencv2/${name}/device/*.h")
@ -27,10 +27,10 @@ if (HAVE_CUDA)
set(ncv_files ${ncv_srcs} ${ncv_cuda})
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)
string(REPLACE "-Wsign-promo" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
#set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;/EHsc-;")
if(MSVC)
if(NOT ENABLE_NOISY_WARNINGS)
@ -46,21 +46,13 @@ if (HAVE_CUDA)
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
if(NOT APPLE)
unset(CUDA_nvcuvid_LIBRARY CACHE)
if(WIN32)
find_cuda_helper_libs(nvcuvid)
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvid_LIBRARY})
endif()
if(WIN32)
unset(CUDA_nvcuvenc_LIBRARY CACHE)
find_cuda_helper_libs(nvcuvenc)
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvenc_LIBRARY})
endif()
if(NOT APPLE AND WITH_FFMPEG)
set(cuda_link_libs ${cuda_link_libs} ${HIGHGUI_LIBRARIES})
endif()
else()
set(lib_cuda "")
set(cuda_objs "")

View File

@ -996,10 +996,12 @@ PERF_TEST_P(Video_Cn_MaxFeatures, DISABLED_Video_GMG,
}
}
#ifdef WIN32
//////////////////////////////////////////////////////
// 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);
@ -1096,4 +1098,6 @@ PERF_TEST_P(Video, Video_VideoReader, Values("gpu/video/768x576.avi", "gpu/video
}
}
#endif
} // namespace

View File

@ -1,7 +1,7 @@
#include "cuvid_video_source.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)
{

View File

@ -45,7 +45,7 @@
#include "precomp.hpp"
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu
{

View File

@ -42,7 +42,7 @@
#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)
#include "cap_ffmpeg_impl.hpp"

View File

@ -46,7 +46,7 @@
#include "precomp.hpp"
#include "thread_wrappers.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_CUDA) && defined(WIN32)
struct InputMediaStream_FFMPEG;

View File

@ -42,7 +42,7 @@
#include "frame_queue.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_CUDA) && defined(WIN32)
cv::gpu::detail::FrameQueue::FrameQueue() :
endOfDecode_(0),

View File

@ -46,7 +46,7 @@
#include "precomp.hpp"
#include "thread_wrappers.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu
{

View File

@ -97,11 +97,8 @@
#include <cublas.h>
#endif
#ifndef __APPLE__
#include <nvcuvid.h>
#endif
#ifdef WIN32
#include <nvcuvid.h>
#include <NVEncoderAPI.h>
#endif

View File

@ -42,7 +42,7 @@
#include "thread_wrappers.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_CUDA) && defined(WIN32)
#ifdef WIN32
#define NOMINMAX

View File

@ -45,7 +45,7 @@
#include "precomp.hpp"
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu
{

View File

@ -43,7 +43,7 @@
#include "video_decoder.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)
{

View File

@ -46,7 +46,7 @@
#include "precomp.hpp"
#include "cu_safe_call.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu
{

View File

@ -43,7 +43,7 @@
#include "video_parser.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) :
videoDecoder_(videoDecoder), frameQueue_(frameQueue), unparsedPackets_(0), hasError_(false)

View File

@ -48,7 +48,7 @@
#include "frame_queue.h"
#include "video_decoder.h"
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_CUDA) && defined(WIN32)
namespace cv { namespace gpu
{

View File

@ -42,7 +42,7 @@
#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
{

View File

@ -868,11 +868,11 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, GMG, testing::Combine(
testing::Values(Channels(1), Channels(3), Channels(4)),
WHOLE_SUBMAT));
#ifdef WIN32
//////////////////////////////////////////////////////
// VideoWriter
#ifdef WIN32
PARAM_TEST_CASE(VideoWriter, cv::gpu::DeviceInfo, std::string)
{
cv::gpu::DeviceInfo devInfo;
@ -934,8 +934,6 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, VideoWriter, testing::Combine(
ALL_DEVICES,
testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi"))));
#endif // WIN32
//////////////////////////////////////////////////////
// VideoReader
@ -976,4 +974,6 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, VideoReader, testing::Combine(
ALL_DEVICES,
testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi"))));
#endif // WIN32
#endif // HAVE_CUDA