Lines Matching refs:tiles
28 * Lossless codec, data stored in tiles, with optional deflate compression.
30 * Header contains the number of tiles in a frame with the tile coordinates,
60 Tile *tiles;
144 av_freep(&ctx->tiles);
170 /* Read number of tiles, and allocate the array */
174 av_log(avctx, AV_LOG_DEBUG, "no tiles\n");
178 av_fast_malloc(&ctx->tiles, &ctx->tiles_size,
179 tiles_nb * sizeof(*ctx->tiles));
180 if (!ctx->tiles) {
185 av_log(avctx, AV_LOG_DEBUG, "Frame with %d tiles.\n", tiles_nb);
187 /* When there are more than 5 tiles, they are packed together with
188 * a size header. When that size does not match the number of tiles
198 ff_dlog(avctx, "packed tiles of size %lu.\n", packed_tiles_size);
200 /* If necessary, uncompress tiles, and hijack the bytestream reader */
231 /* Fill in array of tiles, keeping track of how many pixels are updated */
233 ctx->tiles[i].x = bytestream2_get_le16(gbc);
234 ctx->tiles[i].w = bytestream2_get_le16(gbc);
235 ctx->tiles[i].y = bytestream2_get_le16(gbc);
236 ctx->tiles[i].h = bytestream2_get_le16(gbc);
238 if (pixel_size + ctx->tiles[i].w * (int64_t)ctx->tiles[i].h * ctx->component_size > INT_MAX) {
244 pixel_size += ctx->tiles[i].w * ctx->tiles[i].h * ctx->component_size;
247 ctx->tiles[i].x, ctx->tiles[i].y,
248 ctx->tiles[i].w, ctx->tiles[i].h);
250 if (ctx->tiles[i].w == 0 || ctx->tiles[i].h == 0) {
253 ctx->tiles[i].x, ctx->tiles[i].y,
254 ctx->tiles[i].w, ctx->tiles[i].h);
257 } else if (ctx->tiles[i].x + ctx->tiles[i].w > avctx->width ||
258 ctx->tiles[i].y + ctx->tiles[i].h > avctx->height) {
261 ctx->tiles[i].x, ctx->tiles[i].y,
262 ctx->tiles[i].w, ctx->tiles[i].h);
271 /* Extract how much pixel data the tiles contain */
326 (avctx->height - ctx->tiles[i].y - 1) +
327 ctx->tiles[i].x * ctx->component_size;
329 raw, ctx->tiles[i].w * ctx->component_size,
330 ctx->tiles[i].w * ctx->component_size,
331 ctx->tiles[i].h);
332 raw += ctx->tiles[i].w * ctx->component_size * ctx->tiles[i].h;