]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/lsp.h
Fix h264 parser dependencies
[ffmpeg] / libavcodec / lsp.h
index 18d9772b55de735237688b19bc69c30f35243c3e..c3aee7b7dca012df30589a77e8e86b8228214cb9 100644 (file)
@@ -50,7 +50,7 @@ void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, in
  * @param min_spacing    minimum distance between two consecutive lsf values
  * @param                size size of the lsf vector
  */
-void ff_set_min_dist_lsf(float *lsf, float min_spacing, int order);
+void ff_set_min_dist_lsf(float *lsf, double min_spacing, int order);
 
 /**
  * \brief Convert LSF to LSP
@@ -97,4 +97,23 @@ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd
  */
 void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order);
 
+/**
+ * Sort values in ascending order.
+ *
+ * @note O(n) if data already sorted, O(n^2) - otherwise
+ */
+void ff_sort_nearly_sorted_floats(float *vals, int len);
+
+/**
+ * Computes the Pa / (1 + z(-1)) or Qa / (1 - z(-1)) coefficients
+ * needed for LSP to LPC conversion.
+ * We only need to calculate the 6 first elements of the polynomial.
+ *
+ * @param lsp line spectral pairs in cosine domain
+ * @param f [out] polynomial input/output as a vector
+ *
+ * TIA/EIA/IS-733 2.4.3.3.5-1/2
+ */
+void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order);
+
 #endif /* AVCODEC_LSP_H */