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
458aadf8
Commit
458aadf8
authored
Nov 22, 2014
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lpc: Reduce stack usage by allocating LLSModel in context.
Signed-off-by:
Reimar Döffinger
<
Reimar.Doeffinger@gmx.de
>
parent
f87a3448
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
lpc.c
libavcodec/lpc.c
+1
-1
lpc.h
libavcodec/lpc.h
+4
-0
No files found.
libavcodec/lpc.c
View file @
458aadf8
...
@@ -208,7 +208,7 @@ int ff_lpc_calc_coefs(LPCContext *s,
...
@@ -208,7 +208,7 @@ int ff_lpc_calc_coefs(LPCContext *s,
}
}
if
(
lpc_type
==
FF_LPC_TYPE_CHOLESKY
)
{
if
(
lpc_type
==
FF_LPC_TYPE_CHOLESKY
)
{
LLSModel
m
[
2
]
;
LLSModel
*
m
=
s
->
lls_models
;
LOCAL_ALIGNED
(
32
,
double
,
var
,
[
FFALIGN
(
MAX_LPC_ORDER
+
1
,
4
)]);
LOCAL_ALIGNED
(
32
,
double
,
var
,
[
FFALIGN
(
MAX_LPC_ORDER
+
1
,
4
)]);
double
av_uninit
(
weight
);
double
av_uninit
(
weight
);
memset
(
var
,
0
,
FFALIGN
(
MAX_LPC_ORDER
+
1
,
4
)
*
sizeof
(
*
var
));
memset
(
var
,
0
,
FFALIGN
(
MAX_LPC_ORDER
+
1
,
4
)
*
sizeof
(
*
var
));
...
...
libavcodec/lpc.h
View file @
458aadf8
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <stdint.h>
#include <stdint.h>
#include "libavutil/avassert.h"
#include "libavutil/avassert.h"
#include "libavutil/lls.h"
#define ORDER_METHOD_EST 0
#define ORDER_METHOD_EST 0
#define ORDER_METHOD_2LEVEL 1
#define ORDER_METHOD_2LEVEL 1
...
@@ -79,6 +80,9 @@ typedef struct LPCContext {
...
@@ -79,6 +80,9 @@ typedef struct LPCContext {
*/
*/
void
(
*
lpc_compute_autocorr
)(
const
double
*
data
,
int
len
,
int
lag
,
void
(
*
lpc_compute_autocorr
)(
const
double
*
data
,
int
len
,
int
lag
,
double
*
autoc
);
double
*
autoc
);
// TODO: these should be allocated to reduce ABI compatibility issues
LLSModel
lls_models
[
2
];
}
LPCContext
;
}
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