mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 23:37:33 +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
|
|
@ -38,8 +38,7 @@ class DatarateTestLarge
|
|||
virtual ~DatarateTestLarge() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
InitializeConfig(GET_PARAM(1));
|
||||
ResetModel();
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +57,9 @@ class DatarateTestLarge
|
|||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.7)
|
||||
<< " The datarate for the file is lower than target by too much!";
|
||||
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.3)
|
||||
// FIXME(jingning): Lower this test threshold after vbr mode can render
|
||||
// sufficiently accurate bit rate.
|
||||
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.45)
|
||||
<< " The datarate for the file is greater than target by too much!";
|
||||
}
|
||||
|
||||
|
|
@ -78,6 +79,56 @@ class DatarateTestLarge
|
|||
cfg_.rc_target_bitrate = bitrate_array[GET_PARAM(4)];
|
||||
ResetModel();
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.85)
|
||||
<< " The datarate for the file is lower than target by too much!";
|
||||
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.16)
|
||||
<< " The datarate for the file is greater than target by too much!";
|
||||
}
|
||||
|
||||
virtual void BasicRateTargetingMultiThreadCBRTest() {
|
||||
::libaom_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30,
|
||||
1, 0, 400);
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
cfg_.rc_dropframe_thresh = 1;
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
cfg_.rc_max_quantizer = 63;
|
||||
cfg_.rc_end_usage = AOM_CBR;
|
||||
cfg_.g_lag_in_frames = 0;
|
||||
cfg_.g_threads = 4;
|
||||
|
||||
const int bitrate_array[2] = { 250, 650 };
|
||||
cfg_.rc_target_bitrate = bitrate_array[GET_PARAM(4)];
|
||||
ResetModel();
|
||||
tile_column_ = 2;
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(static_cast<double>(cfg_.rc_target_bitrate),
|
||||
effective_datarate_ * 0.85)
|
||||
<< " The datarate for the file exceeds the target by too much!";
|
||||
ASSERT_LE(static_cast<double>(cfg_.rc_target_bitrate),
|
||||
effective_datarate_ * 1.15)
|
||||
<< " The datarate for the file missed the target!"
|
||||
<< cfg_.rc_target_bitrate << " " << effective_datarate_;
|
||||
}
|
||||
|
||||
virtual void ErrorResilienceOnSceneCuts() {
|
||||
if (GET_PARAM(4) > 0) return;
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
cfg_.rc_dropframe_thresh = 0;
|
||||
cfg_.g_error_resilient = 1;
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
cfg_.rc_max_quantizer = 63;
|
||||
cfg_.rc_end_usage = AOM_CBR;
|
||||
cfg_.g_lag_in_frames = 0;
|
||||
|
||||
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352,
|
||||
288, 30, 1, 0, 300);
|
||||
cfg_.rc_target_bitrate = 500;
|
||||
ResetModel();
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.85)
|
||||
<< " The datarate for the file is lower than target by too much!";
|
||||
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.15)
|
||||
|
|
@ -108,6 +159,31 @@ class DatarateTestLarge
|
|||
<< " The datarate for the file is greater than target by too much!";
|
||||
}
|
||||
|
||||
virtual void CBRPeriodicKeyFrameOnSceneCuts() {
|
||||
if (GET_PARAM(4) > 0) return;
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
cfg_.rc_dropframe_thresh = 0;
|
||||
cfg_.rc_min_quantizer = 0;
|
||||
cfg_.rc_max_quantizer = 63;
|
||||
cfg_.rc_end_usage = AOM_CBR;
|
||||
cfg_.g_lag_in_frames = 0;
|
||||
// Periodic keyframe
|
||||
cfg_.kf_max_dist = 30;
|
||||
cfg_.kf_min_dist = 30;
|
||||
|
||||
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352,
|
||||
288, 30, 1, 0, 300);
|
||||
cfg_.rc_target_bitrate = 500;
|
||||
ResetModel();
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.85)
|
||||
<< " The datarate for the file is lower than target by too much!";
|
||||
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.3)
|
||||
<< " The datarate for the file is greater than target by too much!";
|
||||
}
|
||||
|
||||
virtual void BasicRateTargetingAQModeOnOffCBRTest() {
|
||||
if (GET_PARAM(4) > 0) return;
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
|
|
@ -125,8 +201,7 @@ class DatarateTestLarge
|
|||
|
||||
::libaom_test::I420VideoSource video("pixel_capture_w320h240.yuv", 320, 240,
|
||||
30, 1, 0, 310);
|
||||
const int bitrate_array[1] = { 60 };
|
||||
cfg_.rc_target_bitrate = bitrate_array[GET_PARAM(4)];
|
||||
cfg_.rc_target_bitrate = 60;
|
||||
ResetModel();
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.85)
|
||||
|
|
@ -178,8 +253,7 @@ class DatarateTestFrameDropLarge
|
|||
virtual ~DatarateTestFrameDropLarge() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
InitializeConfig(GET_PARAM(1));
|
||||
ResetModel();
|
||||
}
|
||||
|
||||
|
|
@ -240,11 +314,26 @@ TEST_P(DatarateTestLarge, BasicRateTargetingCBR) {
|
|||
BasicRateTargetingCBRTest();
|
||||
}
|
||||
|
||||
// Check basic rate targeting for CBR, with 4 threads
|
||||
TEST_P(DatarateTestLarge, BasicRateTargetingMultiThreadCBR) {
|
||||
BasicRateTargetingMultiThreadCBRTest();
|
||||
}
|
||||
|
||||
// Check basic rate targeting for periodic key frame.
|
||||
TEST_P(DatarateTestLarge, PeriodicKeyFrameCBR) {
|
||||
BasicRateTargetingCBRPeriodicKeyFrameTest();
|
||||
}
|
||||
|
||||
// Check basic rate targeting for periodic key frame, aligned with scene change.
|
||||
TEST_P(DatarateTestLarge, PeriodicKeyFrameCBROnSceneCuts) {
|
||||
CBRPeriodicKeyFrameOnSceneCuts();
|
||||
}
|
||||
|
||||
// Check basic rate targeting with error resilience on for scene cuts.
|
||||
TEST_P(DatarateTestLarge, ErrorResilienceOnSceneCuts) {
|
||||
ErrorResilienceOnSceneCuts();
|
||||
}
|
||||
|
||||
// Check basic rate targeting for CBR.
|
||||
TEST_P(DatarateTestLarge, BasicRateTargeting444CBR) {
|
||||
BasicRateTargeting444CBRTest();
|
||||
|
|
@ -281,8 +370,7 @@ class DatarateTestSpeedChangeRealtime
|
|||
virtual ~DatarateTestSpeedChangeRealtime() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
SetMode(GET_PARAM(1));
|
||||
InitializeConfig(GET_PARAM(1));
|
||||
ResetModel();
|
||||
}
|
||||
|
||||
|
|
@ -310,7 +398,7 @@ class DatarateTestSpeedChangeRealtime
|
|||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.83)
|
||||
<< " The datarate for the file is lower than target by too much!";
|
||||
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.20)
|
||||
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.21)
|
||||
<< " The datarate for the file is greater than target by too much!";
|
||||
}
|
||||
};
|
||||
|
|
@ -325,11 +413,26 @@ TEST_P(DatarateTestRealtime, BasicRateTargetingCBR) {
|
|||
BasicRateTargetingCBRTest();
|
||||
}
|
||||
|
||||
// Check basic rate targeting for CBR, with 4 threads
|
||||
TEST_P(DatarateTestRealtime, BasicRateTargetingMultiThreadCBR) {
|
||||
BasicRateTargetingMultiThreadCBRTest();
|
||||
}
|
||||
|
||||
// Check basic rate targeting for periodic key frame.
|
||||
TEST_P(DatarateTestRealtime, PeriodicKeyFrameCBR) {
|
||||
BasicRateTargetingCBRPeriodicKeyFrameTest();
|
||||
}
|
||||
|
||||
// Check basic rate targeting for periodic key frame, aligned with scene change.
|
||||
TEST_P(DatarateTestRealtime, PeriodicKeyFrameCBROnSceneCuts) {
|
||||
CBRPeriodicKeyFrameOnSceneCuts();
|
||||
}
|
||||
|
||||
// Check basic rate targeting with error resilience on for scene cuts.
|
||||
TEST_P(DatarateTestRealtime, ErrorResilienceOnSceneCuts) {
|
||||
ErrorResilienceOnSceneCuts();
|
||||
}
|
||||
|
||||
// Check basic rate targeting for CBR.
|
||||
TEST_P(DatarateTestRealtime, BasicRateTargeting444CBR) {
|
||||
BasicRateTargeting444CBRTest();
|
||||
|
|
@ -347,27 +450,27 @@ TEST_P(DatarateTestSpeedChangeRealtime, ChangingSpeedTest) {
|
|||
ChangingSpeedTest();
|
||||
}
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(DatarateTestLarge,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Range(5, 7), ::testing::Values(0, 3),
|
||||
::testing::Values(0, 1));
|
||||
AV1_INSTANTIATE_TEST_SUITE(DatarateTestLarge,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Range(5, 7), ::testing::Values(0, 3),
|
||||
::testing::Values(0, 1));
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(DatarateTestFrameDropLarge,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Range(5, 7), ::testing::Values(0, 3));
|
||||
AV1_INSTANTIATE_TEST_SUITE(DatarateTestFrameDropLarge,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Range(5, 7), ::testing::Values(0, 3));
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(DatarateTestRealtime,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Range(7, 9), ::testing::Values(0, 3),
|
||||
::testing::Values(0, 1));
|
||||
AV1_INSTANTIATE_TEST_SUITE(DatarateTestRealtime,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Range(7, 11), ::testing::Values(0, 3),
|
||||
::testing::Values(0, 1));
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(DatarateTestFrameDropRealtime,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Range(7, 9), ::testing::Values(0, 3));
|
||||
AV1_INSTANTIATE_TEST_SUITE(DatarateTestFrameDropRealtime,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Range(7, 11), ::testing::Values(0, 3));
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(DatarateTestSpeedChangeRealtime,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Values(0, 3));
|
||||
AV1_INSTANTIATE_TEST_SUITE(DatarateTestSpeedChangeRealtime,
|
||||
::testing::Values(::libaom_test::kRealTime),
|
||||
::testing::Values(0, 3));
|
||||
|
||||
} // namespace
|
||||
} // namespace datarate_test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue