43 bytestream2_put_be32u(&s->
p, avctx->
width);
44 bytestream2_put_be32u(&s->
p, avctx->
height);
45 bytestream2_put_be32u(&s->
p, s->
depth);
46 bytestream2_put_be32u(&s->
p, s->
length);
47 bytestream2_put_be32u(&s->
p, s->
type);
48 bytestream2_put_be32u(&s->
p, s->
maptype);
54 const uint32_t *palette_data,
70 for (x = 0; x <
len; x++) {
71 uint32_t
pixel = palette_data[x];
73 bytestream2_put_byteu(&pb_r, (pixel >> 16) & 0xFF);
74 bytestream2_put_byteu(&pb_g, (pixel >> 8) & 0xFF);
75 bytestream2_put_byteu(&s->
p, pixel & 0xFF);
80 alen = len + (len & 1);
86 const uint8_t *start = linesize < 0 ? pixels + (avctx->
height - 1) * linesize
88 const uint8_t *end = linesize < 0 ? pixels - linesize
89 : pixels + avctx->
height * linesize;
93 #define GET_VALUE ptr >= end || ptr < start ? 0 : x >= len ? ptr[len-1] : ptr[x]
97 while (ptr < end && ptr >= start) {
107 while (value2 == value && run < 256 && ptr < end && ptr >= start) {
119 bytestream2_put_byteu(&s->
p, run - 1);
121 bytestream2_put_byteu(&s->
p, value);
122 }
else if (run == 1) {
123 bytestream2_put_byteu(&s->
p, value);
125 bytestream2_put_be16u(&s->
p, (value << 8) | value);
132 for (y = 0; y < avctx->
height; y++) {
135 bytestream2_put_byteu(&s->
p, 0);
187 const AVFrame *frame,
int *got_packet_ptr)
198 (
const uint32_t *)frame->
data[1],