/* * Copyright (c) 2019, Alliance for Open Media. All rights reserved. * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at www.aomedia.org/license/software. If the Alliance for Open * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/ #include <memory> #include <string>
TEST_P(LevelTest, TestLevelMonitoringLowBitrate) { // To save run time, we only test speed 4. if (cpu_used_ == 4) {
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 30);
target_level_ = kLevelKeepStats;
cfg_.rc_target_bitrate = 1000;
cfg_.g_limit = 30;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_LE(level_[0], 0);
}
}
TEST_P(LevelTest, TestLevelMonitoringHighBitrate) { // To save run time, we only test speed 4. if (cpu_used_ == 4) {
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 30);
target_level_ = kLevelKeepStats;
cfg_.rc_target_bitrate = 4000;
cfg_.g_limit = 30;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_LE(level_[0], 4);
}
}
TEST_P(LevelTest, TestTargetLevel0) { // To save run time, we only test speed 4. if (cpu_used_ == 4) {
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 50); constint target_level = 0;
target_level_ = target_level;
cfg_.rc_target_bitrate = 4000;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_LE(level_[0], target_level);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.