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
7da4dc17
Commit
7da4dc17
authored
Dec 14, 2010
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics: line wrap and spacing
Originally committed as revision 26011 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
a0d763fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
ac3enc.c
libavcodec/ac3enc.c
+8
-7
No files found.
libavcodec/ac3enc.c
View file @
7da4dc17
...
...
@@ -975,16 +975,19 @@ static int compute_bit_allocation(AC3EncodeContext *s,
offset until we can pack everything in the requested frame size */
bits_left
=
8
*
s
->
frame_size
-
(
s
->
frame_bits
+
s
->
exponent_bits
);
snr_offset
=
s
->
coarse_snr_offset
<<
4
;
while
(
snr_offset
>=
0
&&
bit_alloc
(
s
,
mask
,
psd
,
bap
,
snr_offset
)
>
bits_left
)
bit_alloc
(
s
,
mask
,
psd
,
bap
,
snr_offset
)
>
bits_left
)
{
snr_offset
-=
64
;
}
if
(
snr_offset
<
0
)
{
return
AVERROR
(
EINVAL
);
}
while
(
snr_offset
+
64
<=
1023
&&
bit_alloc
(
s
,
mask
,
psd
,
bap1
,
snr_offset
+
64
)
<=
bits_left
)
{
bit_alloc
(
s
,
mask
,
psd
,
bap1
,
snr_offset
+
64
)
<=
bits_left
)
{
snr_offset
+=
64
;
memcpy
(
bap
,
bap1
,
sizeof
(
bap1
));
}
...
...
@@ -994,14 +997,12 @@ static int compute_bit_allocation(AC3EncodeContext *s,
memcpy
(
bap
,
bap1
,
sizeof
(
bap1
));
}
while
(
snr_offset
+
4
<=
1023
&&
bit_alloc
(
s
,
mask
,
psd
,
bap1
,
snr_offset
+
4
)
<=
bits_left
)
{
bit_alloc
(
s
,
mask
,
psd
,
bap1
,
snr_offset
+
4
)
<=
bits_left
)
{
snr_offset
+=
4
;
memcpy
(
bap
,
bap1
,
sizeof
(
bap1
));
}
while
(
snr_offset
+
1
<=
1023
&&
bit_alloc
(
s
,
mask
,
psd
,
bap1
,
snr_offset
+
1
)
<=
bits_left
)
{
bit_alloc
(
s
,
mask
,
psd
,
bap1
,
snr_offset
+
1
)
<=
bits_left
)
{
snr_offset
++
;
memcpy
(
bap
,
bap1
,
sizeof
(
bap1
));
}
...
...
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