for (b = 0; b < planes[p].num_bands; b++) {
band = &planes[p].bands[b];
+
+ if (band->tiles) {
+ int t;
+ for (t = 0; t < band->num_tiles; t++) {
+ av_freep(&band->tiles[t].mbs);
+ }
+ }
+
x_tiles = IVI_NUM_TILES(band->width, t_width);
y_tiles = IVI_NUM_TILES(band->height, t_height);
band->num_tiles = x_tiles * y_tiles;
return;
for (y = 0; y < plane->height; y++) {
- for (x = 0; x < plane->width; x++)
- dst[x] = av_clip_uint8(src[x] + 128);
+ int m = 0;
+ int w = plane->width;
+ for (x = 0; x < w; x++) {
+ int t = src[x] + 128;
+ dst[x] = t;
+ m |= t;
+ }
+ if (m & ~255)
+ for (x = 0; x < w; x++)
+ dst[x] = av_clip_uint8(src[x] + 128);
src += pitch;
dst += dst_pitch;
}