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
kwiberg@webrtc.org
0552356fda
isacfix: Refactor big-endian reading and writing
...
Make subroutines for encoding and decoding arrays of 16-bit big-endian
integers, and in the process fix a bug: When decoding an odd number of
bytes from be16, the least significant byte of the last int16 in the
array was properly taken to be zero instead of actually being read
(since it's outside the array). However, when encoding an odd number
of bytes, the least significant byte of the last int16 in the array
was written to the output as-is instead of being taken to be zero;
thus, we encoded one byte more than we should. This was probably not
harmful, and the value was dropped at decoding anyway; nevertheless,
writing a constant zero is the safe thing to do, and this patch does
so.
R=aluebs@webrtc.org , bjornv@webrtc.org , henrik.lundin@webrtc.org , turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/28569004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7527 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-27 11:25:37 +00:00
kwiberg@webrtc.org
396a5e0001
WebRtcIsac_Decode et al.: Type encoded data as uint8[], not uint16[]
...
This patch changes WebRtcIsac_Decode, WebRtcIsac_DecodeRcu, and
WebRtcIsacfix_Decode so that they read the encoded data from a uint8
array instead of a uint16 array.
BUG=909
R=aluebs@webrtc.org , bjornv@webrtc.org , henrik.lundin@webrtc.org , turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/25739004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7431 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 11:23:24 +00:00
kwiberg@webrtc.org
3f7f899a15
WebRtcIsac_UpdateBwEstimate et al.: Type byte streams as uint8, not uint16
...
This patch changes the signature of WebRtcIsac_UpdateBwEstimate,
WebRtcIsacfix_UpdateBwEstimate, and WebRtcIsacfix_UpdateBwEstimate1 so
that they expect the encoded data to be uint8 arrays, not uint16,
which is more natural. The implementations of the functions are left
unchanged for now.
BUG=909
R=aluebs@webrtc.org , bjornv@webrtc.org , henrik.lundin@webrtc.org , turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/25729004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7430 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 11:07:06 +00:00
kwiberg@webrtc.org
1172988c79
Some WebRtcIsac_* and WebRtcIsacfix_* functions: type encoded stream as uint8[]
...
The affected functions are
WebRtcIsacfix_ReadFrameLen
WebRtcIsacfix_GetNewBitStream
WebRtcIsacfix_ReadBwIndex
and
WebRtcIsac_ReadFrameLen
WebRtcIsac_GetNewBitStream
WebRtcIsac_ReadBwIndex
WebRtcIsac_GetRedPayload
BUG=909
R=aluebs@webrtc.org , henrik.lundin@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/22979004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7429 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 10:53:42 +00:00
turaj@webrtc.org
532ed43e85
Prevent reading outside iSAC bitstream, if the stream is corrupted.
...
BUG=chrome_373312(#24 )
R=henrik.lundin@webrtc.org , tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/20089004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7379 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-07 00:21:02 +00:00
kwiberg@webrtc.org
7ee24a7906
WebRtcIsac_Encode and WebRtcIsacfix_Encode: Type encoded stream as uint8_t
...
We have to fix both at once, since there's a macro that calls one of
them or the other.
BUG=909
R=andrew@webrtc.org , bjornv@webrtc.org , henrik.lundin@webrtc.org , minyue@webrtc.org
Committed: https://code.google.com/p/webrtc/source/detail?r=7266
Review URL: https://webrtc-codereview.appspot.com/19229004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7285 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-24 10:31:02 +00:00
andrew@webrtc.org
a3c4d4dd2c
Revert 7266 "WebRtcIsac_Encode and WebRtcIsacfix_Encode: Type en..."
...
This was causing apparently legitimate failures on the following bots:
http://chromegw/i/client.webrtc/builders/Linux64%20Release%20%5Blarge%20tests%5D/builds/2599
http://chromegw/i/client.webrtc/builders/Android%20Tests%20%28KK%20Nexus5%29%28dbg%29/builds/2023
http://chromegw/i/client.webrtc/builders/Android%20Tests%20%28JB%20Nexus7.2%29%28dbg%29/builds/1825
http://chromegw/i/client.webrtc/builders/Android%20Tests%20%28KK%20Nexus5%29/builds/2013
http://chromegw/i/client.webrtc/builders/Android%20Tests%20%28JB%20Nexus7.2%29/builds/1795
> WebRtcIsac_Encode and WebRtcIsacfix_Encode: Type encoded stream as uint8_t
>
> We have to fix both at once, since there's a macro that calls one of
> them or the other.
>
> BUG=909
> R=andrew@webrtc.org , bjornv@webrtc.org , henrik.lundin@webrtc.org , minyue@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/19229004
TBR=kwiberg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/30519004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7267 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-23 01:32:57 +00:00
kwiberg@webrtc.org
8c5740b485
WebRtcIsac_Encode and WebRtcIsacfix_Encode: Type encoded stream as uint8_t
...
We have to fix both at once, since there's a macro that calls one of
them or the other.
BUG=909
R=andrew@webrtc.org , bjornv@webrtc.org , henrik.lundin@webrtc.org , minyue@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/19229004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7266 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-22 23:04:14 +00:00
andresp@webrtc.org
262e676a08
Reland rev 7041 with BUILD.gn files.
...
Original description:
Audio codecs to include webrtc/typedefs.h
Will easy merge of webrtc/typedefs.h and webrtc/base/basictypes.h
CL Generated with:
$ git grep -l \"typedefs.h\" | xargs sed -i "s/typedefs.h/webrtc\/typedefs.h/g"
BUG=3777
R=henrik.lundin@webrtc.org , tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/22569004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7061 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-04 13:28:48 +00:00
andrew@webrtc.org
f86b262588
MIPS optimizations for ISAC (patch #3 )
...
Implemented functions:
- WebRtcIsacfix_MatrixProduct1
- WebRtcIsacfix_MatrixProduct2
The optimizations are bit-exact to the C code.
R=andrew@webrtc.org , tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/18019004
Patch from Ljubomir Papuga <lpapuga@mips.com>.
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6919 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-18 17:32:19 +00:00
andrew@webrtc.org
ceafa8cce9
MIPS optimizations for ISAC (patch #2 )
...
Implemented functions:
- WebRtcIsacfix_CalculateResidualEnergy
- WebRtcIsacfix_Spec2Time
- WebRtcIsacfix_Time2Spec
- WebRtcIsacfix_HighpassFilterFixDec32
- WebRtcIsacfix_PCorr2Q32
Gain achieved: aprox. further 5% on top of patch#1 on ISAC encoding path.
The optimizations are bit-exact to the C code, with the excception of the
MIPS DSPr2 variant of the WebRtcIsacfix_Time2Spec function (the accuracy of
the WebRtcIsacfix_Time2Spec MIPS DSPr2 variant is same or better than C
variant). Code verification and improvement achieved have been determined
using the iSACFixtest application.
R=andrew@webrtc.org , tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/19749004
Patch from Ljubomir Papuga <lpapuga@mips.com>.
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6749 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-21 16:43:13 +00:00
turaj@webrtc.org
8de8c9155e
Maintain constantness of the input to iSAC-fix decoder, and prevent heap-buffer overflow.
...
To save memory in iSAC-fix, decoder operated directly on the recieved bitstream. However, this breaks constantness of input when decoder performed in-place big to little Endian conversion. Furthermore, for bit-streams with odd lengths, this meant writing outside the memory. That is because the last byte will be shifted to the Most Significat Byte which might be outside the allocated memory.
If we care about memory, the solution is to do a big-to-little Endian conversion everytime we read a Word16 from the bitstream.
BUG=845,chrome:379458
R=henrik.lundin@webrtc.org , tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/15829004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6494 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-19 15:47:09 +00:00
andrew@webrtc.org
919914d71b
MIPS optimizations for ISAC (patch #1 )
...
Implemented functions:
- WebRtcIsacfix_AutocorrMIPS
- WebRtcIsacfix_FilterArLoop
- WebRtcIsacfix_FilterMaLoopMIPS
- WebRtcIsacfix_AllpassFilter2FixDec16MIPS (only MIPS DSP)
- WebRtcIsacfix_PitchFilterCore (only MIPS DSPR2)
Gain achieved: from aprox. 15% (MIPS32) up to aprox. 40% (MIPS DSPR2)
R=andrew@webrtc.org , tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/17559005
Patch from Ljubomir Papuga <lpapuga@mips.com>.
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6387 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-10 18:13:15 +00:00
turaj@webrtc.org
546961a9d3
Avoid reading uninitialized values (outside baundary) in DFT arithmatic decoder of iSAC-fix.
...
Arithmetic encoder does not right the last 2 or 3 bytes of |streamval| when terminating the bit-stream. Perhaps the last bytes makes no difference in decoding the stream. However, the decoder reads full |streamval| (int16_t) going out of boundary and reading uninitialized values. This avoids this problem. by inserting zero-bytes whenever decoder intends to read outside boundary.
BUG=1353,chrome373312,b/13468260
R=tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/16499005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6234 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-23 17:14:29 +00:00
andrew@webrtc.org
621df678c8
WEBRTC_{BIG, LITTLE}_ENDIAN -> WEBRTC_ARCH_{BIG, LITTLE}_ENDIAN.
...
Mostly to remove a long-standing TODO...
TESTED=trybots
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2369005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5013 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-22 10:27:23 +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
kma@webrtc.org
23da8622c0
Optimized EstCodeLpcCoef() for iSAC with intrinsics in Android-Neon platform.
...
Cycles of the whole iSAC codec was reduced by 7.9%, measured by offline file test, with time() function.
Bit exact.
** Code style cleanup is not considered in this CL. **
Review URL: https://webrtc-codereview.appspot.com/1069004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3643 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-03-09 00:38:14 +00:00
kma@webrtc.org
c4373bc737
Moved several function pointer declarations in iSAC to isac initialization file.
...
Fixed clang linker problem of not being able to find symbols.
Review URL: https://webrtc-codereview.appspot.com/1061006
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3410 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-25 04:55:21 +00:00
kma@webrtc.org
e8482f0e9f
Revert 3406
...
> Moved all function pointer declarations in iSAC to a single place.
> Review URL: https://webrtc-codereview.appspot.com/1057006
TBR=kma@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1074005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3408 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-24 23:57:56 +00:00
kma@webrtc.org
ebef7e4ac1
Moved all function pointer declarations in iSAC to a single place.
...
Review URL: https://webrtc-codereview.appspot.com/1057006
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3406 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-24 21:19:24 +00:00
kma@webrtc.org
4782911572
Optimized WebRtcIsacfix_Time2Spec() for iSAC-Fix in ARM Neon processor.
...
Review URL: https://webrtc-codereview.appspot.com/1005004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3404 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-24 01:37:33 +00:00
kma@webrtc.org
fa5b6bf4f4
Optimized WebRtcIsacfix_Spec2Time() for iSAC-Fix in ARM Neon processor. Speed doubled.
...
Review URL: https://webrtc-codereview.appspot.com/930033
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3274 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-12-12 23:00:52 +00:00
kma@webrtc.org
fa65c851fe
Optimized function AllpassFilter2FixDec16() in isac fix for Android Neon platforms.
...
With an offline test, codec cycles were reduced by 4%.
Review URL: https://webrtc-codereview.appspot.com/936007
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3066 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-11-09 00:39:45 +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