Apply doxygen fixes suggested by Brad Hards on opj mailing list.
[openjpeg.git] / libopenjpeg / t1_generate_luts.c
index af298133d1c530a0a4c68a468c2c5fc9646d17c3..ffeff03e1b332ce566ea03676d8752d7d67ceb66 100644 (file)
@@ -31,7 +31,6 @@
  */
 
 #include "opj_includes.h"
-#include <math.h>
 
 static int t1_init_ctxno_zc(int f, int orient) {
        int h, v, d, n, t, hv;
@@ -197,7 +196,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 +259,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;
 }