Commit Graph
23 Commits
Author SHA1 Message Date
Karl Tomlinson 45a2b3e869 bug 1389638 use correct input elements for summing squares of trailing unaligned input r=dminor
MozReview-Commit-ID: HlxEBWsFQuU
2017-08-11 23:42:46 +12:00
Karl Tomlinson 6c2869cea3 bug 1389638 include leading unaligned AudioBufferSumOfSquares input in length count and check for end of buffer r=dminor
If there were leading unaligned input elements, then excluding them from the
length count would have led to reading elements beyond the indicated array
length and summing too many squares.  In practice, there were no known cases
with leading unaligned input.

This patch also fixes the calculation for the length of the array for
AudioBufferSumOfSquares_SSE().  Previously this length was based on rounding
down the total input array length.  The result could be too long if there were
both leading and trailing unaligned input.  The length for
AudioBufferSumOfSquares_SSE is now calculated by rounding down the number of
remaining input array elements after leading unaligned elements are excluded.

MozReview-Commit-ID: FFz5RoqUtN0
2017-08-11 23:25:56 +12:00
Karl Tomlinson edc3c43755 bug 1389638 declare length of array for AudioBufferSumOfSquares_SSE as an integral type r=dminor
MozReview-Commit-ID: CRXad6Fm9HC
2017-08-11 23:33:45 +12:00
Chris Pearce e14de67086 Bug 1388288 - Make dom/media/webaudio build non-Unified. r=padenot
MozReview-Commit-ID: Dihfqa9URpl
2017-08-08 11:38:02 +08:00
Bevis Tseng d028a1f078 Bug 1314833 - Part 2.2: Use AbstractThread::CreateDirectTaskDrainer() to Drain Direct Tasks Dispatched to MediaStreamGraph. f=rjesup,r=padenot,jwwang
MozReview-Commit-ID: 1KgE3uKu4CG
2016-12-07 22:00:12 -10:00
Dan Minor cc46c82afb Bug 1263910 - Make AudioBufferAddWithScale handle unaligned buffers; r=padenot
ReverbAccumulationBuffer often produces unaligned buffers due to the way
it wraps around results. This modifies AudioBufferAddWithScale on SSE2
platforms to handle unaligned buffers by performing scalar operations
until both the input and output buffers are aligned to 16 bytes. It then
does as many vector operations as possible and switches back to scalar
operations for anything that is left over.

This could also be done within the ReverbAccumulationBuffer code but doing
it directly within the AudioNodeEngine code makes it available to other
callers in the future, at the cost of a few extra branches in the case
where everything was aligned anyway.

MozReview-Commit-ID: Ky0uIe5LMVq
2016-05-10 06:37:45 -04:00
Dan Minor d531252f15 Bug 1266112 - Remove unnecessary alignment checks from AudioNodeEngine.cpp; r=padenot
Assuming that Bug 1266405 fixed the underlying cause for the unaligned
buffers we were seeing, the checks in AudioBufferAddWithScale and
AudioBlockCopyWithScale shoudl no longer be necessary.


MozReview-Commit-ID: 4OQ4qQVjEP3
2016-04-29 08:35:30 -04:00
Jan Beich d3e5c70cba Bug 1266772 - Unbreak FreeBSD build after bug 881587. r=dminor
MozReview-Commit-ID: 5oZ1R0vYnRm
2016-04-22 15:31:09 +00:00
Dan Minor e4247a01f1 Bug 1266047 - Fix crash in mozilla::AudioBufferAddWithScale_SSE r=padenot
This adds alignment checks to fallback to scalar operations if the
received buffers are not properly aligned. Bug 1266112 is the follow on
to either fix the alignment problem or add a vector path for the aligned
portion of the buffers.

MozReview-Commit-ID: 5HCXzipXlqD
2016-04-20 11:54:50 -04:00
Dan Minor ee39d5b6d9 Bug 881587 - Use SSE2 version of AudioNodeEngine.cpp routines added in bug 815643. r=padenot
MozReview-Commit-ID: 3cfU3oTruAC
2016-04-14 08:57:21 -04:00
Dan Minor bc95ebd7c0 Bug 877662 - Use SSE2 versions of AudioNodeEngine functions r=padenot
MozReview-Commit-ID: AJ2f5YBobPv
2016-03-18 16:24:02 -04:00
Dan Minor 38fb8034e6 Bug 1105513 - Add a NEON version for AudioBlockPanStereoToStereo when aIsOnTheLeft is an array r=padenot 2015-12-17 13:15:54 -05:00
Nathan Froyd 4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Karl Tomlinson 2d17d20fc0 bug 1207003 add GraphTime parameter to ProcessBlock() and remove GetCurrentPosition() r=padenot
This is immediately useful for making the track unnecessary, but will also be
required when switching to the destination node stream for tracking time (bug
1205558) because using GetCurrentPosition() on the destination node stream
would give different results depending on the stream processing order (when
called during processing of streams not strictly upstream from the destination
node).
2015-09-18 17:05:25 +12:00
Karl Tomlinson 0380c42799 bug 1197028 use AudioBlock for web audio processing to reuse buffers shared downstream r=padenot 2015-09-03 19:01:50 +12:00
Karl Tomlinson baea243614 bug 1197028 use AudioChunk::ChannelCount() r=padenot 2015-09-03 17:30:16 +12:00
Karl Tomlinson c0f5fffe34 bug 1197028 move AllocateAudioBlock to AudioBlock.h r=padenot
In a subsequent patch, AllocateAudioBlock will become part of an AudioBlock
class derived from AudioChunk and used for AudioNodeStream members.
2015-09-03 19:05:02 +12:00
Karl Tomlinson 5ee386f016 bug 1199559 add a helper to fallibly allocate ThreadSharedFloatArrayBufferList with buffers r=padenot 2015-08-27 20:35:43 +12:00
Karl Tomlinson cfd19cb319 bug 1186781 skip reallocation when audio block is not shared r=padenot 2015-07-22 18:51:11 +12:00
Karl Tomlinson 08237e3eec bug 1186779 use ChannelFloatsForWrite() instead of const_cast r=padenot 2015-07-22 17:59:21 +12:00
Birunthan Mohanathas a29151dc87 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Paul Adenot 83b0b389e5 Bug 1100349 - Implement StereoPannerNode. r=ehsan,smaug 2014-11-19 18:15:13 +01:00
Birunthan Mohanathas 417b400d55 Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00