It replaces the relative arrival delay tracker which is equivalent.
This results in a slight bit-exactness change but nothing that should affect quality.
Bug: webrtc:13322
Change-Id: I6ed5d6fdfa724859122928a8838acce27ac2e5d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263380
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37004}
A packet arrival history is used to store the timing of incoming packets and tracks the earliest and latest packets by taking the difference between rtp timestamp and arrival time. The history is windowed to 2 seconds by default. The packet arrival history will replace the relative arrival delay tracker in a follow up cl.
The playout delay is estimated by taking the difference between the current playout timestamp and the earliest packet arrival in the history. This method works better when DTX is used compared to the buffer level filter that it replaces.
The threshold for acceleration is changed to be the maximum of the target delay and the maximum packet arrival delay in the history. This prevents any acceleration immediately after an underrun and gives some time to adapt the target delay to new network conditions.
The logic when to decode the next packet after a packet loss is also changed to do concealment for the full loss duration unless the delay is too high.
The new mode is default disabled and can be enabled using a field trial.
Bug: webrtc:13322,webrtc:13966
Change-Id: Idfa0020584591261475b9ca350cc7c6531de9911
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259820
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36899}
Split out `RelativeArrivalDelayTracker` and `DelayOptimizer` logic.
This is in preparation for adding another `DelayOptimizer` specialized in handling reordered packets.
Bug: webrtc:10178
Change-Id: Id3c1746d91980b171fa524f9b2b71cf11fc75f64
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231224
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34938}
This changes behavior slightly but results in a better delay estimate and cleaner code.
Bug: webrtc:10178
Change-Id: If150258bc1ea58149940f17c5660733ff61159c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230740
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34883}
Add a new field trial with more flexible parsing and new options:
- Resample packet delays to only update histogram with maximum observed
delay every X ms.
- Setting the maximum history size (in ms) used for calculating the
relative arrival delay.
Legacy field trial used for configuration is maintained.
Bug: webrtc:10333
Change-Id: I35b004f5d8209c85b33cb49def3816db51650946
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192789
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32591}
This is a reland of 2a7c57c34f
Original change's description:
> Reland "Refactor NetEq delay manager logic."
>
> This is a reland of f8e62fcb14
>
> Original change's description:
> > Refactor NetEq delay manager logic.
> >
> > - Removes dependence on sequence number for calculating target delay.
> > - Changes target delay unit to milliseconds instead of number of
> > packets.
> > - Moves acceleration/preemptive expand thresholds to decision logic.
> > Tests for this will be added in a follow up cl.
> >
> > Bug: webrtc:10333
> > Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32326}
>
> Bug: webrtc:10333
> Change-Id: Iad5e7063f63b84762959ee5b412f5f14a7b2cd06
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186943
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32332}
Bug: webrtc:10333
Change-Id: If2244ee9a3d56a0cfa9b602e7bdf448dc6340147
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187356
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32367}
This is a reland of f8e62fcb14
Original change's description:
> Refactor NetEq delay manager logic.
>
> - Removes dependence on sequence number for calculating target delay.
> - Changes target delay unit to milliseconds instead of number of
> packets.
> - Moves acceleration/preemptive expand thresholds to decision logic.
> Tests for this will be added in a follow up cl.
>
> Bug: webrtc:10333
> Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32326}
Bug: webrtc:10333
Change-Id: Iad5e7063f63b84762959ee5b412f5f14a7b2cd06
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186943
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32332}
This reverts commit f8e62fcb14.
Reason for revert: breaks downstream test.
Original change's description:
> Refactor NetEq delay manager logic.
>
> - Removes dependence on sequence number for calculating target delay.
> - Changes target delay unit to milliseconds instead of number of
> packets.
> - Moves acceleration/preemptive expand thresholds to decision logic.
> Tests for this will be added in a follow up cl.
>
> Bug: webrtc:10333
> Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32326}
TBR=ivoc@webrtc.org,jakobi@webrtc.org
Change-Id: I1bdeacce61b902a0003a40c740f6acccf1443e3e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10333
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186942
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32329}
- Removes dependence on sequence number for calculating target delay.
- Changes target delay unit to milliseconds instead of number of
packets.
- Moves acceleration/preemptive expand thresholds to decision logic.
Tests for this will be added in a follow up cl.
Bug: webrtc:10333
Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32326}
Also remove the delay peak detector which is no longer used.
This should be a no-op since relative arrival delay mode is used by default.
Bug: webrtc:10333
Change-Id: Ifa326b762d52f16f9dc5f3da2874139faf1022da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164462
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30179}
This interface is implemented by the DecisionLogic class, which now contains the DelayManager and DelayPeakDetector.
Bug: webrtc:11005
Change-Id: I4fb69fa359e60831cf153e41f101d5b623749380
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155176
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29613}
Storing a fixed amount of packets does not work well with DTX since the history could include up to 20 seconds of packets which can potentially be negative in the event of clock drift or delay shifts.
Bug: webrtc:10333
Change-Id: Ifb8543b7e999e17845cb0e4171066862941f370e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149832
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28942}
Change the way the forget factor converge to the steady state so that we don't overemphasize the first packets received.
The logic is controlled by the delay histogram field trial which has an added parameter to control if emphasis should be even (c=1, default) or put on later packets (c>1) until we reach our steady state forget factor.
Bug: webrtc:10411
Change-Id: Ia5d46c22d1a4a66994652f71c8cde664362bfacb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137050
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28039}
This change allows NetEq to reach preferred jitter buffer size much faster
for high target delays because it uses absolute units instead of relative ones
during computation of lower_limit.
More details can be found here:
https://docs.google.com/document/d/12qPMJYFhGXrA_o_nvz9VshpzAJX6aULxFig1fTzBzDI/edit
Change-Id: I21ce0e35e25166d935fdf0325c083bcf990899f5
Bug: webrtc:10619
Change-Id: I21ce0e35e25166d935fdf0325c083bcf990899f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135745
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#27970}
- This mode estimates relative packet arrival delay for each incoming packet and adds that value to the histogram.
- The histogram buckets are 20 milliseconds each instead of whole packets.
- The functionality is enabled with a field trial for experimentation.
Bug: webrtc:10333
Change-Id: I8f7499c56802fc1aa1ced2f5310fdd2ef1403515
Reviewed-on: https://webrtc-review.googlesource.com/c/123923
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26871}
On NetEq level latency corresponds to delay and two terms can be used interchangeably here.
In order to implement latency constraint we need to provide a range of possible values which should be constant. See getCapabilities() here:
https://www.w3.org/TR/mediacapture-streams/#dfn-applyconstraints-algorithm
Lowest possible value accepted value is constant and equals 0. But because |packet_len_ms_| and |maximum_delay_ms_| may be updated during live of DelayManager upper bound is not constant. Moreover, due to change in |packet_len_ms_| the |minimum_delay_ms_| which was valid when its was set may be considered invalid later on.
To circumvent that and provide constant range for capabilities we separate base minimum delay and minimum delay. ApplyConstraints algorithm will set base minimum delay. Base minimum delay will act as recommendation for lower bound of minimum delay and will be used to limit target delay. If user sets base minimum delay through ApplyConstraints which is bigger than currently
possible maximum (e.g. bigger than NetEq maximum buffer size in milliseconds) then base minimum delay will be clamped to currently possible maximum to match user's intentions as best as possible.
Note, that we keep original behavior when minimum_delay_ms_ (effective_minimum_delay_ms after this CL) in LimitTargetLevel method may be above upper bound due to changing packet audio length.
Bug: webrtc:10287
Change-Id: I06b8f5cd3fd1bc36800af0447f91f7c4dc21a766
Reviewed-on: https://webrtc-review.googlesource.com/c/121700
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26666}
Currently, if the last packet was reordered (e.g. due to retransmission) then the next packet's inter-arrival time will be estimated incorrectly due to the jump in sequence numbers. This change prevents that by not resetting the stopwatch on reordered packets.
This will also better estimate inter-arrival times when we have multiple reordered packets in a burst. Currently we would only measure the iat of the first reordered packet correctly and not the ones coming after it.
There is a slight risk introducing this: If we would receive an out of order packet far into the future (in sequence numbers) and then continue getting packets in the normal order, then we would not update the current sequence number for these and incorrectly estimate their inter-arrival times since they would all be considered reordered.
Change-Id: Ic938a37cbddf1cb9c30b610218f56794568d3d01
Bug: webrtc:10178
Reviewed-on: https://webrtc-review.googlesource.com/c/119949
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26572}
This is first step to allow to set latency
from client code in Chromium.
Existing minimum latency hasn't been used because it can clash
with video syncronization code.
Bug: webrtc:10287
Change-Id: Ia38906506069a1abfa01698dc62df283fc15cfbc
Reviewed-on: https://webrtc-review.googlesource.com/c/121423
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#26536}
When enabled, the delay manager is updated with reordered packets. It also makes the peak detector ignore the reordered packets.
Change-Id: I2bdc99764cc76b15e613ed3dc75f83aaf66eee4e
Bug: webrtc:10178
Reviewed-on: https://webrtc-review.googlesource.com/c/116481
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26187}
Note that this value will override the minimum delay that is used for audio/video sync.
Bug: webrtc:10053
Change-Id: Ia129f6c9ee9da5d00a3d955afaaa6e8f0c2bee33
Reviewed-on: https://webrtc-review.googlesource.com/c/112121
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25805}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
The experimental function that scales the histogram of inter-arrival times in NetEq suffered from an overflow bug. This caused unexpected increases in the calculated target level.
Bug: webrtc:8381
Change-Id: I2af4d22119fdc684b3cac838c9b317959af17a1f
Reviewed-on: https://webrtc-review.googlesource.com/30261
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21213}
The field trial effects two things: after a frame length change the IAT
histogram is scaled to prevent an immediate change in target buffer
level. Also, the peak history in the delay peak detector is cleared,
because the size of the peaks is stored in number of packets (which
will be incorrect after a frame length change).
Bug: webrtc:8381
Change-Id: I214b990f6e5959b655b6542884a7f75da181a0d8
Reviewed-on: https://webrtc-review.googlesource.com/8101
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20284}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc (Browse further)