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
57cc1ad3
Commit
57cc1ad3
authored
Mar 31, 2011
by
Young Han Lee
Committed by
Janne Grunau
Apr 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacenc: reduce the number of loop index variables
Signed-off-by:
Janne Grunau
<
janne-libav@jannau.net
>
parent
333e8943
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
aaccoder.c
libavcodec/aaccoder.c
+8
-8
No files found.
libavcodec/aaccoder.c
View file @
57cc1ad3
...
...
@@ -110,7 +110,7 @@ static av_always_inline float quantize_and_encode_band_cost_template(
const
float
IQ
=
ff_aac_pow2sf_tab
[
200
+
scale_idx
-
SCALE_ONE_POS
+
SCALE_DIV_512
];
const
float
Q
=
ff_aac_pow2sf_tab
[
200
-
scale_idx
+
SCALE_ONE_POS
-
SCALE_DIV_512
];
const
float
CLIPPED_ESCAPE
=
165140
.
0
f
*
IQ
;
int
i
,
j
,
k
;
int
i
,
j
;
float
cost
=
0
;
const
int
dim
=
BT_PAIR
?
2
:
4
;
int
resbits
=
0
;
...
...
@@ -149,10 +149,10 @@ static av_always_inline float quantize_and_encode_band_cost_template(
curbits
=
ff_aac_spectral_bits
[
cb
-
1
][
curidx
];
vec
=
&
ff_aac_codebook_vectors
[
cb
-
1
][
curidx
*
dim
];
if
(
BT_UNSIGNED
)
{
for
(
k
=
0
;
k
<
dim
;
k
++
)
{
float
t
=
fabsf
(
in
[
i
+
k
]);
for
(
j
=
0
;
j
<
dim
;
j
++
)
{
float
t
=
fabsf
(
in
[
i
+
j
]);
float
di
;
if
(
BT_ESC
&&
vec
[
k
]
==
64
.
0
f
)
{
//FIXME: slow
if
(
BT_ESC
&&
vec
[
j
]
==
64
.
0
f
)
{
//FIXME: slow
if
(
t
>=
CLIPPED_ESCAPE
)
{
di
=
t
-
CLIPPED_ESCAPE
;
curbits
+=
21
;
...
...
@@ -162,15 +162,15 @@ static av_always_inline float quantize_and_encode_band_cost_template(
curbits
+=
av_log2
(
c
)
*
2
-
4
+
1
;
}
}
else
{
di
=
t
-
vec
[
k
]
*
IQ
;
di
=
t
-
vec
[
j
]
*
IQ
;
}
if
(
vec
[
k
]
!=
0
.
0
f
)
if
(
vec
[
j
]
!=
0
.
0
f
)
curbits
++
;
rd
+=
di
*
di
;
}
}
else
{
for
(
k
=
0
;
k
<
dim
;
k
++
)
{
float
di
=
in
[
i
+
k
]
-
vec
[
k
]
*
IQ
;
for
(
j
=
0
;
j
<
dim
;
j
++
)
{
float
di
=
in
[
i
+
j
]
-
vec
[
j
]
*
IQ
;
rd
+=
di
*
di
;
}
}
...
...
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