Commit graph

16 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
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
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
b297c5a01f Miscellaneous changes split from https://codereview.webrtc.org/1230503003 .
These are mostly trivial changes and are separated out just to reduce the
diff on that change to the minimum possible.

Note explanatory comments on patch set 1.

BUG=none
TEST=none

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

Cr-Commit-Position: refs/heads/master@{#9617}
2015-07-22 22:17:26 +00:00
Peter Kasting
aba07ef6d9 Reland "Upconvert various types to int.", isac portion.
This reverts portions of commit cb180976dd, which
reverted commit 83ad33a8ae.  Specifically, the
files in webrtc/modules/audio_coding/codecs/isac/ 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=kwiberg

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

Cr-Commit-Position: refs/heads/master@{#9422}
2015-06-12 01:19:37 +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
Bjorn Volcker
f2822edf61 Refactor audio_coding/codecs/isac/fix: Removed 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
- removed commented code lines used during development
- excluded fft.c since there are neon optimizations used and a removal may cause a performance regression

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

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

Cr-Commit-Position: refs/heads/master@{#8967}
2015-04-10 06:06:46 +00:00
Bjorn Volcker
d4e75016a3 Refactor audio_coding/codecs/isac/fix: Removed usage of trivial macro WEBRTC_SPL_LSHIFT_W32()
The macro is defined as
#define WEBRTC_SPL_LSHIFT_W32(a, b) ((a) << (b))
hence trivial.
The macro name may in fact mislead the user to assume a cast/truncation to int32_t is done.
- Removing usage of it.
- Some style changes.

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

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

Cr-Commit-Position: refs/heads/master@{#8918}
2015-04-02 04:59:44 +00:00
bjornv@webrtc.org
bc2bb34419 Refactor audio_coding/codecs/isac: Removed usage of macro WEBRTC_SPL_MUL_16_16
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)

Some other minor code cleanup also exists.

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

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

Cr-Commit-Position: refs/heads/master@{#8717}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8717 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-13 12:59:36 +00:00
pbos@webrtc.org
eb544460e4 Rename _t struct types in audio_coding.
_t names are reserved in POSIX.

R=henrik.lundin@webrtc.org
BUG=162

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7933 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-17 15:23:29 +00:00
bjornv@webrtc.org
a296725d0e audio_coding/codecs/isac/fix: Replaced macro WEBRTC_SPL_RSHIFT_W32 with >>"
BUG=3348,3353
TESTED=locally on linux and trybots
R=henrik.lundin@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7544 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-28 13:05:43 +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
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
pbos@webrtc.org
0946a56023 WebRtc_Word32 => int32_t etc. in audio_coding/
BUG=314

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3789 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-09 00:28:06 +00:00
andrew@webrtc.org
14b43beb7c Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-10-22 18:19:23 +00:00
Renamed from src/modules/audio_coding/codecs/isac/fix/source/decode.c (Browse further)