Revert of Add QP sum stats for received streams. (patchset #10 id:180001 of https://codereview.webrtc.org/2649133005/ )

Reason for revert:
Breaks downstream build.

Original issue's description:
> Add QP sum stats for received streams.
>
> This is not implemented yet in any of the decoders.
>
> BUG=webrtc:6541
>
> Review-Url: https://codereview.webrtc.org/2649133005
> Cr-Commit-Position: refs/heads/master@{#16475}
> Committed: https://chromium.googlesource.com/external/webrtc/+/ff0e72fd165facac27f0313aa178648782e63bc4

TBR=hta@webrtc.org,hbos@webrtc.org,sprang@webrtc.org,magjed@webrtc.org,stefan@webrtc.org,sakal@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6541

Review-Url: https://codereview.webrtc.org/2680893002 .
Cr-Commit-Position: refs/heads/master@{#16480}
diff --git a/webrtc/media/base/mediachannel.h b/webrtc/media/base/mediachannel.h
index 6e40111..4333fa4 100644
--- a/webrtc/media/base/mediachannel.h
+++ b/webrtc/media/base/mediachannel.h
@@ -781,7 +781,6 @@
   uint32_t frames_received;
   uint32_t frames_decoded;
   uint32_t frames_rendered;
-  rtc::Optional<uint64_t> qp_sum;
 
   // All stats below are gathered per-VideoReceiver, but some will be correlated
   // across MediaStreamTracks.  NOTE(hta): when sinking stats into per-SSRC
diff --git a/webrtc/media/engine/videodecodersoftwarefallbackwrapper_unittest.cc b/webrtc/media/engine/videodecodersoftwarefallbackwrapper_unittest.cc
index de42545..ccdf017 100644
--- a/webrtc/media/engine/videodecodersoftwarefallbackwrapper_unittest.cc
+++ b/webrtc/media/engine/videodecodersoftwarefallbackwrapper_unittest.cc
@@ -141,11 +141,6 @@
       RTC_NOTREACHED();
       return -1;
     }
-    void Decoded(webrtc::VideoFrame& decodedImage,
-                 rtc::Optional<int32_t> decode_time_ms,
-                 rtc::Optional<uint8_t> qp) override {
-      RTC_NOTREACHED();
-    }
   } callback, callback2;
 
   VideoCodec codec = {};
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index df796da..955560a 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -2400,7 +2400,6 @@
                          stats.frame_counts.delta_frames;
   info.frames_decoded = stats.frames_decoded;
   info.frames_rendered = stats.frames_rendered;
-  info.qp_sum = stats.qp_sum;
 
   info.codec_name = GetCodecNameFromPayloadType(stats.current_payload_type);
 
diff --git a/webrtc/media/engine/webrtcvideoengine2_unittest.cc b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
index d77c3c4..06973e6 100644
--- a/webrtc/media/engine/webrtcvideoengine2_unittest.cc
+++ b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
@@ -3430,7 +3430,6 @@
   stats.frame_counts.delta_frames = 12;
   stats.frames_rendered = 13;
   stats.frames_decoded = 14;
-  stats.qp_sum = rtc::Optional<uint64_t>(15);
   stream->SetStats(stats);
 
   cricket::VideoMediaInfo info;
@@ -3450,7 +3449,6 @@
             info.receivers[0].frames_received);
   EXPECT_EQ(stats.frames_rendered, info.receivers[0].frames_rendered);
   EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded);
-  EXPECT_EQ(stats.qp_sum, info.receivers[0].qp_sum);
 }
 
 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) {
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor.h b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
index 778cc1d..a217b11 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor.h
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor.h
@@ -250,11 +250,6 @@
       RTC_NOTREACHED();
       return -1;
     }
