Add documentation for magic values in the code
This commit is contained in:
parent
434ace4ff7
commit
373520db30
|
@ -1491,6 +1491,10 @@ static OPJ_BOOL opj_t2_init_seg(opj_tcd_cblk_dec_t* cblk,
|
||||||
((seg - 1)->maxpasses == 10)) ? 2 : 1;
|
((seg - 1)->maxpasses == 10)) ? 2 : 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
/* See paragraph "B.10.6 Number of coding passes" of the standard.
|
||||||
|
* Probably that 109 must be interpreted a (Mb-1)*3 + 1 with Mb=37,
|
||||||
|
* Mb being the maximum number of bit-planes available for the
|
||||||
|
* representation of coefficients in the sub-band */
|
||||||
seg->maxpasses = 109;
|
seg->maxpasses = 109;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -965,8 +965,10 @@ static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no,
|
||||||
numbps = (OPJ_INT32)(l_image_comp->prec + l_gain);
|
numbps = (OPJ_INT32)(l_image_comp->prec + l_gain);
|
||||||
l_band->stepsize = (OPJ_FLOAT32)(((1.0 + l_step_size->mant / 2048.0) * pow(2.0,
|
l_band->stepsize = (OPJ_FLOAT32)(((1.0 + l_step_size->mant / 2048.0) * pow(2.0,
|
||||||
(OPJ_INT32)(numbps - l_step_size->expn)))) * fraction;
|
(OPJ_INT32)(numbps - l_step_size->expn)))) * fraction;
|
||||||
|
/* Mb value of Equation E-2 in "E.1 Inverse quantization
|
||||||
|
* procedure" of the standard */
|
||||||
l_band->numbps = l_step_size->expn + (OPJ_INT32)l_tccp->numgbits -
|
l_band->numbps = l_step_size->expn + (OPJ_INT32)l_tccp->numgbits -
|
||||||
1; /* WHY -1 ? */
|
1;
|
||||||
|
|
||||||
if (!l_band->precincts && (l_nb_precincts > 0U)) {
|
if (!l_band->precincts && (l_nb_precincts > 0U)) {
|
||||||
l_band->precincts = (opj_tcd_precinct_t *) opj_malloc(/*3 * */
|
l_band->precincts = (opj_tcd_precinct_t *) opj_malloc(/*3 * */
|
||||||
|
|
Loading…
Reference in New Issue