struct opj_j2k: remove unused fields, and add some documentation
authorEven Rouault <even.rouault@spatialys.com>
Sat, 18 Apr 2020 16:25:44 +0000 (18:25 +0200)
committerEven Rouault <even.rouault@spatialys.com>
Sat, 18 Apr 2020 16:25:44 +0000 (18:25 +0200)
src/lib/openjp2/j2k.h
src/lib/openjp2/jp2.c

index 5d393c98130f27af8ee128175e504e580e4e4e13..3ea6395f97c9ec6e9377838bc1b2c3cd734817f0 100644 (file)
@@ -577,15 +577,16 @@ typedef struct opj_j2k {
     /** the current tile coder/decoder **/
     struct opj_tcd *    m_tcd;
 
     /** the current tile coder/decoder **/
     struct opj_tcd *    m_tcd;
 
-    /** Number of threads to use */
-    int m_num_threads;
-
     /** Thread pool */
     opj_thread_pool_t* m_tp;
 
     /** Thread pool */
     opj_thread_pool_t* m_tp;
 
+    /** Image width coming from JP2 IHDR box. 0 from a pure codestream */
     OPJ_UINT32 ihdr_w;
     OPJ_UINT32 ihdr_w;
+
+    /** Image height coming from JP2 IHDR box. 0 from a pure codestream */
     OPJ_UINT32 ihdr_h;
     OPJ_UINT32 ihdr_h;
-    OPJ_UINT32 enumcs;
+
+    /** Set to 1 by the decoder initialization if OPJ_DPARAMETERS_DUMP_FLAG is set */
     unsigned int dump_state;
 }
 opj_j2k_t;
     unsigned int dump_state;
 }
 opj_j2k_t;
index 4402ffe3c51ee347d3a0ef04a54dc89846859fd8..a2363666c90ca70660616abef50a764360db21c9 100644 (file)
@@ -1584,9 +1584,7 @@ static OPJ_BOOL opj_jp2_read_colr(opj_jp2_t *jp2,
                       "COLR BOX meth value is not a regular value (%d), "
                       "so we will ignore the entire Colour Specification box. \n", jp2->meth);
     }
                       "COLR BOX meth value is not a regular value (%d), "
                       "so we will ignore the entire Colour Specification box. \n", jp2->meth);
     }
-    if (jp2->color.jp2_has_colr) {
-        jp2->j2k->enumcs = jp2->enumcs;
-    }
+
     return OPJ_TRUE;
 }
 
     return OPJ_TRUE;
 }