shithub: libvpx

Download patch

ref: 0a0c2930c6c1b5e6a1eba5572d29a54249886599
parent: ac94505ed7295b226580cc0737615f29acdbddf1
parent: bb061388a2cf1ce7ab9800455f4dd385c2bac3cd
author: James Zern <jzern@google.com>
date: Mon Feb 3 18:08:53 EST 2014

Merge changes I9ebfeb49,I2e2f9bb6

* changes:
  resize_test: use const_iterator where appropriate
  resize_test: silence a warning

--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -146,16 +146,16 @@
   ResizingVideoSource video;
   ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 
-  for (std::vector<FrameInfo>::iterator info = frame_info_list_.begin();
+  for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
        info != frame_info_list_.end(); ++info) {
-    const vpx_codec_pts_t pts = info->pts;
-    const unsigned int expected_w = ScaleForFrameNumber(pts, kInitialWidth);
-    const unsigned int expected_h = ScaleForFrameNumber(pts, kInitialHeight);
+    const unsigned int frame = static_cast<unsigned>(info->pts);
+    const unsigned int expected_w = ScaleForFrameNumber(frame, kInitialWidth);
+    const unsigned int expected_h = ScaleForFrameNumber(frame, kInitialHeight);
 
     EXPECT_EQ(expected_w, info->w)
-        << "Frame " << pts << "had unexpected width";
+        << "Frame " << frame << "had unexpected width";
     EXPECT_EQ(expected_h, info->h)
-        << "Frame " << pts << "had unexpected height";
+        << "Frame " << frame << "had unexpected height";
   }
 }
 
@@ -247,7 +247,7 @@
   cfg_.g_lag_in_frames = 0;
   ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 
-  for (std::vector<FrameInfo>::iterator info = frame_info_list_.begin();
+  for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
        info != frame_info_list_.end(); ++info) {
     const vpx_codec_pts_t pts = info->pts;
     if (pts >= kStepDownFrame && pts < kStepUpFrame) {