44 #define BITSTREAM_WRITER_LE
59 unsigned int v, smallest_alpha = 0xFF, alpha_component = 0;
63 bytestream_put_le16(bytestream, avctx->
width);
64 bytestream_put_le16(bytestream, avctx->
height);
66 bytestream_put_byte(bytestream, 0xf7);
67 bytestream_put_byte(bytestream, 0x1f);
68 bytestream_put_byte(bytestream, 0);
73 bytestream_put_be24(bytestream, v);
74 if (v >> 24 < smallest_alpha) {
75 smallest_alpha = v >> 24;
80 if (smallest_alpha < 128) {
81 bytestream_put_byte(bytestream, 0x21);
82 bytestream_put_byte(bytestream, 0xf9);
83 bytestream_put_byte(bytestream, 0x04);
84 bytestream_put_byte(bytestream, 0x01);
85 bytestream_put_le16(bytestream, 0x00);
86 bytestream_put_byte(bytestream, alpha_component);
87 bytestream_put_byte(bytestream, 0x00);
95 const uint8_t *buf,
int linesize)
102 bytestream_put_byte(bytestream, 0x2c);
103 bytestream_put_le16(bytestream, 0);
104 bytestream_put_le16(bytestream, 0);
105 bytestream_put_le16(bytestream, avctx->
width);
106 bytestream_put_le16(bytestream, avctx->
height);
107 bytestream_put_byte(bytestream, 0x00);
110 bytestream_put_byte(bytestream, 0x08);
125 bytestream_put_byte(bytestream, size);
126 if (end - *bytestream < size)
132 bytestream_put_byte(bytestream, 0x00);
133 bytestream_put_byte(bytestream, 0x3b);
141 if (avctx->
width > 65535 || avctx->
height > 65535) {
158 const AVFrame *pict,
int *got_packet)
167 outbuf_ptr = pkt->
data;