Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
70c99adb
Commit
70c99adb
authored
14 years ago
by
Alex Converse
Browse files
Options
Downloads
Patches
Plain Diff
aacdec: 4% faster main profile decoding.
Originally committed as revision 24474 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
51ffd3a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/aacdec.c
+7
-4
7 additions, 4 deletions
libavcodec/aacdec.c
with
7 additions
and
4 deletions
libavcodec/aacdec.c
+
7
−
4
View file @
70c99adb
...
@@ -1231,7 +1231,8 @@ static av_always_inline float flt16_trunc(float pf)
...
@@ -1231,7 +1231,8 @@ static av_always_inline float flt16_trunc(float pf)
return
pun
.
f
;
return
pun
.
f
;
}
}
static
av_always_inline
void
predict
(
AACContext
*
ac
,
PredictorState
*
ps
,
float
*
coef
,
static
av_always_inline
void
predict
(
PredictorState
*
ps
,
float
*
coef
,
float
sf_scale
,
float
inv_sf_scale
,
int
output_enable
)
int
output_enable
)
{
{
const
float
a
=
0
.
953125
;
// 61.0 / 64
const
float
a
=
0
.
953125
;
// 61.0 / 64
...
@@ -1245,9 +1246,9 @@ static av_always_inline void predict(AACContext *ac, PredictorState *ps, float *
...
@@ -1245,9 +1246,9 @@ static av_always_inline void predict(AACContext *ac, PredictorState *ps, float *
pv
=
flt16_round
(
k1
*
ps
->
r0
+
k2
*
ps
->
r1
);
pv
=
flt16_round
(
k1
*
ps
->
r0
+
k2
*
ps
->
r1
);
if
(
output_enable
)
if
(
output_enable
)
*
coef
+=
pv
*
ac
->
sf_scale
;
*
coef
+=
pv
*
sf_scale
;
e0
=
*
coef
/
ac
->
sf_scale
;
e0
=
*
coef
*
inv_
sf_scale
;
e1
=
e0
-
k1
*
ps
->
r0
;
e1
=
e0
-
k1
*
ps
->
r0
;
ps
->
cor1
=
flt16_trunc
(
alpha
*
ps
->
cor1
+
ps
->
r1
*
e1
);
ps
->
cor1
=
flt16_trunc
(
alpha
*
ps
->
cor1
+
ps
->
r1
*
e1
);
...
@@ -1265,6 +1266,7 @@ static av_always_inline void predict(AACContext *ac, PredictorState *ps, float *
...
@@ -1265,6 +1266,7 @@ static av_always_inline void predict(AACContext *ac, PredictorState *ps, float *
static
void
apply_prediction
(
AACContext
*
ac
,
SingleChannelElement
*
sce
)
static
void
apply_prediction
(
AACContext
*
ac
,
SingleChannelElement
*
sce
)
{
{
int
sfb
,
k
;
int
sfb
,
k
;
float
sf_scale
=
ac
->
sf_scale
,
inv_sf_scale
=
1
/
ac
->
sf_scale
;
if
(
!
sce
->
ics
.
predictor_initialized
)
{
if
(
!
sce
->
ics
.
predictor_initialized
)
{
reset_all_predictors
(
sce
->
predictor_state
);
reset_all_predictors
(
sce
->
predictor_state
);
...
@@ -1274,7 +1276,8 @@ static void apply_prediction(AACContext *ac, SingleChannelElement *sce)
...
@@ -1274,7 +1276,8 @@ static void apply_prediction(AACContext *ac, SingleChannelElement *sce)
if
(
sce
->
ics
.
window_sequence
[
0
]
!=
EIGHT_SHORT_SEQUENCE
)
{
if
(
sce
->
ics
.
window_sequence
[
0
]
!=
EIGHT_SHORT_SEQUENCE
)
{
for
(
sfb
=
0
;
sfb
<
ff_aac_pred_sfb_max
[
ac
->
m4ac
.
sampling_index
];
sfb
++
)
{
for
(
sfb
=
0
;
sfb
<
ff_aac_pred_sfb_max
[
ac
->
m4ac
.
sampling_index
];
sfb
++
)
{
for
(
k
=
sce
->
ics
.
swb_offset
[
sfb
];
k
<
sce
->
ics
.
swb_offset
[
sfb
+
1
];
k
++
)
{
for
(
k
=
sce
->
ics
.
swb_offset
[
sfb
];
k
<
sce
->
ics
.
swb_offset
[
sfb
+
1
];
k
++
)
{
predict
(
ac
,
&
sce
->
predictor_state
[
k
],
&
sce
->
coeffs
[
k
],
predict
(
&
sce
->
predictor_state
[
k
],
&
sce
->
coeffs
[
k
],
sf_scale
,
inv_sf_scale
,
sce
->
ics
.
predictor_present
&&
sce
->
ics
.
prediction_used
[
sfb
]);
sce
->
ics
.
predictor_present
&&
sce
->
ics
.
prediction_used
[
sfb
]);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment