summaryrefslogtreecommitdiff
path: root/src/lib/openjp3d/t1.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-05-15 12:21:30 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-05-15 12:21:30 +0200
commit3c2972f924857016bb454201c7e92f25de9105ee (patch)
treedee91c4c200c2e97c83fd4c46588bf923f23852c /src/lib/openjp3d/t1.h
parent28d2eabca79d06378843d1e94fecfb4a5e22178d (diff)
Reformat: apply reformattin on .h files (#128)
Diffstat (limited to 'src/lib/openjp3d/t1.h')
-rw-r--r--src/lib/openjp3d/t1.h89
1 files changed, 45 insertions, 44 deletions
diff --git a/src/lib/openjp3d/t1.h b/src/lib/openjp3d/t1.h
index 8d52f0cc..f2c61e0a 100644
--- a/src/lib/openjp3d/t1.h
+++ b/src/lib/openjp3d/t1.h
@@ -1,6 +1,6 @@
/*
- * The copyright in this software is being made available under the 2-clauses
- * BSD License, included below. This software may be subject to other third
+ * The copyright in this software is being made available under the 2-clauses
+ * BSD License, included below. This software may be subject to other third
* party and contributor rights, including patent rights, and no such rights
* are granted under this license.
*
@@ -48,25 +48,25 @@ in T1.C are used by some function in TCD.C.
/* ----------------------------------------------------------------------- */
#define T1_NMSEDEC_BITS 7
-#define T1_MAXCBLKW 256 /*< Maximum size of code-block (width) */
-#define T1_MAXCBLKH 256 /*< Maximum size of code-block (heigth) */
-#define T1_MAXCBLKD 256 /*< Maximum size of code-block (depth) */
-#define T1_MINCBLKW 4 /*< Minimum size of code-block (width) */
-#define T1_MINCBLKH 4 /*< Minimum size of code-block (heigth) */
-#define T1_MINCBLKD 4 /*< Minimum size of code-block (depth) */
-#define T1_MAXWHD 18
+#define T1_MAXCBLKW 256 /*< Maximum size of code-block (width) */
+#define T1_MAXCBLKH 256 /*< Maximum size of code-block (heigth) */
+#define T1_MAXCBLKD 256 /*< Maximum size of code-block (depth) */
+#define T1_MINCBLKW 4 /*< Minimum size of code-block (width) */
+#define T1_MINCBLKH 4 /*< Minimum size of code-block (heigth) */
+#define T1_MINCBLKD 4 /*< Minimum size of code-block (depth) */
+#define T1_MAXWHD 18
#define T1_CBLKW 256
#define T1_CBLKH 256
#define T1_CBLKD 256
-#define T1_SIG_NE 0x0001 /*< Context orientation : North-East direction */
-#define T1_SIG_SE 0x0002 /*< Context orientation : South-East direction */
-#define T1_SIG_SW 0x0004 /*< Context orientation : South-West direction */
-#define T1_SIG_NW 0x0008 /*< Context orientation : North-West direction */
-#define T1_SIG_N 0x0010 /*< Context orientation : North direction */
-#define T1_SIG_E 0x0020 /*< Context orientation : East direction */
-#define T1_SIG_S 0x0040 /*< Context orientation : South direction */
-#define T1_SIG_W 0x0080 /*< Context orientation : West direction */
+#define T1_SIG_NE 0x0001 /*< Context orientation : North-East direction */
+#define T1_SIG_SE 0x0002 /*< Context orientation : South-East direction */
+#define T1_SIG_SW 0x0004 /*< Context orientation : South-West direction */
+#define T1_SIG_NW 0x0008 /*< Context orientation : North-West direction */
+#define T1_SIG_N 0x0010 /*< Context orientation : North direction */
+#define T1_SIG_E 0x0020 /*< Context orientation : East direction */
+#define T1_SIG_S 0x0040 /*< Context orientation : South direction */
+#define T1_SIG_W 0x0080 /*< Context orientation : West direction */
#define T1_SIG_OTH (T1_SIG_N|T1_SIG_NE|T1_SIG_E|T1_SIG_SE|T1_SIG_S|T1_SIG_SW|T1_SIG_W|T1_SIG_NW)
#define T1_SIG_PRIM (T1_SIG_N|T1_SIG_E|T1_SIG_S|T1_SIG_W)
@@ -95,8 +95,8 @@ in T1.C are used by some function in TCD.C.
#define T1_NMSEDEC_FRACBITS (T1_NMSEDEC_BITS-1)
-#define T1_TYPE_MQ 0 /*< Normal coding using entropy coder */
-#define T1_TYPE_RAW 1 /*< No encoding the information is store under raw format in codestream (mode switch RAW)*/
+#define T1_TYPE_MQ 0 /*< Normal coding using entropy coder */
+#define T1_TYPE_RAW 1 /*< No encoding the information is store under raw format in codestream (mode switch RAW)*/
/* ----------------------------------------------------------------------- */
@@ -104,34 +104,34 @@ in T1.C are used by some function in TCD.C.
Tier-1 coding (coding of code-block coefficients)
*/
typedef struct opj_t1 {
- /** codec context */
- opj_common_ptr cinfo;
-
- /** MQC component */
- opj_mqc_t *mqc;
- /** RAW component */
- opj_raw_t *raw;
- /** LUTs for context-based coding */
- int lut_ctxno_zc[1024];
- int lut_ctxno_sc[256];
- int lut_ctxno_mag[4096];
- int lut_spb[256];
- /** LUTs for decoding normalised MSE */
- int lut_nmsedec_sig[1 << T1_NMSEDEC_BITS];
- int lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS];
- int lut_nmsedec_ref[1 << T1_NMSEDEC_BITS];
- int lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS];
- /** Codeblock data */
- int data[T1_CBLKD][T1_CBLKH][T1_CBLKW];/*int ***data;*/
- /** Context information for each voxel in codeblock */
- int flags[T1_CBLKD + 2][T1_CBLKH + 2][T1_CBLKH + 2];/*int ***flags;*/
+ /** codec context */
+ opj_common_ptr cinfo;
+
+ /** MQC component */
+ opj_mqc_t *mqc;
+ /** RAW component */
+ opj_raw_t *raw;
+ /** LUTs for context-based coding */
+ int lut_ctxno_zc[1024];
+ int lut_ctxno_sc[256];
+ int lut_ctxno_mag[4096];
+ int lut_spb[256];
+ /** LUTs for decoding normalised MSE */
+ int lut_nmsedec_sig[1 << T1_NMSEDEC_BITS];
+ int lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS];
+ int lut_nmsedec_ref[1 << T1_NMSEDEC_BITS];
+ int lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS];
+ /** Codeblock data */
+ int data[T1_CBLKD][T1_CBLKH][T1_CBLKW];/*int ***data;*/
+ /** Context information for each voxel in codeblock */
+ int flags[T1_CBLKD + 2][T1_CBLKH + 2][T1_CBLKH + 2];/*int ***flags;*/
} opj_t1_t;
/** @name Exported functions */
/*@{*/
/* ----------------------------------------------------------------------- */
/**
-Create a new T1 handle
+Create a new T1 handle
and initialize the look-up tables of the Tier-1 coder/decoder
@return Returns a new T1 handle if successful, returns NULL otherwise
@see t1_init_luts
@@ -159,8 +159,8 @@ void t1_decode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp);
/**
Get weigths of MSE decoding
@param nmsedec The normalized MSE reduction
-@param compno
-@param level
+@param compno
+@param level
@param orient
@param bpno
@param stepsize
@@ -168,7 +168,8 @@ Get weigths of MSE decoding
@param dwtid
returns MSE associated to decoding pass
*/
-double t1_getwmsedec(int nmsedec, int compno, int level[3], int orient, int bpno, double stepsize, int numcomps, int dwtid[3]);
+double t1_getwmsedec(int nmsedec, int compno, int level[3], int orient,
+ int bpno, double stepsize, int numcomps, int dwtid[3]);
/* ----------------------------------------------------------------------- */
/*@}*/