/* * Copyright (c) 2020, 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.
*/
TEST(KeyFrameIntervalTest, KeyFrameMaximumInterval) { for (unsignedint usage : { AOM_USAGE_GOOD_QUALITY, AOM_USAGE_REALTIME }) { // Test 0 and 1 (both mean all intra), some powers of 2, some multiples of // 10, and some prime numbers. for (unsignedint kf_max_dist :
{ 0, 1, 2, 3, 4, 7, 10, 13, 16, 20, 23, 29, 32 }) {
TestKeyFrameMaximumInterval(usage, kf_max_dist);
}
}
}
// This class is used to test the presence of forward key frame. class KeyFrameIntervalTestLarge
: public ::libaom_test::CodecTestWith3Params<libaom_test::TestMode,
kfIntervalParam, aom_rc_mode>, public ::libaom_test::EncoderTest { protected:
KeyFrameIntervalTestLarge()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
kf_dist_param_(GET_PARAM(2)), end_usage_check_(GET_PARAM(3)) {
kf_dist_ = -1;
is_kf_interval_violated_ = false;
}
~KeyFrameIntervalTestLarge() override = default;
// Because valgrind builds take a very long time to run, use a lower // resolution video for valgrind runs. constchar *TestFileName() { #ifdef AOM_VALGRIND_BUILD return"hantro_collage_w176h144.yuv"; #else return"hantro_collage_w352h288.yuv"; #endif// AOM_VALGRIND_BUILD
}
::libaom_test::TestMode encoding_mode_; int auto_alt_ref_; int fwd_kf_enabled_; int cpu_used_;
aom_rc_mode rc_end_usage_; int forced_kf_frame_num_; unsignedint frame_num_; bool is_kf_placement_violated_;
};
void ForcedKeyTestLarge::Frame1IsKey() { const aom_rational timebase = { 1, 30 }; // 1st element of this 2D array is for good encoding mode and 2nd element // is for RT encoding mode. constint lag_values[2][NUM_LAG_VALUES] = { { 3, 15, 25 }, { 0, -1, -1 } }; int is_realtime = (encoding_mode_ == ::libaom_test::kRealTime);
// Two pass and single pass CBR are currently segfaulting for the case when // forced kf is placed after lag in frames. // TODO(anyone): Enable(uncomment) below test once above bug is fixed. // frame_num_ = 0; // forced_kf_frame_num_ = lag_values[i] + 1; // cfg_.g_lag_in_frames = lag_values[i]; // is_kf_placement_violated_ = false; // ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); // ASSERT_EQ(is_kf_placement_violated_, false) // << "Frame #" << frame_num_ << " isn't a keyframe!";
}
}
class ForcedKeyRTTestLarge : public ForcedKeyTestLarge {};
TEST_P(ForcedKeyRTTestLarge, Frame1IsKey) { Frame1IsKey(); }
TEST_P(ForcedKeyRTTestLarge, ForcedFrameIsKeyCornerCases) {
ForcedFrameIsKeyCornerCases();
} // TODO(anyone): Add CBR to list of rc_modes once forced kf placement after // lag in frames bug is fixed.
AV1_INSTANTIATE_TEST_SUITE(ForcedKeyTestLarge,
::testing::Values(::libaom_test::kOnePassGood,
::libaom_test::kTwoPassGood),
::testing::Values(0, 1), ::testing::Values(0, 1),
::testing::Values(2, 5),
::testing::Values(AOM_Q, AOM_VBR, AOM_CQ));
AV1_INSTANTIATE_TEST_SUITE(ForcedKeyRTTestLarge,
::testing::Values(::libaom_test::kRealTime),
::testing::Values(0), ::testing::Values(0),
::testing::Values(7, 9),
::testing::Values(AOM_Q, AOM_VBR, AOM_CBR));
} // namespace
Messung V0.5
¤ 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.0.1Bemerkung:
(vorverarbeitet)
¤
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.