! : changed
+ : added
+October 24, 2010
+* [antonin] Fixed doxygen data inside source code (from winfried)
+
October 22, 2010
* [antonin] Patch to support the MSVC Win 64 builds (from szekerest)
Decode the structure of a JP2 file
@param jp2 JP2 handle
@param cio Input buffer stream
+@param ext Collector for profile, cdef and pclr data
@return Returns true if successful, returns false otherwise
*/
static bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio,
struct extension *ext);
-
+/**
+Apply collected palette data
+@param ext Collector for profile, cdef and pclr data
+@param image
+*/
+static void jp2_apply_pclr(struct extension *ext, opj_image_t *image);
+/**
+Collect palette data
+@param jp2 JP2 handle
+@param cio Input buffer stream
+@param box
+@param ext Collector for profile, cdef and pclr data
+@return Returns true if successful, returns false otherwise
+*/
+static bool jp2_read_pclr(opj_jp2_t *jp2, opj_cio_t *cio,
+ opj_jp2_box_t *box, struct extension *ext);
+/**
+Collect component mapping data
+@param jp2 JP2 handle
+@param cio Input buffer stream
+@param box
+@param ext Collector for profile, cdef and pclr data
+@return Returns true if successful, returns false otherwise
+*/
+static bool jp2_read_cmap(opj_jp2_t *jp2, opj_cio_t *cio,
+ opj_jp2_box_t *box, struct extension *ext);
+/**
+Collect colour specification data
+@param jp2 JP2 handle
+@param cio Input buffer stream
+@param box
+@param ext Collector for profile, cdef and pclr data
+@return Returns true if successful, returns false otherwise
+*/
+static bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio,
+ opj_jp2_box_t *box, struct extension *ext);
+/**
+Apply ICC profile if Color Management System available
+@param ext Collector for profile, cdef and pclr data
+@param image
+*/
+static void jp2_apply_profile(struct extension *ext, opj_image_t *image);
/*@}*/
/*@}*/
#define JP2_COLR 0x636f6c72 /**< Colour specification box */
#define JP2_JP2C 0x6a703263 /**< Contiguous codestream box */
#define JP2_URL 0x75726c20 /**< URL box */
-#define JP2_DBTL 0x6474626c /**< ??? */
+#define JP2_DTBL 0x6474626c /**< Data Reference box */
#define JP2_BPCC 0x62706363 /**< Bits per component box */
#define JP2_JP2 0x6a703220 /**< File type fields */
-#define JP2_PCLR 0x70636c72
-#define JP2_CMAP 0x636d6170
-#define JP2_CDEF 0x63646566
+#define JP2_PCLR 0x70636c72 /**< Palette box */
+#define JP2_CMAP 0x636d6170 /**< Component Mapping box */
+#define JP2_CDEF 0x63646566 /**< Channel Definition box */
/* ----------------------------------------------------------------------- */
-/* cdef, cmap, pclr, colr
+/**
+Channel description: channel index, type, assocation
*/
typedef struct opj_jp2_cdef_info
{
unsigned short cn, typ, asoc;
} opj_jp2_cdef_info_t;
+/**
+Channel descriptions and number of descriptions
+*/
typedef struct opj_jp2_cdef
{
opj_jp2_cdef_info_t *info;
unsigned short n;
} opj_jp2_cdef_t;
+/**
+Component mappings: channel index, mapping type, palette index
+*/
typedef struct opj_jp2_cmap_comp
{
unsigned short cmp;
unsigned char mtyp, pcol;
} opj_jp2_cmap_comp_t;
+/**
+Palette data: table entries, palette columns
+*/
typedef struct opj_jp2_pclr
{
unsigned int *entries;
unsigned short nr_entries, nr_channels;
} opj_jp2_pclr_t;
+/**
+Collector for ICC profile, palette, component mapping, channel description
+*/
struct extension
{
unsigned char *jp2_profile_buf;
Read the JP2H box - JP2 Header box (used in MJ2)
@param jp2 JP2 handle
@param cio Input buffer stream
+@param ext Collector for profile, cdef and pclr data
@return Returns true if successful, returns false otherwise
*/
bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, struct extension *ext);
\r
/**\r
Reallocate memory blocks.\r
-@param memblock Pointer to previously allocated memory block\r
-@param size New size in bytes\r
+@param m Pointer to previously allocated memory block\r
+@param s New size in bytes\r
@return Returns a void pointer to the reallocated (and possibly moved) memory block\r
*/\r
#ifdef ALLOC_PERF_OPT\r
-void * OPJ_CALLCONV opj_realloc(void * _Memory, size_t NewSize);\r
+void * OPJ_CALLCONV opj_realloc(void * m, size_t s);\r
#else\r
#define opj_realloc(m, s) realloc(m, s)\r
#endif\r
\r
/**\r
Deallocates or frees a memory block.\r
-@param memblock Previously allocated memory block to be freed\r
+@param m Previously allocated memory block to be freed\r
*/\r
#ifdef ALLOC_PERF_OPT\r
-void OPJ_CALLCONV opj_free(void * _Memory);\r
+void OPJ_CALLCONV opj_free(void * m);\r
#else\r
#define opj_free(m) free(m)\r
#endif\r
@param pi Handle to the packet iterator generated in pi_initialise_encode
@param cp Coding parameters
@param tileno Number that identifies the tile for which to list the packets
+@param pino Iterator index for pi
@param tpnum Tile part number of the current tile
@param tppos The position of the tile part flag in the progression order
+@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass
@param cur_totnum_tp The total number of tile parts in the current tile
@return Returns true if an error is detected
*/
@param stepsize
@param cblksty Code-block style
@param numcomps
+@param mct
@param tile
*/
static void t1_encode_cblk(
/**
Decode the code-blocks of a tile
@param t1 T1 handle
-@param tile The tile to decode
-@param tcp Tile coding parameters
+@param tilec The tile to decode
+@param tccp Tile coding parameters
*/
void t1_decode_cblks(opj_t1_t* t1, opj_tcd_tilecomp_t* tilec, opj_tccp_t* tccp);
/* ----------------------------------------------------------------------- */
*/
static int t2_encode_packet(opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, unsigned char *dest, int len, opj_codestream_info_t *cstr_info, int tileno);
/**
-@param seg
+@param cblk
+@param index
@param cblksty
@param first
*/
@param tile Tile for which to write the packets
@param tcp Tile coding parameters
@param pi Packet identity
+@param pack_info Packet information
@return
*/
static int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *tile,
@param cstr_info Codestream information structure
@param tpnum Tile part number of the current tile
@param tppos The position of the tile part flag in the progression order
+@param pino
@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass
@param cur_totnum_tp The total number of tile parts in the current tile
*/
@param len length of the source buffer
@param tileno number that identifies the tile for which to decode the packets
@param tile tile for which to decode the packets
+@param cstr_info Codestream information structure
*/
int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile, opj_codestream_info_t *cstr_info);
@param src Source buffer
@param len Length of source buffer
@param tileno Number that identifies one of the tiles to be decoded
+@param cstr_info Codestream information structure
*/
bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno, opj_codestream_info_t *cstr_info);
/**