Lines Matching refs:rects
131 // TODO: support multiple rects
133 av_log(avctx, AV_LOG_WARNING, "Only single rects supported (%d in subtitle.)\n", h->num_rects);
136 if (!h->rects[0]->pict.data[0] || !h->rects[0]->pict.data[1]) {
142 if (h->rects[0]->nb_colors > 4)
143 av_log(avctx, AV_LOG_WARNING, "No more than 4 subtitle colors supported (%d found.)\n", h->rects[0]->nb_colors);
146 if (((uint32_t *)h->rects[0]->pict.data[1])[0] & 0xff)
163 width = FFALIGN(h->rects[0]->w, 2) + PADDING * 2;
164 height = FFALIGN(h->rects[0]->h, 2);
168 bytestream_put_le16(&hdr, h->rects[0]->x);
169 bytestream_put_le16(&hdr, h->rects[0]->y);
170 bytestream_put_le16(&hdr, h->rects[0]->x + width);
171 bytestream_put_le16(&hdr, h->rects[0]->y + height);
178 bytestream_put_be24(&hdr, ((uint32_t *)h->rects[0]->pict.data[1])[i]);
183 if (xsub_encode_rle(&pb, h->rects[0]->pict.data[0],
184 h->rects[0]->pict.linesize[0]*2,
185 h->rects[0]->w, (h->rects[0]->h + 1) >> 1))
189 if (xsub_encode_rle(&pb, h->rects[0]->pict.data[0] + h->rects[0]->pict.linesize[0],
190 h->rects[0]->pict.linesize[0]*2,
191 h->rects[0]->w, h->rects[0]->h >> 1))
195 if (h->rects[0]->h & 1) {
196 put_xsub_rle(&pb, h->rects[0]->w, PADDING_COLOR);