mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 16:37:31 +09:00
Issue #1937 - Part 2: Update libaom source.
This commit is contained in:
parent
d09a5eeca2
commit
ecb7ec7377
948 changed files with 244949 additions and 88095 deletions
|
|
@ -42,14 +42,10 @@ class LevelTest
|
|||
virtual ~LevelTest() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
SetMode(encoding_mode_);
|
||||
InitializeConfig(encoding_mode_);
|
||||
if (encoding_mode_ != ::libaom_test::kRealTime) {
|
||||
cfg_.g_lag_in_frames = 5;
|
||||
cfg_.rc_end_usage = AOM_VBR;
|
||||
} else {
|
||||
cfg_.g_lag_in_frames = 0;
|
||||
cfg_.rc_end_usage = AOM_CBR;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 600;
|
||||
|
|
@ -80,7 +76,7 @@ class LevelTest
|
|||
};
|
||||
|
||||
TEST_P(LevelTest, TestTargetLevelApi) {
|
||||
static const aom_codec_iface_t *codec = &aom_codec_av1_cx_algo;
|
||||
static aom_codec_iface_t *codec = aom_codec_av1_cx();
|
||||
aom_codec_ctx_t enc;
|
||||
aom_codec_enc_cfg_t cfg;
|
||||
EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_config_default(codec, &cfg, 0));
|
||||
|
|
@ -108,7 +104,7 @@ TEST_P(LevelTest, TestTargetLevelApi) {
|
|||
TEST_P(LevelTest, TestTargetLevel19) {
|
||||
std::unique_ptr<libaom_test::VideoSource> video;
|
||||
video.reset(new libaom_test::Y4mVideoSource("park_joy_90p_8_420.y4m", 0, 10));
|
||||
ASSERT_TRUE(video.get() != NULL);
|
||||
ASSERT_NE(video, nullptr);
|
||||
// Level index 19 corresponding to level 6.3.
|
||||
target_level_ = 19;
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video.get()));
|
||||
|
|
@ -121,6 +117,7 @@ TEST_P(LevelTest, TestLevelMonitoringLowBitrate) {
|
|||
30, 1, 0, 40);
|
||||
target_level_ = kLevelKeepStats;
|
||||
cfg_.rc_target_bitrate = 1000;
|
||||
cfg_.g_limit = 40;
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_EQ(level_[0], 0);
|
||||
}
|
||||
|
|
@ -133,8 +130,9 @@ TEST_P(LevelTest, TestLevelMonitoringHighBitrate) {
|
|||
30, 1, 0, 40);
|
||||
target_level_ = kLevelKeepStats;
|
||||
cfg_.rc_target_bitrate = 4000;
|
||||
cfg_.g_limit = 40;
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_EQ(level_[0], 1);
|
||||
ASSERT_EQ(level_[0], 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +149,19 @@ TEST_P(LevelTest, TestTargetLevel0) {
|
|||
}
|
||||
}
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(LevelTest,
|
||||
::testing::Values(::libaom_test::kTwoPassGood),
|
||||
::testing::ValuesIn(kCpuUsedVectors));
|
||||
TEST_P(LevelTest, TestTargetLevelRecode) {
|
||||
if (cpu_used_ == 4 && encoding_mode_ == ::libaom_test::kTwoPassGood) {
|
||||
libaom_test::I420VideoSource video("rand_noise_w1280h720.yuv", 1280, 720,
|
||||
25, 1, 0, 10);
|
||||
const int target_level = 0005;
|
||||
target_level_ = target_level;
|
||||
cfg_.rc_target_bitrate = 5000;
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
}
|
||||
}
|
||||
|
||||
AV1_INSTANTIATE_TEST_SUITE(LevelTest,
|
||||
::testing::Values(::libaom_test::kTwoPassGood,
|
||||
::libaom_test::kOnePassGood),
|
||||
::testing::ValuesIn(kCpuUsedVectors));
|
||||
} // namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue