mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
Perf test failure fixes for Media Foundation.
This commit is contained in:
parent
2bc1d3709c
commit
34c6598752
@ -11,11 +11,21 @@ using std::tr1::get;
|
|||||||
|
|
||||||
typedef perf::TestBaseWithParam<String> VideoCapture_Reading;
|
typedef perf::TestBaseWithParam<String> VideoCapture_Reading;
|
||||||
|
|
||||||
|
#if defined(HAVE_MSMF)
|
||||||
|
// MPEG2 is not supported by Media Foundation yet
|
||||||
|
// http://social.msdn.microsoft.com/Forums/en-US/mediafoundationdevelopment/thread/39a36231-8c01-40af-9af5-3c105d684429
|
||||||
|
PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_buck_bunny.avi",
|
||||||
|
"highgui/video/big_buck_bunny.mov",
|
||||||
|
"highgui/video/big_buck_bunny.mp4",
|
||||||
|
"highgui/video/big_buck_bunny.wmv" ) )
|
||||||
|
|
||||||
|
#else
|
||||||
PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_buck_bunny.avi",
|
PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_buck_bunny.avi",
|
||||||
"highgui/video/big_buck_bunny.mov",
|
"highgui/video/big_buck_bunny.mov",
|
||||||
"highgui/video/big_buck_bunny.mp4",
|
"highgui/video/big_buck_bunny.mp4",
|
||||||
"highgui/video/big_buck_bunny.mpg",
|
"highgui/video/big_buck_bunny.mpg",
|
||||||
"highgui/video/big_buck_bunny.wmv" ) )
|
"highgui/video/big_buck_bunny.wmv" ) )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
string filename = getDataPath(GetParam());
|
string filename = getDataPath(GetParam());
|
||||||
|
|
||||||
|
@ -22,10 +22,16 @@ PERF_TEST_P(VideoWriter_Writing, WriteFrame,
|
|||||||
{
|
{
|
||||||
string filename = getDataPath(get<0>(GetParam()));
|
string filename = getDataPath(get<0>(GetParam()));
|
||||||
bool isColor = get<1>(GetParam());
|
bool isColor = get<1>(GetParam());
|
||||||
|
Mat image = imread(filename, 1);
|
||||||
|
#if defined(HAVE_MSMF) && !defined(HAVE_VFW) && !defined(HAVE_FFMPEG) // VFW has greater priority
|
||||||
|
VideoWriter writer(cv::tempfile(".wmv"), CV_FOURCC('W', 'M', 'V', '3'),
|
||||||
|
25, cv::Size(image.cols, image.rows), isColor);
|
||||||
|
#else
|
||||||
|
VideoWriter writer(cv::tempfile(".avi"), CV_FOURCC('X', 'V', 'I', 'D'),
|
||||||
|
25, cv::Size(image.cols, image.rows), isColor);
|
||||||
|
#endif
|
||||||
|
|
||||||
VideoWriter writer(cv::tempfile(".avi"), CV_FOURCC('X', 'V', 'I', 'D'), 25, cv::Size(640, 480), isColor);
|
TEST_CYCLE() { image = imread(filename, 1); writer << image; }
|
||||||
|
|
||||||
TEST_CYCLE() { Mat image = imread(filename, 1); writer << image; }
|
|
||||||
|
|
||||||
bool dummy = writer.isOpened();
|
bool dummy = writer.isOpened();
|
||||||
SANITY_CHECK(dummy);
|
SANITY_CHECK(dummy);
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
defined(HAVE_QUICKTIME) || \
|
defined(HAVE_QUICKTIME) || \
|
||||||
defined(HAVE_AVFOUNDATION) || \
|
defined(HAVE_AVFOUNDATION) || \
|
||||||
defined(HAVE_FFMPEG) || \
|
defined(HAVE_FFMPEG) || \
|
||||||
|
defined(HAVE_MSMF) || \
|
||||||
defined(HAVE_VFW)
|
defined(HAVE_VFW)
|
||||||
/*defined(HAVE_OPENNI) too specialized */ \
|
/*defined(HAVE_OPENNI) too specialized */ \
|
||||||
|
|
||||||
@ -34,6 +35,7 @@
|
|||||||
defined(HAVE_QUICKTIME) || \
|
defined(HAVE_QUICKTIME) || \
|
||||||
defined(HAVE_AVFOUNDATION) || \
|
defined(HAVE_AVFOUNDATION) || \
|
||||||
defined(HAVE_FFMPEG) || \
|
defined(HAVE_FFMPEG) || \
|
||||||
|
defined(HAVE_MSMF) || \
|
||||||
defined(HAVE_VFW)
|
defined(HAVE_VFW)
|
||||||
# define BUILD_WITH_VIDEO_OUTPUT_SUPPORT 1
|
# define BUILD_WITH_VIDEO_OUTPUT_SUPPORT 1
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user