Commit graph

62 commits

Author SHA1 Message Date
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
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
oprypin
67fdb80837 Reland of Enable cpplint and fix cpplint errors in webrtc/*audio (patchset #1 id:1 of https://codereview.webrtc.org/2739143002/ )
Reason for revert:
Can reland it if backwards compatible API is kept.

Original issue's description:
> Revert of Enable cpplint and fix cpplint errors in webrtc/*audio (patchset #4 id:180001 of https://codereview.webrtc.org/2683033004/ )
>
> Reason for revert:
> The API change in audio/utility/audio_frame_operations.h caused breakage. Need to keep backward-compatible API.
>
> Original issue's description:
> > Enable cpplint and fix cpplint errors in webrtc/*audio
> >
> > Change usage accordingly throughout the codebase
> >
> > BUG=webrtc:5268
> >
> > TESTED=Fixed issues reported by:
> > find webrtc/*audio -type f -name *.cc -o -name *.h | xargs cpplint.py
> >
> > Review-Url: https://codereview.webrtc.org/2683033004
> > Cr-Commit-Position: refs/heads/master@{#17133}
> > Committed: aebe55ca6c
>
> TBR=henrika@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5268
>
> Review-Url: https://codereview.webrtc.org/2739143002
> Cr-Commit-Position: refs/heads/master@{#17138}
> Committed: e47c1d3ca1

TBR=henrika@webrtc.org,henrik.lundin@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
BUG=webrtc:5268

Review-Url: https://codereview.webrtc.org/2739073003
Cr-Commit-Position: refs/heads/master@{#17144}
2017-03-09 14:25:06 +00:00
oprypin
e47c1d3ca1 Revert of Enable cpplint and fix cpplint errors in webrtc/*audio (patchset #4 id:180001 of https://codereview.webrtc.org/2683033004/ )
Reason for revert:
The API change in audio/utility/audio_frame_operations.h caused breakage. Need to keep backward-compatible API.

Original issue's description:
> Enable cpplint and fix cpplint errors in webrtc/*audio
>
> Change usage accordingly throughout the codebase
>
> BUG=webrtc:5268
>
> TESTED=Fixed issues reported by:
> find webrtc/*audio -type f -name *.cc -o -name *.h | xargs cpplint.py
>
> Review-Url: https://codereview.webrtc.org/2683033004
> Cr-Commit-Position: refs/heads/master@{#17133}
> Committed: aebe55ca6c

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

Review-Url: https://codereview.webrtc.org/2739143002
Cr-Commit-Position: refs/heads/master@{#17138}
2017-03-09 10:43:31 +00:00
oprypin
aebe55ca6c Enable cpplint and fix cpplint errors in webrtc/*audio
Change usage accordingly throughout the codebase

BUG=webrtc:5268

TESTED=Fixed issues reported by:
find webrtc/*audio -type f -name *.cc -o -name *.h | xargs cpplint.py

Review-Url: https://codereview.webrtc.org/2683033004
Cr-Commit-Position: refs/heads/master@{#17133}
2017-03-09 09:05:33 +00:00
henrik.lundin
d461ffce2a Avoid overflow in WebRtcSpl_DotProductWithScale
BUG=chromium:676935

Review-Url: https://codereview.webrtc.org/2717123004
Cr-Commit-Position: refs/heads/master@{#17091}
2017-03-07 12:02:47 +00:00
deadbeef
922246a353 Replace NULL with nullptr or null in webrtc/audio/ and common_audio/.
BUG=webrtc:7147

Review-Url: https://codereview.webrtc.org/2719733002
Cr-Commit-Position: refs/heads/master@{#16843}
2017-02-26 12:18:12 +00:00
kwiberg
2b1b7a83ad iSAC fix: Ignore overflow in signed left shift
A left shift by 10 was assumed to never overflow, since "[s]imulation
of the 25 files shows that maximum value in the vector gain_lo_hiQ17[]
is 441344, which means that it is log2((2^31)/441344) = 12.2 shifting
bits from saturation." However, a fuzzer test succeeded in provoking
an overflow, which we ignore in this CL on the theory that only
"abnormal" inputs cause overflow.

Also had to replace a "foo << 1" with "foo * (1 << 1)" in
WEBRTC_SPL_MUL_16_32_RSFT15 because foo could be negative; this
problem showed up as soon as I'd asked UBSan to ignore the overflow
discussed above.

BUG=chromium:615819

Review-Url: https://codereview.webrtc.org/2314413002
Cr-Commit-Position: refs/heads/master@{#14162}
2016-09-09 12:51:38 +00:00
kwiberg
64208e5523 Fix UBSan errors (left shift of negative value)
I've settled on replacing x << n with x * (1 << n); this gets rid of
the "left shift of negative value" warning, but will still trigger
undefined behavior if the multiplication overflows. It also still
looks like a left shift, which is good for the readability of the
fixed-point code.

(The compiler is smart enough to recognize that the
multiplication+shift is just a shift, for both variable and constant
shift amounts, so the generated code should not change.)

BUG=chromium:603491

Review-Url: https://codereview.webrtc.org/1989803002
Cr-Commit-Position: refs/heads/master@{#12845}
2016-05-23 10:28:35 +00:00
pasko
e305d956c0 Remove runtime NEON detection
Chrome does not detect NEON instruction set at runtime in WebRTC code starting
with M50, which is now in Stable. Remove support for runtime detection for
simplicity.

The only remaining piece of Chrome that will continue to depend on runtime
detection is /net, where devices with _broken_ neon support are also detected,
and it is not configurable via GYP/GN.

BUG=522035
NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/1955413003
Cr-Commit-Position: refs/heads/master@{#12778}
2016-05-17 17:56:48 +00:00
Peter Kasting
1380e266ff Convert some more things to size_t.
These changes stem from requests by Andrew on https://codereview.webrtc.org/1228823002/ to eliminate some "return -1"s and change to using asserts plus returning size_ts.  I then also converted the relevant connected bits.

This also cleans up a bunch of style issues, e.g. no spaces around operators.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, henrik.lundin@webrtc.org, niklas.enbom@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9813}
2015-08-29 00:31:15 +00:00
Peter Kasting
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
pkasting
72cfd6c468 Reland remaining bits of "Upconvert various types to int."
Most of commit cb180976dd (which reverted
commit 83ad33a8ae) was already re-landed.  This relands the rest, including modifications by kwiberg to hopefully avoid regressing performance.

In a subsequent change I will see if removing the int16_t cast in this modified version still causes perf problems.

BUG=499241
TEST=none
TBR=andrew

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

Cr-Commit-Position: refs/heads/master@{#9487}
2015-06-23 02:33:55 +00:00
Peter Kasting
bc440d5651 Revert "Reland "Upconvert various types to int.", common_audio portion."
This reverts commit 15b58eea28.

BUG=499241
TBR=andrew

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

Cr-Commit-Position: refs/heads/master@{#9426}
2015-06-12 02:56:24 +00:00
Peter Kasting
15b58eea28 Reland "Upconvert various types to int.", common_audio portion.
This reverts portions of commit cb180976dd, which
reverted commit 83ad33a8ae.  Specifically, the
files in webrtc/common_audio/ are relanded.

The original commit message is below:

Upconvert various types to int.

Per comments from HL/kwiberg on https://webrtc-codereview.appspot.com/42569004 , when there is existing usage of mixed types (int16_t, int, etc.), we'd prefer to standardize on larger types like int and phase out use of int16_t.

Specifically, "Using int16 just because we're sure all reasonable values will fit in 16 bits isn't usually meaningful in C."

This converts some existing uses of int16_t (and, in a few cases, other types such as uint16_t) to int (or, in a few places, int32_t).  Other locations will be converted to size_t in a separate change.

BUG=none
TBR=andrew

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

Cr-Commit-Position: refs/heads/master@{#9425}
2015-06-12 02:40:58 +00:00
Peter Kasting
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
Peter Kasting
cb180976dd Revert "Upconvert various types to int."
This reverts commit 83ad33a8ae.

BUG=499241
TBR=hlundin

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

Cr-Commit-Position: refs/heads/master@{#9418}
2015-06-11 19:42:42 +00:00
Peter Kasting
83ad33a8ae Upconvert various types to int.
Per comments from HL/kwiberg on https://webrtc-codereview.appspot.com/42569004 , when there is existing usage of mixed types (int16_t, int, etc.), we'd prefer to standardize on larger types like int and phase out use of int16_t.

Specifically, "Using int16 just because we're sure all reasonable values will fit in 16 bits isn't usually meaningful in C."

This converts some existing uses of int16_t (and, in a few cases, other types such as uint16_t) to int (or, in a few places, int32_t).  Other locations will be converted to size_t in a separate change.

BUG=none
R=andrew@webrtc.org, kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9405}
2015-06-10 00:20:09 +00:00
Andrew MacDonald
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
Bjorn Volcker
1ccd8b4281 Refactor common_audio/signal_processing: Removed usage of 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 Linux for both fixed and floating point and trybots
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8853}
2015-03-25 12:30:01 +00:00
andrew@webrtc.org
0933d01d09 Enabling common_audio building with NEON on ARM64
Passed building common_audio_neon and common_audio_unittests both on
Android ARMv7 and Android ARM64. Pass common_audio_unittests tests both
on Android ARMv7 and Android ARM64.

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

Change-Id: I8e0722f356db8cca6fc8232f00ae1e898a086f5a

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

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

Cr-Commit-Position: refs/heads/master@{#8620}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8620 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-05 19:14:21 +00:00
bjornv@webrtc.org
88a4298234 common_audio: Made input vector const in WebRtcSpl_LevinsonDurbin()
In addition, expanded the unit test to verify both unstable and stable filters.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8038 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-12 05:53:43 +00:00
bjornv@webrtc.org
c14e3572c6 common_audio: Made input signal const in WebRtcSplFilterMAFastQ12()
BUG=3353, 1133
TESTED=locally on Mac and trybots
R=henrik.lundin@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8037 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-12 05:50:52 +00:00
andrew@webrtc.org
d730b288c8 Remove WebRtcSpl_ScaleAndAddVectorsWithRoundNeon
This function isn't used anymore. The file and header are also removed.

BUG=4002,3273
R=andrew@webrtc.org

Change-Id: I4b65dec57e6adc2ac2253031501f3b6de6937fac

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

Patch from Yang Zhang <yang.zhang@arm.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8019 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-07 21:34:23 +00:00
bjornv@webrtc.org
f567095f62 common_audio: Removed macro WEBRTC_SPL_RSHIFT_W32
Replaces the trivial macro WEBRTC_SPL_RSHIFT_W32 with >> at various places in common_audio and removes it.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7558 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-29 10:29:16 +00:00
bjornv@webrtc.org
67ca26e087 common_audio: Removed trivial macro WEBRTC_SPL_UMUL_16_16
The macro made a cast to uint16_t before a plain multiplication. At the few places where it was used the variables were already uint16_t.

Affected components:
* isac/fix

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7543 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-28 13:03:10 +00:00
bjornv@webrtc.org
fab5439112 common_audio: Removed version API from signal_processing
The Signal Processing version API is not used anymore.

BUG=3353
R=kwiberg@webrtc.org, tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7451 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-15 04:38:42 +00:00
bjornv@webrtc.org
bc1a4578e0 common_audio: Removed macro WEBRTC_SPL_RSHIFT_W16
Replaced the trivial right shift macro at remaining 4 places and removed from signal_processing.

Affected components:
* vad
* aecm

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7434 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 14:00:43 +00:00
bjornv@webrtc.org
3ea35fdb1b common_audio: Removed macro WEBRTC_SPL_LSHIFT_W16
The macro was a trivial << operation and where used has been replaced by <<. Affected components are
* ilbc
* isacfix

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7404 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-09 08:47:02 +00:00
bjornv@webrtc.org
7c15510f38 common_audio refactoring: Removed macro WEBRTC_SPL_LSHIFT_U32
The macro is a trivial shift operator including a cast before shift. There is no guard against negative shifts. Replaced with << at place and added casts when necessary.

Affects both fixed and float point versions of iSAC

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7320 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-29 09:40:38 +00:00
bjornv@webrtc.org
3cbd6c26c8 Fix MSVC warnings about value truncations, webrtc/common_audio/ edition.
This changes some method signatures to better reflect how callers are actually
using them.  This also has the tendency to make signatures more consistent about
e.g. using int (instead of int16_t) for lengths of things like vectors, and
using int16_t (instead of int) for e.g. counts of bits in a value.

This also removes a couple of functions that were only called in unittests.

BUG=3353,chromium:81439
TEST=none
R=andrew@webrtc.org, bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7060 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-04 13:21:44 +00:00
bjornv@webrtc.org
df9fef6638 common_audio: Removed macro WEBRTC_SPL_DIV
The macro has no built-in divide by zero check. The only thing that is done is casting to int32_t.
In addition a bug was discovered where it was supposed to do a division with rounding, but instead did a division with truncation + addition by 2. This is corrected in this CL.

BUG=3348,3353
TESTED=locally on Linux
R=kwiberg@webrtc.org, tina.legrand@webrtc.org, turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6998 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-28 12:57:32 +00:00
bjornv@webrtc.org
4f71e22bf9 Refactoring common_audio/signal_processing: Remove macro WEBRTC_SPL_UDIV
This macro is a direct use of the division operator without checking for division by zero. Hence, it is dangerous to use.
This CL replaces the macro with '/' at place.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6976 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-26 10:25:10 +00:00
bjornv@webrtc.org
926707b167 Refactoring common_audio: Replace trivial multiplication macro
This multiplication macro literally use the '*' operator, so there is no need for it.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6964 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-25 11:42:42 +00:00
bjornv@webrtc.org
d32c4389ac Re-landing r6961
common_audio/signal_processing: Remove macro WEBRTC_SPL_MEMCPY_W8

This macro is nothing but memcpy() and further used at one single place in webrtc, so it makes no sense to keep it. Replaced the operation where it is used.

BUG=3348,3353
TESTED=locally on linux
TBR=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6963 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-25 11:19:05 +00:00
bjornv@webrtc.org
4a616be12b Revert 6961 "common_audio/signal_processing: Remove macro WEBRTC..."
> common_audio/signal_processing: Remove macro WEBRTC_SPL_MEMCPY_W8
> 
> This macro is nothing but memcpy() and further used at one single place in webrtc, so it makes no sense to keep it. Replaced the operation where it is used.
> 
> BUG=3348,3353
> TESTED=locally on linux and trybots
> R=kwiberg@webrtc.org, tina.legrand@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/16359004

TBR=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6962 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-25 10:32:22 +00:00
bjornv@webrtc.org
4f01017e2d common_audio/signal_processing: Remove macro WEBRTC_SPL_MEMCPY_W8
This macro is nothing but memcpy() and further used at one single place in webrtc, so it makes no sense to keep it. Replaced the operation where it is used.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6961 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-25 10:23:22 +00:00
bjornv@webrtc.org
6e71d17bc9 Refactoring common_audio/signal_processing: Replaces trivial macros
The macros WEBRTC_SPL_ADD_SAT_W16 and WEBRTC_SPL_ADD_SAT_W32 make direct use of the corresponding functions WebRtcSpl_AddSatW16() and WebRtcSpl_AddSatW32().
This CL replaces these macros in the code.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6960 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-25 07:44:52 +00:00
bjornv@webrtc.org
52275341d8 Refactoring common_audio: Remove macro WEBRTC_SPL_MEMMOVE_W16
Yet another macro that utilizes a function directly.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6935 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-20 10:09:34 +00:00
bjornv@webrtc.org
b5ab52d010 common_audio/signal_processing: Remove unused macros WEBRTC_SPL_GET_BYTE and WEBRTC_SPL_SET_BYTE
These two macros are not used anywhere in webrtc. Previously used in old neteq (I think).

BUG=3348,3353
TESTED=manually on linux and trybots
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6916 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-18 12:01:02 +00:00
bjornv@webrtc.org
1e3ef4b999 common_audio/signal_processing: Remove macro WEBRTC_SPL_UMUL_32_16_RSFT16
Macros should in general be avoided. WEBRTC_SPL_UMUL_32_16_RSFT16 is only used in iSAC fixed point as part of multiplying with LSB and MSB. A better approach is to have one function for that complete operation in iSAC.

This CL removes the macro and replace the operation locally.

BUG=3148, 3353
TESTED=locally on Linux and trybots
R=tina.legrand@webrtc.org, turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6907 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-15 05:17:20 +00:00
bjornv@webrtc.org
8434dbe284 common_audio/signal_processing: Remove macro WEBRTC_SPL_SUB_SAT_W32
This macro is literally using the function WebRtcSpl_SubSatW32(), hence there is no need for a macro.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6899 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-14 07:26:28 +00:00
bjornv@webrtc.org
0a3cbb3906 common_audio/signal_processing: Removes macro WEBRTC_SPL_MUL_32_32_RSFT32
The macro is only used at four places in iSAC fixed point and the macro have been replaced at those places.
In addition, it is used in a unit test, but throws a warning treated as error (issue3674).

The macro has both MIPS and armv7 optimizations. Removing them impacts only MIPS platforms without DSP ASE. This may cause a very small increase in complexity when using iSAC fix.
The armv7 optimizations are not used anywhere, since specific ones are used inline in iSAC fix.

BUG=3348,3353,3674
TESTED=locally and trybots
R=ljubomir.papuga@gmail.com, tina.legrand@webrtc.org, turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6871 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-12 10:54:50 +00:00
bjornv@webrtc.org
c0ba4392f1 common_audio: Removes macro WEBRTC_SPL_SHIFT_W16
We should avoid macros in general (see style guide). This shift macro is not a severe one, since there is a check for negativity.

BUG=3348,3353
TESTED=trybots and manually
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6591 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-03 13:38:53 +00:00
bjornv@webrtc.org
721f970cba common_audio: Removes macro WEBRTC_SPL_LSHIFT_U16
We should avoid macros in general (see style guide) and the shift ones are particular dangerous since they assume that the user apply a non-negative shift.

Related CL: https://webrtc-codereview.appspot.com/16669004

BUG=3348,3353
TESTED=trybots and manually on linux
R=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6444 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-16 10:30:14 +00:00
bjornv@webrtc.org
18026abd82 common_audio/signal_processing: Removes macro WEBRTC_SPL_RSHIFT_U16
This macro is only used at a few places and implies a cast to uint16_t before right shifting. All places already use uint16_t. Further, the amount of shifts applied in the macro has no sanity check for negativity, makes the macro dangerous to use.

BUG=3348,3353
TESTED=trybots and manually
R=kwiberg@webrtc.org, tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6393 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-11 06:53:20 +00:00
bjornv@webrtc.org
782978cfcb common_audio/signal_processing: Moves WEBRTC_SPL_UMUL_16_16_RSFT16 to iSAC fix
This macro is only used by the fixed point version of iSAC. Replacing the (five) locations in arith_routines_logist.c, where it is used, with the actual operation.

BUG=3348,3353
TESTED=trybots and manually
R=kwiberg@webrtc.org, tina.legrand@webrtc.org, turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6392 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-11 06:39:03 +00:00
bjornv@webrtc.org
edbe886a0b common_audio/signal_processing: Removed macro WEBRTC_SPL_MUL_16_16_RSFT_WITH_FIXROUND
This macro was only used at two places in fixed point iSAC, where it has been replaced with the operation.

BUG=3348,3353
TESTED=trybots
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6336 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-05 08:42:53 +00:00
bjornv@webrtc.org
a3b5673879 common_audio/signal_processing: Removes macro WEBRTC_SPL_UMUL_RSFT16
This macro was only used on two lines in iSACfix and I replaced those with the operations the macro performed.

BUG=3348
TESTED=trybots, manual unittests
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6184 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-16 12:11:20 +00:00
bjornv@webrtc.org
1b21a57902 common_audio/signal_processing: Removed macro WEBRTC_SPL_SUB_SAT_W16
Macro was only mapping a function used in one place.

BUG=3348
TESTED=trybots, unittests
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6180 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-16 06:40:31 +00:00
bjornv@webrtc.org
d83d607271 common_audio/signal_processing: Removed macro WEBRTC_SPL_MAX_SEED_USED
* Moved the macro to randomization_functions and made it static const.
* Made WebRtc_IncreaseSeed() static, since it is not used outside this function.
* Style guide changes.

BUG=3348,3353
TESTED=trybots, common_audio_unittests, modules_unittests, modules_tests
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6179 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-16 06:38:47 +00:00