summaryrefslogtreecommitdiff
path: root/libavcodec/lpc.h
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-08-29 06:14:13 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-08-29 06:14:13 +0100
commit20962b567b4d1fe791ca4b537121f13f6e0f5fa0 (patch)
treebe6f384d4251b1415ad4f7cc01c2695f4e49905d /libavcodec/lpc.h
parentf55cc579115e4bcfe26eb05ecaa1c823343e9e1e (diff)
lpc: create a simplified Levinson-Durbin LPC handling float samples
This commit simply duplicates the functionality of ff_lpc_calc_coefs() for the case of a Levinson-Durbin LPC with the only difference being that floating point samples are accepted and the resulting coefficients are raw and unquantized. The motivation behind doing this is the fact that the AAC encoder requires LPC in TNS and LTP and converting non-normalized floating point coefficients to int32_t using SWR and again back for the LPC coefficients was very impractical. The current LPC interfaces were designed for int32_t in mind possibly because FLAC and ALAC use this type for most internal operations. The mathematics in case of floats remains of course identical. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/lpc.h')
-rw-r--r--libavcodec/lpc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h
index 9b76e2fb43..ec59cea635 100644
--- a/libavcodec/lpc.h
+++ b/libavcodec/lpc.h
@@ -100,6 +100,10 @@ int ff_lpc_calc_coefs(LPCContext *s,
int ff_lpc_calc_ref_coefs(LPCContext *s,
const int32_t *samples, int order, double *ref);
+int ff_lpc_calc_levinsion(LPCContext *s, const float *samples, int len,
+ double lpc[][MAX_LPC_ORDER], int min_order,
+ int max_order, int omethod);
+
/**
* Initialize LPCContext.
*/