Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8b25a20e
Commit
8b25a20e
authored
Oct 25, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lpc: Add a function for calculating reflection coefficients from samples
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
39ef66f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
lpc.c
libavcodec/lpc.c
+12
-0
lpc.h
libavcodec/lpc.h
+3
-0
No files found.
libavcodec/lpc.c
View file @
8b25a20e
...
...
@@ -148,6 +148,18 @@ static int estimate_best_order(double *ref, int min_order, int max_order)
return
est
;
}
int
ff_lpc_calc_ref_coefs
(
LPCContext
*
s
,
const
int32_t
*
samples
,
int
order
,
double
*
ref
)
{
double
autoc
[
MAX_LPC_ORDER
+
1
];
s
->
lpc_apply_welch_window
(
samples
,
s
->
blocksize
,
s
->
windowed_samples
);
s
->
lpc_compute_autocorr
(
s
->
windowed_samples
,
s
->
blocksize
,
order
,
autoc
);
compute_ref_coefs
(
autoc
,
order
,
ref
,
NULL
);
return
order
;
}
/**
* Calculate LPC coefficients for multiple orders
*
...
...
libavcodec/lpc.h
View file @
8b25a20e
...
...
@@ -92,6 +92,9 @@ int ff_lpc_calc_coefs(LPCContext *s,
enum
FFLPCType
lpc_type
,
int
lpc_passes
,
int
omethod
,
int
max_shift
,
int
zero_shift
);
int
ff_lpc_calc_ref_coefs
(
LPCContext
*
s
,
const
int32_t
*
samples
,
int
order
,
double
*
ref
);
/**
* Initialize LPCContext.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment