]> granicus.if.org Git - libvpx/commitdiff
resize_test: skip VP9 decode checks if it's disabled
authorJames Zern <jzern@google.com>
Wed, 27 Apr 2016 02:56:44 +0000 (19:56 -0700)
committerJames Zern <jzern@google.com>
Wed, 27 Apr 2016 02:56:44 +0000 (19:56 -0700)
Change-Id: Ieab273a779c44e1c4648642e9f12735b81bd2300

test/resize_test.cc

index eaebd757278acbd19a233e5789a1c26ba4e72c01..90f5452e9dd5907f24f976bd2d2f893d36f92f4e 100644 (file)
@@ -7,6 +7,8 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
+#include <stdio.h>
+
 #include <climits>
 #include <vector>
 #include "third_party/googletest/src/include/gtest/gtest.h"
@@ -558,9 +560,13 @@ TEST_P(ResizeRealtimeTest, TestInternalResizeDown) {
     }
   }
 
+#if CONFIG_VP9_DECODER
   // Verify that we get 1 resize down event in this test.
   ASSERT_EQ(1, resize_count) << "Resizing should occur.";
   EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
+#else
+  printf("Warning: VP9 decoder unavailable, unable to check resize count!\n");
+#endif
 }
 
 // Verify the dynamic resizer behavior for real time, 1 pass CBR mode.
@@ -602,9 +608,13 @@ TEST_P(ResizeRealtimeTest, TestInternalResizeDownUpChangeBitRate) {
     }
   }
 
+#if CONFIG_VP9_DECODER
   // Verify that we get 2 resize events in this test.
   ASSERT_EQ(resize_count, 2) << "Resizing should occur twice.";
   EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
+#else
+  printf("Warning: VP9 decoder unavailable, unable to check resize count!\n");
+#endif
 }
 
 vpx_img_fmt_t CspForFrameNumber(int frame) {