35 #define PADDING_COLOR 0
57 int linesize,
int w,
int h)
61 for (y = 0; y < h; y++) {
69 color = bitmap[x1++] & 3;
70 while (x1 < w && (bitmap[x1] & 3) == color)
85 len =
FFMIN(len, 255);
103 static const int tc_divs[3] = { 1000, 60, 60 };
105 for (i=0; i<3; i++) {
106 tc[i] = ms % tc_divs[i];
116 uint64_t startTime = h->
pts / 1000;
118 int start_tc[4], end_tc[4];
125 if (bufsize < 27 + 7*2 + 4*3) {
146 av_log(avctx,
AV_LOG_WARNING,
"Color index 0 is not transparent. Transparency will be messed up.\n");
154 "[%02d:%02d:%02d.%03d-%02d:%02d:%02d.%03d]",
155 start_tc[3], start_tc[2], start_tc[1], start_tc[0],
156 end_tc[3], end_tc[2], end_tc[1], end_tc[0]);
165 bytestream_put_le16(&hdr, width);
166 bytestream_put_le16(&hdr, height);
167 bytestream_put_le16(&hdr, h->
rects[0]->
x);
168 bytestream_put_le16(&hdr, h->
rects[0]->
y);
169 bytestream_put_le16(&hdr, h->
rects[0]->
x + width -1);
170 bytestream_put_le16(&hdr, h->
rects[0]->
y + height -1);
177 bytestream_put_be24(&hdr, ((uint32_t *)h->
rects[0]->
pict.
data[1])[i]);