[FFmpeg-soc] [soc]: r333 - jpeg2000/j2kenc.c
k.nowosad
subversion at mplayerhq.hu
Sat Jul 7 01:03:38 CEST 2007
Author: k.nowosad
Date: Sat Jul 7 01:03:38 2007
New Revision: 333
Log:
corrected computing number of codeblocks in a subband
Modified:
jpeg2000/j2kenc.c
Modified: jpeg2000/j2kenc.c
==============================================================================
--- jpeg2000/j2kenc.c (original)
+++ jpeg2000/j2kenc.c Sat Jul 7 01:03:38 2007
@@ -498,8 +498,8 @@ static int init_tiles(J2kEncoderContext
band->y1 = ceildivpow2(comp->y1 - (1 << (n-1)) * (((bandno+1)&2)>>1), n);
}
- band->cblknx = ceildiv(band->x1 - band->x0, band->cblkw);
- band->cblkny = ceildiv(band->y1 - band->y0, band->cblkh);
+ band->cblknx = ceildiv(band->x1, band->cblkw) - band->x0 / band->cblkw;
+ band->cblkny = ceildiv(band->y1, band->cblkh) - band->y0 / band->cblkh;
band->cblk = av_malloc(band->cblknx * band->cblkny * sizeof(J2kCblk));
if (band->cblk == NULL)
More information about the FFmpeg-soc
mailing list