webrtc/modules
Henrik Boström bd9e4a95eb Support native scaling of VideoFrameBuffers in LibvpxVp9Encoder.
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.
- To achieve this, WebRTC encoders are updated to map kNative video
  buffers so that in a follow-up CL VideoStreamEncoder can stop mapping
  intermediate buffer sizes.

In this CL LibvpxVp9Encoder is updated to map kNative buffers of pixel
formats it supports and convert ToI420() if the kNative buffer is
something else. A fake native buffer that keeps track of which
resolutions were mapped, MappableNativeBuffer, is added.

Because VP9 is currently an SVC encoder and not a simulcast encoder, it
does not need to invoke CropAndScale.

This CL also fixes MultiplexEncoderAdapter, but because it simply
forwards frames it only cares about the pixel format when
|supports_augmented_data_| is true so this is the only time we map it.
Because this encoder is not used with kNative in practise, we don't care
to make this path optimal.

Bug: webrtc:12469, chromium:1157072
Change-Id: I74edf85b18eccd0d250776bbade7a6444478efce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212580
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@{#33526}
2021-03-22 13:35:35 +00:00
..
async_audio_processing Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
audio_coding Temporarily disable Opus decode test. 2021-03-10 12:47:18 +00:00
audio_device Replace RTC_DEPRECATED with ABSL_DEPRECATED 2021-02-22 12:53:23 +00:00
audio_mixer Remove from chromium build targets that are not compatible with it. 2021-02-01 13:46:19 +00:00
audio_processing Reland "Reduce complexity in the APM pipeline when the output is not used" 2021-03-16 09:33:02 +00:00
congestion_controller Refactor LossBasedBandwidthEstimation 2021-02-17 12:22:22 +00:00
desktop_capture modules/desktop_capture: replace memcpy with libyuv::CopyPlane 2021-02-25 21:50:30 +00:00
include Delete RTPFragmentationHeader as no longer used 2020-09-03 00:01:27 +00:00
pacing Remove old workaround in PacingController 2021-02-24 10:44:42 +00:00
remote_bitrate_estimator Cleanup of bwe_defines.h 2020-11-26 12:26:02 +00:00
rtp_rtcp Updates ulpfec reader to accept padding on media packets. 2021-03-16 19:47:09 +00:00
third_party Use source_sets in component builds and static_library in release builds. 2019-10-17 21:17:18 +00:00
utility Replace RecursiveCriticalSection with Mutex in ProcessThreadImpl 2021-03-01 12:13:09 +00:00
video_capture Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
video_coding Support native scaling of VideoFrameBuffers in LibvpxVp9Encoder. 2021-03-22 13:35:35 +00:00
video_processing Delete unneeded dependencies on the Module abstraction 2020-12-21 09:09:57 +00:00
BUILD.gn Remove from chromium build targets that are not compatible with it. 2021-02-01 13:46:19 +00:00
module_common_types_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00