Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.
Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
If at creation of a VP8 encoder there is not enough bitrate to enable a
given spatial layer - the configuration won't be updated to indicate
the correct temporal layer count. This means GetEncoderInfo() will
indicate lack of temporal layer support, which triggers issues with
rate allocation.
This CL fixes that by always setting an initial bitrate of 0bps.
Bug: webrtc:12788
Change-Id: I10974e85446b58e597d2ca415eaf2550306ce986
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220929
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34198}
...though the big issue was probably that pending frames weren't being
culled properly in the case of frame dropping.
Bug: webrtc:12596
Change-Id: I9a03282b2a99087aa7c5650e57ce30fe0f0d3036
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214127
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33638}
Previously, FecControllerOverride was passed to
Vp8FrameBufferController::SetFecControllerOverride. Passing to
the factory is a more elegant way, since it's only used when
the controller is constructed.
TBR=kwiberg@webrtc.org
Bug: webrtc:10769
Change-Id: Iae599889e7ca9003e3200c2911239cbb763ee65a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144380
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28443}
Rename structures to match terminology in the spec
Bug: webrtc:10342
Change-Id: I1329abaca98ae7f82307451032d5ce1533e80772
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143960
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28402}
Make Vp8FrameBufferController::UpdateConfiguration return a set
of desired overrides. These overrides are cumulative with
previously returned override sets.
Bug: webrtc:10382
Change-Id: I1aa9544ae0cf6c57115e80963b3bbcdc3101db5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134649
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27835}
In this CL:
- Assign frame IDs so that simulcast streams share one frame ID space.
- Added a CodecBufferUsage class that represent how a particular buffer
was used (updated, referenced or both).
- Calculate frame dependencies based on the CodecBufferUsage information.
Bug: webrtc:10342
Change-Id: I4ed5ad703f9376a7d995c04bb757c7d214865ddb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131287
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27784}
Rename "UpdateLayerConfig" to the more appropriate "NextFrameConfig".
Also update some comments in vp8_frame_buffer_controller.h.
Bug: None
Change-Id: Iba8227f84e33e5ebd28d2eeb10fe03e776036603
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133202
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27660}
A typo in a previous CL made OnLossNotification() accept its
single argument as a const-value, rather than a const-reference.
Bug: webrtc:10501
Change-Id: I5e6f9c79f15205b75ec90a53d3fccf3dd9927e33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133343
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27659}
Prior to this CL, this was indicated by passing |size_bytes| = 0
to the method.
Bug: webrtc:10501
Change-Id: Icff3bb83344834dc62d62bde5ec5d05096a08e11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132712
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27620}
In this CL:
- Created static helper function GenericFrameInfo::DecodeTargetInfo to
convert DTI symbols to a list of GenericFrameInfo::OperatingPointIndication.
- Added per frame DTI information for the different stream structures.
Bug: webrtc:10342
Change-Id: I62ff2e9fc9b380fe1d0447ff071e86b6b35ab249
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129923
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27350}
This CL paves the way to making FrameBufferController injectable.
LibvpxVp8Encoder can manage multiple streams. Prior to this CL,
each stream had its own frame buffer controller, all of them held
in a vector by LibvpxVp8Encoder. This complicated the code and
produced some code duplication (cf. SetupTemporalLayers).
This CL:
1. Replaces CreateVp8TemporalLayers() by a factory. (Later CLs
will make this factory injectable.)
2. Makes LibvpxVp8Encoder use a single controller. This single
controller will, in the case of multiple streams, delegate
its work to multiple controllers, but that fact is not visible
to LibvpxVp8Encoder.
This CL also squashes CL #126046 (Send notifications of RTT and
PLR changes to Vp8FrameBufferController) into it.
Bug: webrtc:10382
Change-Id: Id9b55734bebb457acc276f34a7a9e52cc19c8eb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126483
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27206}
In this CL:
- Updated Vp8TemporalLayers::OnEncodeDone to take a CodecSpecificInfo
instead of a CodecSpecificInfoVP8, so that both the VP8 specific and
generic information can be populated.
- Added structs to represent the GFD template structure.
- Added code to generate templates for video/screensharing.
Bug: webrtc:10342
Change-Id: I978f9d708597a6f86bbdc494e62acf7a7b400db3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123422
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26987}
Prior to this CL, when software VP8 encoding was done with one temporal
layer, instead of only predicting from the latest frame, the code
allowed the encoder to reference the latest key frame as well.
This improves quality for the few frames immediately after
the key frame, but is not useful for later frames, which diverge
significantly from the key frame. However, the cost of producing
the prediction from more than one reference is incurred by all frames.
My measurements of the effect of this show an improvement
in CPU utilization of 5%-13% when this is not done.
foreman_352x288, 30fps, target bitrate 500kps
Pre-change:
send_enc_speed_fps: avg(566.187, 570.012, 575.665) = 570.621
send_avg_qp: 45.36
send_avg_psnr: 37.13
Post-change:
send_enc_speed_fps: avg(633.188, 604.694, 623.232) = 620.371
send_avg_qp: 45.88
send_avg_psnr: 37.0749
Improvement in send_enc_speed_fps: 8.71%
foreman_480x272, 30fps, target bitrate 500kps
Pre-change:
send_enc_speed_fps: avg(481.244, 486.971, 487.322) = 485.179
send_avg_qp: 48.9
send_avg_psnr: 37.6217
Post-change:
send_enc_speed_fps: avg(521.651, 499.416, 511.551) = 510.872
send_avg_qp: 48.88
send_avg_psnr: 37.6094
Improvement in send_enc_speed_fps: 5.29%
news_352x288, 30fps, target bitrate 500kps
Pre-change:
send_enc_speed_fps: avg(699.407, 697.837, 699.49) = 698.9113333
send_avg_qp: 24.15
send_avg_psnr: 40.9551
Post-change:
send_enc_speed_fps: avg(758.526, 768.104, 757.232) = 761.2873333
send_avg_qp: 23.9833
send_avg_psnr: 40.9697
Improvement in send_enc_speed_fps: 8.92%
Bridge_180x320_15 (video of brandtr@ from Google), 15fps, target bitrate 500kps
Pre-change:
send_enc_speed_fps: avg(454.757, 450.399, 446.812) = 450.656
send_avg_qp: 17.6771
send_avg_psnr: 39.9267
Post-change:
send_enc_speed_fps: avg(500.014, 513.316, 513.613) = 508.981
send_avg_qp: 17.6837
send_avg_psnr: 39.9137
Improvement in send_enc_speed_fps: 12.94%
Bug: webrtc:10281
Change-Id: If02736e1535c5f46689fd42b657e35a1e1f64d6d
Reviewed-on: https://webrtc-review.googlesource.com/c/120904
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26511}
FrameConfig is not specific to temporal layers. Anything that
can control referenced/updated buffers could potentially use it.
Bug: webrtc:10259
Change-Id: I04ed177ee884693798c3b69e35fd4255ce1e9062
Reviewed-on: https://webrtc-review.googlesource.com/c/120355
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26448}
Prior to this CL, RtpPayloadParams had code that assumed
dependency patterns in VP8, in order to write that information
into the [Generic Frame Descriptor] RTP extension.
This CL starts moving that code out of RtpPayloadParams.
Upcoming CLs will migrate additional encoder-wrappers to
the new scheme, then remove the deprecated code.
Bug: webrtc:10249
Change-Id: I5fc84aedf8e11f79d52b989ff8b7ce9568b6cf32
Reviewed-on: https://webrtc-review.googlesource.com/c/119958
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26438}
Also renaming it Vp8TemporalLayers to show that it is codec specific.
Bug: webrtc:9012
Change-Id: I18187538b8142cdd7538f1a4ed1bada09d040f1f
Reviewed-on: https://webrtc-review.googlesource.com/c/104643
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25137}
This refactoring merged PopulateCodecSpecific and FrameEncoded into a
single callback method. It also removes the FrameConfig parameter and
instead relies on the temporal layer to remember it internally.
Bug: webrtc:9012
Change-Id: I489b76821b534398ad452643f1322f411d3455b1
Reviewed-on: https://webrtc-review.googlesource.com/95681
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24957}
Today, the internal frame dropper in libvpx vp8 encoder is enabled or
disabled based on video or screen content. This is then expected to
match up with screenshare vs default temporal layers implementation.
This cl makes libvpx query the temporal layers implementation as well,
breaking this implicit dependency and allows frames to be dropped if
default temporal layers is used with screen content.
Bug: webrtc:9734
Change-Id: If2523a211f4929f16e65a02fa7a6b4edf7328571
Reviewed-on: https://webrtc-review.googlesource.com/99062
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24645}
kAllBuffers in default_temporal_layers.cc introduces a static initializer,
that is banned in Chromium, and that blocks WebRTC roll into Chromium.
This CL removes it to unblock.
Bug: webrtc:9012
Change-Id: Ide181f63d85748dc2d09199024f1b80868d485fd
Reviewed-on: https://webrtc-review.googlesource.com/94460
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24307}
This CL introduces a few changes to the default VP8 temporal layers:
* The pattern is now reset on keyframes
* The sync flag is inferred rather than hard-coded
* Support is added for buffer search order
Bug: webrtc:9012
Change-Id: Ice19d32413d20982368a01a7d2540d155e185ad4
Reviewed-on: https://webrtc-review.googlesource.com/91863
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24288}
* Make shorter 4-frame pattern default if 2 temporal layers are used.
* Make DefaultTemporalLayers usable by upper simulcast stream with 2tl.
* If experimental settings are enable, bump the max bitrate for the top
stream. Since we're now using probing everywhere the rampup should be
less of an issue.
* Additionally, fixes an issue in full stack tests, where
ScopedFieldTrials in an experiment would override the
--force_fieldtrials specified at command line. Some trials added by
the test bots caused timeouts without this.
Bug: webrtc:9477
Change-Id: I42410605d416b51c4fbfe5b6b850997484af583c
Reviewed-on: https://webrtc-review.googlesource.com/92883
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24252}
Also adjust to base-layer fraction for the shortened 3-tl pattern to be
60%, just like the 2-tl setting.
This CL removes direct use of the allocation matrix and moves it behind
a static getter.
Bug: webrtc:9477
Change-Id: Ifd7d1edffa0555024fd252834357b926997d13b5
Reviewed-on: https://webrtc-review.googlesource.com/86681
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23834}
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
TBR=sprang@webrtc.org,stefan@webrtc.org,titovartem@webrtc.org
Bug: webrtc:5840
Change-Id: I2d3b130622dd7ceec5528f3ab6c46f109e6bafb8
Reviewed-on: https://webrtc-review.googlesource.com/84743
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23715}
This reverts commit 07efe436c9.
Reason for revert: Breaks downstream project.
cricket::GetSimulcastConfig method signature has been updated.
I think you can get away with a default value for temporal_layers_supported (and then you can remove it after a few days when projects will be updated).
Original change's description:
> Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
>
> * Move SimulcastEncoderAdapter out under modules/video_coding
> * Move SimulcastRateAllocator back out to modules/video_coding/utility
> * Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
> * Move any VP8 specific code - such as temporal layer bitrate budgeting -
> under codec type dependent conditionals.
> * Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
>
> Bug: webrtc:5840
> Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
> Reviewed-on: https://webrtc-review.googlesource.com/64100
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23705}
TBR=sprang@webrtc.org,stefan@webrtc.org,mflodman@webrtc.org,hta@webrtc.org,sergio.garcia.murillo@gmail.com,titovartem@webrtc.org,agouaillard@gmail.com
Change-Id: Ic9d3b1eeaf195bb5ec2063954421f5e77866d663
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:5840
Reviewed-on: https://webrtc-review.googlesource.com/84760
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23710}
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
Bug: webrtc:5840
Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
Reviewed-on: https://webrtc-review.googlesource.com/64100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23705}
It would be nice to also delete the fields from CodecSpecificInfo,
but those fields are used on the receive side.
Bug: webrtc:8830
Change-Id: I1a3f13ea2c024cbd73b33fd9dd58e531d3576a55
Reviewed-on: https://webrtc-review.googlesource.com/64780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22625}
As the rate allocation has been moved into entirely into
SimulcastRateAllocator, and the listeners are thus no longer needed,
this class doesn't fill any other purpose than to determine if
ScreenshareLayers or TemporalLayers should be created for a given
simulcast stream. This can however be done just from looking at the
VideoCodec instance, so changing this into a static factory method.
Due to dependencies from upstream projects, keep the class name and
field in VideoCodec around for now.
Bug: webrtc:9012
Change-Id: I028fe6b2a19e0d16b35956cc2df01dcf5bfa7979
Reviewed-on: https://webrtc-review.googlesource.com/63264
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22529}