Re-work TJBUFSIZE() to take into account the level of chrominance subsampling

This commit is contained in:
DRC
2011-07-12 03:17:23 +00:00
parent 2bfd5d8c7d
commit 489864aefa
41 changed files with 268 additions and 180 deletions

View File

@@ -123,7 +123,7 @@ public class TJTransformer extends TJDecompressor {
if(transforms[i].width != 0) w = transforms[i].width;
if(transforms[i].height != 0) h = transforms[i].height;
}
dstBufs[i] = new byte[TJ.bufSize(w, h)];
dstBufs[i] = new byte[TJ.bufSize(w, h, jpegSubsamp)];
}
TJDecompressor[] tjd = new TJDecompressor[transforms.length];
transform(dstBufs, transforms, flags);