Remove |hw_encoder| and |hw_decoder| from VideoCodecTestFixture::Config.
Only used for output filename nowadays. Previously, it was used for selecting the codec implementation. That is now done by injecting the appropriate codec factory. Bug: webrtc:9317 Change-Id: Ia2bf28f7df165fb65410ecd1f5d646ee6604e1be Reviewed-on: https://webrtc-review.googlesource.com/c/106023 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25204}
This commit is contained in:

committed by
Commit Bot

parent
f907c49722
commit
2d0c68744c
@ -123,10 +123,6 @@ class VideoCodecTestFixture {
|
||||
webrtc::H264PacketizationMode::NonInterleaved;
|
||||
} h264_codec_settings;
|
||||
|
||||
// Should hardware accelerated codecs be used?
|
||||
bool hw_encoder = false;
|
||||
bool hw_decoder = false;
|
||||
|
||||
// Custom checker that will be called for each frame.
|
||||
const EncodedFrameChecker* encoded_frame_checker = nullptr;
|
||||
|
||||
|
@ -130,9 +130,7 @@ bool RunEncodeInRealTime(const VideoCodecTestFixtureImpl::Config& config) {
|
||||
|
||||
std::string FilenameWithParams(
|
||||
const VideoCodecTestFixtureImpl::Config& config) {
|
||||
std::string implementation_type = config.hw_encoder ? "hw" : "sw";
|
||||
return config.filename + "_" + config.CodecName() + "_" +
|
||||
implementation_type + "_" +
|
||||
std::to_string(config.codec_settings.startBitrate);
|
||||
}
|
||||
|
||||
|
@ -63,8 +63,6 @@ VideoCodecTestFixture::Config CreateConfig() {
|
||||
config.filepath = ResourcePath(config.filename, "yuv");
|
||||
config.num_frames = kNumFramesLong;
|
||||
config.use_single_core = true;
|
||||
config.hw_encoder = false;
|
||||
config.hw_decoder = false;
|
||||
return config;
|
||||
}
|
||||
|
||||
|
@ -33,8 +33,6 @@ VideoCodecTestFixture::Config CreateConfig() {
|
||||
config.filename = "foreman_cif";
|
||||
config.filepath = ResourcePath(config.filename, "yuv");
|
||||
config.num_frames = kForemanNumFrames;
|
||||
config.hw_encoder = true;
|
||||
config.hw_decoder = true;
|
||||
// In order to not overwhelm the OpenMAX buffers in the Android MediaCodec.
|
||||
config.encode_in_real_time = true;
|
||||
return config;
|
||||
|
@ -32,8 +32,6 @@ VideoCodecTestFixture::Config CreateConfig() {
|
||||
config.num_frames = kNumFrames;
|
||||
// Only allow encoder/decoder to use single core, for predictability.
|
||||
config.use_single_core = true;
|
||||
config.hw_encoder = false;
|
||||
config.hw_decoder = false;
|
||||
return config;
|
||||
}
|
||||
} // namespace
|
||||
|
@ -20,7 +20,6 @@ namespace {
|
||||
// Loop variables.
|
||||
const size_t kBitrates[] = {500};
|
||||
const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8};
|
||||
const bool kHwCodec[] = {false};
|
||||
|
||||
// Codec settings.
|
||||
const int kNumSpatialLayers = 1;
|
||||
@ -39,12 +38,11 @@ const int kNumFrames = 30;
|
||||
class VideoCodecTestParameterized
|
||||
: public ::testing::Test,
|
||||
public ::testing::WithParamInterface<
|
||||
::testing::tuple<size_t, VideoCodecType, bool>> {
|
||||
::testing::tuple<size_t, VideoCodecType>> {
|
||||
protected:
|
||||
VideoCodecTestParameterized()
|
||||
: bitrate_(::testing::get<0>(GetParam())),
|
||||
codec_type_(::testing::get<1>(GetParam())),
|
||||
hw_codec_(::testing::get<2>(GetParam())) {}
|
||||
codec_type_(::testing::get<1>(GetParam())) {}
|
||||
~VideoCodecTestParameterized() override = default;
|
||||
|
||||
void RunTest(size_t width,
|
||||
@ -56,8 +54,6 @@ class VideoCodecTestParameterized
|
||||
config.filepath = ResourcePath(filename, "yuv");
|
||||
config.use_single_core = kUseSingleCore;
|
||||
config.measure_cpu = kMeasureCpu;
|
||||
config.hw_encoder = hw_codec_;
|
||||
config.hw_decoder = hw_codec_;
|
||||
config.num_frames = kNumFrames;
|
||||
|
||||
const size_t num_simulcast_streams =
|
||||
@ -80,14 +76,13 @@ class VideoCodecTestParameterized
|
||||
std::unique_ptr<VideoCodecTestFixture> fixture_;
|
||||
const size_t bitrate_;
|
||||
const VideoCodecType codec_type_;
|
||||
const bool hw_codec_;
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(CodecSettings,
|
||||
VideoCodecTestParameterized,
|
||||
::testing::Combine(::testing::ValuesIn(kBitrates),
|
||||
::testing::ValuesIn(kVideoCodecType),
|
||||
::testing::ValuesIn(kHwCodec)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
CodecSettings,
|
||||
VideoCodecTestParameterized,
|
||||
::testing::Combine(::testing::ValuesIn(kBitrates),
|
||||
::testing::ValuesIn(kVideoCodecType)));
|
||||
|
||||
TEST_P(VideoCodecTestParameterized, Foreman_352x288_30) {
|
||||
RunTest(352, 288, 30, "foreman_cif");
|
||||
|
@ -28,8 +28,6 @@ VideoCodecTestFixture::Config CreateConfig() {
|
||||
config.filename = "foreman_cif";
|
||||
config.filepath = ResourcePath(config.filename, "yuv");
|
||||
config.num_frames = kForemanNumFrames;
|
||||
config.hw_encoder = true;
|
||||
config.hw_decoder = true;
|
||||
return config;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user