Namespace used because of copy-pasting an old pattern, should never have been used in the first place. Removing it now to make followup refactoring prettier.
Bug: webrtc:12579
Change-Id: I00a80958401cfa368769dc0a1d8bbdd76aaa4ef5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212603
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33536}
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}
This will further speed up intra frame encoding
Bug: None
Change-Id: I1a105c6d2cdd9dc82f84d0039dbea3f0d090ab93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212320
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33492}
This will speed up key frame encoding (together with libaom changes)
3x-4x times with ~13% BDRate loss on key frames only
Bug: None
Change-Id: I24332f4f7285811cdc6619ba29844fe564cae95e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212040
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33468}
A refactoring (https://webrtc-review.googlesource.com/c/src/+/196520)
of decoder metadata handling introduced a bug which causes us to log an
info-level entry for every frame decoded if the implementation changes
during runtime (e.g. due to software fallback).
This CL fixes that to avoid spamming the logs.
Bug: webrtc:12271
Change-Id: I89016351b8752b259299c4cf56c6feddcca43460
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211664
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33451}
The access to |_timestampMap| was guarded by a lock but
not the access to the data pointer stored in |_timestampMap|.
There was a potential race condition if new data was added
in VCMGenericDecoder::Decode() while the data pointer
retrieved from _timestampMap.Pop() was being used in
VCMDecodedFrameCallback::Decoded().
This CL moves the storage of data to within |_timestampMap|,
instead of being a pointer so that it's guarded by the same
lock.
Bug: webrtc:11229
Change-Id: I3f2afb568ed724db5719d508a73de402c4531dec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209361
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33374}
Check if codec was successfully created and exit from RunTest if not
before creating VideoProcessor.
Bug: none
Change-Id: Ia6d7171650dbc9824fb78f4a8e2851f755cfd63b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209362
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33372}
The low-latency renderer is activated by the RTP header extension
playout-delay if the min value is set to 0 and the max value is
set to something greater than 0.
According to the specification of the playout-delay header
extension it doesn't have to be set for every frame but only if
it is changed. The bug that this CL fixes occured if a playout
delay had been set previously but some frames without any specified
playout-delay were received. In this case max composition delay
would not be set and the low-latency renderer algorithm would be
disabled for the rest of the session.
Bug: chromium:1138888
Change-Id: I12d10715fd5ec29f6ee78296ddfe975d7edab8a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208581
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33330}
Use 4 threads for 360p and above.
Use tile rows for VGA and 4 threads.
Use speed 8 for 360p.
Change min max qp scaling threshold.
Bug: None
Change-Id: Ib7a5b7e539d26d9fa60aa2c4a75eb6f4b19f7dea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208340
Commit-Queue: Jerome Jiang <jianj@google.com>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33320}
This remove webrtc-specific macro that has no reason to be webrtc specific
ABSL_DEPRECATED takes a message parameter encouraging to write text how class or function is deprecated.
Bug: webrtc:12484
Change-Id: I89f1398f91dacadc37f7db469dcd985e3724e444
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208282
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33314}
Before this CL, WebRTC created a decoder for each negotiated codec
profile. This quickly consumed all available HW decoder resources
on some platforms. This CL adds a field trial,
WebRTC-PreStreamDecoders, that makes it possible to set how many
decoders that should be created up front, from 0 to ALL. If the
field trial is set to 1, we only create a decoder for the
preferred codec. The other decoders are only created when they are
needed (i.e., if we receive the corresponding payload type).
Bug: webrtc:12462
Change-Id: I087571b540f6796d32d34923f9c7f8e89b0959c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208284
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33300}
Keeping structures in the same file makes it clearer which are missing
and makes it easier to see if structures are consistent with one another.
No-Try: True
Bug: None
Change-Id: I4e5e6971054dd28dd326c68369ee57b6df62725e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206987
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33256}
Since for such frame SvcController haven't setup how buffer should be
referenced and updated, the frame would likely have unexpected configuration.
Log an error to note resource have been wasted produce it and drop such frame.
Bug: webrtc:11999
Change-Id: I1784403e67b7207092d46016510460738994404e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205140
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33148}
To be able to build these targets in chromium we need to replace all abseil dependencies with "//third_party/abseil-cpp:absl".
Bug: webrtc:12404
Change-Id: Ie0f6af73f2abc73e5744520cfd9a6414e2f948e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202762
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33108}
The SpatialIndex value from an EncodedImage is 0-based, but values were
off by 1.
Bug: none
Change-Id: Ie74e6450ddef1cfaee68fa230c441030fa86a64a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203525
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33067}