[BREAKGLASS] Append-only mirror of github.com/signalapp/webrtc
Go to file
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
api Update rsid and mid spec links from draft to release version 2021-03-22 12:24:00 +00:00
audio Add remote-outbound stats for audio streams 2021-03-12 20:39:50 +00:00
build_overrides Allow webrtc mac cross compile 2021-03-10 18:42:58 +00:00
call Update WebRTC code version (2021-03-20T04:03:21). 2021-03-20 05:38:27 +00:00
common_audio Remove from chromium build targets that are not compatible with it. 2021-02-01 13:46:19 +00:00
common_video Provide a default implementation of NV12BufferInterface::CropAndScale. 2021-03-22 11:09:36 +00:00
data Remove old data files. 2018-10-05 14:40:21 +00:00
docs doc: add M88/M89 release notes 2021-03-01 16:16:03 +00:00
examples Expose addIceCandidate with completion handler. 2021-03-11 16:15:44 +00:00
g3doc Introduce WebRTC documentation structure and how-to 2021-03-12 12:07:52 +00:00
logging Replace RTC_DEPRECATED with ABSL_DEPRECATED 2021-02-22 12:53:23 +00:00
media Make num_encoded_channels_ atomic 2021-03-18 15:26:23 +00:00
modules Support native scaling of VideoFrameBuffers in LibvpxVp9Encoder. 2021-03-22 13:35:35 +00:00
p2p Delete TurnPort usage of AsyncInvoker 2021-03-22 12:56:26 +00:00
pc Add missing EXPECT_CALL for RTCStatsCollectorTest tests 2021-03-18 12:52:42 +00:00
resources Disable high-pass filtering of the AEC reference 2021-02-23 07:06:11 +00:00
rtc_base Check if ifa_addr field is null. 2021-03-22 09:41:27 +00:00
rtc_tools Reland "Enable use of rtc::SystemTimeNanos() provided by Chromium" 2021-02-25 10:48:55 +00:00
sdk Expose offerExtmapAllowMixed in iOS SDK. 2021-03-18 08:54:11 +00:00
stats [Stats] Add minimum RTCReceivedRtpStreamStats with jitter and packetsLost 2021-03-11 11:58:58 +00:00
style-guide Remove kwiberg@webrtc.org from OWNERS files 2020-12-04 15:11:26 +00:00
system_wrappers Don't use SystemTimeNanos() for current wallclock time on WINUWP 2021-02-23 14:53:22 +00:00
test Support native scaling of VideoFrameBuffers in LibvpxVp9Encoder. 2021-03-22 13:35:35 +00:00
tools_webrtc Update apply-iwyu tool to report compile errors 2021-03-22 13:01:56 +00:00
video Provide a default implementation of NV12BufferInterface::CropAndScale. 2021-03-22 11:09:36 +00:00
.clang-format Add IncludeBlocks to clang-format. 2021-02-03 16:29:07 +00:00
.git-blame-ignore-revs Let git-hyper-blame ignore new format cleanup. 2019-07-11 16:18:51 +00:00
.gitignore Add .cache to .gitignore. 2021-01-20 15:01:07 +00:00
.gn Rename PlayoutDelay --> VideoPlayoutDelay, move to api/video/video_timing.h 2020-09-07 08:37:14 +00:00
.vpython Reland "Add protobuf-py2_py3 3.13.0 to .vpython." 2020-11-20 07:52:26 +00:00
abseil-in-webrtc.md Polish the "Using Abseil in WebRTC" docs 2020-10-16 13:42:00 +00:00
AUTHORS Roll src/third_party/libjpeg_turbo/ fa0de0767..7b4981b65 (2 commits) 2021-02-24 08:40:13 +00:00
BUILD.gn Move SequenceChecker header to API: step 1, move header only 2021-02-08 11:49:58 +00:00
CODE_OF_CONDUCT.md
codereview.settings Don't add webrtc-reviews@ to CC, it can be added globally on Gerrit 2018-10-25 08:19:53 +00:00
DEPS Roll chromium_revision 5f1d8e0c95..23141e38f1 (864439:864556) 2021-03-19 05:07:58 +00:00
DIR_METADATA Move metadata in OWNERS files to DIR_METADATA files. 2021-02-08 19:09:33 +00:00
ENG_REVIEW_OWNERS Remove kwiberg@webrtc.org from OWNERS files 2020-12-04 15:11:26 +00:00
LICENSE Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
license_template.txt
native-api.md Make the remote_bitrate_estimator build target private 2020-11-26 12:21:22 +00:00
OWNERS Move metadata in OWNERS files to DIR_METADATA files. 2021-02-08 19:09:33 +00:00
PATENTS Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
presubmit_test_mocks.py Reformat python files checked by pylint (part 1/2). 2020-10-30 10:13:11 +00:00
presubmit_test.py Reformat python files checked by pylint (part 1/2). 2020-10-30 10:13:11 +00:00
PRESUBMIT.py Add deprecation section to webrtc style guide 2021-02-22 13:34:40 +00:00
pylintrc Undo enforcing of PEP-8 pylint changes for method and function names. 2020-11-10 18:26:25 +00:00
README.chromium Add CPEPrefix. 2020-07-13 11:42:07 +00:00
README.md doc: move bug reporting instructions to the repository 2020-10-21 14:47:49 +00:00
style-guide.md Add deprecation section to webrtc style guide 2021-02-22 13:34:40 +00:00
WATCHLISTS Add hta@ to rtc_base/ and api/ WATCHLISTS. 2021-01-06 09:43:34 +00:00
webrtc_lib_link_test.cc Rewrite the lib link test to just be a binary. 2019-10-18 07:42:20 +00:00
webrtc.gni build: improve rtc_include_tests documentation 2021-03-05 13:54:20 +00:00
whitespace.txt Reland "Triggering CI." 2021-03-22 11:57:23 +00:00

WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.

Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.

The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.

Development

See here for instructions on how to get started developing with the native code.

Authoritative list of directories that contain the native API header files.

More info