summaryrefslogtreecommitdiff
path: root/libavcodec/lpc.h
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2008-08-16 17:18:20 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2008-08-16 17:18:20 +0000
commitc50da3ad6c5ee316bafd38170172dcc6c3163764 (patch)
treea14e1737b60d336d2a498bd8dc3a689b17f33fb4 /libavcodec/lpc.h
parent51c796d012b6494f4937e794db9ed05e05d970c4 (diff)
flacenc, lpc: Move LPC code from flacenc.c to new lpc.[ch] files.
Originally committed as revision 14790 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lpc.h')
-rw-r--r--libavcodec/lpc.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h
new file mode 100644
index 0000000000..db1a6432ec
--- /dev/null
+++ b/libavcodec/lpc.h
@@ -0,0 +1,46 @@
+/**
+ * LPC utility code
+ * Copyright (c) 2006 Justin Ruggles <jruggle@earthlink.net>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef FFMPEG_LPC_H
+#define FFMPEG_LPC_H
+
+#include <inttypes.h>
+
+#define ORDER_METHOD_EST 0
+#define ORDER_METHOD_2LEVEL 1
+#define ORDER_METHOD_4LEVEL 2
+#define ORDER_METHOD_8LEVEL 3
+#define ORDER_METHOD_SEARCH 4
+#define ORDER_METHOD_LOG 5
+
+#define MIN_LPC_ORDER 1
+#define MAX_LPC_ORDER 32
+
+
+/**
+ * Calculate LPC coefficients for multiple orders
+ */
+int ff_lpc_calc_coefs(DSPContext *s,
+ const int32_t *samples, int blocksize, int max_order,
+ int precision, int32_t coefs[][MAX_LPC_ORDER],
+ int *shift, int use_lpc, int omethod, int max_shift, int zero_shift);
+
+#endif /* FFMPEG_LPC_H */