]> granicus.if.org Git - openjpeg/commitdiff
[trunk] JP3D fix issue with Registration value in COM marker. Move COM marker just...
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 28 Nov 2012 12:18:17 +0000 (12:18 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 28 Nov 2012 12:18:17 +0000 (12:18 +0000)
src/lib/openjp3d/jp3d.c

index 95e6ff3b18b98330412e834a8c9e5ed0a11a2e10..e54617b095dd93a58754d86011bf20be44b99d91 100755 (executable)
@@ -780,9 +780,7 @@ static void j3d_write_com(opj_j3d_t *j3d) {
        cio_write(cio, J3D_MS_COM, 2);\r
        lenp = cio_tell(cio);\r
        cio_skip(cio, 2);\r
-       /*cio_write(cio, 0, 2);*/\r
-       cio_write(cio, j3d->cp->transform_format,1);\r
-       cio_write(cio, j3d->cp->encoding_format,1);\r
+       cio_write(cio, 0, 2);\r
        /*opj_event_msg(j3d->cinfo, EVT_INFO, "TRF %D ENCOD %d\n",j3d->cp->transform_format,j3d->cp->encoding_format);*/\r
        if (j3d->cp->comment != NULL) {\r
                char *comment = j3d->cp->comment;\r
@@ -2258,6 +2256,10 @@ bool j3d_encode(opj_j3d_t *j3d, opj_cio_t *cio, opj_volume_t *volume, char *inde
                j3d_write_cap(j3d);\r
                j3d_write_nsi(j3d);\r
        }\r
+\r
+       /*if (j3d->cp->transform_format != TRF_2D_DWT || j3d->cp->encoding_format != ENCOD_2EB)*/\r
+               j3d_write_com(j3d);\r
+\r
        j3d_write_cod(j3d);\r
        j3d_write_qcd(j3d);\r
        for (compno = 0; compno < volume->numcomps; compno++) {\r
@@ -2271,9 +2273,6 @@ bool j3d_encode(opj_j3d_t *j3d, opj_cio_t *cio, opj_volume_t *volume, char *inde
        if (j3d->volume->comps[0].dcoffset != 0)\r
         j3d_write_dco(j3d);\r
 \r
-       if (j3d->cp->transform_format != TRF_2D_DWT || j3d->cp->encoding_format != ENCOD_2EB)\r
-               j3d_write_com(j3d);\r
-       \r
        /* INDEX >> */\r
        if(volume_info && volume_info->index_on) {\r
                volume_info->main_head_end = cio_tell(cio) - 1;\r