Commit Graph

86 Commits

Author SHA1 Message Date
7358fda399 Convert to Android.bp
See build/soong/README.md for more information.

Test: mmma external/webrtc
Change-Id: I821fe8af5da246c7d93c2caee2b7e262a2c0ef53
2017-10-25 15:20:25 -07:00
aa415f46df Remove WEBRTC_BUILD_NEON_LIBS
It doesn't work, and only complicates the Soong conversion (since it
can't even be tested). It shouldn't be that hard to reimplement in Soong
if we ever fix it.

Test: mmma external/webrtc
Change-Id: Ia5a23a6b7fb1ee17f7d9633016eb8ff73435b448
2017-10-25 15:19:20 -07:00
c3f927f4f5 Remove unused gnustl webrtc variants
These aren't being used, and were complicating the makefiles.

Test: cs/webrtc gnustl
Change-Id: I256bc9da8e0dc89a11fda6a941a9cb43b8c0bb20
2017-10-25 15:17:01 -07:00
107cb5291b Suppress non-critical warnings in webrtc.
* We should enable those warnings after fixing the upstream source code.

Bug: 64487164
Test: build with WITH_TIDY=1
Change-Id: I306b4eb26fc8729f21cab4d5b82c9e3b59d8db3e
2017-08-09 15:08:21 -07:00
11d9a8be40 Move all libwebrtc* to vendor image.
Native tests are not moved. Tests include:
    webrtc_apm_process_test
    webrtc_isac_test
    webrtc_apm_unit_test

Test: mma -j
Test: m -j -k BOARD_VNDK_VERSION=current has no errors for webrtc

Bug: 62489821

Merged-In: I013303de263866cbf368f3f89327c5357f9cecdb
Change-Id: I013303de263866cbf368f3f89327c5357f9cecdb
(cherry picked from commit 8df7e85368569b7cd0afc1ce231b8b3a0ab49333)
2017-06-14 19:37:33 +09:00
4e188dd374 Suppress unused-parameter warnings.
Suppress warnings until upstream can fix them.

BUG: 27074506
Change-Id: If7e6f190100fba025d25d2634d1c9a657cc24854
2016-02-11 16:11:43 -08:00
daef292e03 Merge upstream SHA 04cb763
* git merge 04cb763
* See all upstream changes since the previous merge in branch aosp/upstream-master: git diff cb3f9bd..04cb763
* Modify webrtc/.gitignore to keep *.mk files.
* Removed old files from *.mk files:
  - thread.cc
  - thread_posix.cc
* Add new files to *.mk files:
  - event_tracer.cc
* Android relevant upstream changes:
  - Make Beamforming dynamically settable for Android platform builds
  - Remove additional channel constraints when Beamforming is enabled in AudioProcessing
  - Use an explicit identifier in Config

Change-Id: I384a4e8f6982c31c5bc70eef521bb2d90800b9a4
2016-01-15 11:28:47 -08:00
675d4373f8 WIP: Changes after merge commit 'cb3f9bd'
Changes after "git merge cb3f9bd"

