diff celp_math.h @ 8505:c8743c33eeef libavcodec

Remove duplicated dot product code. Use dsputil's scalarproduct instead. Patch by Aurelien Jacobs.
author reynaldo
date Mon, 29 Dec 2008 17:14:30 +0000
parents cf4d575b1982
children fdafbcef52f5
line wrap: on
line diff
--- a/celp_math.h	Mon Dec 29 10:20:03 2008 +0000
+++ b/celp_math.h	Mon Dec 29 17:14:30 2008 +0000
@@ -51,26 +51,6 @@
 int ff_log2(uint32_t value);
 
 /**
- * returns the dot product.
- * @param a input data array
- * @param b input data array
- * @param length number of elements
- * @param shift right shift by this value will be done after multiplication
- *
- * @return dot product = sum of elementwise products
- */
-static int dot_product(const int16_t* a, const int16_t* b, int length, int shift)
-{
-    int sum = 0;
-    int i;
-
-    for(i=0; i<length; i++)
-        sum += (a[i] * b[i]) >> shift;
-
-    return sum;
-}
-
-/**
  * Shift value left or right depending on sign of offset parameter.
  * @param value value to shift
  * @param offset shift offset