Remove EncodedFrame::MissingFrame, as it was always false in actual
in-use code anyway, and remove usages of the Decode missing_frames param
within WebRTC. Uses/overrides in other projects will be cleaned up
shortly, allowing that variant to be removed from the interface.
Bug: webrtc:15444
Change-Id: Id299d82e441a351deff81c0f2812707a985d23d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317802
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40662}
Remove VCMEncodedFrame from the inheritance chain of EncodedFrames by
- moving getters for EncodedImage fields up to EncodedImage
- copying other non-deprecated fields & Methods from VCMEncodedFrame over to EncodedFrame
- Removing EncodedFrame's inheritance of VCMEncodedFrame
We leave VCMEncodedFrame as part of the (near) deprecated
VideoCodingModule code. The only place which needs to accept either is
in the generic decoder.
Bug: webrtc:9378, b:296992877
Change-Id: I60706aebbb6eacc7fd4b35ec90cc903efdbe14c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317160
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40639}
When GenericFrameDescriptor or DependencyDescriptor RTP extensions are used, we may receive multiple consecutive StapA packets where only the first packet has is_first_packet_in_frame set. The previous code assumed that all StapA had is_first_packet_in_frame = true. Per discussion on the attached bug, removing the DCHECK is OK.
Bug: webrtc:15155
Change-Id: I6348740eac7d70bca2b7541721aaa7e2b5e5a970
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316941
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40608}
Expose new function MaybeCreateFrameDumpingEncoderWrapper that
wraps another passed encoder and dumps its encoded frames out
into a unique IVF file into the directory specified by the
"WebRTC-EncoderDataDumpDirectory" field trial. If the passed
encoder is nullptr, or the field trial is not setup, the function
just returns the passed encoder. The directory specified by the
field trial parameter should be delimited by ';'.
The new function is wired up in VideoStreamEncoder.
Bug: b/296242528
Change-Id: I6143adf899f78fcc03d4239a86c68dcbab483f1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317200
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40600}
Goal is to be able to get an improved overview of the distribution
of the total delay.
Bug: None
Change-Id: I0dced53eafd1fb09941590f3706480066c52419b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317260
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40597}
Remove code where integer -1 as delay is used to represent unset value.
Bug: webrtc:13756
Change-Id: I16a01e12c25a09ce21a971c9edabf47af5936662
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316923
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40592}
Remove support for setting one limit without another limit
because related rtp header extension doesn't support such values.
Start morphing VideoPlayouDelay into a class and stricter type: add accessors returning TimeDelta
Bug: webrtc:13756
Change-Id: If0dd02620528dc870b015beeff3a8103e04022ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315921
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40570}
after the downstream tests have been updated.
BUG=webrtc:14728
Change-Id: I9cf7eb607f8b26acf985d90625e55bac257a2606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316220
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40557}
This is a reland of commit 0e37f5ebd4
with backward compability added to allow downstream tests to migrate to the new signature.
Original change's description:
> Fix definition of keyframes decoded statistics
>
> which are defined to be measured after decoding, not before:
> https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-keyframesdecoded
>
> BUG=webrtc:14728
>
> Change-Id: I0a83dde278e1ebe8acf787bdac729af369a1ecf8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315520
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40545}
BUG=webrtc:14728
Change-Id: I4cf52bb22ba8244155b4fa8c367b9c0306a77590
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316120
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40553}
which makes it possible to grep the logs for all decode errors
on a particular SSRC.
BUG=None
Change-Id: I4aa54434f0b85932313adaf39e099729991a4700
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308823
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40404}
This reverts commit 7534ebd2bf.
Reason for revert: Downstream projects have been updated, try it again.
R=perkj@webrtc.org
Bug: webrtc:7452
Change-Id: Ice48a563a6da499b6050b6f6e21bb0a18cd34f57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271841
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40386}
Use 8 threads for > 720p
Use 4 tile columns and 2 tile rows for 8 threads
Use 2 tile columns and 2 tile rows for 4 threads
For VGA, 2 tile_col x 2 tile_row configuration has
- ~9% speedup over 4 tile_col x 1 tile_row
- ~5% speedup over 1 tile_col x 4 tile_row
Bug: None
Change-Id: I3c1ea948437aece7c6734ce25351158cbdf0a15b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307880
Commit-Queue: Jerome Jiang <jianj@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40237}
The preferred method to create codecs is to use the function
cricket::CreateAudioCodec or cricketCreateVideoCodec.
Empty codec objects are deprecated and should be replaced
with alternatives such as methods returning an
absl::optional object instead.
Bug: webrtc:15214
Change-Id: I7fe40f64673cd407830dbbb0e541b85a3aee93aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307521
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40226}
Empty codec objects do not make sense. Instead of creating an empty
object to be used as a placeholder in the API, at least create a
video codec with the right name.
Bug: webrtc:15214
Change-Id: I705d9d1361f353fe5dc538a6fe972c8a346f1247
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307221
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40218}
Most of the usage of the H264Encoder::Create(codec) method passes a
simple codec with just the H264 codec name. This simplified the call
sites in many places and removes references to the codec types.
Bug: webrtc:15214
Change-Id: I4039c0be4ce6e3147c14c7853df4635f344b7d70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307222
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40214}
Currently FecController knows about network conditions, these information can be used to control RTX settings in-call.
Change-Id: I8f84164aeac48ea13b7f1cf82fd7424431f98ada
Bug: webrtc:15167
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304800
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40192}
Error resilience is no longer required for upper temporal layers.
Disabling error resilience on the upper layers leads to a ~2% PSNR BD-rate gain.
Reland of https://webrtc-review.googlesource.com/c/src/+/302001
Bug: webrtc:15106
Change-Id: I72ca9d504a7848dda934cbd52669027061742256
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305782
Reviewed-by: Jerome Jiang <jianj@google.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/main@{#40099}
The IvfFileWriter logs a warning in case frames have a different
resolution compared to the one of the first frame in the file.
While this is an issue, since the IVF header will have the resolution
of the first frame, in reality this is not a problem (e.g. tools like
VLC can open and play the IVF without issues).
For this reason, let's remove the log which gets printed for each
frame.
Bug: b/282678729
Change-Id: I540cd1b6ce4f5d888737725e7615918aa126647f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305280
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40069}
The VCMReceiveStatisticsCallback interface is both implemented (by ReceiveStatisticsProxy) and called (by VideoStreamBufferController) in `video/`, so there's no reason it should be declared in `modules/video_coding`. I also took the opportunity to update the name.
No functional changes are intended by this change, but following CLs will make some changes.
Bug: webrtc:15085
Change-Id: Ib8da30ca56675e4f638d0b9778c329b9c1138acf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304662
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40034}
This move further clarifies that the file and its class are deprecated. It also cleans up the modules/video_coding root folder a bit.
No functional changes are intended.
Bug: webrtc:14876
Change-Id: I580e8412d379931bfdf9517e0a8be25c19e0cd32
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304100
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40004}
This reverts commit 2080dacfb7.
Reason for revert: This CL is causing a lot of flakiness on iOS bots
https://ci.chromium.org/p/webrtc/builders/ci/iOS%20Debug%20%28simulator%29
Original change's description:
> For AV1, disable error resilience on upper temporal layers. Error resilience is no longer required for upper temporal layers. Disabling error resilience on the upper layers leads to a ~2% PSNR BD-rate gain.
>
> Bug: webrtc:15106
> Change-Id: Id92d51defbd26c1a77e3c9fe19607e9db4a3e7c1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302001
> Reviewed-by: Marco Paniconi <marpan@webrtc.org>
> Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39900}
Bug: webrtc:15106
Change-Id: I24515280113ed6681c9766026ec24d689035c031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301983
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39903}
This move further clarifies that the file and its class are deprecated. It also cleans up the modules/video_coding root folder a bit.
No functional changes are intended.
Bug: webrtc:14876
Change-Id: Ic3ac439b3dd3492e6c9c85869efa80a6708658ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301521
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39876}
native_test_jni_onload depends on base_jni which depends on modules/audio_processing:api. This requires to include audio_device_java in pure video targets like video_codec_perf_tests.
Bug: webrtc:14852
Change-Id: I5e7b102fd730801562695bf3f4d5170ec8e59b58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301363
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39873}
The jitterbuffer would call Flush which takes a mutex from
InsertPacket, which is already under the same mutex. Fix
this by introducing an internal flush method that assumes
a locked state.
The change also adds more thread annotations in case more
problems were present. No more problems were detected.
Fixed: b/277930190
Change-Id: If85609f27f8187ade9370847fecc2bc83d940dd5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301340
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Auto-Submit: Markus Handell <handellm@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39868}
These tests often fail in 'ExtrapolateLocalTime' because the result gives a negative Timestamp.
Here is the stack from https://chromium-swarm.appspot.com/task?id=6173230e67897b10:
PC: @ 0x7f03afdb8e87 (unknown) raise
...
@ 0x55f4a360ba71 352 webrtc::Timestamp::operator+()
@ 0x55f4a47ecaf3 160 webrtc::TimestampExtrapolator::ExtrapolateLocalTime()
Low-Coverage-Reason: coverage isn't that low.
Change-Id: If3e7cbf31d6c4800727b24352ed2c6edc425fc73
Bug: webrtc:15022
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300600
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39853}
Set of codecs for testing is hardcoded to AV1, VP8, VP9, H264, H265. Some codecs may not be available due to lack of support on the platform or due to some issue in our code which would be a regression. Reporting zero metrics for failed tests would allow the perf tool to detect such a regression.
This also enables codec tests by default. The tests should not run on bots since video_codec_perf_tests binary is not included in any test suits yet.
Bug: webrtc:14852
Change-Id: I967160069055036f93e595d328c4d5f1ca483be9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300868
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39840}
Fix Issue 15059: The target bitrate was mistakenly set to be the maximal
bitrate when initializing the libaom encoder.
Bug: webrtc:15059
Change-Id: I38498d4cce7b0a9c26736d9f1096178dd2e1fef6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300004
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39822}
We shouldn't treat VP9 simulcast {active,inactive,inactive} different
from VP9 singlecast when it comes to bitrates, so the condition
`config.simulcast_layers.size() <= 1` is updated to
`video_codec.numberOfSimulcastStreams <= 1` which holds true in the
"single active stream" case as well.
This is consistent with existing logic, such as the fact that we use
`SvcRateAllocator` instead of `SimulcastRateAllocator` when
`numberOfSimulcastStreams <= 1`.
Bug: webrtc:15061
Change-Id: I67fc78b9c0f97f1d607c91bbc689b06c3fd5cb48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298920
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39791}
Various "if streams == 1" cases are updated to "if
IsSinglecastOrAllNonFirstLayersInactive()" in order not to cause subtle
differences between VP9 {active} and VP9 {active,inactive,inactive}.
This CL also affects a line that conditionally sets
`simulcastStream[0].active = codec_active` so it seemed fitting to
improve the test coverage of "if all streams are inactive, don't send".
Bug: webrtc:15028
Change-Id: I8872dc8be0f2dfc1d8914bdba5e6433f9ba8cbfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298881
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39656}
Attempting to ship "WebRTC-AllowDisablingLegacyScalability" revealed a
DCHECK that happens when negotiating 3 VP9 streams prior to the
setParameters() call:
1. By default, `scalability_mode` is missing, so those 3 streams
defaulted to legacy SVC, meaning only a single stream is used.
2. Then, setParameters() was called to make
`encodings[0].scalability_mode = "L2T2_KEY"` and
`encodings[1-2].active = false`. The inactive streams were just
dummies and never expected to exist.
Without simulcast support this is OK, because both 1) and 2) are
interpreted to have a single stream. But with simulcast support, 1) is
interpreted as single stream and 2) as three streams (1 active, 2
inactive). This should be roughly the same setup, but our code treats
them differently.
The DCHECK crash was a mismatch in number of streams in one of the
layers.
The fix is to re-create the streams when the number of streams change
for this reason. The new test revealed other issues and fixes too:
- Support for multiple spatial layers (e.g. "L2T2_KEY") when multiple
encodings exist but only one encoding is active.
- Allow inactive layers not to have a scalability mode set.
A laundry list (https://crbug.com/webrtc/15028) has been created to
update known places doing "if streams == 1" that need to do "if
active streams == 1" instead.
Credit:
The RecreateWebRtcStream() fix is based on eshr@'s POC from
https://webrtc-review.googlesource.com/c/src/+/298565.
Bug: webrtc:15016
Change-Id: I909a3f83a4ef53562894549ade0a870b208cec7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298443
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#39651}
Initialization of Android HW codecs takes hundreds milliseconds. Exclude this time from frame processing time of first frame by initializing codecs before starting encoding/decoding.
Bug: b/261160916, webrtc:14852
Change-Id: I9ec84c6b12c1d9821b59965cf521170224066563
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298304
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39613}
BuiltinVideoEncoderFactory, which was used before, has been started to use SEA since https://webrtc-review.googlesource.com/c/src/+/297740. SEA requires factory lifetime to be ~same as created codec lifetime. Codec test doesn't guarantee this currently.
Bug: b/261160916, webrtc:14852
Change-Id: I75ef99f1c9fe0d7823f31fd07c05a3ca52f7212d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298201
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39600}