Commit graph

21 commits

Author SHA1 Message Date
Alex Loiko
83ed89a45f Opus multistream.
This is a backwards-compatible change. It makes WebRTC use the Opus
multistream decoder for all Opus packets. Single-stream packets are a
special case of multistream ones (with stream=1).

The tricky parts are 'WebRtcOpus_GetMaxPlaybackRate' and
'WebRtcOpus_GetSurroundParameters'. GetMaxPlaybackRate is supposed to
do what opus_encoder_ctl(encoder, OPUS_GET_MAX_BANDWIDTH(&bandwidth))
did when we had single-stream encoders. Now there may be several
independent encoders with possibly different BANDWIDTH. The new
GetMaxPlaybackRate queries all of them, and returns a playback rate if
all the encoder's rates are equal.

WebRtcOpus_GetSurroundParameters is a configuration convention. It
maps the number of channels to a multi-stream encoder/decoder
configuration. As described in RFC 7845
https://tools.ietf.org/html/rfc7845#section-5.1.1, a multi-stream
encoder/decoder needs a number of streams, number of coupled streams
and a 255-byte mapping array. The function GetSurroundParameters
computes all of these from the number of channels. [1, 2, 4, 6, 8]
channels are supported.

Bug: webrtc:8649
Change-Id: I271de8e387d738254d6aa53af7fcf8644a53edb5
Reviewed-on: https://webrtc-review.googlesource.com/c/111750
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26293}
2019-01-17 12:23:23 +00:00
Henrik Lundin
007065522a Removing ancient and unused test scripts and data files
None of these scripts or files have been used in a very long time. They
are removed for the same reason, and since the data files add to the
weight of the resources folder.

Bug: webrtc:5289
Change-Id: Ia14a46aed180f286fa881fe5f60da6973a5fe027
Reviewed-on: https://webrtc-review.googlesource.com/c/109022
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25502}
2018-11-05 16:08:46 +00:00
Henrik Lundin
e9619f8f81 Add a new NetEq decoding unit test for Opus with DTX
This tests NetEq with a stream encoded with Opus using it's internal
DTX/CNG.

Also adding a new resource file which is encoded using Opus with DTX.

Bug: webrtc:8488
Change-Id: Icfba5bc5dc7f9c9d0e637a90f4df674e8ba40358
Reviewed-on: https://webrtc-review.googlesource.com/26028
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20905}
2017-11-28 10:45:38 +00:00
Henrik Kjellander
fb78c3e6fc Convert CRLF to unix newlines in resources/audio_coding/READ.ME
This file shows up with whitespace changes when importing the code
into a downstream project

BUG=None
NOTRY=True
NOPRESUBMIT=True
R=mbonadei@webrtc.org

Review-Url: https://codereview.webrtc.org/2592913003 .
Cr-Commit-Position: refs/heads/master@{#15758}
2016-12-22 12:46:43 +00:00
minyue
4f90677527 Making NetEq bitexactness test independent on reference files.
NetEq bitexactness test depended on reference files which differs from platform to platform. This makes it very hard to update Neteq.

New method maintains the ability to save output into files. But it verifies the checksum only. With this, when bitexactness test fails, we can still check closely to the output file if need, but the test becomes much easier to modify.

BUG=

Review-Url: https://codereview.webrtc.org/1928923002
Cr-Commit-Position: refs/heads/master@{#12567}
2016-04-29 18:05:18 +00:00
minyue
8c22962474 Revert of Avoiding overflow in cross correlation in NetEq. (patchset #6 id:180001 of https://codereview.webrtc.org/1908623002/ )
Reason for revert:
There seems an error made in this patch.

Hi Henrik,

I think the bit shift returned by CrossCorrelationWithAutoShift may be wrongly used by DotProduct.

We'd better revert this CL.

Doing another fix (and future fixes) will be paintful. I will work on a easy-to-modify bitexactness test first.

Original issue's description:
> Avoiding overflow in cross correlation in NetEq.
>
> BUG=

TBR=henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.webrtc.org/1925053002
Cr-Commit-Position: refs/heads/master@{#12543}
2016-04-28 09:16:54 +00:00
minyue
3d09dfdbba Avoiding overflow in cross correlation in NetEq.
BUG=

Review-Url: https://codereview.webrtc.org/1908623002
Cr-Commit-Position: refs/heads/master@{#12538}
2016-04-27 22:06:18 +00:00
henrik.lundin
6608d9a1aa NetEq: Fix a negative shift value
In some rare occations (very low energy signal), a shift value happened
to be negative. This is now fixed by using the WEBRTC_SPL_SHIFT_W32,
which in essence checks the sign of the number of shifts and performs a
right or left shift accordingly.

The fix reverts to how the code was written in old NetEq; see
4d363ae305/webrtc/modules/audio_coding/neteq/normal.c (165).

BUG=webrtc:5490

Review URL: https://codereview.webrtc.org/1675293002

Cr-Commit-Position: refs/heads/master@{#11546}
2016-02-10 10:47:56 +00:00
kjellander
c3a0983d4b Roll chromium_revision a8e5140..c6076f2 (372922:372974) incl. update to Opus v.1.1.2
Includes updates to tests for Opus v.1.1.2, reveiwed in
https://codereview.webrtc.org/1629413002/

Change log: a8e5140..c6076f2
Full diff: a8e5140..c6076f2

Changed dependencies:
* src/third_party/catapult: 471db30..d4d48e6
* src/third_party/opus/src: cae6961..655cc54
DEPS diff: a8e5140..c6076f2/DEPS

No update to Clang.

BUG=chromium:580524
TBR=

Review URL: https://codereview.webrtc.org/1657343002

Cr-Commit-Position: refs/heads/master@{#11464}
2016-02-02 21:18:42 +00:00
ivoc
72c08edced Reenables several NetEq unittests on android.
Several unittests were disabled on android, this CL will reenable them. One of
the tests was accidentally disabled on all platforms, and now no longer gives a
bitexact result.

BUG=webrtc:3343,webrtc:5349

Review URL: https://codereview.webrtc.org/1532903002

Cr-Commit-Position: refs/heads/master@{#11323}
2016-01-20 15:26:28 +00:00
minyue
49c454e748 Cleaning neteq_unittest resource files.
BUG=webrtc:2692

Review URL: https://codereview.webrtc.org/1563983003

Cr-Commit-Position: refs/heads/master@{#11189}
2016-01-08 19:30:18 +00:00
minyue
93c08b7438 Adding bit exactness test for Opus decoding in NetEq.
Opus has become the mostly used codec in WebRTC. There, however, is no bit exactness test for Opus decoding in NetEq.

The new RTP file is generated by the following steps:
    1. Encode a clean RTP file with Opus
RTPencode resources/audio_coding/speech_mono_32_48kHz.pcm neteq_opus_raw.rtp 960 opus 1

    2. Adding jitter to the clean RTP file
RTPjitter neteq_opus_raw.rtp jitter.dat neteq_opus.rtp
(Note: jitter.dat does not exist in WebRTC resources folder. Check the source code for RTPjitter to know how to define such a file.)

BUG=webrtc:3987
TEST=observed Opus normal decoding and FEC decoding were used, listened to the reference output.

Review URL: https://codereview.webrtc.org/1515113002

Cr-Commit-Position: refs/heads/master@{#11113}
2015-12-22 17:57:47 +00:00
minyue
5f026d03af Update NetEq network statistics in neteq_unittest.
NetEqNetworkStatistics has been updated some time ago. A bit exactness test in neteq unittests is still using the old NetEqNetworkStatistics.

New neteq4_network_stats.dat generated by running TestBitExactness with flag "genref"

BUG=

Review URL: https://codereview.webrtc.org/1522103002

Cr-Commit-Position: refs/heads/master@{#11052}
2015-12-16 15:36:10 +00:00
henrik.lundin@webrtc.org
023f12fb6e NetEq background noise generation off by default
This CL turns the background noise generation in NetEq off by default. The noise generation used to kick in during long-duration packet losses, when there was no point in extrapolating the latest audio any longer. However, this sometimes produces annoying noise in situations where silence would have been preferable.

With this change, a long packet-loss concealment will be faded out to zeros instead of a low noise.

Reference files are updated where needed.

BUG=3519
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/20109004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6882 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-13 09:45:40 +00:00
henrik.lundin@webrtc.org
ab85187e63 Remove unused resource
The file resources/audio_coding/neteq_universal.rtp is no longer
used in any test. Removing the hash file neteq_universal.rtp.sha1.

BUG=2996
R=kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/17679004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6402 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-11 13:59:44 +00:00
henrik.lundin@webrtc.org
48438c2c90 Enabling NetEq bit-exactness test for Win x64
A new reference file (neteq4_universal_ref_win_64.pcm) was generated and
uploaded.

Also removing the old hack to have different reference files
for different version of Visual Studio. The test is now only supporting
VS 2012 and later (_MSC_VER >= 1700). This makes the windows 32-bit
output identical to the generic reference file
(neteq4_universal_ref.pcm), so the specialized one
(neteq4_universal_ref_win_32.pcm) could have been removed. However,
since the resources sync mechanism does not include removing of old
files, a client could pick up the old reference and fail. Therefore,
this cl also updates neteq4_universal_ref_win_32.pcm to be identical to
neteq4_universal_ref.pcm.

BUG=1458
R=kjellander@webrtc.org, tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/14569005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6204 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-20 16:07:43 +00:00
minyue@webrtc.org
04546884bf This CL is to add Opus complexity knob and to test it.
As a by-product, a generic tool for testing and comparing the complexity of codecs is added, and new audio files are added to the resources.

Three complexity tests are included
1. Default Opus complexity
2. Opus complexity knob
3. Default iSAC complexity (to compare with Opus)

The complexity tests are only meant for development reasons
and not to be run at bots.

The .isolate file is only needed for the APK packaging and test execution on Android.

TEST=passes all trybots

BUG=
R=kjellander@webrtc.org, tina.legrand@webrtc.org, turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/8969004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5655 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-07 08:55:48 +00:00
kjellander@webrtc.org
d16d307218 Fix bad Google Storage uploads of resource files.
The files in this CL seem to have hit some kind of bug
during upload, causing the downloaded files to get another
SHA-1 hash than the .sha1 file. This makes them become
redownloaded every time runhooks execute.
Re-uploading them one by one seems to have resolved this.

TEST=trybots passing
BUG=2294
R=niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/3449004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5086 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-05 21:03:04 +00:00
kjellander@webrtc.org
da7f6589aa Add svn:ignore to avoid re-download of resources
Without this, the bots will download all resources for
every build. This consumes a lot of unnecessary traffic.
I tried experimenting with patterns ignoring everything
except the .sha1 files but wasn't able to get it working,
so this will have to do for now.



git-svn-id: http://webrtc.googlecode.com/svn/trunk@5082 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-05 09:27:51 +00:00
kjellander@webrtc.org
3779c1cb0a Fix invalid .sha1 files for audio_coding
It seems like multiple runs of the upload_to_google_storage.py
script created .sha1.sha1 files that sneaked in with
https://code.google.com/p/webrtc/source/detail?r=5076

This caused the wrong files getting downloaded during sync.
This affected the modules_unittests and the neteq_unittests
which started failing (due to wrong version of the resource files).

TEST=trybots passing
BUG=2294
TBR=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/3329004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5077 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-04 14:54:47 +00:00
kjellander@webrtc.org
80174583bd Replace old resources download script with depot_tools
With help from hinoka@, we're now using a more efficient approach
to download only the files that have changed from Google Storge.

When uploading new resource files, use
upload_to_google_storage.py --bucket chromium-webrtc-resources ./filename
which of course requires gsutil authentication setup.

NOTICE: Before deploying this, svn:ignore should be removed for
the resources folder, or the bots will run into problems with a
non-versioned file being found in the checkout during sync (as
this CL adds resources to version control).

All developers will also need to be informed to wipe their local
resources dir to avoid getting an error during checkout due to the
already existing non-versioned resources directory.

BUG=2294
TEST=locally running gclient runhooks
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2095004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5076 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-04 12:07:57 +00:00