webrtc/modules/video_coding
Henrik Boström 56db9ff1e1 VideoStreamEncoder: Don't map kNative video frame buffers.
Follow-up CL to VP8 and VP9 encoders taking care of mapping.
Context again:
  This CL is part of Optimized Scaling efforts. In Chromium, the native
frame buffer is getting an optimized CropAndScale() implementation. To
support HW accelerated scaling, returning pre-scaled images and skipping
unnecessary intermediate downscales, WebRTC needs to 1) use CropAndScale
instead of libyuv::XXXXScale and 2) only map buffers it actually intends
to encode.

In this CL, VideoStreamEncoder no longer calls GetMappedFrameBuffer() on
behalf of the encoders, since the encoders are now able to either do the
mapping or performs ToI420() anyway.

- Tests for old VSE behaviors are updated to test the new behavior (i.e.
  that native frames are pretty much always forwarded).
- The "having to call ToI420() twice" workaround to Android bug
  https://crbug.com/webrtc/12602 is added to H264 and AV1 encoders.

Bug: webrtc:12469
Change-Id: Ibdc2e138d4782a140f433c8330950e61b9829f43
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211940
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#33548}
2021-03-24 09:43:11 +00:00
..
codecs VideoStreamEncoder: Don't map kNative video frame buffers. 2021-03-24 09:43:11 +00:00
deprecated Replace RTC_DEPRECATED with ABSL_DEPRECATED 2021-02-22 12:53:23 +00:00
include Replace RTC_DEPRECATED with ABSL_DEPRECATED 2021-02-22 12:53:23 +00:00
svc In full svc controller reuse unused frame configuration 2021-03-12 14:50:39 +00:00
test Include module_common_types.h only where needed 2019-09-24 08:22:38 +00:00
utility Reland "Parse encoded frame QP if not provided by encoder" 2021-03-15 10:11:22 +00:00
BUILD.gn Support native scaling of VideoFrameBuffers in LibvpxVp8Encoder. 2021-03-23 09:08:58 +00:00
chain_diff_calculator.cc Introduce ChainDiffCalculator 2020-05-18 14:22:44 +00:00
chain_diff_calculator.h Introduce ChainDiffCalculator 2020-05-18 14:22:44 +00:00
chain_diff_calculator_unittest.cc Introduce ChainDiffCalculator 2020-05-18 14:22:44 +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 Include module_common_types.h only where needed 2019-09-24 08:22:38 +00:00
decoder_database.cc Delay creation of decoders until they are needed 2021-02-19 12:08:49 +00:00
decoder_database.h Delay creation of decoders until they are needed 2021-02-19 12:08:49 +00:00
decoding_state.cc Concatenate string literals at compile time. 2020-01-14 14:47:48 +00:00
decoding_state.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
decoding_state_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
DEPS Add RTC_EXPORT to VCMEncodedFrame 2020-02-28 16:59:10 +00:00
encoded_frame.cc Removed _completeFrame since we never allow incomplete frames. 2020-10-28 16:00:27 +00:00
encoded_frame.h Delete unowned buffer in EncodedImage. 2021-03-19 14:12:28 +00:00
event_wrapper.cc Move EventWrapper class to target video_coding_legacy. 2020-03-06 08:39:35 +00:00
event_wrapper.h Move EventWrapper class to target video_coding_legacy. 2020-03-06 08:39:35 +00:00
fec_controller_default.cc Migrate modules/video_coding to webrtc::Mutex. 2020-07-07 11:41:21 +00:00
fec_controller_default.h Migrate modules/video_coding to webrtc::Mutex. 2020-07-07 11:41:21 +00:00
fec_controller_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
fec_rate_table.h
frame_buffer.cc Removed _completeFrame since we never allow incomplete frames. 2020-10-28 16:00:27 +00:00
frame_buffer.h Refactor legacy FrameBuffer to use EncodedImageBuffer::Realloc 2019-09-30 09:48:26 +00:00
frame_buffer2.cc Prepare to replace VideoLayerFrameId with int64_t. 2021-02-15 14:42:02 +00:00
frame_buffer2.h Prepare to replace VideoLayerFrameId with int64_t. 2021-02-15 14:42:02 +00:00
frame_buffer2_unittest.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
frame_dependencies_calculator.cc Ignore frame type when calculating generic frame dependencies. 2020-11-23 10:52:06 +00:00
frame_dependencies_calculator.h Ignore frame type when calculating generic frame dependencies. 2020-11-23 10:52:06 +00:00
frame_dependencies_calculator_unittest.cc Ignore frame type when calculating generic frame dependencies. 2020-11-23 10:52:06 +00:00
frame_object.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
frame_object.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
generic_decoder.cc Avoid log spam when decoder implementation changes 2021-03-12 17:12:25 +00:00
generic_decoder.h Fix potential unsafe access to VCMTimestampMap::data 2021-03-03 14:21:17 +00:00
generic_decoder_unittest.cc Signaling for low-latency renderer algorithm 2020-10-26 15:03:56 +00:00
h264_sprop_parameter_sets.cc Format almost everything. 2019-07-08 13:45:15 +00:00
h264_sprop_parameter_sets.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
h264_sprop_parameter_sets_unittest.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
h264_sps_pps_tracker.cc H264: Fix stap-a-to-annex-b loop over-read 2020-06-24 21:54:45 +00:00
h264_sps_pps_tracker.h in PacketBuffer::Packet pass payload using smart buffer 2019-12-03 14:55:54 +00:00
h264_sps_pps_tracker_unittest.cc in PacketBuffer::Packet pass payload using smart buffer 2019-12-03 14:55:54 +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 Format almost everything. 2019-07-08 13:45:15 +00:00
inter_frame_delay.cc Remove unused method in VCMInterFrameDelay. 2019-04-03 07:35:28 +00:00
inter_frame_delay.h Remove unused method in VCMInterFrameDelay. 2019-04-03 07:35:28 +00:00
internal_defines.h Remove unused defines and methods in internal_defines.h 2019-01-28 10:31:40 +00:00
jitter_buffer.cc Removed _completeFrame since we never allow incomplete frames. 2020-10-28 16:00:27 +00:00
jitter_buffer.h Migrate modules/video_coding to webrtc::Mutex. 2020-07-07 11:41:21 +00:00
jitter_buffer_common.h Format almost everything. 2019-07-08 13:45:15 +00:00
jitter_buffer_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
jitter_estimator.cc Add option to disable reduced jitter delay through field trial. 2020-05-19 11:51:29 +00:00
jitter_estimator.h Add option to disable reduced jitter delay through field trial. 2020-05-19 11:51:29 +00:00
jitter_estimator_tests.cc Add option to disable reduced jitter delay through field trial. 2020-05-19 11:51:29 +00:00
loss_notification_controller.cc Detach LossNotificationController from RtpGenericFrameDescriptor 2020-01-24 11:53:28 +00:00
loss_notification_controller.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
loss_notification_controller_unittest.cc Detach LossNotificationController from RtpGenericFrameDescriptor 2020-01-24 11:53:28 +00:00
media_opt_util.cc Stop checking VP8BaseHeavyTl3RateAllocation field trial on every frame. 2019-11-04 13:50:59 +00:00
media_opt_util.h Stop checking VP8BaseHeavyTl3RateAllocation field trial on every frame. 2019-11-04 13:50:59 +00:00
nack_module2.cc Remove locks and dependency on ProcessThread+Module from NackModule2. 2020-05-27 14:20:34 +00:00
nack_module2.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
nack_module2_unittest.cc Remove locks and dependency on ProcessThread+Module from NackModule2. 2020-05-27 14:20:34 +00:00
nack_module_unittest.cc Deprecate webrtc::NackModule. 2020-05-30 16:34:44 +00:00
OWNERS Remove wildcard ownership for build files. 2020-02-19 14:05:46 +00:00
packet.cc Add plumbing of RtpPacketInfos to each VideoFrame as input for SourceTracker. 2019-06-20 10:24:29 +00:00
packet.h Add plumbing of RtpPacketInfos to each VideoFrame as input for SourceTracker. 2019-06-20 10:24:29 +00:00
packet_buffer.cc Remove NTP timestamp from PacketBuffer::Packet. 2021-03-12 15:19:35 +00:00
packet_buffer.h Remove NTP timestamp from PacketBuffer::Packet. 2021-03-12 15:19:35 +00:00
packet_buffer_unittest.cc Add new fmtp parameter for H.264 2020-08-07 10:32:41 +00:00
receiver.cc Removed _completeFrame since we never allow incomplete frames. 2020-10-28 16:00:27 +00:00
receiver.h Remove unused critical section includes. 2020-07-16 13:52:28 +00:00
receiver_unittest.cc Move EventWrapper class to target video_coding_legacy. 2020-03-06 08:39:35 +00:00
rtp_frame_id_only_ref_finder.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_frame_id_only_ref_finder.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_frame_reference_finder.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_frame_reference_finder.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_frame_reference_finder_unittest.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_generic_ref_finder.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_generic_ref_finder.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_seq_num_only_ref_finder.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_seq_num_only_ref_finder.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_vp8_ref_finder.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_vp8_ref_finder.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_vp8_ref_finder_unittest.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_vp9_ref_finder.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_vp9_ref_finder.h Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtp_vp9_ref_finder_unittest.cc Move RtpFrameObject and EncodedFrame out of video_coding namespace. 2021-03-23 14:22:47 +00:00
rtt_filter.cc
rtt_filter.h Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
session_info.cc Remove framemarking RTP extension. 2020-06-15 11:18:00 +00:00
session_info.h Format almost everything. 2019-07-08 13:45:15 +00:00
session_info_unittest.cc Include module_common_types.h only where needed 2019-09-24 08:22:38 +00:00
timestamp_map.cc Fix potential unsafe access to VCMTimestampMap::data 2021-03-03 14:21:17 +00:00
timestamp_map.h Fix potential unsafe access to VCMTimestampMap::data 2021-03-03 14:21:17 +00:00
timing.cc Delete master_timing argument to VCMTiming. 2020-11-02 11:49:46 +00:00
timing.h Delete master_timing argument to VCMTiming. 2020-11-02 11:49:46 +00:00
timing_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
unique_timestamp_counter.cc Split out counting unique rtp timestamps from packet_buffer 2019-10-30 15:27:48 +00:00
unique_timestamp_counter.h Split out counting unique rtp timestamps from packet_buffer 2019-10-30 15:27:48 +00:00
unique_timestamp_counter_unittest.cc Split out counting unique rtp timestamps from packet_buffer 2019-10-30 15:27:48 +00:00
video_codec_initializer.cc Add support for VideoLayersAllocation for Vp9 scv/ksvc and none scalable 2020-12-30 16:45:03 +00:00
video_codec_initializer_unittest.cc Make VP9 correctly accept middle-layer singlecast 2020-09-22 16:09:53 +00:00
video_coding_defines.cc Fix frames dropped statistics 2019-08-27 07:43:01 +00:00
video_coding_impl.cc Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
video_coding_impl.h Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
video_receiver.cc Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
video_receiver2.cc Delay creation of decoders until they are needed 2021-02-19 12:08:49 +00:00
video_receiver2.h Delay creation of decoders until they are needed 2021-02-19 12:08:49 +00:00
video_receiver_unittest.cc Prepare for deleting VideoCodec::plType 2020-08-11 14:20:59 +00:00