iron261 / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

error in code block calculations #369

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In tcd.c, the code block y start value is calculated using the precinct width. 
It should use the height instead: 

OPJ_INT32 cbgxstart =
      tlcbgxstart + (OPJ_INT32)(precno % l_res->pw) * (1 << cbgwidthexpn);

OPJ_INT32 cbgystart = 
     tlcbgystart + (OPJ_INT32)(precno / l_res->pw) * (1 << cbgheightexpn);

The same error occurs here:

OPJ_INT32 cblkxstart = tlcblkxstart + (OPJ_INT32)(cblkno % 
l_current_precinct->cw) * (1 << cblkwidthexpn);

 OPJ_INT32 cblkystart = tlcblkystart + (OPJ_INT32)(cblkno /    l_current_precinct->cw) * (1 << cblkheightexpn);

Original issue reported on code.google.com by boxe...@gmail.com on 3 Jul 2014 at 5:08

GoogleCodeExporter commented 9 years ago
This is not, in fact, an error. Please close.

Original comment by boxe...@gmail.com on 3 Jul 2014 at 5:23

GoogleCodeExporter commented 9 years ago

Original comment by antonin on 4 Jul 2014 at 7:47