Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: Source/WebCore/platform/audio/VectorMath.cpp

Issue 9350003: Merge 106864 - zvmul incorrectly multiplies complex arrays on Windows. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/platform/chromium/test_expectations.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/audio/VectorMath.cpp
===================================================================
--- Source/WebCore/platform/audio/VectorMath.cpp (revision 106870)
+++ Source/WebCore/platform/audio/VectorMath.cpp (working copy)
@@ -418,8 +418,13 @@
}
#endif
for (; i < framesToProcess; ++i) {
- realDestP[i] = real1P[i] * real2P[i] - imag1P[i] * imag2P[i];
- imagDestP[i] = real1P[i] * imag2P[i] + imag1P[i] * real2P[i];
+ // Read and compute result before storing them, in case the
+ // destination is the same as one of the sources.
+ float realResult = real1P[i] * real2P[i] - imag1P[i] * imag2P[i];
+ float imagResult = real1P[i] * imag2P[i] + imag1P[i] * real2P[i];
+
+ realDestP[i] = realResult;
+ imagDestP[i] = imagResult;
}
}
« no previous file with comments | « LayoutTests/platform/chromium/test_expectations.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698