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
adf6640c
Commit
adf6640c
authored
Apr 09, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 8699 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
6207bb20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
lzwenc.c
libavcodec/lzwenc.c
+3
-4
No files found.
libavcodec/lzwenc.c
View file @
adf6640c
...
...
@@ -232,13 +232,12 @@ int ff_lzw_encode(LZWEncodeState * s, const uint8_t * inbuf, int insize)
for
(
i
=
0
;
i
<
insize
;
i
++
)
{
uint8_t
c
=
*
inbuf
++
;
int
code
=
findCode
(
s
,
c
,
code_prefix
);
if
(
s
->
tab
[
code
].
hash_prefix
!=
LZW_PREFIX_FREE
)
{
code_prefix
=
s
->
tab
[
code
].
code
;
}
else
{
if
(
s
->
tab
[
code
].
hash_prefix
==
LZW_PREFIX_FREE
)
{
writeCode
(
s
,
code_prefix
);
addCode
(
s
,
c
,
code_prefix
,
code
);
code
_prefix
=
s
->
tab
[
hash
(
0
,
c
)].
code
;
code
=
hash
(
0
,
c
)
;
}
code_prefix
=
s
->
tab
[
code
].
code
;
if
(
s
->
tabsize
>=
s
->
maxcode
-
1
)
{
clearTable
(
s
);
}
...
...
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