42 bytestream2_put_be32u(&s->
p, avctx->
width);
43 bytestream2_put_be32u(&s->
p, avctx->
height);
44 bytestream2_put_be32u(&s->
p, s->
depth);
45 bytestream2_put_be32u(&s->
p, s->
length);
46 bytestream2_put_be32u(&s->
p, s->
type);
47 bytestream2_put_be32u(&s->
p, s->
maptype);
53 const uint32_t *palette_data,
69 for (x = 0; x <
len; x++) {
70 uint32_t
pixel = palette_data[x];
72 bytestream2_put_byteu(&pb_r, (pixel >> 16) & 0xFF);
73 bytestream2_put_byteu(&pb_g, (pixel >> 8) & 0xFF);
74 bytestream2_put_byteu(&s->
p, pixel & 0xFF);
79 alen = len + (len & 1);
85 const uint8_t *start = linesize < 0 ? pixels + (avctx->
height - 1) * linesize
87 const uint8_t *end = linesize < 0 ? pixels - linesize
88 : pixels + avctx->
height * linesize;
92 #define GET_VALUE ptr >= end || ptr < start ? 0 : x >= len ? ptr[len-1] : ptr[x]
96 while (ptr < end && ptr >= start) {
106 while (value2 == value && run < 256 && ptr < end && ptr >= start) {
118 bytestream2_put_byteu(&s->
p, run - 1);
120 bytestream2_put_byteu(&s->
p, value);
121 }
else if (run == 1) {
122 bytestream2_put_byteu(&s->
p, value);
124 bytestream2_put_be16u(&s->
p, (value << 8) | value);
131 for (y = 0; y < avctx->
height; y++) {
134 bytestream2_put_byteu(&s->
p, 0);
189 const AVFrame *frame,
int *got_packet_ptr)
200 (
const uint32_t *)frame->
data[1],