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
033a4a94
Commit
033a4a94
authored
May 15, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacdec: Use float instead of int16_t for ltp_state to avoid needless rounding.
parent
7f995abe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
aac.h
libavcodec/aac.h
+1
-1
aacdec.c
libavcodec/aacdec.c
+3
-3
No files found.
libavcodec/aac.h
View file @
033a4a94
...
...
@@ -227,7 +227,7 @@ typedef struct {
DECLARE_ALIGNED
(
32
,
float
,
coeffs
)[
1024
];
///< coefficients for IMDCT
DECLARE_ALIGNED
(
32
,
float
,
saved
)[
1024
];
///< overlap
DECLARE_ALIGNED
(
32
,
float
,
ret
)[
2048
];
///< PCM output
DECLARE_ALIGNED
(
16
,
int16_t
,
ltp_state
)[
3072
];
///< time signal for LTP
DECLARE_ALIGNED
(
16
,
float
,
ltp_state
)[
3072
];
///< time signal for LTP
PredictorState
predictor_state
[
MAX_PREDICTORS
];
}
SingleChannelElement
;
...
...
libavcodec/aacdec.c
View file @
033a4a94
...
...
@@ -1820,9 +1820,9 @@ static void update_ltp(AACContext *ac, SingleChannelElement *sce)
saved_ltp
[
i
+
512
]
=
ac
->
buf_mdct
[
1023
-
i
]
*
lwindow
[
511
-
i
];
}
memcpy
(
sce
->
ltp_state
,
&
sce
->
ltp_state
[
1024
],
1024
*
sizeof
(
int16_t
));
ac
->
fmt_conv
.
float_to_int16
(
&
(
sce
->
ltp_state
[
1024
]),
sce
->
ret
,
1024
);
ac
->
fmt_conv
.
float_to_int16
(
&
(
sce
->
ltp_state
[
2048
]),
saved_ltp
,
1024
);
memcpy
(
sce
->
ltp_state
,
sce
->
ltp_state
+
1024
,
1024
*
sizeof
(
*
sce
->
ltp_state
));
memcpy
(
sce
->
ltp_state
+
1024
,
sce
->
ret
,
1024
*
sizeof
(
*
sce
->
ltp_state
)
);
memcpy
(
sce
->
ltp_state
+
2048
,
saved_ltp
,
1024
*
sizeof
(
*
sce
->
ltp_state
)
);
}
/**
...
...
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