* git mv old Android.mk from src/ to webrtc/
* Remove old unused files in src/*.
* Modify webrtc/.gitignore to keep *.mk files.
* Copy old files from master, lost in auto-merge.
      src/modules/audio_processing/test/unit_test.cc
      src/modules/audio_coding/codecs/isac/fix/test/{Android.mk,kenny.c}
  to webrtc, but most of the old test code do not compile with new
  webrtc API and are commented out.
* Move src/modules/audio_processing/test/android/apmtest/jni/*.mk to
  webrtc/... but the Android.mk files does not work.
  Commented out its build target.
* Changes to Android.mk files:
  * Change references of src/ to webrtc/.
  * Fix include path
  * Fix source file list, remove old non-existing files,
    add new source files to resolve link errors.
  * Add new Android.mk files to build some new static libraries
    to link into current Android webrtc .so files.
  * Remove unnecessary LOCAL_SHARED_LIBRARIES in Android.mk files
    that build static libraries.
  * Remove old unnecessary clang workarounds like
     -Wno-tautological-pointer-compare
     -no-integrated-as
* Fix include path of debug.pb.h in some source files.
* Add -DWEBRTC_POSIX in android-webrtc.mk
* Manually merge Android specific changes in
     src/typedefs.h to webrtc/typedefs.h
* Fix trivial syntax error in scoped_ptr.h, calling static_assert.
* Use -std=c++0x in webrtc/system_wrappers/source/Android.mk
* #undef getchaar in spreadsort.hpp
* Verified and not to carry old Android hacks from src/... to webrtc/...
      src/system_wrappers/source/android/cpu-features.c
      src/modules/interface/module.h
      src/modules/audio_coding/codecs/isac/fix/source/filters_neon.c
      src/system_wrappers/source/trace_posix.cc
      src/typedefs.h

More pathes from Alex Luebs:
* Use new unit test kenny.cc.
  Delete old kenny.cc.
  Comment out unessential code in kenny.cc to fix link error for now.
* Replace old unit test files with new ones in
  webrtc/modules/audio_processing/Android.mk.
  Delete old audio_processing/test/unit_test.cc.
* Fix compilation errors in
  webrtc/modules/audio_processing/test/audio_processing_unittest.cc

Change-Id: I7bbf776eeb9dcfa21a82dd1f2dec378235cbbc3e
2015-11-25 11:43:05 -08:00
9b72af94cd Remove webrtc/modules/audio_processing/{aec,aecm,ns}/include
BUG=webrtc:5095
TESTED=git cl try -c --bot=android_compile_rel --bot=linux_compile_rel --bot=win_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc
R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10608}
2015-11-11 19:16:28 +00:00
98f53510b2 system_wrappers: rename interface -> include
BUG=webrtc:5095
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10438}
2015-10-28 17:17:50 +00:00
dce40cf804 Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.

This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.

This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002

The change is being landed as TBR to all the folks who reviewed the above.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher

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

Cr-Commit-Position: refs/heads/master@{#9768}
2015-08-24 21:52:45 +00:00
728d9037c0 Reformat existing code. There should be no functional effects.
This includes changes like:
* Attempt to break lines at better positions
* Use "override" in more places, don't use "virtual" with it
* Use {} where the body is more than one line
* Make declaration and definition arg names match
* Eliminate unused code
* EXPECT_EQ(expected, actual) (but use (actual, expected) for e.g. _GT)
* Correct #include order
* Use anonymous namespaces in preference to "static" for file-scoping
* Eliminate unnecessary casts
* Update reference code in comments of ARM assembly sources to match actual current C code
* Fix indenting to be more style-guide compliant
* Use arraysize() in more places
* Use bool instead of int for "boolean" values (0/1)
* Shorten and simplify code
* Spaces around operators
* 80 column limit
* Use const more consistently
* Space goes after '*' in type name, not before
* Remove unnecessary return values
* Use "(var == const)", not "(const == var)"
* Spelling
* Prefer true, typed constants to "enum hack" constants
* Avoid "virtual" on non-overridden functions
* ASSERT(x == y) -> ASSERT_EQ(y, x)

BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9420}
2015-06-11 21:31:48 +00:00
b7e5054414 Match existing type usage better.
This makes a variety of small changes to synchronize bits of code using different types, remove useless code or casts, and add explicit casts in some places previously doing implicit ones.  For example:

* Change a few type declarations to better match how the majority of code uses those objects.
* Eliminate "< 0" check for unsigned values.
* Replace "(float)sin(x)", where |x| is also a float, with "sinf(x)", and similar.
* Add casts to uint32_t in many places timestamps were used and the existing code stored signed values into the unsigned objects.
* Remove downcasts when the results would be passed to a larger type, e.g. calling "foo((int16_t)x)" with an int |x| when foo() takes an int instead of an int16_t.
* Similarly, add casts when passing a larger type to a function taking a smaller one.
* Add casts to int16_t when doing something like "int16_t = int16_t + int16_t" as the "+" operation would implicitly upconvert to int, and similar.
* Use "false" instead of "0" for setting a bool.
* Shift a few temp types when doing a multi-stage calculation involving typecasts, so as to put the most logical/semantically correct type possible into the temps.  For example, when doing "int foo = int + int; size_t bar = (size_t)foo + size_t;", we might change |foo| to a size_t and move the cast if it makes more sense for |foo| to be represented as a size_t.

BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=andrew, asapersson, henrika

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

Cr-Commit-Position: refs/heads/master@{#9419}
2015-06-11 19:56:03 +00:00
f045e4da43 Prepare to convert various types to size_t.
This makes some behaviorally-invariant changes to make certain code that
currently only works correctly with signed types work safely regardless of the
signedness of the types in question.  This is preparation for a future change
that will convert a variety of types to size_t.

There are also some formatting changes (e.g. converting "enum hack" usage to real consts) to make it simpler to just change "int" to "size_t" in the future to change the types of those constants.

BUG=none
R=andrew@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=ajm

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

Cr-Commit-Position: refs/heads/master@{#9413}
2015-06-11 04:15:51 +00:00
9345e86551 audio_processing: Create now returns a pointer to the object
Affects
* NS
* AGC
* AEC

BUG=441
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9411}
2015-06-10 19:43:46 +00:00
cb7f8ce2df Clear ARM NEON flag
Merge WEBRTC_ARCH_ARM64_NEON and WEBRTC_ARCH_ARM_NEON into one
WEBRTC_HAS_NEON.
Replace WEBRTC_DETECT_ARM_NEON by WEBRTC_DETECT_NEON.
Replace WEBRTC_ARCH_ARM by WEBRTC_ARCH_ARM64 for arm64 cpu.

BUG=4002
R=andrew@webrtc.org, jridges@masque.com, kjellander@webrtc.org

Change-Id: I870a4d0682b80633b671c9aab733153f6d95a980

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

Cr-Commit-Position: refs/heads/master@{#9228}
2015-05-20 05:20:04 +00:00
0f911d71a7 Refactor audio_processing/nsx: Removed usage of macro WEBRTC_SPL_MEMCPY_W16
The macro assumes int16_t pointers, but there is no check for it.

BUG=3348,3353
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8987}
2015-04-13 13:45:07 +00:00
f6a99e63b6 Refactor audio_processing: Free functions return void
There is no point in returning an error when Free() fails. In fact it can only happen if we have a null pointer as object. There is further no place where the return value is used.

Affected components are
- aec
- aecm
- agc
- ns

BUG=441
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8966}
2015-04-10 05:56:59 +00:00
04c50981f8 Add the Ooura FFT to RealFourier.
We are using the Ooura FFT in a few places:
- AGC
- Transient suppression
- Noise suppression

The optimized OpenMAX DL FFT is considerably faster, but currently does
not compile everywhere, notably on iOS. This change will allow us to use
Openmax when possible and otherwise fall back to Ooura.

(Unfortunately, noise suppression won't be able to take advantage of it
since it's not C++. Upgrade time?)

R=aluebs@webrtc.org, mgraczyk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#8798}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8798 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-19 20:07:43 +00:00
7ef8b12a3b Refactor audio_processing/ns: Removes usage of macro WEBRTC_SPL_MUL_16_16_RSFT
The macro is defined as
#define WEBRTC_SPL_MUL_16_16_RSFT(a, b, c) \
(WEBRTC_SPL_MUL_16_16(a, b) >> (c))

where the latter macro is in C defined as
#define WEBRTC_SPL_MUL_16_16(a, b) \
((int32_t) (((int16_t)(a)) * ((int16_t)(b))))
(For definitions on ARMv7 and MIPS, see common_audio/signal_processing/include/spl_inl_{armv7,mips}.h)

The replacement consists of
- avoiding casts to int16_t if inputs already are int16_t
- adding explicit cast to <type> if result is assigned to <type> (other than int or int32_t)
- minor cleanups like remove of unnecessary parentheses and style changes

BUG=3348,3353
TESTED=Locally on Mac and trybots
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8666}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8666 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-10 07:10:14 +00:00
dec649cbab audio_processing/ns: Replaced WEBRTC_SPL_MUL_16_16 macro with *
The macro is in C defined as
#define WEBRTC_SPL_MUL_16_16(a, b) ((int32_t) (((int16_t)(a)) * ((int16_t)(b))))
(For definition on ARMv7 and MIPS, see common_audio/signal_processing/include/spl_inl_armv7.h and common_audio/signal_processing/include/spl_inl_mips.h)

The replacement consists of
- avoiding casts to int16_t if inputs already are int16_t
- adding explicit cast to <type> if result is assigned to <type> (other than int or int32_t)

BUG=3348, 3353
TESTED=locally on Mac and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8024 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-08 17:34:33 +00:00
e468bc9e60 Rename _t struct types in audio_processing.
_t names are reserved in POSIX.

R=bjornv@webrtc.org
BUG=162

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7943 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-18 09:11:33 +00:00
c5ebbd98f5 Support 48kHz in Noise Suppression
Doing the same for the 16-24kHz band than was done in the 8-16kHz.
Results look and sound as nice.

BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7865 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-10 19:30:57 +00:00
d1fac61e8f Remove need for assembly offset generation in aecm and ns module.
All *neon.S files in aecm and ns modules have been removed. We need no
assembly offset generation now.

Pass byte to byte conformance test for aecm and ns test in audioproc
between new NEON (written in intrinsics) version and C version on both
ARMv7 and ARM64.

BUG=3580
R=andrew@webrtc.org, jridges@masque.com

Change-Id: I05d43d0c04d00bead65ca8c8fda25f0a42394b2b

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

Patch from Zhongwei Yai <zhongwei.yao@arm.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7800 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-03 17:54:38 +00:00
a56a2c57cf Enabling building with NEON on ARM64
This patch enables NEON on ARM64 platform. Passed building both on
Android ARMv7 and Android ARM64.

BUG=3580
R=andrew@webrtc.org, jridges@masque.com

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

Patch from Zhongwei Yao <zhongwei.yao@arm.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7751 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-26 17:01:40 +00:00
d024f759a8 clear asm code and unused functions in audio processing module
BUG=
R=andrew@webrtc.org

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

Patch from Zhongwei Yao <zhongwei.yao@arm.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7671 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-10 17:19:57 +00:00
b81e304ac0 replace inline assembly WebRtcNsx_AnalysisUpdate by intrinsics.
The modification only uses the unique part of the analysis_update
 function. Pass byte to byte conformance test on both ARMv7 and AArch64,
 and the single function performance is similar with original assembly
 version on different platforms. If not specified, the code is compiled
 by GCC 4.6. The result is the "X version / C version" ratio, and the
 less is better.

| run 100k times             | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base on each  |  (1.2Ghz) |  (1.0Ghz) |   (1.7Ghz) |
| CPU target                 |           |           |            |
|----------------------------+-----------+-----------+------------|
| Neon asm                   |    15.61% |    20.15% |     14.89% |
| Neon inline asm (LLVM 3.4) |    25.98% |    33.96% |     18.18% |
| Neon intrinsics (GCC 4.6)  |    22.06% |    27.01% |     19.24% |
| Neon intrinsics (GCC 4.8)  |    17.28% |    18.23% |     18.55% |
| Neon intrinsics (LLVM 3.4) |    21.02% |    19.98% |     16.76% |

BUG=
R=andrew@webrtc.org

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

Patch from Zhongwei Yao <zhongwei.yao@arm.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7596 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-03 17:17:51 +00:00
818c9f9e14 replace inline assembly WebRtcNsx_SynthesisUpdateNeon by intrinsics.
The modification only uses the unique part of the synthesis_update
function. Pass byte to byte conformance test both on ARMv7 and ARMv8,
and the single function performance is similar with original assembly
version on different platforms (if not specified, the code is compiled
by GCC 4.6):

| run 100k times             | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base          |  (1.2Ghz) |  (1.0Ghz) |   (1.7Ghz) |
| (the smaller the better)   |           |           |            |
|----------------------------+-----------+-----------+------------|
| C                          |      100% |      100% |       100% |
| Neon asm                   |    15.93% |    17.01% |     12.50% |
| Neon inline asm            |    27.74% |    31.41% |     14.64% |
| Neon intrinsics (GCC 4.8)  |    17.84% |    14.10% |     13.84% |
| Neon intrinsics (LLVM 3.4) |    16.63% |    14.01% |     12.98% |

BUG=3580
R=andrew@webrtc.org

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

Patch from Zhongwei Yao <zhongwei.yao@arm.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7586 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-31 22:07:35 +00:00
ffeaeed8c1 Make NSinst_t* const and rename to self in ns_core
This is only to make the code more readable and maintainable.
It generates a bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7550 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-28 22:52:09 +00:00
8b1b23f8f8 Make local functions static and dropWebRtcNs_ in ns_core
This is only to make the code more readable and maintainable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7548 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-28 21:06:57 +00:00
28b54671cb Make all comments whole sentences in ns_core
This is done to make the code more readable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7547 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-28 20:56:53 +00:00
7e19a11a71 Break out WebRtcNs_ComputeDdUpdate function in ns_core
This is done in order to make the code more readible and maintainable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7514 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 19:54:33 +00:00
f8ea0d5518 Break out WebRtcNs_UpdateNoise function in ns_core
This is done in order to make the code more readible and maintainable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7513 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 19:49:42 +00:00
799e88ae19 Break out FFT function in ns_core
This is done in order to make the code more readible and maintainable.
This introduces an error of only +1 and -1.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7512 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 19:36:42 +00:00
8454ad88ed Break out ComputeSnr function in ns_core
This is done in order to make the code more readible and maintainable.
The output is bit-exact.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7511 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 19:34:14 +00:00
67cf1d742b Break out WebRtcNs_Windowing function in ns_core
This is done in order to make the code more readible and maintainable.
This introduces only +1 and -1 errors.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7488 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-21 22:35:40 +00:00
0e7099244c Break out WebRtcNs_Energy function in ns_core
This is done in order to make the code more readible and maintainable.
This generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7487 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-21 22:14:10 +00:00
7634c09406 Break out WebRtcNs_IFFT function in ns_core
This is done in order to make the code more readible and maintainable.
This creates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7486 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-21 21:27:00 +00:00
333e2556ed Break out WebRtcNs_UpdateBuffer function in ns_core
This is done in order to make the code more readible and maintainable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7483 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-21 20:33:09 +00:00
f87c0aff7f audio_processing: Replaced macro WEBRTC_SPL_RSHIFT_W32 with >>
Also includes a typo in a comment.
Affects
* aecm
* hpf

BUG=3348,3353
TESTED=locally on linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7456 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-15 12:51:23 +00:00
8dc00d76af audio_processing/ns: Replaced macro WEBRTC_SPL_RSHIFT_W32 with >>
Affects fixed point version of Noise Suppression.

BUG=3348,3353
TESTED=locally on linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7454 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-15 09:31:40 +00:00
b6af4283ca Adjust speech probability in NS when echo
The average speech probability for the higher band is multiplied by the quotient of the process and analyze powers, to avoid thinking that suppressed echo is speech. In order to do this both magnitudes, alanyze and process, needed to be stored. This also was used to calculate different previous STSA estimates for analyze and process.
This CL was tested on two long team member recordings (bjornv and kwiberg) and the noisiest (5) recordings from the QA set.

BUG=webrtc:3763
R=andrew@webrtc.org, bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7437 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 20:48:05 +00:00
d4fe824862 audio_processing: Replaced macro WEBRTC_SPL_RSHIFT_W16 with >>
The implementation of WEBRTC_SPL_RSHIFT_W16 is simply >>. This CL removes the macro usage in audio_processing and signal_processing.

Affected components:
* aecm
* agc
* nsx

Indirectly affecting (through signal_processing changes)
* codecs/cng
* codecs/isac/fix
* codecs/isac/main

BUG=3348,3353
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7432 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 13:01:13 +00:00
348eac641e audio_processing: Replaced WEBRTC_SPL_RSHIFT_U32 with >>
A trivial macro that is replaced. Affected components:
* AGC
* NSx

BUG=3348,3353
TESTED=locally on linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7366 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-02 08:07:05 +00:00
23ec8372a6 audio_processing: Removed usage of macro WEBRTC_SPL_MUL
WEBRTC_SPL_MUL is a trivial multiplication after casting to int32_t. This is already taken care of by the compiler which makes the macro unnecessary.

Affected components:
* AGC
* NSx

BUG=3348,3353
TESTED=locally on linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7330 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 09:29:28 +00:00
750423c722 audio_processing: Replaced trivial macro WEBRTC_SPL_LSHIFT_W32 with <<
Affected components:
* AECM
* AGC
* HPF
* NSx

BUG=3348,3353
TESTED=locally on linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7329 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 09:26:36 +00:00
d71118194f audio_processing: Replaced macro WEBRTC_SPL_LSHIFT_W16 with <<
A trivial macro that serves no purpose. Affected components are:
* audio_processing/nsx
* audio_processing/agc
* audio_processing/aecm
* common_audio/LpcToReflCoef

BUG=3348,3353
TESTED=locally on linux
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7321 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-29 10:56:27 +00:00
384d05f362 Remove the different block lengths in ns_core
Relanding the CL: https://webrtc-codereview.appspot.com/30539004/
It had to be reverted because some development code was uploaded by mistake.

TBR=bjornv@webrtc.org

BUG=webrtc:3811

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7307 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-26 14:41:19 +00:00
5088377d70 Revert 7297 "Remove the different block lengths in ns_core"
> Remove the different block lengths in ns_core
> 
> This CL has bit-exact output.
> 
> What it does:
>   * Remove the blockLen10Ms, as it is hardcoded to be equal to blockLen.
>   * This makes outLen to be always zero, so it can be removed too.
>   * It also avoids the need to have an outBuf, because it is not used, so it is also removed
>   * Replaced blockLen10Ms by blockLen everywhere, since they were hardcoded to be equal.
>   * We don't need to check if outLen is zero, because it always is, so it was removed.
>   * Of course, the outBuf needs no initial set or copying around, because it is not used.
> 
> BUG=webrtc:3811
> R=bjornv@webrtc.org, kwiberg@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/30539004

TBR=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7306 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-26 14:33:08 +00:00
5f3965783b Remove the different block lengths in ns_core
This CL has bit-exact output.

What it does:
  * Remove the blockLen10Ms, as it is hardcoded to be equal to blockLen.
  * This makes outLen to be always zero, so it can be removed too.
  * It also avoids the need to have an outBuf, because it is not used, so it is also removed
  * Replaced blockLen10Ms by blockLen everywhere, since they were hardcoded to be equal.
  * We don't need to check if outLen is zero, because it always is, so it was removed.
  * Of course, the outBuf needs no initial set or copying around, because it is not used.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7297 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-25 13:53:43 +00:00