• Home
  • Raw
  • Download

Lines Matching refs:pbc

51 static int sgi_rle_encode(PutByteContext *pbc, const uint8_t *src,  in sgi_rle_encode()  argument
54 int val, count, x, start = bytestream2_tell_p(pbc); in sgi_rle_encode()
66 if (bytestream2_get_bytes_left_p(pbc) < bpp * 2) in sgi_rle_encode()
70 bytestream2_put(pbc, count); in sgi_rle_encode()
71 bytestream2_put(pbc, val); in sgi_rle_encode()
76 if (bytestream2_get_bytes_left_p(pbc) < bpp * (count + 1)) in sgi_rle_encode()
79 bytestream2_put(pbc, count + 0x80); in sgi_rle_encode()
82 bytestream2_put(pbc, val); in sgi_rle_encode()
89 return bytestream2_tell_p(pbc) - start; in sgi_rle_encode()
97 PutByteContext pbc; in encode_frame() local
174 bytestream2_init_writer(&pbc, pkt->data, pkt->size); in encode_frame()
177 bytestream2_put_be16(&pbc, SGI_MAGIC); in encode_frame()
178 bytestream2_put_byte(&pbc, s->rle); /* RLE 1 - VERBATIM 0 */ in encode_frame()
179 bytestream2_put_byte(&pbc, bytes_per_channel); in encode_frame()
180 bytestream2_put_be16(&pbc, dimension); in encode_frame()
181 bytestream2_put_be16(&pbc, width); in encode_frame()
182 bytestream2_put_be16(&pbc, height); in encode_frame()
183 bytestream2_put_be16(&pbc, depth); in encode_frame()
185 bytestream2_put_be32(&pbc, 0L); /* pixmin */ in encode_frame()
186 bytestream2_put_be32(&pbc, pixmax); in encode_frame()
187 bytestream2_put_be32(&pbc, 0L); /* dummy */ in encode_frame()
191 bytestream2_put_byte(&pbc, 0L); in encode_frame()
194 bytestream2_put_be32(&pbc, 0L); in encode_frame()
198 bytestream2_put_byte(&pbc, 0L); in encode_frame()
204 bytestream2_init_writer(&taboff_pcb, pbc.buffer, tablesize); in encode_frame()
205 bytestream2_skip_p(&pbc, tablesize); in encode_frame()
208 bytestream2_init_writer(&tablen_pcb, pbc.buffer, tablesize); in encode_frame()
209 bytestream2_skip_p(&pbc, tablesize); in encode_frame()
219 bytestream2_put_be32(&taboff_pcb, bytestream2_tell_p(&pbc)); in encode_frame()
232 length = sgi_rle_encode(&pbc, encode_buf, width, in encode_frame()
252 bytestream2_put_byte(&pbc, in_buf[x]); in encode_frame()
255 bytestream2_put_be16(&pbc, ((uint16_t *)in_buf)[x]); in encode_frame()
257 bytestream2_put_le16(&pbc, ((uint16_t *)in_buf)[x]); in encode_frame()
265 pkt->size = bytestream2_tell_p(&pbc); in encode_frame()