namespace { // This class is used to validate if screen_content_tools are turned on // appropriately. class ScreenContentToolsTestLarge
: public ::libaom_test::CodecTestWith3Params<
libaom_test::TestMode, aom_rc_mode, aom_screen_detection_mode>, public ::libaom_test::EncoderTest { protected:
ScreenContentToolsTestLarge()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
rc_end_usage_(GET_PARAM(2)),
screen_content_tools_detection_mode_(GET_PARAM(3)) {
is_screen_content_violated_ = true;
tune_content_ = AOM_CONTENT_DEFAULT;
}
~ScreenContentToolsTestLarge() override = default;
TEST_P(ScreenContentToolsTestLarge, ScreenContentToolsTest) { // force screen content tools on
::libaom_test::Y4mVideoSource video_nonsc("park_joy_90p_8_444.y4m", 0, 1);
cfg_.g_profile = 1;
tune_content_ = AOM_CONTENT_SCREEN;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video_nonsc));
ASSERT_EQ(is_screen_content_violated_, false)
<< "Failed for tune_content_ = AOM_CONTENT_SCREEN";
// Don't force screen content, however as the input is screen content // allow_screen_content_tools should still be turned on
::libaom_test::Y4mVideoSource video_sc("desktop_credits.y4m", 0, 1);
cfg_.g_profile = 1;
is_screen_content_violated_ = true;
tune_content_ = AOM_CONTENT_DEFAULT;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video_sc));
ASSERT_EQ(is_screen_content_violated_, false)
<< "Failed detection of screen content";
// The test below is only enabled for mode 2 because the input consists of // anti-aliased text, which mode 1 can't determine as screen content if (screen_content_tools_detection_mode_ ==
AOM_SCREEN_DETECTION_ANTIALIASING_AWARE) { // low resolution test
::libaom_test::Y4mVideoSource video_sc_lowres("screendata.y4m", 0, 1);
cfg_.g_profile = 0;
is_screen_content_violated_ = true;
tune_content_ = AOM_CONTENT_DEFAULT;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video_sc_lowres));
ASSERT_EQ(is_screen_content_violated_, false)
<< "Failed detection of screen content(lowres)";
}
}
class ScreenContentToolsMultiThreadTestLarge
: public ScreenContentToolsTestLarge {};
TEST_P(ScreenContentToolsMultiThreadTestLarge, ScreenContentToolsTest) { // Don't force screen content, however as the input is screen content // allow_screen_content_tools should still be turned on even with // multi-threaded encoding.
::libaom_test::Y4mVideoSource video_sc("desktop_credits.y4m", 0, 10);
cfg_.g_profile = 1;
cfg_.g_threads = 4;
is_screen_content_violated_ = true;
tune_content_ = AOM_CONTENT_DEFAULT;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video_sc));
ASSERT_EQ(is_screen_content_violated_, false)
<< "Failed detection of screen content";
}
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.