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

Unified Diff: webrtc/common_audio/signal_processing/include/signal_processing_library.h

Issue 2717123004: Avoid overflow in WebRtcSpl_DotProductWithScale (Closed)
Patch Set: Remove wd4334 Created 3 years, 9 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 | « webrtc/common_audio/signal_processing/dot_product_with_scale.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/signal_processing/include/signal_processing_library.h
diff --git a/webrtc/common_audio/signal_processing/include/signal_processing_library.h b/webrtc/common_audio/signal_processing/include/signal_processing_library.h
index 7fa68e04226e3c13be8eb9b73f8dc112758be93f..f1d605bb27d74defbd7b756bf700546b0e1c0d8a 100644
--- a/webrtc/common_audio/signal_processing/include/signal_processing_library.h
+++ b/webrtc/common_audio/signal_processing/include/signal_processing_library.h
@@ -19,6 +19,7 @@
#define WEBRTC_SPL_SIGNAL_PROCESSING_LIBRARY_H_
#include <string.h>
+#include "webrtc/common_audio/signal_processing/dot_product_with_scale.h"
#include "webrtc/typedefs.h"
// Macros specific for the fixed point implementation
@@ -597,22 +598,6 @@ int32_t WebRtcSpl_Energy(int16_t* vector,
size_t vector_length,
int* scale_factor);
-// Calculates the dot product between two (int16_t) vectors.
-//
-// Input:
-// - vector1 : Vector 1
-// - vector2 : Vector 2
-// - vector_length : Number of samples used in the dot product
-// - scaling : The number of right bit shifts to apply on each term
-// during calculation to avoid overflow, i.e., the
-// output will be in Q(-|scaling|)
-//
-// Return value : The dot product in Q(-scaling)
-int32_t WebRtcSpl_DotProductWithScale(const int16_t* vector1,
- const int16_t* vector2,
- size_t length,
- int scaling);
-
// Filter operations.
size_t WebRtcSpl_FilterAR(const int16_t* ar_coef,
size_t ar_coef_length,
« no previous file with comments | « webrtc/common_audio/signal_processing/dot_product_with_scale.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698