fixed MCT check bug in t1_getwmsedec. See http://groups.google.com/group/openjpeg/browse_thread/thread/d9d96dd4ec3e7443 for info
This commit is contained in:
parent
449d7bedb6
commit
9324bc4cd4
|
@ -5,6 +5,9 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
November 5, 2009
|
||||||
|
* [antonin] fixed MCT check bug in t1_getwmsedec. See http://groups.google.com/group/openjpeg/browse_thread/thread/d9d96dd4ec3e7443 for info.
|
||||||
|
|
||||||
November 5, 2009
|
November 5, 2009
|
||||||
* [antonin] fixed "tiffio" header inclusion to use user version on Win32 system only (otherwise assume its existence in system headers).
|
* [antonin] fixed "tiffio" header inclusion to use user version on Win32 system only (otherwise assume its existence in system headers).
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,8 @@ static double t1_getwmsedec(
|
||||||
int bpno,
|
int bpno,
|
||||||
int qmfbid,
|
int qmfbid,
|
||||||
double stepsize,
|
double stepsize,
|
||||||
int numcomps);
|
int numcomps,
|
||||||
|
int mct);
|
||||||
/**
|
/**
|
||||||
Encode 1 code-block
|
Encode 1 code-block
|
||||||
@param t1 T1 handle
|
@param t1 T1 handle
|
||||||
|
@ -202,6 +203,7 @@ static void t1_encode_cblk(
|
||||||
double stepsize,
|
double stepsize,
|
||||||
int cblksty,
|
int cblksty,
|
||||||
int numcomps,
|
int numcomps,
|
||||||
|
int mct,
|
||||||
opj_tcd_tile_t * tile);
|
opj_tcd_tile_t * tile);
|
||||||
/**
|
/**
|
||||||
Decode 1 code-block
|
Decode 1 code-block
|
||||||
|
@ -736,14 +738,15 @@ static double t1_getwmsedec(
|
||||||
int bpno,
|
int bpno,
|
||||||
int qmfbid,
|
int qmfbid,
|
||||||
double stepsize,
|
double stepsize,
|
||||||
int numcomps)
|
int numcomps,
|
||||||
|
int mct)
|
||||||
{
|
{
|
||||||
double w1, w2, wmsedec;
|
double w1, w2, wmsedec;
|
||||||
if (qmfbid == 1) {
|
if (qmfbid == 1) {
|
||||||
w1 = (numcomps > 1) ? mct_getnorm(compno) : 1.0;
|
w1 = (mct && numcomps==3) ? mct_getnorm(compno) : 1.0;
|
||||||
w2 = dwt_getnorm(level, orient);
|
w2 = dwt_getnorm(level, orient);
|
||||||
} else { /* if (qmfbid == 0) */
|
} else { /* if (qmfbid == 0) */
|
||||||
w1 = (numcomps > 1) ? mct_getnorm_real(compno) : 1.0;
|
w1 = (mct && numcomps==3) ? mct_getnorm_real(compno) : 1.0;
|
||||||
w2 = dwt_getnorm_real(level, orient);
|
w2 = dwt_getnorm_real(level, orient);
|
||||||
}
|
}
|
||||||
wmsedec = w1 * w2 * stepsize * (1 << bpno);
|
wmsedec = w1 * w2 * stepsize * (1 << bpno);
|
||||||
|
@ -800,6 +803,7 @@ static void t1_encode_cblk(
|
||||||
double stepsize,
|
double stepsize,
|
||||||
int cblksty,
|
int cblksty,
|
||||||
int numcomps,
|
int numcomps,
|
||||||
|
int mct,
|
||||||
opj_tcd_tile_t * tile)
|
opj_tcd_tile_t * tile)
|
||||||
{
|
{
|
||||||
double cumwmsedec = 0.0;
|
double cumwmsedec = 0.0;
|
||||||
|
@ -850,7 +854,7 @@ static void t1_encode_cblk(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fixed_quality */
|
/* fixed_quality */
|
||||||
tempwmsedec = t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps);
|
tempwmsedec = t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps, mct);
|
||||||
cumwmsedec += tempwmsedec;
|
cumwmsedec += tempwmsedec;
|
||||||
tile->distotile += tempwmsedec;
|
tile->distotile += tempwmsedec;
|
||||||
|
|
||||||
|
@ -1110,6 +1114,7 @@ void t1_encode_cblks(
|
||||||
band->stepsize,
|
band->stepsize,
|
||||||
tccp->cblksty,
|
tccp->cblksty,
|
||||||
tile->numcomps,
|
tile->numcomps,
|
||||||
|
tcp->mct,
|
||||||
tile);
|
tile);
|
||||||
|
|
||||||
} /* cblkno */
|
} /* cblkno */
|
||||||
|
|
Loading…
Reference in New Issue