Revert "disabled video decoding under linux"

This reverts commit 889674ef43.
pull/258/merge
vlad 12 years ago committed by Vladislav Vinogradov
parent 660d23aa04
commit 11293d071f
  1. 22
      modules/gpu/CMakeLists.txt
  2. 6
      modules/gpu/perf/perf_video.cpp
  3. 2
      modules/gpu/src/cuvid_video_source.cpp
  4. 2
      modules/gpu/src/cuvid_video_source.h
  5. 2
      modules/gpu/src/ffmpeg_video_source.cpp
  6. 2
      modules/gpu/src/ffmpeg_video_source.h
  7. 2
      modules/gpu/src/frame_queue.cpp
  8. 2
      modules/gpu/src/frame_queue.h
  9. 5
      modules/gpu/src/precomp.hpp
  10. 2
      modules/gpu/src/thread_wrappers.cpp
  11. 2
      modules/gpu/src/thread_wrappers.h
  12. 2
      modules/gpu/src/video_decoder.cpp
  13. 2
      modules/gpu/src/video_decoder.h
  14. 2
      modules/gpu/src/video_parser.cpp
  15. 2
      modules/gpu/src/video_parser.h
  16. 2
      modules/gpu/src/video_reader.cpp
  17. 10
      modules/gpu/test/test_video.cpp

@ -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" "${OpenCV_SOURCE_DIR}/modules/highgui/src")
ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/cuda" "${CMAKE_CURRENT_SOURCE_DIR}/../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")
@ -21,16 +21,16 @@ source_group("Src\\Cuda" FILES ${lib_cuda} ${lib_cuda_hdrs})
source_group("Device" FILES ${lib_device_hdrs})
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_cuda "src/nvidia/*.cu")
file(GLOB_RECURSE ncv_cuda "src/nvidia/*.cu")
set(ncv_files ${ncv_srcs} ${ncv_cuda})
source_group("Src\\NVidia" FILES ${ncv_files})
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_include_directories("src/nvidia" "src/nvidia/core" "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}")
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,13 +46,21 @@ if(HAVE_CUDA)
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
if(WIN32)
if(NOT APPLE)
unset(CUDA_nvcuvid_LIBRARY CACHE)
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 "")

@ -1045,12 +1045,10 @@ PERF_TEST_P(Video_Cn_MaxFeatures, DISABLED_Video_GMG,
}
}
#ifdef WIN32
//////////////////////////////////////////////////////
// VideoWriter
PERF_TEST_P(Video, Video_VideoWriter, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"))
PERF_TEST_P(Video, DISABLED_Video_VideoWriter, Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"))
{
declare.time(30);
@ -1147,6 +1145,4 @@ PERF_TEST_P(Video, Video_VideoReader, Values("gpu/video/768x576.avi", "gpu/video
}
}
#endif
} // namespace

@ -1,7 +1,7 @@
#include "cuvid_video_source.h"
#include "cu_safe_call.h"
#if defined(HAVE_CUDA) && defined(WIN32)
#if defined(HAVE_CUDA) && !defined(__APPLE__)
cv::gpu::detail::CuvidVideoSource::CuvidVideoSource(const std::string& fname)
{

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

@ -42,7 +42,7 @@
#include "ffmpeg_video_source.h"
#if defined(HAVE_CUDA) && defined(WIN32)
#if defined(HAVE_CUDA) && !defined(__APPLE__)
#if defined(HAVE_FFMPEG) && defined(BUILD_SHARED_LIBS)
#include "cap_ffmpeg_impl.hpp"

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

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

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

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

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

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

@ -43,7 +43,7 @@
#include "video_decoder.h"
#include "frame_queue.h"
#if defined(HAVE_CUDA) && defined(WIN32)
#if defined(HAVE_CUDA) && !defined(__APPLE__)
void cv::gpu::detail::VideoDecoder::create(const VideoReader_GPU::FormatInfo& videoFormat)
{

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

@ -43,7 +43,7 @@
#include "video_parser.h"
#include "cu_safe_call.h"
#if defined(HAVE_CUDA) && defined(WIN32)
#if defined(HAVE_CUDA) && !defined(__APPLE__)
cv::gpu::detail::VideoParser::VideoParser(VideoDecoder* videoDecoder, FrameQueue* frameQueue) :
videoDecoder_(videoDecoder), frameQueue_(frameQueue), unparsedPackets_(0), hasError_(false)

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

@ -42,7 +42,7 @@
#include "precomp.hpp"
#if !defined HAVE_CUDA || defined(CUDA_DISABLER) || !defined(WIN32)
#if !defined HAVE_CUDA || defined(CUDA_DISABLER) || defined(__APPLE__)
class cv::gpu::VideoReader_GPU::Impl
{

@ -43,11 +43,11 @@
#ifdef HAVE_CUDA
#ifdef WIN32
//////////////////////////////////////////////////////
// VideoWriter
#ifdef WIN32
PARAM_TEST_CASE(VideoWriter, cv::gpu::DeviceInfo, std::string)
{
cv::gpu::DeviceInfo devInfo;
@ -107,9 +107,13 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, VideoWriter, testing::Combine(
ALL_DEVICES,
testing::Values(std::string("768x576.avi"), std::string("1920x1080.avi"))));
#endif // WIN32
//////////////////////////////////////////////////////
// VideoReader
#ifdef HAVE_NVCUVID
PARAM_TEST_CASE(VideoReader, cv::gpu::DeviceInfo, std::string)
{
cv::gpu::DeviceInfo devInfo;
@ -147,6 +151,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_NVCUVID
#endif // HAVE_CUDA

Loading…
Cancel
Save