32 int loop_count, uint32_t *
palette)
45 for (i = 0; i < 256; i++) {
46 const uint32_t
v = palette[i] & 0xffffff;
59 avio_write(pb,
"NETSCAPE2.0",
sizeof(
"NETSCAPE2.0") - 1);
88 "GIF muxer supports only a single video GIF stream.\n");
93 width = video_enc->
width;
94 height = video_enc->
height;
128 unsigned i, smallest_alpha = 0xff;
131 const uint32_t
v = palette[i];
132 if (v >> 24 < smallest_alpha) {
133 smallest_alpha = v >> 24;
134 transparent_color_index = i;
137 if (smallest_alpha < 128)
152 avio_w8(pb, transparent_color_index);
189 #define OFFSET(x) offsetof(GIFContext, x)
190 #define ENC AV_OPT_FLAG_ENCODING_PARAM
192 {
"loop",
"Number of times to loop the output.",
OFFSET(
loop),
194 {
"final_delay",
"Force delay (in ms) after the last frame",
OFFSET(last_delay),
209 .mime_type =
"image/gif",
217 .priv_class = &gif_muxer_class,