From 0dc7f6a2d3d2a242c561b7cc1e4003542f2810b1 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Sun, 24 Oct 2010 20:28:22 +0000 Subject: [PATCH] Fixed doxygen data inside source code (from winfried) --- CHANGES | 3 +++ libopenjpeg/jp2.c | 44 +++++++++++++++++++++++++++++++++++++++- libopenjpeg/jp2.h | 24 +++++++++++++++++----- libopenjpeg/opj_malloc.h | 10 ++++----- libopenjpeg/pi.h | 2 ++ libopenjpeg/t1.c | 1 + libopenjpeg/t1.h | 4 ++-- libopenjpeg/t2.c | 4 +++- libopenjpeg/t2.h | 2 ++ libopenjpeg/tcd.h | 1 + 10 files changed, 81 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index 4906319d..382a2bf1 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ What's New for OpenJPEG ! : 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) diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c index 02f3adb6..48a1f8d0 100644 --- a/libopenjpeg/jp2.c +++ b/libopenjpeg/jp2.c @@ -93,11 +93,53 @@ static bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio); 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); /*@}*/ /*@}*/ diff --git a/libopenjpeg/jp2.h b/libopenjpeg/jp2.h index e9ce242a..3cfaef4a 100644 --- a/libopenjpeg/jp2.h +++ b/libopenjpeg/jp2.h @@ -46,33 +46,43 @@ #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; @@ -82,6 +92,9 @@ typedef struct opj_jp2_pclr 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; @@ -151,6 +164,7 @@ void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio); 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); diff --git a/libopenjpeg/opj_malloc.h b/libopenjpeg/opj_malloc.h index c477aec0..1c99bcd5 100644 --- a/libopenjpeg/opj_malloc.h +++ b/libopenjpeg/opj_malloc.h @@ -130,22 +130,22 @@ Allocate memory aligned to a 16 byte boundry /** Reallocate memory blocks. -@param memblock Pointer to previously allocated memory block -@param size New size in bytes +@param m Pointer to previously allocated memory block +@param s New size in bytes @return Returns a void pointer to the reallocated (and possibly moved) memory block */ #ifdef ALLOC_PERF_OPT -void * OPJ_CALLCONV opj_realloc(void * _Memory, size_t NewSize); +void * OPJ_CALLCONV opj_realloc(void * m, size_t s); #else #define opj_realloc(m, s) realloc(m, s) #endif /** Deallocates or frees a memory block. -@param memblock Previously allocated memory block to be freed +@param m Previously allocated memory block to be freed */ #ifdef ALLOC_PERF_OPT -void OPJ_CALLCONV opj_free(void * _Memory); +void OPJ_CALLCONV opj_free(void * m); #else #define opj_free(m) free(m) #endif diff --git a/libopenjpeg/pi.h b/libopenjpeg/pi.h index b5e0f6a4..80febc5c 100644 --- a/libopenjpeg/pi.h +++ b/libopenjpeg/pi.h @@ -115,8 +115,10 @@ Modify the packet iterator for enabling tile part generation @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 */ diff --git a/libopenjpeg/t1.c b/libopenjpeg/t1.c index 14d5b5cf..49300747 100644 --- a/libopenjpeg/t1.c +++ b/libopenjpeg/t1.c @@ -240,6 +240,7 @@ Encode 1 code-block @param stepsize @param cblksty Code-block style @param numcomps +@param mct @param tile */ static void t1_encode_cblk( diff --git a/libopenjpeg/t1.h b/libopenjpeg/t1.h index 0b4294e1..572ec88d 100644 --- a/libopenjpeg/t1.h +++ b/libopenjpeg/t1.h @@ -135,8 +135,8 @@ void t1_encode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp); /** 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); /* ----------------------------------------------------------------------- */ diff --git a/libopenjpeg/t2.c b/libopenjpeg/t2.c index 102104fe..48463c9c 100644 --- a/libopenjpeg/t2.c +++ b/libopenjpeg/t2.c @@ -59,7 +59,8 @@ Encode a packet of a tile to a destination buffer */ 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 */ @@ -72,6 +73,7 @@ Decode a packet of a tile from a source buffer @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, diff --git a/libopenjpeg/t2.h b/libopenjpeg/t2.h index b15b7520..2151ba67 100644 --- a/libopenjpeg/t2.h +++ b/libopenjpeg/t2.h @@ -67,6 +67,7 @@ Encode the packets of a tile to a destination buffer @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 */ @@ -78,6 +79,7 @@ Decode the packets of a tile from a source buffer @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); diff --git a/libopenjpeg/tcd.h b/libopenjpeg/tcd.h index f0ac5619..a5330730 100644 --- a/libopenjpeg/tcd.h +++ b/libopenjpeg/tcd.h @@ -268,6 +268,7 @@ Decode a tile from a buffer into a raw image @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); /**