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
3a8bf529
Commit
3a8bf529
authored
18 years ago
by
Justin Ruggles
Browse files
Options
Downloads
Patches
Plain Diff
cosmetics. remove space before semi-colon.
Originally committed as revision 8301 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
dc13d0b5
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/ac3enc.c
+31
-31
31 additions, 31 deletions
libavcodec/ac3enc.c
with
31 additions
and
31 deletions
libavcodec/ac3enc.c
+
31
−
31
View file @
3a8bf529
...
...
@@ -86,7 +86,7 @@ static inline int16_t fix15(float a)
static
inline
int
calc_lowcomp1
(
int
a
,
int
b0
,
int
b1
)
{
if
((
b0
+
256
)
==
b1
)
{
a
=
384
;
a
=
384
;
}
else
if
(
b0
>
b1
)
{
a
=
a
-
64
;
if
(
a
<
0
)
a
=
0
;
...
...
@@ -98,14 +98,14 @@ static inline int calc_lowcomp(int a, int b0, int b1, int bin)
{
if
(
bin
<
7
)
{
if
((
b0
+
256
)
==
b1
)
{
a
=
384
;
a
=
384
;
}
else
if
(
b0
>
b1
)
{
a
=
a
-
64
;
if
(
a
<
0
)
a
=
0
;
}
}
else
if
(
bin
<
20
)
{
if
((
b0
+
256
)
==
b1
)
{
a
=
320
;
a
=
320
;
}
else
if
(
b0
>
b1
)
{
a
=
a
-
64
;
if
(
a
<
0
)
a
=
0
;
...
...
@@ -171,21 +171,21 @@ void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,
if
(
bndstrt
==
0
)
{
lowcomp
=
0
;
lowcomp
=
calc_lowcomp1
(
lowcomp
,
bndpsd
[
0
],
bndpsd
[
1
])
;
excite
[
0
]
=
bndpsd
[
0
]
-
fgain
-
lowcomp
;
lowcomp
=
calc_lowcomp1
(
lowcomp
,
bndpsd
[
1
],
bndpsd
[
2
])
;
excite
[
1
]
=
bndpsd
[
1
]
-
fgain
-
lowcomp
;
begin
=
7
;
lowcomp
=
calc_lowcomp1
(
lowcomp
,
bndpsd
[
0
],
bndpsd
[
1
]);
excite
[
0
]
=
bndpsd
[
0
]
-
fgain
-
lowcomp
;
lowcomp
=
calc_lowcomp1
(
lowcomp
,
bndpsd
[
1
],
bndpsd
[
2
]);
excite
[
1
]
=
bndpsd
[
1
]
-
fgain
-
lowcomp
;
begin
=
7
;
for
(
bin
=
2
;
bin
<
7
;
bin
++
)
{
if
(
!
(
is_lfe
&&
bin
==
6
))
lowcomp
=
calc_lowcomp1
(
lowcomp
,
bndpsd
[
bin
],
bndpsd
[
bin
+
1
])
;
fastleak
=
bndpsd
[
bin
]
-
fgain
;
slowleak
=
bndpsd
[
bin
]
-
s
->
sgain
;
excite
[
bin
]
=
fastleak
-
lowcomp
;
lowcomp
=
calc_lowcomp1
(
lowcomp
,
bndpsd
[
bin
],
bndpsd
[
bin
+
1
]);
fastleak
=
bndpsd
[
bin
]
-
fgain
;
slowleak
=
bndpsd
[
bin
]
-
s
->
sgain
;
excite
[
bin
]
=
fastleak
-
lowcomp
;
if
(
!
(
is_lfe
&&
bin
==
6
))
{
if
(
bndpsd
[
bin
]
<=
bndpsd
[
bin
+
1
])
{
begin
=
bin
+
1
;
break
;
begin
=
bin
+
1
;
break
;
}
}
}
...
...
@@ -195,13 +195,13 @@ void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,
for
(
bin
=
begin
;
bin
<
end1
;
bin
++
)
{
if
(
!
(
is_lfe
&&
bin
==
6
))
lowcomp
=
calc_lowcomp
(
lowcomp
,
bndpsd
[
bin
],
bndpsd
[
bin
+
1
],
bin
)
;
lowcomp
=
calc_lowcomp
(
lowcomp
,
bndpsd
[
bin
],
bndpsd
[
bin
+
1
],
bin
);
fastleak
-=
s
->
fdecay
;
fastleak
-=
s
->
fdecay
;
v
=
bndpsd
[
bin
]
-
fgain
;
if
(
fastleak
<
v
)
fastleak
=
v
;
slowleak
-=
s
->
sdecay
;
slowleak
-=
s
->
sdecay
;
v
=
bndpsd
[
bin
]
-
s
->
sgain
;
if
(
slowleak
<
v
)
slowleak
=
v
;
...
...
@@ -220,10 +220,10 @@ void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,
}
for
(
bin
=
begin
;
bin
<
bndend
;
bin
++
)
{
fastleak
-=
s
->
fdecay
;
fastleak
-=
s
->
fdecay
;
v
=
bndpsd
[
bin
]
-
fgain
;
if
(
fastleak
<
v
)
fastleak
=
v
;
slowleak
-=
s
->
sdecay
;
slowleak
-=
s
->
sdecay
;
v
=
bndpsd
[
bin
]
-
s
->
sgain
;
if
(
slowleak
<
v
)
slowleak
=
v
;
...
...
@@ -249,44 +249,44 @@ void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,
if
(
deltbae
==
0
||
deltbae
==
1
)
{
int
band
,
seg
,
delta
;
band
=
0
;
band
=
0
;
for
(
seg
=
0
;
seg
<
deltnseg
;
seg
++
)
{
band
+=
deltoffst
[
seg
]
;
band
+=
deltoffst
[
seg
];
if
(
deltba
[
seg
]
>=
4
)
{
delta
=
(
deltba
[
seg
]
-
3
)
<<
7
;
}
else
{
delta
=
(
deltba
[
seg
]
-
4
)
<<
7
;
}
for
(
k
=
0
;
k
<
deltlen
[
seg
];
k
++
)
{
mask
[
band
]
+=
delta
;
band
++
;
mask
[
band
]
+=
delta
;
band
++
;
}
}
}
/* compute bit allocation */
i
=
start
;
j
=
masktab
[
start
]
;
i
=
start
;
j
=
masktab
[
start
];
do
{
v
=
mask
[
j
];
v
-=
snroffset
;
v
-=
s
->
floor
;
v
-=
snroffset
;
v
-=
s
->
floor
;
if
(
v
<
0
)
v
=
0
;
v
&=
0x1fe0
;
v
+=
s
->
floor
;
v
&=
0x1fe0
;
v
+=
s
->
floor
;
end1
=
bndtab
[
j
]
+
bndsz
[
j
];
if
(
end1
>
end
)
end1
=
end
;
for
(
k
=
i
;
k
<
end1
;
k
++
)
{
address
=
(
psd
[
i
]
-
v
)
>>
5
;
address
=
(
psd
[
i
]
-
v
)
>>
5
;
if
(
address
<
0
)
address
=
0
;
else
if
(
address
>
63
)
address
=
63
;
bap
[
i
]
=
baptab
[
address
];
i
++
;
}
}
while
(
end
>
bndtab
[
j
++
])
;
}
while
(
end
>
bndtab
[
j
++
]);
}
typedef
struct
IComplex
{
...
...
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