summaryrefslogtreecommitdiff
path: root/src/lib/openjp3d
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-10-01 10:01:09 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-10-01 10:01:09 +0000
commitabdb8ee3f735500da1c1cdf11c4462a4fcba616c (patch)
treea6af739b0a5ff1cf82ba3080e546be518f8a5b4e /src/lib/openjp3d
parentaa6b4b49706c83bf376c6bfaab64dca49f140179 (diff)
[trunk] Fix a set of warnings about C90 issues
Diffstat (limited to 'src/lib/openjp3d')
-rwxr-xr-xsrc/lib/openjp3d/bio.h2
-rwxr-xr-xsrc/lib/openjp3d/event.c4
-rwxr-xr-xsrc/lib/openjp3d/jp3d.c34
-rwxr-xr-xsrc/lib/openjp3d/jp3d.h2
-rwxr-xr-xsrc/lib/openjp3d/opj_includes.h3
-rwxr-xr-xsrc/lib/openjp3d/pi.c4
-rwxr-xr-xsrc/lib/openjp3d/t1.h4
-rwxr-xr-xsrc/lib/openjp3d/t1_3d.h16
-rwxr-xr-xsrc/lib/openjp3d/tcd.c57
-rwxr-xr-xsrc/lib/openjp3d/tcd.h2
10 files changed, 63 insertions, 65 deletions
diff --git a/src/lib/openjp3d/bio.h b/src/lib/openjp3d/bio.h
index 36bb942b..47010d46 100755
--- a/src/lib/openjp3d/bio.h
+++ b/src/lib/openjp3d/bio.h
@@ -121,7 +121,7 @@ Read a bit
@return Returns the read bit
*/
/* MOD antonin */
-//int bio_getbit(opj_bio_t *bio);
+/*int bio_getbit(opj_bio_t *bio);*/
/* DOM */
/* ----------------------------------------------------------------------- */
/*@}*/
diff --git a/src/lib/openjp3d/event.c b/src/lib/openjp3d/event.c
index e27df654..b7d2bcc7 100755
--- a/src/lib/openjp3d/event.c
+++ b/src/lib/openjp3d/event.c
@@ -26,9 +26,9 @@
#include "opj_includes.h"
-// ==========================================================
+/* ==========================================================
// Utility functions
-// ==========================================================
+// ==========================================================*/
#ifndef _WIN32
static char*
diff --git a/src/lib/openjp3d/jp3d.c b/src/lib/openjp3d/jp3d.c
index ec2a759d..5ab5d94b 100755
--- a/src/lib/openjp3d/jp3d.c
+++ b/src/lib/openjp3d/jp3d.c
@@ -471,7 +471,7 @@ static void j3d_read_zsi(opj_j3d_t *j3d) {
volume->comps[i].dz = cio_read(cio, 1); /* ZRsiz_i */
}
- //Initialization of volume
+ /*Initialization of volume*/
cp->tw = int_ceildiv(volume->x1 - cp->tx0, cp->tdx);
cp->th = int_ceildiv(volume->y1 - cp->ty0, cp->tdy);
cp->tl = int_ceildiv(volume->z1 - cp->tz0, cp->tdz);
@@ -538,7 +538,7 @@ static void j3d_read_dco(opj_j3d_t *j3d){
opj_cp_t *cp = j3d->cp;
len = cio_read(cio, 2); /* Lsiz */
- dcotype = cio_read(cio, 1); //offset 8bit unsigned / 16bit signed integers
+ dcotype = cio_read(cio, 1); /*offset 8bit unsigned / 16bit signed integers*/
if (dcotype == 0) {
for (i = 0; i < volume->numcomps; i++) {
volume->comps[i].dcoffset = cio_read(cio, 1);
@@ -660,7 +660,7 @@ static void j3d_write_siz(opj_j3d_t *j3d) {
cio_write(cio, J3D_MS_SIZ, 2); /* SIZ */
lenp = cio_tell(cio);
cio_skip(cio, 2);
- //cio_write(cio, 0, 2); /* Rsiz (capabilities of 15444-1 only) */
+ /*cio_write(cio, 0, 2);*/ /* Rsiz (capabilities of 15444-1 only) */
Rsiz = J3D_RSIZ_DCO | J3D_RSIZ_ATK; /** | J3D_RSIZ_MCT | J3D_RSIZ_NONLT (not implemented yet)*/
cio_write(cio, Rsiz, 2); /* capabilities of WDv5.2*/
cio_write(cio, volume->x1, 4); /* Xsiz */
@@ -725,7 +725,7 @@ static void j3d_read_siz(opj_j3d_t *j3d) {
for (i = 0; i < volume->numcomps; i++)
volume->comps[i].dz = 1;
- //Initialization of volume
+ /*Initialization of volume*/
cp->tw = int_ceildiv(volume->x1 - cp->tx0, cp->tdx);
cp->th = int_ceildiv(volume->y1 - cp->ty0, cp->tdy);
cp->tl = int_ceildiv(volume->z1 - cp->tz0, cp->tdz);
@@ -767,10 +767,10 @@ static void j3d_write_com(opj_j3d_t *j3d) {
cio_write(cio, J3D_MS_COM, 2);
lenp = cio_tell(cio);
cio_skip(cio, 2);
- //cio_write(cio, 0, 2);
+ /*cio_write(cio, 0, 2);*/
cio_write(cio, j3d->cp->transform_format,1);
cio_write(cio, j3d->cp->encoding_format,1);
- //opj_event_msg(j3d->cinfo, EVT_INFO, "TRF %D ENCOD %d\n",j3d->cp->transform_format,j3d->cp->encoding_format);
+ /*opj_event_msg(j3d->cinfo, EVT_INFO, "TRF %D ENCOD %d\n",j3d->cp->transform_format,j3d->cp->encoding_format);*/
if (j3d->cp->comment != NULL) {
char *comment = j3d->cp->comment;
for (i = 0; i < strlen(comment); i++) {
@@ -791,9 +791,9 @@ static void j3d_read_com(opj_j3d_t *j3d) {
j3d->cp->transform_format = (OPJ_TRANSFORM) cio_read(cio, 1);
j3d->cp->encoding_format = (OPJ_ENTROPY_CODING) cio_read(cio, 1);
- //opj_event_msg(j3d->cinfo, EVT_INFO, "TRF %D ENCOD %d\n",j3d->cp->transform_format,j3d->cp->encoding_format);
+ /*opj_event_msg(j3d->cinfo, EVT_INFO, "TRF %D ENCOD %d\n",j3d->cp->transform_format,j3d->cp->encoding_format);*/
- cio_skip(cio, len - 4); //posible comments
+ cio_skip(cio, len - 4); /*posible comments*/
}
static void j3d_write_cox(opj_j3d_t *j3d, int compno) {
@@ -871,7 +871,7 @@ static void j3d_read_cox(opj_j3d_t *j3d, int compno) {
tccp->dwtid[1] = tccp->dwtid[0]; /* SPcox (L) */
tccp->dwtid[2] = tccp->dwtid[0]; /* SPcox (M) */
}
- tccp->reversible = (tccp->dwtid[0]>=1 && tccp->dwtid[1]>=1 && tccp->dwtid[2]>=1); //TODO: only valid for irreversible 9x7 WTs
+ tccp->reversible = (tccp->dwtid[0]>=1 && tccp->dwtid[1]>=1 && tccp->dwtid[2]>=1); /*TODO: only valid for irreversible 9x7 WTs*/
if (tccp->csty & J3D_CP_CSTY_PRT) {
for (i = 0; i < tccp->numresolution[0]; i++) {
int tmp = cio_read(cio, 2); /* SPcox (N_i) */
@@ -1494,7 +1494,7 @@ static void j3d_read_eoc(opj_j3d_t *j3d) {
j3d_dump_cp(stdout, tcd->volume, tcd->cp);*/
for (i = 0; i < j3d->cp->tileno_size; i++) {
tileno = j3d->cp->tileno[i];
- //opj_event_msg(j3d->cinfo, EVT_INFO, "tcd_decode_tile \n");
+ /*opj_event_msg(j3d->cinfo, EVT_INFO, "tcd_decode_tile \n");*/
tcd_decode_tile(tcd, j3d->tile_data[tileno], j3d->tile_len[tileno], tileno);
opj_free(j3d->tile_data[tileno]);
j3d->tile_data[tileno] = NULL;
@@ -1696,7 +1696,7 @@ opj_volume_t* j3d_decode(opj_j3d_t *j3d, opj_cio_t *cio) {
return 0;
}
e = j3d_dec_mstab_lookup(id);
- //opj_event_msg(cinfo, EVT_INFO, "MARKER %x PREVSTATE %d E->STATE %d\n",e->id,j3d->state,e->states);
+ /*opj_event_msg(cinfo, EVT_INFO, "MARKER %x PREVSTATE %d E->STATE %d\n",e->id,j3d->state,e->states);*/
if (!(j3d->state & e->states)) {
opj_volume_destroy(volume);
opj_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id);
@@ -1705,7 +1705,7 @@ opj_volume_t* j3d_decode(opj_j3d_t *j3d, opj_cio_t *cio) {
if (e->handler) {
(*e->handler)(j3d);
}
- //opj_event_msg(cinfo, EVT_INFO, "POSTSTATE %d\n",j3d->state);
+ /*opj_event_msg(cinfo, EVT_INFO, "POSTSTATE %d\n",j3d->state);*/
if (j3d->state == J3D_STATE_MT) {
break;
}
@@ -1898,7 +1898,7 @@ void j3d_setup_encoder(opj_j3d_t *j3d, opj_cparameters_t *parameters, opj_volume
tccp->cblk[1] = int_floorlog2(parameters->cblock_init[1]);
tccp->cblk[2] = int_floorlog2(parameters->cblock_init[2]);
assert (tccp->cblk[0]+tccp->cblk[1]+tccp->cblk[1] <= T1_MAXWHD);
- tccp->cblksty = parameters->mode; //Codeblock style --> Table A.19 (default 0)
+ tccp->cblksty = parameters->mode; /*Codeblock style --> Table A.19 (default 0)*/
/*ATK / transform */
tccp->reversible = parameters->irreversible ? 0 : 1; /* 0 => DWT 9-7 || 1 => DWT 5-3 */
@@ -1946,7 +1946,7 @@ void j3d_setup_encoder(opj_j3d_t *j3d, opj_cparameters_t *parameters, opj_volume
}
}
}
- //Calcular stepsize for each subband (if NOQNT -->stepsize = 1.0)
+ /*Calcular stepsize for each subband (if NOQNT -->stepsize = 1.0)*/
dwt_calc_explicit_stepsizes(tccp, volume->comps[i].prec);
}
}
@@ -2051,8 +2051,8 @@ static int j3d_create_index(opj_j3d_t *j3d, opj_cio_t *cio, opj_volume_info_t *v
*/
for (resno = 0; resno < volume_info->decomposition[0] + 1; resno++) {
/* I suppose components have same XRsiz, YRsiz */
- //int x0 = volume_info->tile_Ox + tileno - (int)floor( (float)tileno/(float)volume_info->tw ) * volume_info->tw * volume_info->tile_x;
- //int y0 = volume_info->tile_Ox + (int)floor( (float)tileno/(float)volume_info->tw ) * volume_info->tile_y;
+ /*int x0 = volume_info->tile_Ox + tileno - (int)floor( (float)tileno/(float)volume_info->tw ) * volume_info->tw * volume_info->tile_x;*/
+ /*int y0 = volume_info->tile_Ox + (int)floor( (float)tileno/(float)volume_info->tw ) * volume_info->tile_y;*/
int x0 = volume_info->tile_Ox + (int)floor( (float)tileno/(float)volume_info->tw ) * volume_info->tile_x;
int y0 = volume_info->tile_Oy + (int)floor( (float)tileno/(float)volume_info->th ) * volume_info->tile_y;
int z0 = volume_info->tile_Ox + (int)floor( (float)tileno/(float)volume_info->tl ) * volume_info->tile_z;
@@ -2300,7 +2300,7 @@ bool j3d_encode(opj_j3d_t *j3d, opj_cio_t *cio, opj_volume_t *volume, char *inde
if (cp->tcps[tileno].numpocs) {
j3d_write_poc(j3d);
}
- j3d_write_sod(j3d, tcd); //--> tcd_encode_tile
+ j3d_write_sod(j3d, tcd); /*--> tcd_encode_tile*/
/* INDEX >> */
if(volume_info && volume_info->index_on) {
diff --git a/src/lib/openjp3d/jp3d.h b/src/lib/openjp3d/jp3d.h
index 02457224..e9ecf131 100755
--- a/src/lib/openjp3d/jp3d.h
+++ b/src/lib/openjp3d/jp3d.h
@@ -81,7 +81,7 @@ The functions in J3D.C have for goal to read/write the several parts of the code
#define J3D_MS_EPH 0xff92 /**< EPH marker value */
#define J3D_MS_CRG 0xff63 /**< CRG marker value */
#define J3D_MS_COM 0xff64 /**< COM marker value */
-//15444-2
+/*15444-2*/
#define J3D_MS_DCO 0xff70 /**< DCO marker value */
#define J3D_MS_VMS 0xff71 /**< VMS marker value */
#define J3D_MS_DFS 0xff72 /**< DFS marker value */
diff --git a/src/lib/openjp3d/opj_includes.h b/src/lib/openjp3d/opj_includes.h
index 40fecfc3..a24283f3 100755
--- a/src/lib/openjp3d/opj_includes.h
+++ b/src/lib/openjp3d/opj_includes.h
@@ -75,7 +75,4 @@
#include "int.h"
#include "fix.h"
-//#include "pred.h"
-//#include "golomb.h"
-
#endif /* OPJ_INCLUDES_H */
diff --git a/src/lib/openjp3d/pi.c b/src/lib/openjp3d/pi.c
index f9b8a963..960c1d84 100755
--- a/src/lib/openjp3d/pi.c
+++ b/src/lib/openjp3d/pi.c
@@ -99,7 +99,7 @@ static bool pi_next_lrcp(opj_pi_iterator_t * pi) {
continue;
}
res = &comp->resolutions[pi->resno];
- //for (pi->precno = 0; pi->precno < (res->prctno[0] * res->prctno[1]); pi->precno++) {
+ /*for (pi->precno = 0; pi->precno < (res->prctno[0] * res->prctno[1]); pi->precno++) {*/
for (pi->precno = 0; pi->precno < (res->prctno[0] * res->prctno[1] * res->prctno[2]); pi->precno++) {
index = pi->layno * pi->step_l
+ pi->resno * pi->step_r
@@ -140,7 +140,7 @@ static bool pi_next_rlcp(opj_pi_iterator_t * pi) {
continue;
}
res = &comp->resolutions[pi->resno];
- //for (pi->precno = 0; pi->precno < (res->prctno[0] * res->prctno[1]); pi->precno++) {
+ /*for (pi->precno = 0; pi->precno < (res->prctno[0] * res->prctno[1]); pi->precno++) {*/
for (pi->precno = 0; pi->precno < (res->prctno[0] * res->prctno[1] * res->prctno[2]); pi->precno++) {
index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p;
if (!pi->include[index]) {
diff --git a/src/lib/openjp3d/t1.h b/src/lib/openjp3d/t1.h
index 7b4a18f5..1863484c 100755
--- a/src/lib/openjp3d/t1.h
+++ b/src/lib/openjp3d/t1.h
@@ -117,9 +117,9 @@ typedef struct opj_t1 {
int lut_nmsedec_ref[1 << T1_NMSEDEC_BITS];
int lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS];
/** Codeblock data */
- int data[T1_CBLKD][T1_CBLKH][T1_CBLKW];//int ***data;
+ int data[T1_CBLKD][T1_CBLKH][T1_CBLKW];/*int ***data;*/
/** Context information for each voxel in codeblock */
- int flags[T1_CBLKD + 2][T1_CBLKH + 2][T1_CBLKH + 2];//int ***flags;
+ int flags[T1_CBLKD + 2][T1_CBLKH + 2][T1_CBLKH + 2];/*int ***flags;*/
} opj_t1_t;
/** @name Exported functions */
diff --git a/src/lib/openjp3d/t1_3d.h b/src/lib/openjp3d/t1_3d.h
index dd73763d..6410bd5a 100755
--- a/src/lib/openjp3d/t1_3d.h
+++ b/src/lib/openjp3d/t1_3d.h
@@ -79,9 +79,9 @@ The functions in T1_3D.C are used by some function in TCD.C.
#define T1_3D_SGN_B 0x8000
#define T1_3D_SGN (T1_3D_SGN_N|T1_3D_SGN_E|T1_3D_SGN_S|T1_3D_SGN_W|T1_3D_SGN_F|T1_3D_SGN_B)
-#define T1_3D_SIG 0x0001 //Significance state
-#define T1_3D_REFINE 0x0002 //Delayed significance
-#define T1_3D_VISIT 0x0004 //First-pass membership
+#define T1_3D_SIG 0x0001 /*Significance state*/
+#define T1_3D_REFINE 0x0002 /*Delayed significance*/
+#define T1_3D_VISIT 0x0004 /*First-pass membership*/
#define T1_3D_NUMCTXS_AGG 1
#define T1_3D_NUMCTXS_ZC 16
@@ -90,11 +90,11 @@ The functions in T1_3D.C are used by some function in TCD.C.
#define T1_3D_NUMCTXS_UNI 1
#define T1_3D_CTXNO_AGG 0
-#define T1_3D_CTXNO_ZC (T1_3D_CTXNO_AGG+T1_3D_NUMCTXS_AGG) //1
-#define T1_3D_CTXNO_MAG (T1_3D_CTXNO_ZC+T1_3D_NUMCTXS_ZC) //17
-#define T1_3D_CTXNO_SC (T1_3D_CTXNO_MAG+T1_3D_NUMCTXS_MAG) //20
-#define T1_3D_CTXNO_UNI (T1_3D_CTXNO_SC+T1_3D_NUMCTXS_SC) //26
-#define T1_3D_NUMCTXS (T1_3D_CTXNO_UNI+T1_3D_NUMCTXS_UNI) //27
+#define T1_3D_CTXNO_ZC (T1_3D_CTXNO_AGG+T1_3D_NUMCTXS_AGG) /*1*/
+#define T1_3D_CTXNO_MAG (T1_3D_CTXNO_ZC+T1_3D_NUMCTXS_ZC) /*17*/
+#define T1_3D_CTXNO_SC (T1_3D_CTXNO_MAG+T1_3D_NUMCTXS_MAG) /*20*/
+#define T1_3D_CTXNO_UNI (T1_3D_CTXNO_SC+T1_3D_NUMCTXS_SC) /*26*/
+#define T1_3D_NUMCTXS (T1_3D_CTXNO_UNI+T1_3D_NUMCTXS_UNI) /*27*/
/* ----------------------------------------------------------------------- */
diff --git a/src/lib/openjp3d/tcd.c b/src/lib/openjp3d/tcd.c
index e5147e29..88b1bcf6 100755
--- a/src/lib/openjp3d/tcd.c
+++ b/src/lib/openjp3d/tcd.c
@@ -156,7 +156,7 @@ void tcd_destroy(opj_tcd_t *tcd) {
/* ----------------------------------------------------------------------- */
void tcd_malloc_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int curtileno) {
- int compno, resno, bandno, precno, cblkno, i, j;//, k;
+ int compno, resno, bandno, precno, cblkno, i, j;/*, k;*/
opj_tcd_tile_t *tile = NULL; /* pointer to tcd->tile */
opj_tcd_tilecomp_t *tilec = NULL; /* pointer to tcd->tilec */
@@ -239,7 +239,7 @@ void tcd_malloc_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int
res_max = 0;
for (i = 0;i < 3; i++){
tilec->numresolution[i] = tccp->numresolution[i];
- //Greater of 3 resolutions contains all information
+ /*Greater of 3 resolutions contains all information*/
res_max = (tilec->numresolution[i] > res_max) ? tilec->numresolution[i] : res_max;
}
@@ -272,7 +272,7 @@ void tcd_malloc_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int
res->x1 = int_ceildivpow2(tilec->x1, levelnox);
res->y1 = int_ceildivpow2(tilec->y1, levelnoy);
res->z1 = int_ceildivpow2(tilec->z1, levelnoz);
- //if (res->z1 < 0)fprintf(stdout,"Res: %d %d/%d --> %d\n",resno,tilec->z1, levelnoz, int_ceildivpow2(tilec->z1, levelnoz));
+ /*if (res->z1 < 0)fprintf(stdout,"Res: %d %d/%d --> %d\n",resno,tilec->z1, levelnoz, int_ceildivpow2(tilec->z1, levelnoz));*/
res->numbands = (resno == 0) ? 1 : (resno <= diff) ? 3 : 7; /* --> 3D */
@@ -323,9 +323,9 @@ void tcd_malloc_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int
cbglengthexpn = pdz - 1;
}
- cblkwidthexpn = int_min(tccp->cblk[0], cbgwidthexpn); //6
- cblkheightexpn = int_min(tccp->cblk[1], cbgheightexpn); //6
- cblklengthexpn = int_min(tccp->cblk[2], cbglengthexpn); //6
+ cblkwidthexpn = int_min(tccp->cblk[0], cbgwidthexpn); /*6*/
+ cblkheightexpn = int_min(tccp->cblk[1], cbgheightexpn); /*6*/
+ cblklengthexpn = int_min(tccp->cblk[2], cbglengthexpn); /*6*/
res->bands = (opj_tcd_band_t *) opj_malloc(res->numbands * sizeof(opj_tcd_band_t));
for (bandno = 0; bandno < res->numbands; bandno++) {
@@ -414,7 +414,7 @@ void tcd_malloc_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int
prc->cblks = (opj_tcd_cblk_t *) opj_malloc((prc->cblkno[0] * prc->cblkno[1] * prc->cblkno[2]) * sizeof(opj_tcd_cblk_t));
prc->incltree = tgt_create(prc->cblkno[0], prc->cblkno[1], prc->cblkno[2]);
prc->imsbtree = tgt_create(prc->cblkno[0], prc->cblkno[1], prc->cblkno[2]);
- //tgt_tree_dump(stdout,prc->incltree);
+ /*tgt_tree_dump(stdout,prc->incltree);*/
for (cblkno = 0; cblkno < (prc->cblkno[0] * prc->cblkno[1] * prc->cblkno[2]); cblkno++) {
int cblkxstart = tlcblkxstart + (cblkno % prc->cblkno[0]) * (1 << cblkwidthexpn);
int cblkystart = tlcblkystart + ((cblkno % (prc->cblkno[0] * prc->cblkno[1])) / prc->cblkno[0]) * (1 << cblkheightexpn);
@@ -439,7 +439,7 @@ void tcd_malloc_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int
}
}
}
- //tcd_dump(stdout, tcd, tcd->tcd_volume);
+ /*tcd_dump(stdout, tcd, tcd->tcd_volume);*/
}
void tcd_init_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int curtileno) {
@@ -518,7 +518,7 @@ void tcd_init_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int c
res_max = 0;
for (i = 0;i < 3; i++){
tilec->numresolution[i] = tccp->numresolution[i];
- //Greater of 3 resolutions contains all information
+ /*Greater of 3 resolutions contains all information*/
res_max = (tilec->numresolution[i] > res_max) ? tilec->numresolution[i] : res_max;
}
@@ -547,7 +547,8 @@ void tcd_init_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int c
res->y1 = int_ceildivpow2(tilec->y1, levelnoy);
res->z1 = int_ceildivpow2(tilec->z1, levelnoz);
- // res->numbands = resno == 0 ? 1 : 3; /* --> 2D */
+ /* res->numbands = resno == 0 ? 1 : 3; *//* --> 2D */
+
res->numbands = (resno == 0) ? 1 : (resno <= diff) ? 3 : 7; /* --> 3D */
/* p. 30, table A-13, ISO/IEC IS154444-1 : 2002 */
@@ -707,7 +708,7 @@ void tcd_init_encode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp, int c
} /* bandno */
} /* resno */
} /* compno */
- //tcd_dump(stdout, tcd, tcd->tcd_volume);
+ /*tcd_dump(stdout, tcd, tcd->tcd_volume);*/
}
@@ -715,7 +716,7 @@ void tcd_free_encode(opj_tcd_t *tcd) {
int tileno, compno, resno, bandno, precno;
opj_tcd_tile_t *tile = NULL; /* pointer to tcd->tile */
-// opj_tcd_slice_t *slice = NULL; /* pointer to tcd->slice */
+/* opj_tcd_slice_t *slice = NULL; */ /* pointer to tcd->slice */
opj_tcd_tilecomp_t *tilec = NULL; /* pointer to tcd->tilec */
opj_tcd_resolution_t *res = NULL; /* pointer to tcd->res */
opj_tcd_band_t *band = NULL; /* pointer to tcd->band */
@@ -821,7 +822,7 @@ void tcd_malloc_decode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp) {
res_max = 0;
for (i = 0;i < 3; i++){
tilec->numresolution[i] = tccp->numresolution[i];
- //Greater of 3 resolutions contains all information
+ /*Greater of 3 resolutions contains all information*/
res_max = (tilec->numresolution[i] > res_max) ? tilec->numresolution[i] : res_max;
}
@@ -874,13 +875,13 @@ void tcd_malloc_decode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp) {
/* p. 67, B.17 & B.18, ISO/IEC IS15444-1 : 2002 */
if (resno == 0) {
- tlcbgxstart = tlprcxstart;//0
+ tlcbgxstart = tlprcxstart;/*0*/
tlcbgystart = tlprcystart;
tlcbgzstart = tlprczstart;
- brcbgxend = brprcxend;//1
+ brcbgxend = brprcxend;/*1*/
brcbgyend = brprcyend;
brcbgzend = brprczend;
- cbgwidthexpn = pdx; //15
+ cbgwidthexpn = pdx; /*15*/
cbgheightexpn = pdy;
cbglengthexpn = pdz;
} else {
@@ -895,9 +896,9 @@ void tcd_malloc_decode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp) {
cbglengthexpn = pdz - 1;
}
- cblkwidthexpn = int_min(tccp->cblk[0], cbgwidthexpn); //6
- cblkheightexpn = int_min(tccp->cblk[1], cbgheightexpn); //6
- cblklengthexpn = int_min(tccp->cblk[2], cbglengthexpn); //6
+ cblkwidthexpn = int_min(tccp->cblk[0], cbgwidthexpn); /*6*/
+ cblkheightexpn = int_min(tccp->cblk[1], cbgheightexpn); /*6*/
+ cblklengthexpn = int_min(tccp->cblk[2], cbglengthexpn); /*6*/
res->bands = (opj_tcd_band_t *) opj_malloc(res->numbands * sizeof(opj_tcd_band_t));
for (bandno = 0; bandno < res->numbands; bandno++) {
@@ -1003,7 +1004,7 @@ void tcd_malloc_decode(opj_tcd_t *tcd, opj_volume_t * volume, opj_cp_t * cp) {
} /* compno */
} /* i = 0..cp->tileno_size */
- //tcd_dump(stdout, tcd, tcd->tcd_volume);
+ /*tcd_dump(stdout, tcd, tcd->tcd_volume);*/
/*
Allocate place to store the decoded data = final volume
@@ -1234,7 +1235,7 @@ void tcd_makelayer(opj_tcd_t *tcd, int layno, double thresh, int final) {
if (final)
cblk->numpassesinlayers = n;
- // fprintf(stdout,"MakeLayer : %d %f %d %d \n",layer->len, layer->disto, layer->numpasses, n);
+ /* fprintf(stdout,"MakeLayer : %d %f %d %d \n",layer->len, layer->disto, layer->numpasses, n);*/
}
}
}
@@ -1346,7 +1347,7 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_volume_i
lo = thresh;
} else { /* disto_alloc -r, fixed_alloc -f */
l = t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, volume_info);
- //fprintf(stdout, "layno %d i %d len=%d max=%d \n",layno,i,l,maxlen);
+ /*fprintf(stdout, "layno %d i %d len=%d max=%d \n",layno,i,l,maxlen);*/
if (l == -999) {
lo = thresh;
continue;
@@ -1433,7 +1434,7 @@ int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, op
opj_tcd_tilecomp_t *tilec = &tile->comps[compno];
int adjust;
- int offset_x = int_ceildiv(volume->x0, volume->comps[compno].dx); //ceil(x0 / subsampling_dx)
+ int offset_x = int_ceildiv(volume->x0, volume->comps[compno].dx); /*ceil(x0 / subsampling_dx)*/
int offset_y = int_ceildiv(volume->y0, volume->comps[compno].dy);
int offset_z = int_ceildiv(volume->z0, volume->comps[compno].dz);
@@ -1447,18 +1448,18 @@ int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, op
/* extract tile data from volume.comps[0].data to tile.comps[0].data */
- //fprintf(stdout,"[INFO] Extract tile data\n");
+ /*fprintf(stdout,"[INFO] Extract tile data\n");*/
if (tcd->cp->transform_format == TRF_3D_RLS || tcd->cp->transform_format == TRF_3D_LSE) {
adjust = 0;
} else {
- adjust = volume->comps[compno].sgnd ? 0 : 1 << (volume->comps[compno].prec - 1); //sign=='+' --> 2^(prec-1)
+ adjust = volume->comps[compno].sgnd ? 0 : 1 << (volume->comps[compno].prec - 1); /*sign=='+' --> 2^(prec-1)*/
if (volume->comps[compno].dcoffset != 0){
adjust += volume->comps[compno].dcoffset;
fprintf(stdout,"[INFO] DC Offset applied: DCO = %d -> adjust = %d\n",volume->comps[compno].dcoffset,adjust);
}
}
- if (tcd_tcp->tccps[compno].reversible == 1) { //IF perfect reconstruction (DWT.5-3)
+ if (tcd_tcp->tccps[compno].reversible == 1) { /*IF perfect reconstruction (DWT.5-3)*/
for (z = tilec->z0; z < tilec->z1; z++) {
for (y = tilec->y0; y < tilec->y1; y++) {
/* start of the src tile scanline */
@@ -1470,7 +1471,7 @@ int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, op
}
}
}
- } else if (tcd_tcp->tccps[compno].reversible == 0) { //IF not (DWT.9-7)
+ } else if (tcd_tcp->tccps[compno].reversible == 0) { /*IF not (DWT.9-7)*/
for (z = tilec->z0; z < tilec->z1; z++) {
for (y = tilec->y0; y < tilec->y1; y++) {
/* start of the src tile scanline */
@@ -1694,7 +1695,7 @@ bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno) {
if (tcd->cp->transform_format == TRF_3D_RLS || tcd->cp->transform_format == TRF_3D_LSE) {
adjust = 0;
} else {
- adjust = tcd->volume->comps[compno].sgnd ? 0 : 1 << (tcd->volume->comps[compno].prec - 1); //sign=='+' --> 2^(prec-1)
+ adjust = tcd->volume->comps[compno].sgnd ? 0 : 1 << (tcd->volume->comps[compno].prec - 1); /*sign=='+' --> 2^(prec-1)*/
if (tcd->volume->comps[compno].dcoffset != 0){
adjust += tcd->volume->comps[compno].dcoffset;
fprintf(stdout,"[INFO] DC Offset applied: DCO = %d -> adjust = %d\n",tcd->volume->comps[compno].dcoffset,adjust);
diff --git a/src/lib/openjp3d/tcd.h b/src/lib/openjp3d/tcd.h
index 52504d10..06c814e7 100755
--- a/src/lib/openjp3d/tcd.h
+++ b/src/lib/openjp3d/tcd.h
@@ -115,7 +115,7 @@ typedef struct opj_tcd_cblk {
opj_tcd_pass_t passes[100];
/* Data */
unsigned char data[524288];
- //unsigned char *data;
+ /*unsigned char *data;*/
} opj_tcd_cblk_t;
/**