Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: source/libvpx/test/datarate_test.cc

Issue 111463005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/convolve_test.cc ('k') | source/libvpx/test/dct16x16_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "third_party/googletest/src/include/gtest/gtest.h" 10 #include "third_party/googletest/src/include/gtest/gtest.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 cfg_.rc_min_quantizer = 0; 241 cfg_.rc_min_quantizer = 0;
242 cfg_.rc_max_quantizer = 63; 242 cfg_.rc_max_quantizer = 63;
243 cfg_.rc_end_usage = VPX_CBR; 243 cfg_.rc_end_usage = VPX_CBR;
244 244
245 ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288, 245 ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
246 30, 1, 0, 140); 246 30, 1, 0, 140);
247 for (int i = 150; i < 800; i += 200) { 247 for (int i = 150; i < 800; i += 200) {
248 cfg_.rc_target_bitrate = i; 248 cfg_.rc_target_bitrate = i;
249 ResetModel(); 249 ResetModel();
250 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); 250 ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
251 ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.8) 251 ASSERT_GE(static_cast<double>(cfg_.rc_target_bitrate),
252 effective_datarate_ * 0.85)
252 << " The datarate for the file exceeds the target by too much!"; 253 << " The datarate for the file exceeds the target by too much!";
253 ASSERT_LE(cfg_.rc_target_bitrate, effective_datarate_ * 1.3) 254 ASSERT_LE(static_cast<double>(cfg_.rc_target_bitrate),
255 effective_datarate_ * 1.15)
254 << " The datarate for the file missed the target!"; 256 << " The datarate for the file missed the target!";
255 } 257 }
256 } 258 }
257 259
258 VP8_INSTANTIATE_TEST_CASE(DatarateTest, ALL_TEST_MODES); 260 VP8_INSTANTIATE_TEST_CASE(DatarateTest, ALL_TEST_MODES);
259 VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9, 261 VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9,
260 ::testing::Values(::libvpx_test::kOnePassGood), 262 ::testing::Values(::libvpx_test::kOnePassGood),
261 ::testing::Range(1, 5)); 263 ::testing::Range(1, 5));
262 } // namespace 264 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/convolve_test.cc ('k') | source/libvpx/test/dct16x16_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698