1 #include "perf_precomp.hpp"
3 #if BUILD_WITH_VIDEO_OUTPUT_SUPPORT
8 using std::tr1::make_tuple;
11 typedef std::tr1::tuple<String, bool> VideoWriter_Writing_t;
12 typedef perf::TestBaseWithParam<VideoWriter_Writing_t> VideoWriter_Writing;
14 PERF_TEST_P(VideoWriter_Writing, WriteFrame,
15 testing::Combine( testing::Values( "python/images/QCIF_00.bmp",
16 "python/images/QCIF_01.bmp",
17 "python/images/QCIF_02.bmp",
18 "python/images/QCIF_03.bmp",
19 "python/images/QCIF_04.bmp",
20 "python/images/QCIF_05.bmp" ),
23 string filename = getDataPath(get<0>(GetParam()));
24 bool isColor = get<1>(GetParam());
26 VideoWriter writer(cv::tempfile(".avi"), CV_FOURCC('X', 'V', 'I', 'D'), 25, cv::Size(640, 480), isColor);
28 TEST_CYCLE() { Mat image = imread(filename, 1); writer << image; }
30 bool dummy = writer.isOpened();
34 #endif // BUILD_WITH_VIDEO_OUTPUT_SUPPORT