Revert "Add ability to specify if rate controller of video encoder is trusted."
This reverts commit 3e335d1423cab06cca8cdb4f1fadb0b16c9e7d38. Reason for revert: breaks downstream project Original change's description: > Add ability to specify if rate controller of video encoder is trusted. > > If rate controller is trusted, we disable the frame dropper in the > media optimization module. > > Bug: webrtc:9722 > Change-Id: I821f21fd74a400ee9d5aa3f6b42d4e569033acbe > Reviewed-on: https://webrtc-review.googlesource.com/c/105020 > Commit-Queue: Erik Språng <sprang@webrtc.org> > Reviewed-by: Per Kjellander <perkj@webrtc.org> > Reviewed-by: Niels Moller <nisse@webrtc.org> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#25107} TBR=brandtr@webrtc.org,ilnik@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,perkj@webrtc.org Change-Id: Ifdb0aae684894854a184ec1e7423a7c62e7ba237 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:9722 Reviewed-on: https://webrtc-review.googlesource.com/c/105360 Commit-Queue: Oleh Prypin <oprypin@webrtc.org> Reviewed-by: Oleh Prypin <oprypin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25117}
This commit is contained in:
@ -51,7 +51,6 @@ class MultiplexEncoderAdapter : public VideoEncoder {
|
||||
uint32_t new_framerate) override;
|
||||
int Release() override;
|
||||
const char* ImplementationName() const override;
|
||||
bool HasTrustedRateController() const override;
|
||||
|
||||
EncodedImageCallback::Result OnEncodedImage(
|
||||
AlphaCodecStream stream_idx,
|
||||
@ -82,8 +81,6 @@ class MultiplexEncoderAdapter : public VideoEncoder {
|
||||
|
||||
const bool supports_augmented_data_;
|
||||
int augmenting_data_size_ = 0;
|
||||
|
||||
bool has_trusted_rate_controllers_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -53,8 +53,7 @@ MultiplexEncoderAdapter::MultiplexEncoderAdapter(
|
||||
: factory_(factory),
|
||||
associated_format_(associated_format),
|
||||
encoded_complete_callback_(nullptr),
|
||||
supports_augmented_data_(supports_augmented_data),
|
||||
has_trusted_rate_controllers_(false) {}
|
||||
supports_augmented_data_(supports_augmented_data) {}
|
||||
|
||||
MultiplexEncoderAdapter::~MultiplexEncoderAdapter() {
|
||||
Release();
|
||||
@ -93,7 +92,6 @@ int MultiplexEncoderAdapter::InitEncode(const VideoCodec* inst,
|
||||
break;
|
||||
}
|
||||
|
||||
has_trusted_rate_controllers_ = true;
|
||||
for (size_t i = 0; i < kAlphaCodecStreams; ++i) {
|
||||
std::unique_ptr<VideoEncoder> encoder =
|
||||
factory_->CreateVideoEncoder(associated_format_);
|
||||
@ -103,7 +101,6 @@ int MultiplexEncoderAdapter::InitEncode(const VideoCodec* inst,
|
||||
RTC_LOG(LS_ERROR) << "Failed to create multiplex codec index " << i;
|
||||
return rv;
|
||||
}
|
||||
has_trusted_rate_controllers_ &= encoder->HasTrustedRateController();
|
||||
adapter_callbacks_.emplace_back(new AdapterEncodedImageCallback(
|
||||
this, static_cast<AlphaCodecStream>(i)));
|
||||
encoder->RegisterEncodeCompleteCallback(adapter_callbacks_.back().get());
|
||||
@ -245,10 +242,6 @@ const char* MultiplexEncoderAdapter::ImplementationName() const {
|
||||
return "MultiplexEncoderAdapter";
|
||||
}
|
||||
|
||||
bool MultiplexEncoderAdapter::HasTrustedRateController() const {
|
||||
return has_trusted_rate_controllers_;
|
||||
}
|
||||
|
||||
EncodedImageCallback::Result MultiplexEncoderAdapter::OnEncodedImage(
|
||||
AlphaCodecStream stream_idx,
|
||||
const EncodedImage& encodedImage,
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
#include <memory>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/test/mock_video_encoder.h"
|
||||
#include "api/test/videocodec_test_fixture.h"
|
||||
#include "api/video/i420_buffer.h"
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
|
||||
@ -28,8 +28,6 @@
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
const char kVp8GfBoostFieldTrial[] = "WebRTC-VP8-GfBoost";
|
||||
const char kVp8TrustedRateControllerFieldTrial[] =
|
||||
"WebRTC-Vp8TrustedRateController";
|
||||
|
||||
// QP is obtained from VP8-bitstream for HW, so the QP corresponds to the
|
||||
// bitstream range of [0, 127] and not the user-level range of [0,63].
|
||||
@ -160,8 +158,6 @@ LibvpxVp8Encoder::LibvpxVp8Encoder()
|
||||
LibvpxVp8Encoder::LibvpxVp8Encoder(std::unique_ptr<LibvpxInterface> interface)
|
||||
: libvpx_(std::move(interface)),
|
||||
use_gf_boost_(webrtc::field_trial::IsEnabled(kVp8GfBoostFieldTrial)),
|
||||
trusted_rate_controller_(
|
||||
webrtc::field_trial::IsEnabled(kVp8TrustedRateControllerFieldTrial)),
|
||||
encoded_complete_callback_(nullptr),
|
||||
inited_(false),
|
||||
timestamp_(0),
|
||||
@ -286,10 +282,6 @@ const char* LibvpxVp8Encoder::ImplementationName() const {
|
||||
return "libvpx";
|
||||
}
|
||||
|
||||
bool LibvpxVp8Encoder::HasTrustedRateController() const {
|
||||
return trusted_rate_controller_;
|
||||
}
|
||||
|
||||
void LibvpxVp8Encoder::SetStreamState(bool send_stream, int stream_idx) {
|
||||
if (send_stream && !send_stream_[stream_idx]) {
|
||||
// Need a key frame if we have not sent this stream before.
|
||||
|
||||
@ -56,8 +56,6 @@ class LibvpxVp8Encoder : public VideoEncoder {
|
||||
|
||||
const char* ImplementationName() const override;
|
||||
|
||||
bool HasTrustedRateController() const override;
|
||||
|
||||
static vpx_enc_frame_flags_t EncodeFlags(
|
||||
const TemporalLayers::FrameConfig& references);
|
||||
|
||||
@ -90,7 +88,6 @@ class LibvpxVp8Encoder : public VideoEncoder {
|
||||
|
||||
const std::unique_ptr<LibvpxInterface> libvpx_;
|
||||
const bool use_gf_boost_;
|
||||
const bool trusted_rate_controller_;
|
||||
|
||||
EncodedImageCallback* encoded_complete_callback_;
|
||||
VideoCodec codec_;
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "api/test/mock_video_encoder.h"
|
||||
#include "common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "modules/video_coding/codecs/test/video_codec_unittest.h"
|
||||
#include "modules/video_coding/codecs/vp8/include/vp8.h"
|
||||
|
||||
Reference in New Issue
Block a user