Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
ffmpeg
Commits
f21fb76b
Commit
f21fb76b
authored
Jun 21, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: remove a branch in asym_quant() by doing 2 shifts
parent
0e4dbe29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
libavcodec/ac3enc.c
libavcodec/ac3enc.c
+2
-8
No files found.
libavcodec/ac3enc.c
View file @
f21fb76b
...
...
@@ -1123,15 +1123,9 @@ static inline int sym_quant(int c, int e, int levels)
*/
static
inline
int
asym_quant
(
int
c
,
int
e
,
int
qbits
)
{
int
lshift
,
m
,
v
;
int
m
,
v
;
lshift
=
e
+
qbits
-
24
;
if
(
lshift
>=
0
)
v
=
c
<<
lshift
;
else
v
=
c
>>
(
-
lshift
);
/* rounding */
v
=
(
v
+
1
)
>>
1
;
v
=
(((
c
<<
e
)
>>
(
24
-
qbits
))
+
1
)
>>
1
;
m
=
(
1
<<
(
qbits
-
1
));
if
(
v
>=
m
)
v
=
m
-
1
;
...
...
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