[trunk] WIP: add output elements about decoding of jp2 files with last tile part...
[openjpeg.git] / libopenjpeg / t1_generate_luts.c
index af298133d1c530a0a4c68a468c2c5fc9646d17c3..39880414fb6bde1df07926deb90153a51bfa90fe 100644 (file)
@@ -197,7 +197,13 @@ int main(){
        // lut_ctxno_zc
        for (j = 0; j < 4; ++j) {
                for (i = 0; i < 256; ++i) {
-                       lut_ctxno_zc[(j << 8) | i] = t1_init_ctxno_zc(i, j);
+                       int orient = j;
+                       if (orient == 2) {
+                               orient = 1;
+                       } else if (orient == 1) {
+                               orient = 2;
+                       }
+                       lut_ctxno_zc[(orient << 8) | i] = t1_init_ctxno_zc(i, j);
                }
        }
 
@@ -254,16 +260,16 @@ int main(){
        }
 
        printf("static short lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = {\n  ");
-       dump_array16(&lut_nmsedec_sig, 1 << T1_NMSEDEC_BITS);
+       dump_array16(lut_nmsedec_sig, 1 << T1_NMSEDEC_BITS);
 
        printf("static short lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = {\n  ");
-       dump_array16(&lut_nmsedec_sig0, 1 << T1_NMSEDEC_BITS);
+       dump_array16(lut_nmsedec_sig0, 1 << T1_NMSEDEC_BITS);
 
        printf("static short lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = {\n  ");
-       dump_array16(&lut_nmsedec_ref, 1 << T1_NMSEDEC_BITS);
+       dump_array16(lut_nmsedec_ref, 1 << T1_NMSEDEC_BITS);
 
        printf("static short lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = {\n  ");
-       dump_array16(&lut_nmsedec_ref0, 1 << T1_NMSEDEC_BITS);
+       dump_array16(lut_nmsedec_ref0, 1 << T1_NMSEDEC_BITS);
 
        return 0;
 }