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
f5ede48f
Commit
f5ede48f
authored
Apr 19, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/gif: miscellaneous cosmetics.
parent
7004cad3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
gif.c
libavcodec/gif.c
+6
-10
No files found.
libavcodec/gif.c
View file @
f5ede48f
...
...
@@ -34,11 +34,9 @@
#include "bytestream.h"
#include "internal.h"
#include "lzw.h"
#include "gif.h"
/* The GIF format uses reversed order for bitstreams... */
/* at least they don't use PDP_ENDIAN :) */
#define BITSTREAM_WRITER_LE
#include "put_bits.h"
typedef
struct
{
...
...
@@ -137,7 +135,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
}
/* image block */
bytestream_put_byte
(
bytestream
,
0x2c
);
bytestream_put_byte
(
bytestream
,
GIF_IMAGE_SEPARATOR
);
bytestream_put_le16
(
bytestream
,
x_start
);
bytestream_put_le16
(
bytestream
,
y_start
);
bytestream_put_le16
(
bytestream
,
width
);
...
...
@@ -189,11 +187,10 @@ static int gif_image_write_image(AVCodecContext *avctx,
ref
+=
ref_linesize
;
}
}
else
{
/* TODO: reindent */
for
(
y
=
0
;
y
<
height
;
y
++
)
{
len
+=
ff_lzw_encode
(
s
->
lzw
,
ptr
,
width
);
ptr
+=
linesize
;
}
for
(
y
=
0
;
y
<
height
;
y
++
)
{
len
+=
ff_lzw_encode
(
s
->
lzw
,
ptr
,
width
);
ptr
+=
linesize
;
}
}
len
+=
ff_lzw_encode_flush
(
s
->
lzw
,
flush_put_bits
);
...
...
@@ -233,7 +230,6 @@ static av_cold int gif_encode_init(AVCodecContext *avctx)
return
0
;
}
/* better than nothing gif encoder */
static
int
gif_encode_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
const
AVFrame
*
pict
,
int
*
got_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