Add support for partial bitstream decoding (#1407) (fixes #715)
[openjpeg.git] / src / lib / openjp2 / t1.h
index da8b0c80256ccf15682e7742fefe7a14a6c44ffa..ce43658ba383c31c557e6e974be77750d55142d0 100644 (file)
@@ -198,14 +198,15 @@ typedef struct opj_t1 {
     OPJ_UINT32 h;
     OPJ_UINT32 datasize;
     OPJ_UINT32 flagssize;
-    OPJ_UINT32 data_stride;
     OPJ_BOOL   encoder;
 
-    /* Thre 3 variables below are only used by the decoder */
-    OPJ_BOOL     mustuse_segdatabuffer; /* set to TRUE in multithreaded context */
-    OPJ_BYTE
-    *segdatabuffer;     /* Temporary buffer to concatenate all chunks of a segment */
-    OPJ_UINT32   segdatabuffersize; /* Maximum size available in segdatabuffer */
+    /* The 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 */
@@ -214,13 +215,13 @@ typedef struct opj_t1 {
 
 /**
 Encode the code-blocks of a tile
-@param t1 T1 handle
+@param tcd TCD handle
 @param tile The tile to encode
 @param tcp Tile coding parameters
 @param mct_norms  FIXME DOC
 @param mct_numcomps Number of components used for MCT
 */
-OPJ_BOOL opj_t1_encode_cblks(opj_t1_t *t1,
+OPJ_BOOL opj_t1_encode_cblks(opj_tcd_t* tcd,
                              opj_tcd_tile_t *tile,
                              opj_tcp_t *tcp,
                              const OPJ_FLOAT64 * mct_norms,
@@ -228,7 +229,7 @@ OPJ_BOOL opj_t1_encode_cblks(opj_t1_t *t1,
 
 /**
 Decode the code-blocks of a tile
-@param tp Thread pool
+@param tcd TCD handle
 @param pret Pointer to return value
 @param tilec The tile to decode
 @param tccp Tile coding parameters
@@ -236,7 +237,7 @@ Decode the code-blocks of a tile
 @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,