]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/celp_math.h
Add ff_ prefix for mpeg2_dc_scale_table.
[ffmpeg] / libavcodec / celp_math.h
index 029b5310af3de0588055edb70bfae8367aed2f01..7cf7861ca7e018b19a5a7428d10851860ffcf598 100644 (file)
@@ -50,26 +50,6 @@ int ff_exp2(uint16_t power);
  */
 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
@@ -83,4 +63,14 @@ static inline int bidir_sal(int value, int offset)
     else           return value <<  offset;
 }
 
+/**
+ * returns the dot product.
+ * @param a input data array
+ * @param b input data array
+ * @param length number of elements
+ *
+ * @return dot product = sum of elementwise products
+ */
+float ff_dot_productf(const float* a, const float* b, int length);
+
 #endif /* AVCODEC_CELP_MATH_H */