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
2d9b5ae0
Commit
2d9b5ae0
authored
Oct 17, 2015
by
Rostislav Pehlivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacenc: slightly simplify and remove a redundant variable
Functionally identical, doesn't change anything.
parent
564db3e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
aacenc.c
libavcodec/aacenc.c
+8
-6
No files found.
libavcodec/aacenc.c
View file @
2d9b5ae0
...
...
@@ -540,6 +540,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
float
**
samples
=
s
->
planar_samples
,
*
samples2
,
*
la
,
*
overlap
;
ChannelElement
*
cpe
;
SingleChannelElement
*
sce
;
IndividualChannelStream
*
ics
;
int
i
,
its
,
ch
,
w
,
chans
,
tag
,
start_ch
,
ret
,
frame_bits
;
int
target_bits
,
rate_bits
,
too_many_bits
,
too_few_bits
;
int
ms_mode
=
0
,
is_mode
=
0
,
tns_mode
=
0
,
pred_mode
=
0
;
...
...
@@ -569,10 +570,11 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
chans
=
tag
==
TYPE_CPE
?
2
:
1
;
cpe
=
&
s
->
cpe
[
i
];
for
(
ch
=
0
;
ch
<
chans
;
ch
++
)
{
IndividualChannelStream
*
ics
=
&
cpe
->
ch
[
ch
].
ics
;
int
cur_channel
=
start_ch
+
ch
;
sce
=
&
cpe
->
ch
[
ch
];
ics
=
&
sce
->
ics
;
s
->
cur_channel
=
start_ch
+
ch
;
float
clip_avoidance_factor
;
overlap
=
&
samples
[
cur_channel
][
0
];
overlap
=
&
samples
[
s
->
cur_channel
][
0
];
samples2
=
overlap
+
1024
;
la
=
samples2
+
(
448
+
64
);
if
(
!
frame
)
...
...
@@ -589,7 +591,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
*/
ics
->
num_swb
=
s
->
samplerate_index
>=
8
?
1
:
3
;
}
else
{
wi
[
ch
]
=
s
->
psy
.
model
->
window
(
&
s
->
psy
,
samples2
,
la
,
cur_channel
,
wi
[
ch
]
=
s
->
psy
.
model
->
window
(
&
s
->
psy
,
samples2
,
la
,
s
->
cur_channel
,
ics
->
window_sequence
[
0
]);
}
ics
->
window_sequence
[
1
]
=
ics
->
window_sequence
[
0
];
...
...
@@ -622,12 +624,12 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
ics
->
clip_avoidance_factor
=
1
.
0
f
;
}
apply_window_and_mdct
(
s
,
&
cpe
->
ch
[
ch
]
,
overlap
);
apply_window_and_mdct
(
s
,
sce
,
overlap
);
if
(
isnan
(
cpe
->
ch
->
coeffs
[
0
]))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Input contains NaN
\n
"
);
return
AVERROR
(
EINVAL
);
}
avoid_clipping
(
s
,
&
cpe
->
ch
[
ch
]
);
avoid_clipping
(
s
,
sce
);
}
start_ch
+=
chans
;
}
...
...
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