-/*
- * Apply a reversible DWT transform to a component of an image
- * a: samples of the component
- * w: width of the component
- * h: height of the component
- * l: number of decomposition levels in the DWT
- */
-/* void dwt_encode(int* a, int w, int h, int l); */
-void dwt_encode(int *a, int w, int h, tcd_tilecomp_t * tilec, int l);
-/*
- * Apply a reversible inverse DWT transform to a component of an image
- * a: samples of the component
- * w: width of the component
- * h: height of the component
- * l: number of decomposition levels in the DWT
- */
-void dwt_decode(int *a, int w, int h, tcd_tilecomp_t * tilec, int l,
- tcd_tilecomp_t * row_tilec, tcd_tilecomp_t * col_tilec);
-/* void dwt_decode(int* a, int w, int h,tcd_tilecomp_t *tilec, int l); */
-/*
- * Get the gain of a subband for the reversible DWT
- * orient: number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH)
- */
+The functions in DWT.C have for goal to realize forward and inverse discret wavelet
+transform with filter 5-3 (reversible) and filter 9-7 (irreversible). The functions in
+DWT.C are used by some function in TCD.C.
+*/
+
+/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */
+/*@{*/
+
+
+/** @name Exported functions */
+/*@{*/
+/* ----------------------------------------------------------------------- */
+/**
+Forward 5-3 wavelet tranform in 2-D.
+Apply a reversible DWT transform to a component of an image.
+@param tilec Tile component information (current tile)
+*/
+void dwt_encode(opj_tcd_tilecomp_t * tilec);
+/**
+Inverse 5-3 wavelet tranform in 2-D.
+Apply a reversible inverse DWT transform to a component of an image.
+@param tilec Tile component information (current tile)
+@param numres Number of resolution levels to decode
+*/
+#ifdef OPJ_V1
+void dwt_decode(opj_tcd_tilecomp_t* tilec, int numres);
+#endif
+opj_bool dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres);
+
+opj_bool dwt_decode_v2(opj_tcd_tilecomp_v2_t* tilec, OPJ_UINT32 numres);
+
+/**
+Get the gain of a subband for the reversible 5-3 DWT.
+@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH)
+@return Returns 0 if orient = 0, returns 1 if orient = 1 or 2, returns 2 otherwise
+*/