diff --git a/modules/cudacodec/src/ffmpeg_video_source.cpp b/modules/cudacodec/src/ffmpeg_video_source.cpp index 20a02f84b..867910fee 100644 --- a/modules/cudacodec/src/ffmpeg_video_source.cpp +++ b/modules/cudacodec/src/ffmpeg_video_source.cpp @@ -54,16 +54,12 @@ using namespace cv::cudacodec::detail; static std::string fourccToString(int fourcc) { - union { - int u32; - unsigned char c[4]; - } i32_c; - i32_c.u32 = fourcc; - return cv::format("%c%c%c%c", - (i32_c.c[0] >= ' ' && i32_c.c[0] < 128) ? i32_c.c[0] : '?', - (i32_c.c[1] >= ' ' && i32_c.c[1] < 128) ? i32_c.c[1] : '?', - (i32_c.c[2] >= ' ' && i32_c.c[2] < 128) ? i32_c.c[2] : '?', - (i32_c.c[3] >= ' ' && i32_c.c[3] < 128) ? i32_c.c[3] : '?'); + char str[5] = {'\0', '\0', '\0', '\0'}; + for (int i = 0; i < 4; i++) { + char c = (char)(fourcc >> i*8); + str[i] = ' ' <= c && c < 128 ? c : '?'; + } + return std::string(str); } // handle old FFmpeg backend - remove when windows shared library is updated diff --git a/modules/cudev/include/opencv2/cudev/util/vec_traits.hpp b/modules/cudev/include/opencv2/cudev/util/vec_traits.hpp index bff3744ef..92f360c88 100644 --- a/modules/cudev/include/opencv2/cudev/util/vec_traits.hpp +++ b/modules/cudev/include/opencv2/cudev/util/vec_traits.hpp @@ -188,6 +188,7 @@ template<> struct VecTraits namespace cv { +#ifndef CV_32U template <> class DataType { public: @@ -202,6 +203,7 @@ public: type = CV_MAKE_TYPE(depth, channels) }; }; +#endif #define CV_CUDEV_DATA_TYPE_INST(_depth_type, _channel_num) \ template <> class DataType< _depth_type ## _channel_num > \ diff --git a/modules/cudev/test/test_integral.cu b/modules/cudev/test/test_integral.cu index 3c34ffcc0..6bdb98bd9 100644 --- a/modules/cudev/test/test_integral.cu +++ b/modules/cudev/test/test_integral.cu @@ -48,7 +48,7 @@ using namespace cv::cuda; using namespace cv::cudev; using namespace cvtest; -TEST(Integral, _8u) +TEST(DISABLED_Integral, _8u) { const Size size = randomSize(100, 400); @@ -84,7 +84,7 @@ TEST(Integral, _32f) ASSERT_PRED_FORMAT2(cvtest::MatComparator(1e-5, 0), dst_gold, Mat(dst)); } -TEST(Integral, _8u_opt) +TEST(DISABLED_Integral, _8u_opt) { const Size size(640, 480);