51 #define BITSTREAM_WRITER_LE
66 unsigned int v, smallest_alpha = 0xFF, alpha_component = 0;
70 bytestream_put_le16(bytestream, avctx->
width);
71 bytestream_put_le16(bytestream, avctx->
height);
73 bytestream_put_byte(bytestream, 0xf7);
74 bytestream_put_byte(bytestream, 0x1f);
75 bytestream_put_byte(bytestream, 0);
80 bytestream_put_be24(bytestream, v);
81 if (v >> 24 < smallest_alpha) {
82 smallest_alpha = v >> 24;
87 if (smallest_alpha < 128) {
88 bytestream_put_byte(bytestream, 0x21);
89 bytestream_put_byte(bytestream, 0xf9);
90 bytestream_put_byte(bytestream, 0x04);
91 bytestream_put_byte(bytestream, 0x01);
92 bytestream_put_le16(bytestream, 0x00);
93 bytestream_put_byte(bytestream, alpha_component);
94 bytestream_put_byte(bytestream, 0x00);
102 const uint8_t *buf,
int linesize)
109 bytestream_put_byte(bytestream, 0x2c);
110 bytestream_put_le16(bytestream, 0);
111 bytestream_put_le16(bytestream, 0);
112 bytestream_put_le16(bytestream, avctx->
width);
113 bytestream_put_le16(bytestream, avctx->
height);
114 bytestream_put_byte(bytestream, 0x00);
117 bytestream_put_byte(bytestream, 0x08);
132 bytestream_put_byte(bytestream, size);
133 if (end - *bytestream < size)
139 bytestream_put_byte(bytestream, 0x00);
140 bytestream_put_byte(bytestream, 0x3b);
148 if (avctx->
width > 65535 || avctx->
height > 65535) {
165 const AVFrame *pict,
int *got_packet)
174 outbuf_ptr = pkt->
data;