diff --git a/api/test/videocodec_test_fixture.h b/api/test/videocodec_test_fixture.h index 67f9d02676..c9359a6eb2 100644 --- a/api/test/videocodec_test_fixture.h +++ b/api/test/videocodec_test_fixture.h @@ -107,9 +107,6 @@ class VideoCodecTestFixture { // Simulate frames arriving in real-time by adding delays between frames. bool encode_in_real_time = false; - // If > 0: forces the encoder to create a keyframe every Nth frame. - size_t keyframe_interval = 0; - // Codec settings to use. webrtc::VideoCodec codec_settings; diff --git a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc index 7ab6f18188..c81ce760a7 100644 --- a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc +++ b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc @@ -258,7 +258,6 @@ std::string VideoCodecTestFixtureImpl::Config::ToString() const { ss << "\nuse_single_core: " << use_single_core; ss << "\nmeasure_cpu: " << measure_cpu; ss << "\nnum_cores: " << NumberOfCores(); - ss << "\nkeyframe_interval: " << keyframe_interval; ss << "\ncodec_type: " << codec_type; ss << "\n\n--> codec_settings"; ss << "\nwidth: " << codec_settings.width; diff --git a/modules/video_coding/codecs/test/videocodec_test_libvpx.cc b/modules/video_coding/codecs/test/videocodec_test_libvpx.cc index 66923154f8..02dc66c23a 100644 --- a/modules/video_coding/codecs/test/videocodec_test_libvpx.cc +++ b/modules/video_coding/codecs/test/videocodec_test_libvpx.cc @@ -291,8 +291,8 @@ TEST(VideoCodecTestLibvpx, MAYBE_ChangeFramerateVP8) { {10, 2, 10, 1, 0.3, 0.2, 0, 0}}; #else std::vector rc_thresholds = { - {10, 2, 20, 1, 0.3, 0.1, 0, 1}, - {5, 2, 5, 1, 0.3, 0.1, 0, 0}, + {10, 2, 20, 1, 0.3, 0.15, 0, 1}, + {5, 2, 5, 1, 0.3, 0.15, 0, 0}, {4, 2, 1, 1, 0.3, 0.2, 0, 0}}; #endif diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc index 419254024e..31da98bde4 100644 --- a/modules/video_coding/codecs/test/videoprocessor.cc +++ b/modules/video_coding/codecs/test/videoprocessor.cc @@ -157,16 +157,6 @@ void CalculateFrameQuality(const I420BufferInterface& ref_buffer, } } -std::vector FrameTypeForFrame( - const VideoCodecTestFixture::Config& config, - size_t frame_idx) { - if (config.keyframe_interval > 0 && - (frame_idx % config.keyframe_interval == 0)) { - return {kVideoFrameKey}; - } - return {kVideoFrameDelta}; -} - } // namespace VideoProcessor::VideoProcessor(webrtc::VideoEncoder* encoder, @@ -296,7 +286,8 @@ void VideoProcessor::ProcessFrame() { // Encode. const std::vector frame_types = - FrameTypeForFrame(config_, frame_number); + (frame_number == 0) ? std::vector{kVideoFrameKey} + : std::vector{kVideoFrameDelta}; const int encode_return_code = encoder_->Encode(input_frame, nullptr, &frame_types); for (size_t i = 0; i < num_simulcast_or_spatial_layers_; ++i) {