/* * Copyright (c) 2018 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "./vpx_config.h" #include "gtest/gtest.h" #include "test/codec_factory.h" #include "test/encode_test_driver.h" #include "test/i420_video_source.h" #include "test/svc_test.h" #include "test/util.h" #include "test/y4m_video_source.h" #include "vp9/common/vp9_onyxc_int.h" #include "vpx/vpx_codec.h" #include "vpx_ports/bitops.h" namespace svc_test { namespace { INTER_LAYER_PRED; class ScalePartitionOnePassCbrSvc : public OnePassCbrSvc, public ::testing::TestWithParam<const ::libvpx_test::CodecFactory *> { … }; TEST_P(ScalePartitionOnePassCbrSvc, OnePassCbrSvc3SL3TL1080P) { … } // Params: Inter layer prediction modes. class SyncFrameOnePassCbrSvc : public OnePassCbrSvc, public ::libvpx_test::CodecTestWithParam<int> { … }; // Test for sync layer for 1 pass CBR SVC: 3 spatial layers and // 3 temporal layers. Only start decoding on the sync layer. // Full sync: insert key frame on base layer. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc3SL3TLFullSync) { … } // Test for sync layer for 1 pass CBR SVC: 2 spatial layers and // 3 temporal layers. Decoding QVGA before sync frame and decode up to // VGA on and after sync. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc2SL3TLSyncToVGA) { … } // Test for sync layer for 1 pass CBR SVC: 3 spatial layers and // 3 temporal layers. Decoding QVGA and VGA before sync frame and decode up to // HD on and after sync. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc3SL3TLSyncToHD) { … } // Test for sync layer for 1 pass CBR SVC: 3 spatial layers and // 3 temporal layers. Decoding QVGA before sync frame and decode up to // HD on and after sync. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc3SL3TLSyncToVGAHD) { … } #if CONFIG_VP9_TEMPORAL_DENOISING // Test for sync layer for 1 pass CBR SVC: 2 spatial layers and // 3 temporal layers. Decoding QVGA before sync frame and decode up to // VGA on and after sync. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc2SL3TLSyncFrameVGADenoise) { … } #endif // Encode 3 spatial, 2 temporal layer in flexible mode but don't // start decoding. During the sequence insert intra-only on base/qvga // layer at frame 20 and start decoding only QVGA layer from there. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc3SL3TLSyncFrameStartDecodeOnIntraOnlyQVGAFlex) { … } // Encode 3 spatial, 3 temporal layer but don't start decoding. // During the sequence insert intra-only on base/qvga layer at frame 20 // and start decoding only QVGA layer from there. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc3SL3TLSyncFrameStartDecodeOnIntraOnlyQVGA) { … } // Start decoding from beginning of sequence, during sequence insert intra-only // on base/qvga layer. Decode all layers. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc3SL3TLSyncFrameIntraOnlyQVGA) { … } // Start decoding from beginning of sequence, during sequence insert intra-only // on base/qvga layer and sync_layer on middle/VGA layer. Decode all layers. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc3SL3TLSyncFrameIntraOnlyVGA) { … } // Start decoding from sync frame, insert intra-only on base/qvga layer. Decode // all layers. For 1 spatial layer, it inserts a key frame. TEST_P(SyncFrameOnePassCbrSvc, OnePassCbrSvc1SL3TLSyncFrameIntraOnlyQVGA) { … } // Params: Loopfilter modes. class LoopfilterOnePassCbrSvc : public OnePassCbrSvc, public ::libvpx_test::CodecTestWithParam<int> { … }; TEST_P(LoopfilterOnePassCbrSvc, OnePassCbrSvc1SL1TLLoopfilterOff) { … } TEST_P(LoopfilterOnePassCbrSvc, OnePassCbrSvc1SL3TLLoopfilterOff) { … } TEST_P(LoopfilterOnePassCbrSvc, OnePassCbrSvc3SL3TLLoopfilterOff) { … } VP9_INSTANTIATE_TEST_SUITE(…); VP9_INSTANTIATE_TEST_SUITE(…); INSTANTIATE_TEST_SUITE_P(…); } // namespace } // namespace svc_test