-    void Decoded(VideoFrame& frame,
-                 rtc::Optional<int32_t> decode_time_ms,
-                 rtc::Optional<uint8_t> qp) override {
-      RTC_NOTREACHED();
-    }
 
    private:
     VideoProcessorImpl* video_processor_;
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h b/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
index b7e3e7d..d140b0a 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
@@ -145,11 +145,6 @@
     RTC_NOTREACHED();
     return -1;
   }
-  void Decoded(VideoFrame& decoded_image,
-               rtc::Optional<int32_t> decode_time_ms,
-               rtc::Optional<uint8_t> qp) override {
-    RTC_NOTREACHED();
-  }
   int DecodedFrames() { return decoded_frames_; }
 
  private:
diff --git a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
index a47c209..de612f0 100644
--- a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
@@ -97,11 +97,6 @@
     RTC_NOTREACHED();
     return -1;
   }
-  void Decoded(VideoFrame& frame,
-               rtc::Optional<int32_t> decode_time_ms,
-               rtc::Optional<uint8_t> qp) override {
-    RTC_NOTREACHED();
-  }
   bool DecodeComplete();
 
  private:
diff --git a/webrtc/modules/video_coding/generic_decoder.cc b/webrtc/modules/video_coding/generic_decoder.cc
index 34500c6..b1059e8 100644
--- a/webrtc/modules/video_coding/generic_decoder.cc
+++ b/webrtc/modules/video_coding/generic_decoder.cc
@@ -48,16 +48,6 @@
 
 int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
                                          int64_t decode_time_ms) {
-  Decoded(decodedImage,
-          decode_time_ms >= 0 ? rtc::Optional<int32_t>(decode_time_ms)
-                              : rtc::Optional<int32_t>(),
-          rtc::Optional<uint8_t>());
-  return WEBRTC_VIDEO_CODEC_OK;
-}
-
-void VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage,
-                                      rtc::Optional<int32_t> decode_time_ms,
-                                      rtc::Optional<uint8_t> qp) {
   TRACE_EVENT_INSTANT1("webrtc", "VCMDecodedFrameCallback::Decoded",
                        "timestamp", decodedImage.timestamp());
   // TODO(holmer): We should improve this so that we can handle multiple
@@ -73,15 +63,15 @@
   if (frameInfo == NULL) {
     LOG(LS_WARNING) << "Too many frames backed up in the decoder, dropping "
                        "this one.";
-    return;
+    return WEBRTC_VIDEO_CODEC_OK;
   }
 
   const int64_t now_ms = _clock->TimeInMilliseconds();
-  if (!decode_time_ms) {
+  if (decode_time_ms < 0) {
     decode_time_ms =
-        rtc::Optional<int32_t>(now_ms - frameInfo->decodeStartTimeMs);
+        static_cast<int32_t>(now_ms - frameInfo->decodeStartTimeMs);
   }
-  _timing->StopDecodeTimer(decodedImage.timestamp(), *decode_time_ms, now_ms,
+  _timing->StopDecodeTimer(decodedImage.timestamp(), decode_time_ms, now_ms,
                            frameInfo->renderTimeMs);
 
   decodedImage.set_timestamp_us(
@@ -90,10 +80,11 @@
   // TODO(sakal): Investigate why callback is NULL sometimes and replace if
   // statement with a DCHECK.
   if (callback) {
-    callback->FrameToRender(decodedImage, qp);
+    callback->FrameToRender(decodedImage);
   } else {
     LOG(LS_WARNING) << "No callback, dropping frame.";
   }
+  return WEBRTC_VIDEO_CODEC_OK;
 }
 
 int32_t VCMDecodedFrameCallback::ReceivedDecodedReferenceFrame(
diff --git a/webrtc/modules/video_coding/generic_decoder.h b/webrtc/modules/video_coding/generic_decoder.h
index 48e2519..2d0007b 100644
--- a/webrtc/modules/video_coding/generic_decoder.h
+++ b/webrtc/modules/video_coding/generic_decoder.h
@@ -37,13 +37,11 @@
     void SetUserReceiveCallback(VCMReceiveCallback* receiveCallback);
     VCMReceiveCallback* UserReceiveCallback();
 
-    int32_t Decoded(VideoFrame& decodedImage) override;
-    int32_t Decoded(VideoFrame& decodedImage, int64_t decode_time_ms) override;
-    void Decoded(VideoFrame& decodedImage,
-                 rtc::Optional<int32_t> decode_time_ms,
-                 rtc::Optional<uint8_t> qp) override;
-    int32_t ReceivedDecodedReferenceFrame(const uint64_t pictureId) override;
-    int32_t ReceivedDecodedFrame(const uint64_t pictureId) override;
+    virtual int32_t Decoded(VideoFrame& decodedImage);  // NOLINT
+    virtual int32_t Decoded(VideoFrame& decodedImage,   // NOLINT
+                            int64_t decode_time_ms);
+    virtual int32_t ReceivedDecodedReferenceFrame(const uint64_t pictureId);
+    virtual int32_t ReceivedDecodedFrame(const uint64_t pictureId);
 
     uint64_t LastReceivedPictureID() const;
     void OnDecoderImplementationName(const char* implementation_name);
diff --git a/webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h b/webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h
index bbf3098..7e2076c 100644
--- a/webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h
+++ b/webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h
@@ -57,10 +57,6 @@
   MOCK_METHOD2(Decoded,
                int32_t(VideoFrame& decodedImage,  // NOLINT
                        int64_t decode_time_ms));
-  MOCK_METHOD3(Decoded,
-               void(VideoFrame& decodedImage,  // NOLINT
-                    rtc::Optional<int32_t> decode_time_ms,
-                    rtc::Optional<uint8_t> qp));
   MOCK_METHOD1(ReceivedDecodedReferenceFrame,
                int32_t(const uint64_t pictureId));
   MOCK_METHOD1(ReceivedDecodedFrame, int32_t(const uint64_t pictureId));
diff --git a/webrtc/modules/video_coding/include/video_coding_defines.h b/webrtc/modules/video_coding/include/video_coding_defines.h
index 00ad5b6..dede5b6 100644
--- a/webrtc/modules/video_coding/include/video_coding_defines.h
+++ b/webrtc/modules/video_coding/include/video_coding_defines.h
@@ -63,8 +63,7 @@
 // rendered.
 class VCMReceiveCallback {
  public:
-  virtual int32_t FrameToRender(VideoFrame& videoFrame,  // NOLINT
-                                rtc::Optional<uint8_t> qp) = 0;
+  virtual int32_t FrameToRender(VideoFrame& videoFrame) = 0;  // NOLINT
   virtual int32_t ReceivedDecodedReferenceFrame(const uint64_t pictureId) {
     return -1;
   }
diff --git a/webrtc/modules/video_coding/test/test_util.cc b/webrtc/modules/video_coding/test/test_util.cc
index 386b430..8f5c55f 100644
--- a/webrtc/modules/video_coding/test/test_util.cc
+++ b/webrtc/modules/video_coding/test/test_util.cc
@@ -97,8 +97,8 @@
   }
 }
 
-int32_t FileOutputFrameReceiver::FrameToRender(webrtc::VideoFrame& video_frame,
-                                               rtc::Optional<uint8_t> qp) {
+int32_t FileOutputFrameReceiver::FrameToRender(
+    webrtc::VideoFrame& video_frame) {
   if (timing_file_ == NULL) {
     std::string basename;
     std::string extension;
diff --git a/webrtc/modules/video_coding/test/test_util.h b/webrtc/modules/video_coding/test/test_util.h
index 86d3ecf..45b88b9 100644
--- a/webrtc/modules/video_coding/test/test_util.h
+++ b/webrtc/modules/video_coding/test/test_util.h
@@ -29,18 +29,26 @@
  public:
   virtual ~NullEvent() {}
 
-  bool Set() override { return true; }
+  virtual bool Set() { return true; }
 
-  webrtc::EventTypeWrapper Wait(unsigned long max_time) override {  // NOLINT
+  virtual bool Reset() { return true; }
+
+  virtual webrtc::EventTypeWrapper Wait(unsigned long max_time) {  // NOLINT
     return webrtc::kEventTimeout;
   }
+
+  virtual bool StartTimer(bool periodic, unsigned long time) {  // NOLINT
+    return true;
+  }
+
+  virtual bool StopTimer() { return true; }
 };
 
 class NullEventFactory : public webrtc::EventFactory {
  public:
   virtual ~NullEventFactory() {}
 
-  webrtc::EventWrapper* CreateEvent() override { return new NullEvent; }
+  virtual webrtc::EventWrapper* CreateEvent() { return new NullEvent; }
 };
 
 class FileOutputFrameReceiver : public webrtc::VCMReceiveCallback {
@@ -49,8 +57,7 @@
   virtual ~FileOutputFrameReceiver();
 
   // VCMReceiveCallback
-  int32_t FrameToRender(webrtc::VideoFrame& video_frame,
-                        rtc::Optional<uint8_t> qp) override;
+  virtual int32_t FrameToRender(webrtc::VideoFrame& video_frame);  // NOLINT
 
  private:
   std::string out_filename_;
diff --git a/webrtc/pc/statscollector.cc b/webrtc/pc/statscollector.cc
index e91f873..3e0c2bf 100644
--- a/webrtc/pc/statscollector.cc
+++ b/webrtc/pc/statscollector.cc
@@ -221,9 +221,6 @@
     report->AddInt64(StatsReport::kStatsValueNameCaptureStartNtpTimeMs,
                      info.capture_start_ntp_time_ms);
   }
-  if (info.qp_sum)
-    report->AddInt64(StatsReport::kStatsValueNameQpSum, *info.qp_sum);
-
   const IntForAdd ints[] = {
     { StatsReport::kStatsValueNameCurrentDelayMs, info.current_delay_ms },
     { StatsReport::kStatsValueNameDecodeMs, info.decode_ms },
diff --git a/webrtc/pc/statscollector_unittest.cc b/webrtc/pc/statscollector_unittest.cc
index 1bb6d1d..e89da1c 100644
--- a/webrtc/pc/statscollector_unittest.cc
+++ b/webrtc/pc/statscollector_unittest.cc
@@ -2018,7 +2018,6 @@
   // Construct a stats value to read.
   video_receiver_info.add_ssrc(1234);
   video_receiver_info.frames_decoded = 10;
-  video_receiver_info.qp_sum = rtc::Optional<uint64_t>(11);
   stats_read.receivers.push_back(video_receiver_info);
 
   EXPECT_CALL(session_, video_channel()).WillRepeatedly(Return(&video_channel));
@@ -2030,8 +2029,6 @@
   EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded),
             ExtractSsrcStatsValue(reports,
                                   StatsReport::kStatsValueNameFramesDecoded));
-  EXPECT_EQ(rtc::ToString(*video_receiver_info.qp_sum),
-            ExtractSsrcStatsValue(reports, StatsReport::kStatsValueNameQpSum));
 }
 
 }  // namespace webrtc
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc
index 066b7ef..6fe8574 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -428,26 +428,11 @@
   }
 }
 
-void ReceiveStatisticsProxy::OnDecodedFrame(rtc::Optional<uint8_t> qp) {
+void ReceiveStatisticsProxy::OnDecodedFrame() {
   uint64_t now = clock_->TimeInMilliseconds();
 
   rtc::CritScope lock(&crit_);
   ++stats_.frames_decoded;
-  if (qp) {
-    if (!stats_.qp_sum) {
-      if (stats_.frames_decoded != 1) {
-        LOG(LS_WARNING)
-            << "Frames decoded was not 1 when first qp value was received.";
-        stats_.frames_decoded = 1;
-      }
-      stats_.qp_sum = rtc::Optional<uint64_t>(0);
-    }
-    *stats_.qp_sum += *qp;
-  } else if (stats_.qp_sum) {
-    LOG(LS_WARNING)
-        << "QP sum was already set and no QP was given for a frame.";
-    stats_.qp_sum = rtc::Optional<uint64_t>();
-  }
   decode_fps_estimator_.Update(1, now);
   stats_.decode_frame_rate = decode_fps_estimator_.Rate(now).value_or(0);
 }
diff --git a/webrtc/video/receive_statistics_proxy.h b/webrtc/video/receive_statistics_proxy.h
index 30d5d00..73a9b37 100644
--- a/webrtc/video/receive_statistics_proxy.h
+++ b/webrtc/video/receive_statistics_proxy.h
@@ -46,7 +46,7 @@
 
   VideoReceiveStream::Stats GetStats() const;
 
-  void OnDecodedFrame(rtc::Optional<uint8_t> qp);
+  void OnDecodedFrame();
   void OnSyncOffsetUpdated(int64_t sync_offset_ms, double estimated_freq_khz);
   void OnRenderedFrame(const VideoFrame& frame);
   void OnIncomingPayloadType(int payload_type);
diff --git a/webrtc/video/receive_statistics_proxy_unittest.cc b/webrtc/video/receive_statistics_proxy_unittest.cc
index ba4ad3a..e0cca3aa 100644
--- a/webrtc/video/receive_statistics_proxy_unittest.cc
+++ b/webrtc/video/receive_statistics_proxy_unittest.cc
@@ -54,44 +54,11 @@
 TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameIncreasesFramesDecoded) {
   EXPECT_EQ(0u, statistics_proxy_->GetStats().frames_decoded);
   for (uint32_t i = 1; i <= 3; ++i) {
-    statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>());
+    statistics_proxy_->OnDecodedFrame();
     EXPECT_EQ(i, statistics_proxy_->GetStats().frames_decoded);
   }
 }
 
-TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameWithQpResetsFramesDecoded) {
-  EXPECT_EQ(0u, statistics_proxy_->GetStats().frames_decoded);
-  for (uint32_t i = 1; i <= 3; ++i) {
-    statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>());
-    EXPECT_EQ(i, statistics_proxy_->GetStats().frames_decoded);
-  }
-  statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(1u));
-  EXPECT_EQ(1u, statistics_proxy_->GetStats().frames_decoded);
-}
-
-TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameIncreasesQpSum) {
-  EXPECT_EQ(rtc::Optional<uint64_t>(), statistics_proxy_->GetStats().qp_sum);
-  statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u));
-  EXPECT_EQ(rtc::Optional<uint64_t>(3u), statistics_proxy_->GetStats().qp_sum);
-  statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(127u));
-  EXPECT_EQ(rtc::Optional<uint64_t>(130u),
-            statistics_proxy_->GetStats().qp_sum);
-}
-
-TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameWithoutQpQpSumWontExist) {
-  EXPECT_EQ(rtc::Optional<uint64_t>(), statistics_proxy_->GetStats().qp_sum);
-  statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>());
-  EXPECT_EQ(rtc::Optional<uint64_t>(), statistics_proxy_->GetStats().qp_sum);
-}
-
-TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameWithoutQpResetsQpSum) {
-  EXPECT_EQ(rtc::Optional<uint64_t>(), statistics_proxy_->GetStats().qp_sum);
-  statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u));
-  EXPECT_EQ(rtc::Optional<uint64_t>(3u), statistics_proxy_->GetStats().qp_sum);
-  statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>());
-  EXPECT_EQ(rtc::Optional<uint64_t>(), statistics_proxy_->GetStats().qp_sum);
-}
-
 TEST_F(ReceiveStatisticsProxyTest, OnRenderedFrameIncreasesFramesRendered) {
   EXPECT_EQ(0u, statistics_proxy_->GetStats().frames_rendered);
   webrtc::VideoFrame frame(
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index bb4e9f6..e8b88a5 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -367,6 +367,10 @@
 
 // TODO(tommi): This method grabs a lock 6 times.
 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) {
+  // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock
+  // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab.
+  stats_proxy_.OnDecodedFrame();
+
   int64_t sync_offset_ms;
   double estimated_freq_khz;
   // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks.  One inside the
diff --git a/webrtc/video/video_stream_decoder.cc b/webrtc/video/video_stream_decoder.cc
index b0308f2..2c7f84b 100644
--- a/webrtc/video/video_stream_decoder.cc
+++ b/webrtc/video/video_stream_decoder.cc
@@ -73,11 +73,8 @@
 // callback won't necessarily be called from the decoding thread. The decoding
 // thread may have held the lock when calling VideoDecoder::Decode, Reset, or
 // Release. Acquiring the same lock in the path of decode callback can deadlock.
-int32_t VideoStreamDecoder::FrameToRender(VideoFrame& video_frame,
-                                          rtc::Optional<uint8_t> qp) {
-  receive_stats_callback_->OnDecodedFrame(qp);
+int32_t VideoStreamDecoder::FrameToRender(VideoFrame& video_frame) {  // NOLINT
   incoming_video_stream_->OnFrame(video_frame);
-
   return 0;
 }
 
diff --git a/webrtc/video/video_stream_decoder.h b/webrtc/video/video_stream_decoder.h
index 270c16b..10acd24 100644
--- a/webrtc/video/video_stream_decoder.h
+++ b/webrtc/video/video_stream_decoder.h
@@ -59,8 +59,7 @@
   ~VideoStreamDecoder();
 
   // Implements VCMReceiveCallback.
-  int32_t FrameToRender(VideoFrame& video_frame,
-                        rtc::Optional<uint8_t> qp) override;
+  int32_t FrameToRender(VideoFrame& video_frame) override;  // NOLINT
   int32_t ReceivedDecodedReferenceFrame(const uint64_t picture_id) override;
   void OnIncomingPayloadType(int payload_type) override;
   void OnDecoderImplementationName(const char* implementation_name) override;
diff --git a/webrtc/video_decoder.h b/webrtc/video_decoder.h
index 70c0912..b8d2c96 100644
--- a/webrtc/video_decoder.h
+++ b/webrtc/video_decoder.h
@@ -35,18 +35,11 @@
   // decode time excluding waiting time for any previous pending frame to
   // return. This is necessary for breaking positive feedback in the delay
   // estimation when the decoder has a single output buffer.
+  // TODO(perkj): Remove default implementation when chromium has been updated.
   virtual int32_t Decoded(VideoFrame& decodedImage, int64_t decode_time_ms) {
     // The default implementation ignores custom decode time value.
     return Decoded(decodedImage);
   }
-  // TODO(sakal): Remove other implementations when upstream projects have been
-  // updated.
-  virtual void Decoded(VideoFrame& decodedImage,
-                       rtc::Optional<int32_t> decode_time_ms,
-                       rtc::Optional<uint8_t> qp) {
-    Decoded(decodedImage,
-            decode_time_ms ? static_cast<int32_t>(*decode_time_ms) : -1);
-  }
 
   virtual int32_t ReceivedDecodedReferenceFrame(const uint64_t pictureId) {
     return -1;
diff --git a/webrtc/video_receive_stream.h b/webrtc/video_receive_stream.h
index 12629d0..374f350 100644
--- a/webrtc/video_receive_stream.h
+++ b/webrtc/video_receive_stream.h
@@ -70,7 +70,6 @@
     int min_playout_delay_ms = 0;
     int render_delay_ms = 10;
     uint32_t frames_decoded = 0;
-    rtc::Optional<uint64_t> qp_sum;
 
     int current_payload_type = -1;