| Index: webrtc/modules/video_processing/test/video_processing_unittest.cc
|
| diff --git a/webrtc/modules/video_processing/test/video_processing_unittest.cc b/webrtc/modules/video_processing/test/video_processing_unittest.cc
|
| index 4b5334cc31665831684522156d0e691ce2c6b570..0d18d0a4c891a47381e359994818dd3bb9330efb 100644
|
| --- a/webrtc/modules/video_processing/test/video_processing_unittest.cc
|
| +++ b/webrtc/modules/video_processing/test/video_processing_unittest.cc
|
| @@ -59,10 +59,9 @@
|
| VideoProcessingTest::VideoProcessingTest()
|
| : vp_(NULL),
|
| source_file_(NULL),
|
| - vtt_(GetParam()),
|
| - width_(vtt_.width),
|
| + width_(352),
|
| half_width_((width_ + 1) / 2),
|
| - height_(vtt_.height),
|
| + height_(288),
|
| size_y_(width_ * height_),
|
| size_uv_(half_width_ * ((height_ + 1) / 2)),
|
| frame_length_(CalcBufferSize(kI420, width_, height_)) {}
|
| @@ -70,15 +69,18 @@
|
| void VideoProcessingTest::SetUp() {
|
| vp_ = VideoProcessing::Create();
|
| ASSERT_TRUE(vp_ != NULL);
|
| +
|
| video_frame_.CreateEmptyFrame(width_, height_, width_,
|
| half_width_, half_width_);
|
| // Clear video frame so DrMemory/Valgrind will allow reads of the buffer.
|
| memset(video_frame_.buffer(kYPlane), 0, video_frame_.allocated_size(kYPlane));
|
| memset(video_frame_.buffer(kUPlane), 0, video_frame_.allocated_size(kUPlane));
|
| memset(video_frame_.buffer(kVPlane), 0, video_frame_.allocated_size(kVPlane));
|
| - source_file_ = fopen(vtt_.file_name.c_str(), "rb");
|
| + const std::string video_file =
|
| + webrtc::test::ResourcePath("foreman_cif", "yuv");
|
| + source_file_ = fopen(video_file.c_str(), "rb");
|
| ASSERT_TRUE(source_file_ != NULL)
|
| - << "Cannot read source file: " + vtt_.file_name + "\n";
|
| + << "Cannot read source file: " + video_file + "\n";
|
| }
|
|
|
| void VideoProcessingTest::TearDown() {
|
| @@ -91,9 +93,9 @@
|
| }
|
|
|
| #if defined(WEBRTC_IOS)
|
| -TEST_P(VideoProcessingTest, DISABLED_HandleNullBuffer) {
|
| -#else
|
| -TEST_P(VideoProcessingTest, HandleNullBuffer) {
|
| +TEST_F(VideoProcessingTest, DISABLED_HandleNullBuffer) {
|
| +#else
|
| +TEST_F(VideoProcessingTest, HandleNullBuffer) {
|
| #endif
|
| // TODO(mikhal/stefan): Do we need this one?
|
| VideoProcessing::FrameStats stats;
|
| @@ -109,9 +111,9 @@
|
| }
|
|
|
| #if defined(WEBRTC_IOS)
|
| -TEST_P(VideoProcessingTest, DISABLED_HandleBadStats) {
|
| -#else
|
| -TEST_P(VideoProcessingTest, HandleBadStats) {
|
| +TEST_F(VideoProcessingTest, DISABLED_HandleBadStats) {
|
| +#else
|
| +TEST_F(VideoProcessingTest, HandleBadStats) {
|
| #endif
|
| VideoProcessing::FrameStats stats;
|
| vp_->ClearFrameStats(&stats);
|
| @@ -127,9 +129,9 @@
|
| }
|
|
|
| #if defined(WEBRTC_IOS)
|
| -TEST_P(VideoProcessingTest, DISABLED_IdenticalResultsAfterReset) {
|
| -#else
|
| -TEST_P(VideoProcessingTest, IdenticalResultsAfterReset) {
|
| +TEST_F(VideoProcessingTest, DISABLED_IdenticalResultsAfterReset) {
|
| +#else
|
| +TEST_F(VideoProcessingTest, IdenticalResultsAfterReset) {
|
| #endif
|
| VideoFrame video_frame2;
|
| VideoProcessing::FrameStats stats;
|
| @@ -164,9 +166,9 @@
|
| }
|
|
|
| #if defined(WEBRTC_IOS)
|
| -TEST_P(VideoProcessingTest, DISABLED_FrameStats) {
|
| -#else
|
| -TEST_P(VideoProcessingTest, FrameStats) {
|
| +TEST_F(VideoProcessingTest, DISABLED_FrameStats) {
|
| +#else
|
| +TEST_F(VideoProcessingTest, FrameStats) {
|
| #endif
|
| VideoProcessing::FrameStats stats;
|
| vp_->ClearFrameStats(&stats);
|
| @@ -193,9 +195,9 @@
|
| }
|
|
|
| #if defined(WEBRTC_IOS)
|
| -TEST_P(VideoProcessingTest, DISABLED_PreprocessorLogic) {
|
| -#else
|
| -TEST_P(VideoProcessingTest, PreprocessorLogic) {
|
| +TEST_F(VideoProcessingTest, DISABLED_PreprocessorLogic) {
|
| +#else
|
| +TEST_F(VideoProcessingTest, PreprocessorLogic) {
|
| #endif
|
| // Disable temporal sampling (frame dropping).
|
| vp_->EnableTemporalDecimation(false);
|
| @@ -216,9 +218,9 @@
|
| }
|
|
|
| #if defined(WEBRTC_IOS)
|
| -TEST_P(VideoProcessingTest, DISABLED_Resampler) {
|
| -#else
|
| -TEST_P(VideoProcessingTest, Resampler) {
|
| +TEST_F(VideoProcessingTest, DISABLED_Resampler) {
|
| +#else
|
| +TEST_F(VideoProcessingTest, Resampler) {
|
| #endif
|
| enum { NumRuns = 1 };
|
|
|
| @@ -304,12 +306,6 @@
|
| static_cast<int>(total_runtime));
|
| printf("Min run time = %d us / frame\n\n", static_cast<int>(min_runtime));
|
| }
|
| -
|
| -INSTANTIATE_TEST_CASE_P(ForemanCif,
|
| - VideoProcessingTest,
|
| - ::testing::Values(VideoToTest(
|
| - {webrtc::test::ResourcePath("foreman_cif", "yuv"),
|
| - 352, 288})));
|
|
|
| void PreprocessFrameAndVerify(const VideoFrame& source,
|
| int target_width,
|
|
|