different sample rate frequency.
BUG=webrtc:7327
Problems before the fix:
1. NetEqImpl::timestamp_ is inconsistent. Initially it is set to
the original RTP timestamp, but later gets updated with the
scaled timestamp.
2. NetEqImpl::InsertPacketInternal::main_timestamp is set with
the original RTP timestamp, but later gets compared with the
NetEqImpl::timestamp_ which may or may not be with the same
sample rate frequency and this results in major problems.
3. IncreaseEndTimestamp(main_timestamp - timestamp_) will be
incorrect when SSRC is changed and not the first packet.
4. delay_manager_->Update() may not be always invoked, since
the (main_timestamp - timestamp_) >= 0 will not be true when
the previous scaled timestamp_ is bigger than the main_timestamp
(current RTP timestamp) even if the current RTP timestamp is
bigger than the previous RTP timestamp.
5. delay_manager_->Update() parameters are main_timestamp
which increments with the RTP sample rate frequency and the
fs_hz_ which is the decoder sample rate frequency. When these
two frequencies are different as is the case with g.722, the
DelayManager::Update() will misfire and calculate incorrect
packet_len_ms and inter-arrival time (IAT) as a result. This
in effect will cause neteq to enter kPreemptiveExpand operation
and will keep expanding the jitter buffer even if the RTP packets
arrive with no jitter at all.
The fix corrects all these problems by making sure the
main_timestamp and the timestamp_ are always set with the scaled
timestamp and increment with the decoder sample rate frequency.
Review-Url: https://codereview.webrtc.org/2743063005
Cr-Commit-Position: refs/heads/master@{#17232}
A DCHECK added in a recent bugfix, which asserted that a signed 64->32
bit cast did not overflow, has been found to not always pass. We fix
this by saturating.
BUG=chromium:693868
Review-Url: https://codereview.webrtc.org/2746903002
Cr-Commit-Position: refs/heads/master@{#17209}
In an attempt to help Kenny locate the evil Dr. Deo.
BUG=webrtc:7307
Review-Url: https://codereview.webrtc.org/2732193006
Cr-Commit-Position: refs/heads/master@{#17135}
New Opus version starts to support 120ms frame lengths. AudioEncoderOpusTest had an unnecessary check on the available frame lengths.
It is removed in this CL.
BUG=b/35415318
Review-Url: https://codereview.webrtc.org/2731583003
Cr-Commit-Position: refs/heads/master@{#17011}
In short, what I did was to
* Remove acm_common_defs.h (the stuff in it was used only by
acm_codec_database.cc).
* Move audio_coding_module_typedefs.h to a new build target.
* Move the NetEqDecoder enum (and the associated
NetEqDecoderToSdpAudioFormat function) to a new file in a new
build target.
BUG=webrtc:7243, webrtc:7244
Review-Url: https://codereview.webrtc.org/2723253005
Cr-Commit-Position: refs/heads/master@{#17005}
A fuzzer run caused the operands of this multiplication to be 512 and
5000000, resulting in a product about 20% too large for int32_t. So
change this from a 16x32->32 to a 16x32->64 multiplication. Since we
right shift by 2 at the end, the end result will still fit in int32_t.
I also had to fix a few follow-on add/sub overflows found by the same
fuzzer input once the multiplication was fixed. I chose to saturate
these, since it wasn't just an intermediate value that overflowed.
BUG=chromium:693868
Review-Url: https://codereview.webrtc.org/2729573002
Cr-Commit-Position: refs/heads/master@{#17003}
It's the faster, less strict cousin of checked_cast.
BUG=none
Review-Url: https://codereview.webrtc.org/2714063002
Cr-Commit-Position: refs/heads/master@{#16958}
The paths of the protobuf output files needs to match the actual tree path
in order for Bazel builds to work.
BUG=webrtc:6412
NOTRY=True
Review-Url: https://codereview.webrtc.org/2716413004
Cr-Commit-Position: refs/heads/master@{#16912}
This is a follow-up to https://codereview.webrtc.org/2670643007/. That
CL provided significant improvement to Mac, Linux and ARM-based
platforms, but failed to improve the performance for Windows. The
problem is that the MSVC compiler did not produce branch-free code for
that fix. This new change produces the same result for non-Windows
platforms, as well as introduces branch-free code for Windows.
H/t to kwiberg@ for providing the solution.
BUG=webrtc:7159
Review-Url: https://codereview.webrtc.org/2700633003
Cr-Commit-Position: refs/heads/master@{#16649}
After https://codereview.webrtc.org/2340773002,
the path from webrtc::test::ResourcePath in
webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc is wrong.
It is
/path/to/repos/resources/audio_coding/testfile32kHz.pcm
It should be
/path/to/repos/webrtc-temp/src/resources/audio_coding/testfile32kHz.pcm.
The middle part is missing.
The reason this target is affected is because
webrtc::test::SetExecutablePath(argv[0]);
was not called.
That call is necessary for us to know that the test is being run from src/
and not from out/Default (as is assumed, when that function is not called.)
BUG=chromium:497757
R=kjellander@webrtc.org, henrik.lundin@webrtc.org
Review-Url: https://codereview.webrtc.org/2698743002
Cr-Commit-Position: refs/heads/master@{#16641}
The removed tests are covered by cases in call_perf_tests.
BUG=webrtc:4690
Review-Url: https://codereview.webrtc.org/2672583002
Cr-Commit-Position: refs/heads/master@{#16621}
There are currently two webrtc::CircularBuffers defined:
- modules/audio_coding/test/utility.{h,cc}
- modules/audio_processing/echo_detector/circular_buffer.{h,cc}
This CL moves the former definition to the webrtc::test namespace,
to avoid link errors in a future build target.
BUG=None
Review-Url: https://codereview.webrtc.org/2667383008
Cr-Commit-Position: refs/heads/master@{#16553}
It's currently only used to ensure transport-cc is enabled for the format in question. It might be used to toggle more things in future.
BUG=webrtc:5806
Review-Url: https://codereview.webrtc.org/2669583002
Cr-Commit-Position: refs/heads/master@{#16514}
As it is, the test fails to compile on some downstream compilers with the following error:
webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:316:25: error: lambda capture 'kPayloadLength' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
.WillOnce(Invoke([kPayloadLength, kFirstSequenceNumber, kFirstTimestamp,
^
webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:316:41: error: lambda capture 'kFirstSequenceNumber' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
.WillOnce(Invoke([kPayloadLength, kFirstSequenceNumber, kFirstTimestamp,
^
webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:316:63: error: lambda capture 'kFirstTimestamp' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
.WillOnce(Invoke([kPayloadLength, kFirstSequenceNumber, kFirstTimestamp,
^
webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc:317:25: error: lambda capture 'kFirstReceiveTime' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
kFirstReceiveTime](const SdpAudioFormat& format,
BUG=webrtc:7107
Review-Url: https://codereview.webrtc.org/2672823002
Cr-Commit-Position: refs/heads/master@{#16422}
BUG=webrtc:7097
TEST=Set "ptime=120", try WebRTC calls over custom build Chromium with and without Opus 120ms. Try both Chromium w <-> Chromium w and Chromium w <-> Chromium w/o
Review-Url: https://codereview.webrtc.org/2668633004
Cr-Commit-Position: refs/heads/master@{#16408}
We read past the end of the initialized part of the buffer, seemingly
on purpose (no one knows the details of this code anymore). The right
thing to do is probably to zero that part of the buffer.
(The *right* right thing to would be to rewrite this so that it was
easier to see what data was supposed to be where when, but
priorities...)
BUG=chromium:683040
Review-Url: https://codereview.webrtc.org/2659383002
Cr-Commit-Position: refs/heads/master@{#16365}
This allows controllers to do internal logic upon the network metric changes, e.g., filtering.
BUG=webrtc:6303
Review-Url: https://codereview.webrtc.org/2643133003
Cr-Commit-Position: refs/heads/master@{#16363}