comparison gif.c @ 10627:3c7adb462b65 libavcodec

remove useless params
author bcoudurier
date Wed, 02 Dec 2009 21:04:23 +0000
parents 099e9b33c1b9
children 3d43d9bcf903
comparison
equal deleted inserted replaced
10626:099e9b33c1b9 10627:3c7adb462b65
82 82
83 return 0; 83 return 0;
84 } 84 }
85 85
86 static int gif_image_write_image(uint8_t **bytestream, 86 static int gif_image_write_image(uint8_t **bytestream,
87 int x1, int y1, int width, int height, 87 int width, int height,
88 const uint8_t *buf, int linesize, int pix_fmt) 88 const uint8_t *buf, int linesize, int pix_fmt)
89 { 89 {
90 PutBitContext p; 90 PutBitContext p;
91 uint8_t buffer[200]; /* 100 * 9 / 8 = 113 */ 91 uint8_t buffer[200]; /* 100 * 9 / 8 = 113 */
92 int i, left, w; 92 int i, left, w;
93 const uint8_t *ptr; 93 const uint8_t *ptr;
94 /* image block */ 94 /* image block */
95 95
96 bytestream_put_byte(bytestream, 0x2c); 96 bytestream_put_byte(bytestream, 0x2c);
97 bytestream_put_le16(bytestream, x1); 97 bytestream_put_le16(bytestream, 0);
98 bytestream_put_le16(bytestream, y1); 98 bytestream_put_le16(bytestream, 0);
99 bytestream_put_le16(bytestream, width); 99 bytestream_put_le16(bytestream, width);
100 bytestream_put_le16(bytestream, height); 100 bytestream_put_le16(bytestream, height);
101 bytestream_put_byte(bytestream, 0x00); /* flags */ 101 bytestream_put_byte(bytestream, 0x00); /* flags */
102 /* no local clut */ 102 /* no local clut */
103 103
160 160
161 *p = *pict; 161 *p = *pict;
162 p->pict_type = FF_I_TYPE; 162 p->pict_type = FF_I_TYPE;
163 p->key_frame = 1; 163 p->key_frame = 1;
164 gif_image_write_header(&outbuf_ptr, avctx->width, avctx->height, (uint32_t *)pict->data[1]); 164 gif_image_write_header(&outbuf_ptr, avctx->width, avctx->height, (uint32_t *)pict->data[1]);
165 gif_image_write_image(&outbuf_ptr, 0, 0, avctx->width, avctx->height, pict->data[0], pict->linesize[0], PIX_FMT_PAL8); 165 gif_image_write_image(&outbuf_ptr, avctx->width, avctx->height, pict->data[0], pict->linesize[0], PIX_FMT_PAL8);
166 return outbuf_ptr - outbuf; 166 return outbuf_ptr - outbuf;
167 } 167 }
168 168
169 AVCodec gif_encoder = { 169 AVCodec gif_encoder = {
170 "gif", 170 "gif",