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
e8c7f81c
Commit
e8c7f81c
authored
15 years ago
by
Sascha Sommer
Browse files
Options
Downloads
Patches
Plain Diff
cosmetics: Add brackets between if/else
Originally committed as revision 19170 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
523c09ca
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/wma.c
+30
-23
30 additions, 23 deletions
libavcodec/wma.c
with
30 additions
and
23 deletions
libavcodec/wma.c
+
30
−
23
View file @
e8c7f81c
...
...
@@ -75,12 +75,12 @@ int av_cold ff_wma_get_frame_len_bits(int sample_rate, int version,
int
frame_len_bits
;
if
(
sample_rate
<=
16000
)
if
(
sample_rate
<=
16000
)
{
frame_len_bits
=
9
;
else
if
(
sample_rate
<=
22050
||
(
sample_rate
<=
32000
&&
version
==
1
))
}
else
if
(
sample_rate
<=
22050
||
(
sample_rate
<=
32000
&&
version
==
1
))
{
frame_len_bits
=
10
;
else
if
(
sample_rate
<=
48000
)
{
}
else
if
(
sample_rate
<=
48000
)
{
frame_len_bits
=
11
;
}
else
if
(
sample_rate
<=
96000
)
{
frame_len_bits
=
12
;
...
...
@@ -153,16 +153,17 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
/* if version 2, then the rates are normalized */
sample_rate1
=
s
->
sample_rate
;
if
(
s
->
version
==
2
)
{
if
(
sample_rate1
>=
44100
)
if
(
sample_rate1
>=
44100
)
{
sample_rate1
=
44100
;
else
if
(
sample_rate1
>=
22050
)
}
else
if
(
sample_rate1
>=
22050
)
{
sample_rate1
=
22050
;
else
if
(
sample_rate1
>=
16000
)
}
else
if
(
sample_rate1
>=
16000
)
{
sample_rate1
=
16000
;
else
if
(
sample_rate1
>=
11025
)
}
else
if
(
sample_rate1
>=
11025
)
{
sample_rate1
=
11025
;
else
if
(
sample_rate1
>=
8000
)
}
else
if
(
sample_rate1
>=
8000
)
{
sample_rate1
=
8000
;
}
}
bps
=
(
float
)
s
->
bit_rate
/
(
float
)(
s
->
nb_channels
*
s
->
sample_rate
);
...
...
@@ -174,22 +175,25 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
if
(
s
->
nb_channels
==
2
)
bps1
=
bps
*
1
.
6
;
if
(
sample_rate1
==
44100
)
{
if
(
bps1
>=
0
.
61
)
if
(
bps1
>=
0
.
61
)
{
s
->
use_noise_coding
=
0
;
else
}
else
{
high_freq
=
high_freq
*
0
.
4
;
}
}
else
if
(
sample_rate1
==
22050
)
{
if
(
bps1
>=
1
.
16
)
if
(
bps1
>=
1
.
16
)
{
s
->
use_noise_coding
=
0
;
else
if
(
bps1
>=
0
.
72
)
}
else
if
(
bps1
>=
0
.
72
)
{
high_freq
=
high_freq
*
0
.
7
;
else
}
else
{
high_freq
=
high_freq
*
0
.
6
;
}
}
else
if
(
sample_rate1
==
16000
)
{
if
(
bps
>
0
.
5
)
if
(
bps
>
0
.
5
)
{
high_freq
=
high_freq
*
0
.
5
;
else
}
else
{
high_freq
=
high_freq
*
0
.
3
;
}
}
else
if
(
sample_rate1
==
11025
)
{
high_freq
=
high_freq
*
0
.
7
;
}
else
if
(
sample_rate1
==
8000
)
{
...
...
@@ -252,12 +256,13 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
table
=
NULL
;
a
=
s
->
frame_len_bits
-
BLOCK_MIN_BITS
-
k
;
if
(
a
<
3
)
{
if
(
s
->
sample_rate
>=
44100
)
if
(
s
->
sample_rate
>=
44100
)
{
table
=
exponent_band_44100
[
a
];
else
if
(
s
->
sample_rate
>=
32000
)
}
else
if
(
s
->
sample_rate
>=
32000
)
{
table
=
exponent_band_32000
[
a
];
else
if
(
s
->
sample_rate
>=
22050
)
}
else
if
(
s
->
sample_rate
>=
22050
)
{
table
=
exponent_band_22050
[
a
];
}
}
if
(
table
)
{
n
=
*
table
++
;
...
...
@@ -345,10 +350,11 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
if
(
s
->
use_noise_coding
)
{
/* init the noise generator */
if
(
s
->
use_exp_vlc
)
if
(
s
->
use_exp_vlc
)
{
s
->
noise_mult
=
0
.
02
;
else
}
else
{
s
->
noise_mult
=
0
.
04
;
}
#ifdef TRACE
for
(
i
=
0
;
i
<
NOISE_TAB_SIZE
;
i
++
)
...
...
@@ -370,10 +376,11 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
/* choose the VLC tables for the coefficients */
coef_vlc_table
=
2
;
if
(
s
->
sample_rate
>=
32000
)
{
if
(
bps1
<
0
.
72
)
if
(
bps1
<
0
.
72
)
{
coef_vlc_table
=
0
;
else
if
(
bps1
<
1
.
16
)
}
else
if
(
bps1
<
1
.
16
)
{
coef_vlc_table
=
1
;
}
}
s
->
coef_vlcs
[
0
]
=
&
coef_vlcs
[
coef_vlc_table
*
2
];
s
->
coef_vlcs
[
1
]
=
&
coef_vlcs
[
coef_vlc_table
*
2
+
1
];
...
...
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