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
3f5d6a66
Commit
3f5d6a66
authored
Nov 13, 2011
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
binkvideo: simplify and remove invalid shifts
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
2625b621
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
bink.c
libavcodec/bink.c
+4
-5
No files found.
libavcodec/bink.c
View file @
3f5d6a66
...
...
@@ -595,7 +595,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
{
int
coef_list
[
128
];
int
mode_list
[
128
];
int
i
,
t
,
mask
,
bits
,
ccoef
,
mode
,
sign
;
int
i
,
t
,
bits
,
ccoef
,
mode
,
sign
;
int
list_start
=
64
,
list_end
=
64
,
list_pos
;
int
coef_count
=
0
;
int
coef_idx
[
64
];
...
...
@@ -609,8 +609,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
coef_list
[
list_end
]
=
2
;
mode_list
[
list_end
++
]
=
3
;
coef_list
[
list_end
]
=
3
;
mode_list
[
list_end
++
]
=
3
;
bits
=
get_bits
(
gb
,
4
)
-
1
;
for
(
mask
=
1
<<
bits
;
bits
>=
0
;
mask
>>=
1
,
bits
--
)
{
for
(
bits
=
get_bits
(
gb
,
4
)
-
1
;
bits
>=
0
;
bits
--
)
{
list_pos
=
list_start
;
while
(
list_pos
<
list_end
)
{
if
(
!
(
mode_list
[
list_pos
]
|
coef_list
[
list_pos
])
||
!
get_bits1
(
gb
))
{
...
...
@@ -636,7 +635,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
if
(
!
bits
)
{
t
=
1
-
(
get_bits1
(
gb
)
<<
1
);
}
else
{
t
=
get_bits
(
gb
,
bits
)
|
mask
;
t
=
get_bits
(
gb
,
bits
)
|
1
<<
bits
;
sign
=
-
get_bits1
(
gb
);
t
=
(
t
^
sign
)
-
sign
;
}
...
...
@@ -657,7 +656,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
if
(
!
bits
)
{
t
=
1
-
(
get_bits1
(
gb
)
<<
1
);
}
else
{
t
=
get_bits
(
gb
,
bits
)
|
mask
;
t
=
get_bits
(
gb
,
bits
)
|
1
<<
bits
;
sign
=
-
get_bits1
(
gb
);
t
=
(
t
^
sign
)
-
sign
;
}
...
...
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