Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
1d94a662
Commit
1d94a662
authored
18 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
simplify
Originally committed as revision 5786 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
cfc4bd46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavformat/crc.c
+1
-1
1 addition, 1 deletion
libavformat/crc.c
libavutil/adler32.c
+3
-8
3 additions, 8 deletions
libavutil/adler32.c
with
4 additions
and
9 deletions
libavformat/crc.c
+
1
−
1
View file @
1d94a662
...
...
@@ -29,7 +29,7 @@ static int crc_write_header(struct AVFormatContext *s)
CRCState
*
crc
=
s
->
priv_data
;
/* init CRC */
crc
->
crcval
=
av_adler32_update
(
0
,
NULL
,
0
)
;
crc
->
crcval
=
1
;
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
libavutil/adler32.c
+
3
−
8
View file @
1d94a662
...
...
@@ -11,21 +11,16 @@
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
#define DO1(buf) {s1 += *buf++; s2 += s1;}
#define DO2(buf) DO1(buf); DO1(buf);
#define DO4(buf) DO2(buf); DO2(buf);
#define DO8(buf) DO4(buf); DO4(buf);
#define DO16(buf) DO8(buf); DO8(buf);
#define DO4(buf) DO1(buf); DO1(buf); DO1(buf); DO1(buf);
#define DO16(buf) DO4(buf); DO4(buf); DO4(buf); DO4(buf);
unsigned
long
av_adler32_update
(
unsigned
long
adler
,
const
uint8_t
*
buf
,
unsigned
int
len
)
{
unsigned
long
s1
=
adler
&
0xffff
;
unsigned
long
s2
=
(
adler
>>
16
)
&
0xffff
;
int
k
;
if
(
buf
==
NULL
)
return
1L
;
while
(
len
>
0
)
{
k
=
FFMIN
(
len
,
NMAX
);
int
k
=
FFMIN
(
len
,
NMAX
);
len
-=
k
;
#ifndef CONFIG_SMALL
while
(
k
>=
16
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment