/* * Copyright (c) 2021, 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.
*/
if (img) {
::libaom_test::MD5 md5_res;
md5_res.Add(img);
md5_dec_.push_back(md5_res.Get());
}
}
void DoTest(::libaom_test::VideoSource *input_video) { /* This is the actual parallel encode of frames using multiple cpis. * The parallel frames are independently encoded. * Threads are distributed among the parallel frames whereas non-parallel * frames use all the threads. Example: for 8 threads, in case of 4 frames * in a parallel encode set, each frame gets 2 threads. In case of 3 frames * in a parallel encode set, threads are distributed as 2, 3 ,3.
*/
enable_actual_parallel_encode_ = 1;
ASSERT_NO_FATAL_FAILURE(RunLoop(input_video));
std::vector<size_t> enc_stream_fpmt_size;
std::vector<std::string> enc_stream_fpmt;
std::vector<std::string> dec_stream_fpmt;
enc_stream_fpmt_size = size_enc_;
enc_stream_fpmt = md5_enc_;
dec_stream_fpmt = md5_dec_;
size_enc_.clear();
md5_enc_.clear();
md5_dec_.clear();
/* This is the simulation of parallel encode of frames using single cpi. * In simulation, it should be ensured to have no dependency across frames * (similar to parallel encode). * Each frame uses all the threads configured.
*/
enable_actual_parallel_encode_ = 0;
ASSERT_NO_FATAL_FAILURE(RunLoop(input_video));
std::vector<size_t> enc_stream_sim_size;
std::vector<std::string> enc_stream_sim;
std::vector<std::string> dec_stream_sim;
enc_stream_sim_size = size_enc_;
enc_stream_sim = md5_enc_;
dec_stream_sim = md5_dec_;
size_enc_.clear();
md5_enc_.clear();
md5_dec_.clear();
// Check that the vectors are equal.
ASSERT_EQ(enc_stream_sim_size, enc_stream_fpmt_size);
ASSERT_EQ(enc_stream_sim, enc_stream_fpmt);
ASSERT_EQ(dec_stream_sim, dec_stream_fpmt);
}
bool encoder_initialized_; int set_cpu_used_; int tile_cols_; int tile_rows_; int enable_actual_parallel_encode_;
::libaom_test::Decoder *decoder_;
std::vector<size_t> size_enc_;
std::vector<std::string> md5_enc_;
std::vector<std::string> md5_dec_;
};
class AVxFrameParallelThreadEncodeHDResTestLarge
: public AVxFrameParallelThreadEncodeTest {};
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.