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