Mercurial > libavcodec.hg
comparison gif.c @ 5089:bff60ecc02f9 libavcodec
Use AV_xx throughout libavcodec
author | ramiro |
---|---|
date | Sat, 02 Jun 2007 01:41:07 +0000 |
parents | f6f67a8bdd09 |
children | 448466ff832a |
comparison
equal
deleted
inserted
replaced
5088:8e206208db1f | 5089:bff60ecc02f9 |
---|---|
130 bit_buf |= value << (bit_cnt); | 130 bit_buf |= value << (bit_cnt); |
131 bit_cnt+=n; | 131 bit_cnt+=n; |
132 } else { | 132 } else { |
133 bit_buf |= value << (bit_cnt); | 133 bit_buf |= value << (bit_cnt); |
134 | 134 |
135 *s->buf_ptr = bit_buf & 0xff; | 135 bytestream_put_le32(&s->buf_ptr, bit_buf); |
136 s->buf_ptr[1] = (bit_buf >> 8) & 0xff; | |
137 s->buf_ptr[2] = (bit_buf >> 16) & 0xff; | |
138 s->buf_ptr[3] = (bit_buf >> 24) & 0xff; | |
139 | 136 |
140 //printf("bitbuf = %08x\n", bit_buf); | 137 //printf("bitbuf = %08x\n", bit_buf); |
141 s->buf_ptr+=4; | |
142 if (s->buf_ptr >= s->buf_end) | 138 if (s->buf_ptr >= s->buf_end) |
143 puts("bit buffer overflow !!"); // should never happen ! who got rid of the callback ??? | 139 puts("bit buffer overflow !!"); // should never happen ! who got rid of the callback ??? |
144 // flush_buffer_rev(s); | 140 // flush_buffer_rev(s); |
145 bit_cnt=bit_cnt + n - 32; | 141 bit_cnt=bit_cnt + n - 32; |
146 if (bit_cnt == 0) { | 142 if (bit_cnt == 0) { |
193 for(i=0;i<((256-216)*3);i++) | 189 for(i=0;i<((256-216)*3);i++) |
194 bytestream_put_byte(bytestream, 0); | 190 bytestream_put_byte(bytestream, 0); |
195 } else { | 191 } else { |
196 for(i=0;i<256;i++) { | 192 for(i=0;i<256;i++) { |
197 v = palette[i]; | 193 v = palette[i]; |
198 bytestream_put_byte(bytestream, (v >> 16) & 0xff); | 194 bytestream_put_be24(bytestream, v); |
199 bytestream_put_byte(bytestream, (v >> 8) & 0xff); | |
200 bytestream_put_byte(bytestream, (v) & 0xff); | |
201 } | 195 } |
202 } | 196 } |
203 | 197 |
204 /* update: this is the 'NETSCAPE EXTENSION' that allows for looped animated gif | 198 /* update: this is the 'NETSCAPE EXTENSION' that allows for looped animated gif |
205 see http://members.aol.com/royalef/gifabout.htm#net-extension | 199 see http://members.aol.com/royalef/gifabout.htm#net-extension |