Lines Matching defs:buf
64 int GIFReadGraphicsExtension(const GifByteType* const buf, int* const duration,
67 const int flags = buf[1];
69 const int duration_raw = buf[2] | (buf[3] << 8); // In 10 ms units.
70 if (buf[0] != 4) return 0;
86 (flags & GIF_TRANSPARENT_MASK) ? buf[4] : GIF_INDEX_INVALID;
175 int GIFReadLoopCount(GifFileType* const gif, GifByteType** const buf,
177 assert(!memcmp(*buf + 1, "NETSCAPE2.0", 11) ||
178 !memcmp(*buf + 1, "ANIMEXTS1.0", 11));
179 if (DGifGetExtensionNext(gif, buf) == GIF_ERROR) {
182 if (*buf == NULL) {
185 if ((*buf)[0] < 3 || (*buf)[1] != 1) {
188 *loop_count = (*buf)[2] | ((*buf)[3] << 8);
192 int GIFReadMetadata(GifFileType* const gif, GifByteType** const buf,
194 const int is_xmp = !memcmp(*buf + 1, "XMP DataXMP", 11);
195 const int is_icc = !memcmp(*buf + 1, "ICCRGBG1012", 11);
208 if (DGifGetExtensionNext(gif, buf) == GIF_ERROR) {
211 if (*buf == NULL) break; // Finished.
212 subblock.size = is_xmp ? (*buf)[0] + 1 : (*buf)[0];
214 subblock.bytes = is_xmp ? *buf : *buf + 1;
357 int GIFReadLoopCount(struct GifFileType* const gif, GifByteType** const buf,
360 (void)buf;
366 int GIFReadMetadata(struct GifFileType* const gif, GifByteType** const buf,
369 (void)buf;