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
85ab2904
Commit
85ab2904
authored
Mar 22, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: make sym_quant() branch-free
parent
45ed8225
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
11 deletions
+1
-11
ac3enc.c
libavcodec/ac3enc.c
+1
-11
No files found.
libavcodec/ac3enc.c
View file @
85ab2904
...
...
@@ -1096,17 +1096,7 @@ static int compute_bit_allocation(AC3EncodeContext *s)
*/
static
inline
int
sym_quant
(
int
c
,
int
e
,
int
levels
)
{
int
v
;
if
(
c
>=
0
)
{
v
=
(
levels
*
(
c
<<
e
))
>>
24
;
v
=
(
v
+
1
)
>>
1
;
v
=
(
levels
>>
1
)
+
v
;
}
else
{
v
=
(
levels
*
((
-
c
)
<<
e
))
>>
24
;
v
=
(
v
+
1
)
>>
1
;
v
=
(
levels
>>
1
)
-
v
;
}
int
v
=
((((
levels
*
c
)
>>
(
24
-
e
))
+
1
)
>>
1
)
+
(
levels
>>
1
);
av_assert2
(
v
>=
0
&&
v
<
levels
);
return
v
;
}
...
...
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