struct opj_j2k: remove unused fields, and add some documentation
[openjpeg.git] / src / lib / openjp2 / t1.h
index 171232658fd5e34af4c7361377fa601a463ef67e..171dfb0a7ae57e5f874f74c6967d80b628b6316e 100644 (file)
@@ -36,8 +36,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __T1_H
-#define __T1_H
+#ifndef OPJ_T1_H
+#define OPJ_T1_H
 /**
 @file t1.h
 @brief Implementation of the tier-1 coding (coding of code-block coefficients) (T1)
@@ -75,7 +75,7 @@ in T1.C are used by some function in TCD.C.
  *  a single 32-bit flags word to hold the state of 4 data points.  This corresponds
  *  to the 4-point-high columns that the data is processed in.
  *
- *  These #defines declare the layout of a 32-bit flags word.
+ *  These \#defines declare the layout of a 32-bit flags word.
  *
  *  This is currently done for encoding only.
  *  The values must NOT be changed, otherwise this is going to break a lot of
@@ -134,7 +134,7 @@ in T1.C are used by some function in TCD.C.
  *  word right by 3 bits and look at the same bit positions to see the
  *  values for data point 1.
  *
- *  The #defines below help a bit with this; say you have a flags word
+ *  The \#defines below help a bit with this; say you have a flags word
  *  f, you can do things like
  *
  *  (f & T1_SIGMA_THIS)
@@ -185,8 +185,6 @@ typedef struct opj_t1 {
 
     /** MQC component */
     opj_mqc_t mqc;
-    /** RAW component */
-    opj_raw_t raw;
 
     OPJ_INT32  *data;
     /** Flags used by decoder and encoder.
@@ -202,6 +200,14 @@ typedef struct opj_t1 {
     OPJ_UINT32 flagssize;
     OPJ_UINT32 data_stride;
     OPJ_BOOL   encoder;
+
+    /* Thre 3 variables below are only used by the decoder */
+    /* set to TRUE in multithreaded context */
+    OPJ_BOOL     mustuse_cblkdatabuffer;
+    /* Temporary buffer to concatenate all chunks of a codebock */
+    OPJ_BYTE    *cblkdatabuffer;
+    /* Maximum size available in cblkdatabuffer */
+    OPJ_UINT32   cblkdatabuffersize;
 } opj_t1_t;
 
 /** @name Exported functions */
@@ -224,14 +230,21 @@ OPJ_BOOL opj_t1_encode_cblks(opj_t1_t *t1,
 
 /**
 Decode the code-blocks of a tile
-@param t1 T1 handle
+@param tcd TCD handle
+@param pret Pointer to return value
 @param tilec The tile to decode
 @param tccp Tile coding parameters
+@param p_manager the event manager
+@param p_manager_mutex mutex for the event manager
+@param check_pterm whether PTERM correct termination should be checked
 */
-void opj_t1_decode_cblks(opj_thread_pool_t* tp,
+void opj_t1_decode_cblks(opj_tcd_t* tcd,
                          volatile OPJ_BOOL* pret,
                          opj_tcd_tilecomp_t* tilec,
-                         opj_tccp_t* tccp);
+                         opj_tccp_t* tccp,
+                         opj_event_mgr_t *p_manager,
+                         opj_mutex_t* p_manager_mutex,
+                         OPJ_BOOL check_pterm);
 
 
 
@@ -253,4 +266,4 @@ void opj_t1_destroy(opj_t1_t *p_t1);
 
 /*@}*/
 
-#endif /* __T1_H */
+#endif /* OPJ_T1_H */