Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
84082497
Commit
84082497
authored
Aug 09, 2002
by
Zdenek Kabelac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* using statics
Originally committed as revision 850 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
3625e88a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
30 deletions
+8
-30
gif.c
libav/gif.c
+8
-30
No files found.
libav/gif.c
View file @
84082497
...
...
@@ -58,7 +58,7 @@ typedef struct {
* echo -n "{ 0x$r, 0x$g, 0x$b }, "; done; echo ""; done; done
*/
const
rgb_triplet
gif_clut
[
216
]
=
{
static
const
rgb_triplet
gif_clut
[
216
]
=
{
{
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x33
},
{
0x00
,
0x00
,
0x66
},
{
0x00
,
0x00
,
0x99
},
{
0x00
,
0x00
,
0xcc
},
{
0x00
,
0x00
,
0xff
},
{
0x00
,
0x33
,
0x00
},
{
0x00
,
0x33
,
0x33
},
{
0x00
,
0x33
,
0x66
},
{
0x00
,
0x33
,
0x99
},
{
0x00
,
0x33
,
0xcc
},
{
0x00
,
0x33
,
0xff
},
{
0x00
,
0x66
,
0x00
},
{
0x00
,
0x66
,
0x33
},
{
0x00
,
0x66
,
0x66
},
{
0x00
,
0x66
,
0x99
},
{
0x00
,
0x66
,
0xcc
},
{
0x00
,
0x66
,
0xff
},
...
...
@@ -106,15 +106,7 @@ const rgb_triplet gif_clut[216] = {
# error no ALT_BITSTREAM_WRITER support for now
#endif
void
init_put_bits_rev
(
PutBitContext
*
s
,
UINT8
*
buffer
,
int
buffer_size
,
void
*
opaque
,
void
(
*
write_data
)(
void
*
,
UINT8
*
,
int
))
{
init_put_bits
(
s
,
buffer
,
buffer_size
,
opaque
,
write_data
);
}
void
put_bits_rev
(
PutBitContext
*
s
,
int
n
,
unsigned
int
value
)
static
void
gif_put_bits_rev
(
PutBitContext
*
s
,
int
n
,
unsigned
int
value
)
{
unsigned
int
bit_buf
;
int
bit_cnt
;
...
...
@@ -158,19 +150,8 @@ void put_bits_rev(PutBitContext *s, int n, unsigned int value)
s
->
bit_left
=
32
-
bit_cnt
;
}
/* return the number of bits output */
INT64
get_bit_count_rev
(
PutBitContext
*
s
)
{
return
get_bit_count
(
s
);
}
void
align_put_bits_rev
(
PutBitContext
*
s
)
{
align_put_bits
(
s
);
}
/* pad the end of the output stream with zeros */
void
flush_put_bits_rev
(
PutBitContext
*
s
)
static
void
gif_
flush_put_bits_rev
(
PutBitContext
*
s
)
{
while
(
s
->
bit_left
<
32
)
{
/* XXX: should test end of buffer */
...
...
@@ -318,10 +299,7 @@ static int gif_write_video(AVFormatContext *s,
left
=
size
/
3
;
/* XXX:deprecated */
/*init_put_bits_rev(&p, buffer, sizeof(buf), (void *)pb, gif_put_chunk); *//* mmm found a but in my code: s/sizeof(buf)/150/ */
init_put_bits_rev
(
&
p
,
buffer
,
130
,
NULL
,
NULL
);
init_put_bits
(
&
p
,
buffer
,
130
,
NULL
,
NULL
);
/*
* the thing here is the bitstream is written as little packets, with a size byte before
...
...
@@ -330,16 +308,16 @@ static int gif_write_video(AVFormatContext *s,
while
(
left
>
0
)
{
put_bits_rev
(
&
p
,
9
,
0x0100
);
/* clear code */
gif_
put_bits_rev
(
&
p
,
9
,
0x0100
);
/* clear code */
for
(
i
=
0
;
i
<
GIF_CHUNKS
;
i
++
)
{
put_bits_rev
(
&
p
,
9
,
gif_clut_index
(
NULL
,
*
buf
,
buf
[
1
],
buf
[
2
]));
gif_
put_bits_rev
(
&
p
,
9
,
gif_clut_index
(
NULL
,
*
buf
,
buf
[
1
],
buf
[
2
]));
buf
+=
3
;
}
if
(
left
<=
GIF_CHUNKS
)
{
put_bits_rev
(
&
p
,
9
,
0x101
);
/* end of stream */
flush_put_bits_rev
(
&
p
);
gif_
put_bits_rev
(
&
p
,
9
,
0x101
);
/* end of stream */
gif_
flush_put_bits_rev
(
&
p
);
}
if
(
pbBufPtr
(
&
p
)
-
p
.
buf
>
0
)
{
put_byte
(
pb
,
pbBufPtr
(
&
p
)
-
p
.
buf
);
/* byte count of the packet */
...
...
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