webrtc/modules/video_coding
Niels Möller 6bb5ab9740 Reland "Refactor and remove media_optimization::MediaOptimization."
This reverts commit 6613f8e98a.

Reason for revert: This change seemed innocent after all, so undoing speculative revert.

Original change's description:
> Revert "Refactor and remove media_optimization::MediaOptimization."
> 
> This reverts commit 07276e4f89.
> 
> Reason for revert: Speculative revert due to downstream crashes.
> 
> Original change's description:
> > Refactor and remove media_optimization::MediaOptimization.
> > 
> > This CL removes MediaOptmization and folds some of its functionality
> > into VideoStreamEncoder.
> > 
> > The FPS tracking is now handled by a RateStatistics instance. Frame
> > dropping is still handled by FrameDropper. Both of these now live
> > directly in VideoStreamEncoder.
> > There is no intended change in behavior from this CL, but due to a new
> > way of measuring frame rate, some minor perf changes can be expected.
> > 
> > A small change in behavior is that OnBitrateUpdated is now called
> > directly rather than on the next frame. Since both encoding frame and
> > setting rate allocations happen on the encoder worker thread, there's
> > really no reason to cache bitrates and wait until the next frame.
> > An edge case though is that if a new bitrate is set before the first
> > frame, we must remember that bitrate and then apply it after the video
> > bitrate allocator has been first created.
> > 
> > In addition to existing unit tests, manual tests have been used to
> > confirm that frame dropping works as expected with misbehaving encoders.
> > 
> > Bug: webrtc:10164
> > Change-Id: I7ee9c8d3c4f2bcf23c8c420310b05a4d35d94744
> > Reviewed-on: https://webrtc-review.googlesource.com/c/115620
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26147}
> 
> TBR=nisse@webrtc.org,sprang@webrtc.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: webrtc:10164
> Change-Id: Ie0dae19dd012bc09e793c9661a45823fd760c20c
> Reviewed-on: https://webrtc-review.googlesource.com/c/116780
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26191}

TBR=nisse@webrtc.org,sprang@webrtc.org

Change-Id: Ieda1fad301de002460bb0bf5a75267ea065176a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10164
Reviewed-on: https://webrtc-review.googlesource.com/c/116960
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26213}
2019-01-11 10:46:33 +00:00
..
codecs Include absl/memory/memory.h if absl::make_unique is used 2019-01-08 20:08:32 +00:00
include Make VCMDecodeErrorMode optional when calling VideoCodingModule::SetReceiverRobustnessMode 2019-01-10 14:06:10 +00:00
test [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
utility Introduce VideoFrame::id to keep track of frames inside application. 2019-01-04 08:59:26 +00:00
BUILD.gn Reland "Refactor and remove media_optimization::MediaOptimization." 2019-01-11 10:46:33 +00:00
codec_timer.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
codec_timer.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
decoder_database.cc Remove kVideoCodecUnknown from WebRTC. 2018-08-16 15:15:39 +00:00
decoder_database.h Refactoring PayloadRouter. 2018-07-17 14:46:15 +00:00
decoding_state.cc Add accessor methods for RTP timestamp of EncodedImage. 2018-08-21 09:15:51 +00:00
decoding_state.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
decoding_state_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
DEPS Prepare VideoProcessor for async simulcast support. 2018-03-08 17:41:13 +00:00
encoded_frame.cc Propagate spatial index to EncodedImage. 2018-12-20 15:21:22 +00:00
encoded_frame.h Delete VCMEncodedFrame methods Buffer and MutableBuffer 2019-01-11 10:10:12 +00:00
encoder_database.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
encoder_database.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
fec_controller_default.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
fec_controller_default.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
fec_controller_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
fec_rate_table.h
frame_buffer.cc Convert all webrtc code to not access EncodedImage::_size directly. 2018-12-07 16:19:34 +00:00
frame_buffer.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
frame_buffer2.cc Delete VCMEncodedFrame methods Buffer and MutableBuffer 2019-01-11 10:10:12 +00:00
frame_buffer2.h Refactor FrameBuffer to store decoded frames history separately 2019-01-10 15:11:15 +00:00
frame_buffer2_unittest.cc Propagate spatial index to EncodedImage. 2018-12-20 15:21:22 +00:00
frame_object.cc Calculate min and max receive timestamps for packets in a video frame 2018-12-07 16:22:34 +00:00
frame_object.h Calculate min and max receive timestamps for packets in a video frame 2018-12-07 16:22:34 +00:00
generic_decoder.cc Always record receive timestamps even on when the invalid flag is set. 2018-12-07 12:29:45 +00:00
generic_decoder.h Remove unimplemented function declarations VCMGenericDecoder::External and VCMTimestampMap::Reset. 2018-09-06 09:05:30 +00:00
generic_encoder.cc Reland "Refactor and remove media_optimization::MediaOptimization." 2019-01-11 10:46:33 +00:00
generic_encoder.h Reland "Refactor and remove media_optimization::MediaOptimization." 2019-01-11 10:46:33 +00:00
generic_encoder_unittest.cc Reland "Refactor and remove media_optimization::MediaOptimization." 2019-01-11 10:46:33 +00:00
h264_sprop_parameter_sets.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
h264_sprop_parameter_sets.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
h264_sprop_parameter_sets_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
h264_sps_pps_tracker.cc Remove clang:find_bad_constructs suppression from call:call. 2018-08-29 11:57:00 +00:00
h264_sps_pps_tracker.h Remove clang:find_bad_constructs suppression from call:call. 2018-08-29 11:57:00 +00:00
h264_sps_pps_tracker_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
histogram.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
histogram.h
histogram_unittest.cc
inter_frame_delay.cc
inter_frame_delay.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
internal_defines.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
jitter_buffer.cc Include event_wrapper.h only where used. 2018-12-04 14:50:18 +00:00
jitter_buffer.h Include event_wrapper.h only where used. 2018-12-04 14:50:18 +00:00
jitter_buffer_common.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
jitter_buffer_unittest.cc Delete VCMEncodedFrame methods Buffer and MutableBuffer 2019-01-11 10:10:12 +00:00
jitter_estimator.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
jitter_estimator.h JitterEstimator: Remove old LowRate exp and add trial for upper bound. 2018-11-01 14:51:38 +00:00
jitter_estimator_tests.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
media_opt_util.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
media_opt_util.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
nack_fec_tables.h
nack_module.cc Adds a field trial parameter to configure waiting time before sending Nack packets. 2018-11-02 14:56:52 +00:00
nack_module.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
nack_module_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
OWNERS Make ilnik@ owner in video/ and modules/video_coding/ 2018-09-11 12:39:39 +00:00
packet.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
packet.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
packet_buffer.cc Avoid creating frames with packets of different timestamps. 2019-01-09 12:19:05 +00:00
packet_buffer.h Replace rtc::Optional with absl::optional 2018-06-18 10:24:48 +00:00
receiver.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
receiver.h Include event_wrapper.h only where used. 2018-12-04 14:50:18 +00:00
receiver_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
rtp_frame_reference_finder.cc Vp9 flexible mode fixes 2018-12-04 15:36:28 +00:00
rtp_frame_reference_finder.h Make RtpGenericFrameDescriptor available for E2EE. 2018-10-02 13:35:29 +00:00
rtp_frame_reference_finder_unittest.cc Calculate min and max receive timestamps for packets in a video frame 2018-12-07 16:22:34 +00:00
rtt_filter.cc Fix typo in VCMRttFilter 2018-01-26 10:59:56 +00:00
rtt_filter.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
session_info.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
session_info.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
session_info_unittest.cc VCMPacket: Set VCMNaluCompleteness for generic codecs 2018-07-11 13:22:59 +00:00
timestamp_map.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
timestamp_map.h Remove unimplemented function declarations VCMGenericDecoder::External and VCMTimestampMap::Reset. 2018-09-06 09:05:30 +00:00
timing.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
timing.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
timing_unittest.cc Remove unused functions in VCMTiming. 2018-01-17 14:47:10 +00:00
video_codec_initializer.cc Activate/deactivate VP9 spatial layers. 2018-12-10 12:55:51 +00:00
video_codec_initializer_unittest.cc Activate/deactivate VP9 spatial layers. 2018-12-10 12:55:51 +00:00
video_coding_defines.cc Fix chromium warnings for SdpVideoFormat. 2018-03-27 08:11:21 +00:00
video_coding_impl.cc Delete method VideoCodingModule::SetVideoProtection 2019-01-10 13:32:07 +00:00
video_coding_impl.h Reland "Refactor and remove media_optimization::MediaOptimization." 2019-01-11 10:46:33 +00:00
video_packet_buffer_unittest.cc Delete VCMEncodedFrame methods Buffer and MutableBuffer 2019-01-11 10:10:12 +00:00
video_receiver.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
video_receiver_unittest.cc Minor changes to TestVideoReceiver. 2019-01-10 08:15:28 +00:00
video_sender.cc Reland "Refactor and remove media_optimization::MediaOptimization." 2019-01-11 10:46:33 +00:00
video_sender_unittest.cc Reland "Refactor and remove media_optimization::MediaOptimization." 2019-01-11 10:46:33 +00:00