Reformat: apply reformattin on .h files (#128)
[openjpeg.git] / src / lib / openjpip / index_manager.h
index 8831d7f5bf1f27b9aad4c7a0a0cba3d5087ce520..f0b06186faa2b1c276ff4a075be5d7141055cb3d 100644 (file)
@@ -28,8 +28,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef        INDEX_MANAGER_H_
-# define       INDEX_MANAGER_H_
+#ifndef     INDEX_MANAGER_H_
+# define    INDEX_MANAGER_H_
 
 #include "opj_config.h"
 #include "opj_includes.h"
 /** progression order */
 #if 0
 typedef enum porder {
-  PROG_UNKNOWN = -1,      /**< place-holder */
-  LRCP = 0,               /**< layer-resolution-component-precinct order */
-  RLCP = 1,               /**< resolution-layer-component-precinct order */
-  RPCL = 2,               /**< resolution-precinct-component-layer order */
-  PCRL = 3,               /**< precinct-component-resolution-layer order */
-  CPRL = 4                /**< component-precinct-resolution-layer order */
+    PROG_UNKNOWN = -1,      /**< place-holder */
+    LRCP = 0,               /**< layer-resolution-component-precinct order */
+    RLCP = 1,               /**< resolution-layer-component-precinct order */
+    RPCL = 2,               /**< resolution-precinct-component-layer order */
+    PCRL = 3,               /**< precinct-component-resolution-layer order */
+    CPRL = 4                /**< component-precinct-resolution-layer order */
 } porder_t;
 #endif
 
 /** A.5.1 Image and tile size (SIZ)*/
-typedef struct SIZmarker_param{
-  Byte2_t Lsiz;              /**< length of marker segment excluding the marker*/
-  Byte2_t Rsiz;              /**< capabilities that a decoder needs*/
-  Byte4_t Xsiz;              /**< width of the reference grid*/
-  Byte4_t Ysiz;              /**< height of the reference grid*/
-  Byte4_t XOsiz;             /**< horizontal offset from the origin of the reference grid to the left side of the image area*/
-  Byte4_t YOsiz;             /**< vertical offset from the origin of the reference grid to the top side of the image area*/
-  Byte4_t XTsiz;             /**< width of one reference tile with respect to the reference grid*/
-  Byte4_t YTsiz;             /**< height of one reference tile with respect to the reference grid*/
-  Byte4_t XTOsiz;            /**< horizontal offset from the origin of the reference grid to the left side of the first tile*/
-  Byte4_t YTOsiz;            /**< vertical offset from the origin of the reference grid to the top side of the first tile*/
-  Byte4_t XTnum;             /**< number of tiles in horizontal direction*/
-  Byte4_t YTnum;             /**< number of tiles in vertical direction*/
-  Byte2_t Csiz;              /**< number of the components in the image*/
-  Byte_t  Ssiz[3];           /**< precision (depth) in bits and sign of the component samples*/
-  Byte_t  XRsiz[3];          /**< horizontal separation of a sample of component with respect to the reference grid*/
-  Byte_t  YRsiz[3];          /**< vertical separation of a sample of component with respect to the reference grid*/
+typedef struct SIZmarker_param {
+    Byte2_t Lsiz;              /**< length of marker segment excluding the marker*/
+    Byte2_t Rsiz;              /**< capabilities that a decoder needs*/
+    Byte4_t Xsiz;              /**< width of the reference grid*/
+    Byte4_t Ysiz;              /**< height of the reference grid*/
+    Byte4_t XOsiz;             /**< horizontal offset from the origin of the reference grid to the left side of the image area*/
+    Byte4_t YOsiz;             /**< vertical offset from the origin of the reference grid to the top side of the image area*/
+    Byte4_t XTsiz;             /**< width of one reference tile with respect to the reference grid*/
+    Byte4_t YTsiz;             /**< height of one reference tile with respect to the reference grid*/
+    Byte4_t XTOsiz;            /**< horizontal offset from the origin of the reference grid to the left side of the first tile*/
+    Byte4_t YTOsiz;            /**< vertical offset from the origin of the reference grid to the top side of the first tile*/
+    Byte4_t XTnum;             /**< number of tiles in horizontal direction*/
+    Byte4_t YTnum;             /**< number of tiles in vertical direction*/
+    Byte2_t Csiz;              /**< number of the components in the image*/
+    Byte_t  Ssiz[3];           /**< precision (depth) in bits and sign of the component samples*/
+    Byte_t  XRsiz[3];          /**< horizontal separation of a sample of component with respect to the reference grid*/
+    Byte_t  YRsiz[3];          /**< vertical separation of a sample of component with respect to the reference grid*/
 } SIZmarker_param_t;
 
 /** A.6.1 Coding style default (COD)*/
-typedef struct CODmarker_param{
-  Byte2_t  Lcod;             /**< length of marker segment excluding the marker*/
-  Byte_t   Scod;             /**< Coding style for all components*/
-  OPJ_PROG_ORDER prog_order;       /**< progression order*/
-  Byte2_t  numOflayers;      /**< number of layers*/
-  Byte_t   numOfdecomp;      /**< number of decompositions levels*/
-  Byte4_t  *XPsiz;           /**< dynamic array of precinct width  at successive resolution level in order*/
-  Byte4_t  *YPsiz;           /**< dynamic array of precinct height at successive resolution level in order*/
+typedef struct CODmarker_param {
+    Byte2_t  Lcod;             /**< length of marker segment excluding the marker*/
+    Byte_t   Scod;             /**< Coding style for all components*/
+    OPJ_PROG_ORDER prog_order;       /**< progression order*/
+    Byte2_t  numOflayers;      /**< number of layers*/
+    Byte_t   numOfdecomp;      /**< number of decompositions levels*/
+    Byte4_t  *XPsiz;           /**< dynamic array of precinct width  at successive resolution level in order*/
+    Byte4_t  *YPsiz;           /**< dynamic array of precinct height at successive resolution level in order*/
 } CODmarker_param_t;
 
 /** index parameters*/
-typedef struct index_param{
-  metadatalist_param_t *metadatalist; /**< metadata-bin list*/
-  OPJ_OFF_T offset;                     /**< codestream offset*/
-  Byte8_t length;                     /**< codestream length */
-  Byte8_t mhead_length;               /**< main header length  */
-  SIZmarker_param_t SIZ;              /**< SIZ marker information*/
-  CODmarker_param_t COD;              /**< COD marker information*/
-  faixbox_param_t *tilepart;          /**< tile part information from tpix box*/
-  mhixbox_param_t **tileheader;       /**< dynamic array of tile header information from thix box*/
-  faixbox_param_t **precpacket;       /**< dynamic array of precint packet information from ppix box*/
+typedef struct index_param {
+    metadatalist_param_t *metadatalist; /**< metadata-bin list*/
+    OPJ_OFF_T offset;                     /**< codestream offset*/
+    Byte8_t length;                     /**< codestream length */
+    Byte8_t mhead_length;               /**< main header length  */
+    SIZmarker_param_t SIZ;              /**< SIZ marker information*/
+    CODmarker_param_t COD;              /**< COD marker information*/
+    faixbox_param_t *tilepart;          /**< tile part information from tpix box*/
+    mhixbox_param_t
+    **tileheader;       /**< dynamic array of tile header information from thix box*/
+    faixbox_param_t
+    **precpacket;       /**< dynamic array of precint packet information from ppix box*/
 } index_param_t;
 
 
@@ -103,48 +105,48 @@ typedef struct index_param{
  * @param[in] fd file descriptor of the JP2 file
  * @return       pointer to the generated structure of index parameters
  */
-index_param_t * parse_jp2file( int fd);
+index_param_t * parse_jp2file(int fd);
 
 /**
  * print index parameters
  *
  * @param[in] index index parameters
  */
-void print_index( index_param_t index);
+void print_index(index_param_t index);
 
 /**
  * print Image and Tile SIZ parameters
  *
  * @param[in] SIZ SIZ marker information
  */
-void print_SIZ( SIZmarker_param_t SIZ);
+void print_SIZ(SIZmarker_param_t SIZ);
 
 /**
  * print Coding style default COD parameters
  *
  * @param[in] COD COD marker information
  */
-void print_COD( CODmarker_param_t COD);
+void print_COD(CODmarker_param_t COD);
 
 /**
  * delete index
  *
  * @param[in,out] index addressof the index pointer
  */
-void delete_index( index_param_t **index);
+void delete_index(index_param_t **index);
 
 /**
  * delete dynamic arrays in COD marker
  *
  * @param[in] COD COD marker information
  */
-void delete_COD( CODmarker_param_t COD);
+void delete_COD(CODmarker_param_t COD);
 
 
 /** 1-dimensional range parameters*/
-typedef struct range_param{
-  Byte4_t minvalue; /**< minimal value*/
-  Byte4_t maxvalue; /**< maximal value*/
+typedef struct range_param {
+    Byte4_t minvalue; /**< minimal value*/
+    Byte4_t maxvalue; /**< maximal value*/
 } range_param_t;
 
 /**
@@ -155,7 +157,8 @@ typedef struct range_param{
  * @param[in] level    decomposition level
  * @return             structured range parameter
  */
-range_param_t get_tile_Xrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
+range_param_t get_tile_Xrange(SIZmarker_param_t SIZ, Byte4_t tile_id,
+                              int level);
 
 /**
  * get vertical range of the tile in reference grid
@@ -165,7 +168,8 @@ range_param_t get_tile_Xrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level
  * @param[in] level    decomposition level
  * @return             structured range parameter
  */
-range_param_t get_tile_Yrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
+range_param_t get_tile_Yrange(SIZmarker_param_t SIZ, Byte4_t tile_id,
+                              int level);
 
 
 /**
@@ -176,8 +180,8 @@ range_param_t get_tile_Yrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level
  * @param[in] level    decomposition level
  * @return             tile width
  */
-Byte4_t get_tile_XSiz( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
-Byte4_t get_tile_YSiz( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
+Byte4_t get_tile_XSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
+Byte4_t get_tile_YSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
 
 
 /**
@@ -186,6 +190,6 @@ Byte4_t get_tile_YSiz( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
  * @param[in] index index parameters
  * @return    true if JPT-stream is feasible
  */
-OPJ_BOOL isJPTfeasible( index_param_t index);
+OPJ_BOOL isJPTfeasible(index_param_t index);
 
-#endif             /* !INDEX_MANAGER_H_ */
+#endif      /* !INDEX_MANAGER_H_ */