5d0978c057799ff9f3171025e1852c5d92c46859
[openjpeg.git] / libjp3dvm / jp3d.h
1 /*\r
2  * Copyright (c) 2001-2003, David Janssens\r
3  * Copyright (c) 2002-2003, Yannick Verschueren\r
4  * Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe\r
5  * Copyright (c) 2005, Herve Drolon, FreeImage Team\r
6  * Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium\r
7  * Copyright (c) 2006, M�nica D�ez Garc�a, Image Processing Laboratory, University of Valladolid, Spain\r
8  * All rights reserved.\r
9  *\r
10  * Redistribution and use in source and binary forms, with or without\r
11  * modification, are permitted provided that the following conditions\r
12  * are met:\r
13  * 1. Redistributions of source code must retain the above copyright\r
14  *    notice, this list of conditions and the following disclaimer.\r
15  * 2. Redistributions in binary form must reproduce the above copyright\r
16  *    notice, this list of conditions and the following disclaimer in the\r
17  *    documentation and/or other materials provided with the distribution.\r
18  *\r
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'\r
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
22  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\r
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
29  * POSSIBILITY OF SUCH DAMAGE.\r
30  */\r
31 #ifndef __J3D_H\r
32 #define __J3D_H\r
33 /**\r
34 @file j3d.h\r
35 @brief The JPEG-2000 Codestream Reader/Writer (J3D)\r
36 \r
37 The functions in J3D.C have for goal to read/write the several parts of the codestream: markers and data.\r
38 */\r
39 \r
40 /** @defgroup J3D J3D - JPEG-2000 codestream reader/writer */\r
41 /*@{*/\r
42 \r
43 #define J3D_CP_CSTY_PRT 0x01\r
44 #define J3D_CP_CSTY_SOP 0x02\r
45 #define J3D_CP_CSTY_EPH 0x04\r
46 #define J3D_CCP_CSTY_PRT 0x01\r
47 /** Table A-8 */\r
48 #define J3D_CCP_CBLKSTY_LAZY 0x01        /* Selective arithmetic coding bypass */\r
49 #define J3D_CCP_CBLKSTY_RESET 0x02   /* Reset context probabilities on coding pass boundaries */\r
50 #define J3D_CCP_CBLKSTY_TERMALL 0x04 /* Termination on each coding pass */\r
51 #define J3D_CCP_CBLKSTY_VSC 0x08         /* Vertically causal context, add also hook for switching off and on 3D context models */      \r
52 #define J3D_CCP_CBLKSTY_PTERM 0x10       /* Predictable termination */\r
53 #define J3D_CCP_CBLKSTY_SEGSYM 0x20      /* Segmentation symbols are used */\r
54 #define J3D_CCP_CBLKSTY_3DCTXT 0x40  /* 3D context models (3D-EBCOT) vs 2D context models */\r
55 \r
56 #define J3D_CCP_QNTSTY_NOQNT 0  /* Quantization style : no quantization */\r
57 #define J3D_CCP_QNTSTY_SIQNT 1  /* Quantization style : scalar derived (values signalled only in LLL subband) */\r
58 #define J3D_CCP_QNTSTY_SEQNT 2  /* Quantization style : scalar expounded (values signalled for each subband) */\r
59 \r
60 /* ----------------------------------------------------------------------- */\r
61 \r
62 #define J3D_MS_SOC 0xff4f       /**< SOC marker value */\r
63 #define J3D_MS_SOT 0xff90       /**< SOT marker value */\r
64 #define J3D_MS_SOD 0xff93       /**< SOD marker value */\r
65 #define J3D_MS_EOC 0xffd9       /**< EOC marker value */\r
66 #define J3D_MS_CAP 0xff50       /**< CAP marker value */\r
67 #define J3D_MS_SIZ 0xff51       /**< SIZ marker value */\r
68 #define J3D_MS_ZSI 0xff54       /**< ZSI marker value */\r
69 #define J3D_MS_COD 0xff52       /**< COD marker value */\r
70 #define J3D_MS_COC 0xff53       /**< COC marker value */\r
71 #define J3D_MS_RGN 0xff5e       /**< RGN marker value */\r
72 #define J3D_MS_QCD 0xff5c       /**< QCD marker value */\r
73 #define J3D_MS_QCC 0xff5d       /**< QCC marker value */\r
74 #define J3D_MS_POC 0xff5f       /**< POC marker value */\r
75 #define J3D_MS_TLM 0xff55       /**< TLM marker value */\r
76 #define J3D_MS_PLM 0xff57       /**< PLM marker value */\r
77 #define J3D_MS_PLT 0xff58       /**< PLT marker value */\r
78 #define J3D_MS_PPM 0xff60       /**< PPM marker value */\r
79 #define J3D_MS_PPT 0xff61       /**< PPT marker value */\r
80 #define J3D_MS_SOP 0xff91       /**< SOP marker value */\r
81 #define J3D_MS_EPH 0xff92       /**< EPH marker value */\r
82 #define J3D_MS_CRG 0xff63       /**< CRG marker value */\r
83 #define J3D_MS_COM 0xff64       /**< COM marker value */\r
84 //15444-2\r
85 #define J3D_MS_DCO 0xff70       /**< DCO marker value */\r
86 #define J3D_MS_VMS 0xff71   /**< VMS marker value */\r
87 #define J3D_MS_DFS 0xff72       /**< DFS marker value */\r
88 #define J3D_MS_ADS 0xff73       /**< ADS marker value */\r
89 #define J3D_MS_ATK 0xff79       /**< ATK marker value */\r
90 #define J3D_MS_CBD 0xff78       /**< CBD marker value */\r
91 #define J3D_MS_MCT 0xff74       /**< MCT marker value */\r
92 #define J3D_MS_MCC 0xff75       /**< MCC marker value */\r
93 #define J3D_MS_MCO 0xff77       /**< MCO marker value */\r
94 #define J3D_MS_NLT 0xff76       /**< NLT marker value */\r
95 #define J3D_MS_QPD 0xff5a       /**< QPD marker value */\r
96 #define J3D_MS_QPC 0xff5b       /**< QPC marker value */\r
97 \r
98 /* ----------------------------------------------------------------------- */\r
99 /* Capability RSIZ parameter, extended */\r
100 #define J3D_RSIZ_BASIC 0x0000\r
101 \r
102 #define J3D_RSIZ_DCO   0x8001 /* Required */\r
103 #define J3D_RSIZ_VSQNT 0x8002\r
104 #define J3D_RSIZ_TCQNT 0x8004\r
105 #define J3D_RSIZ_VMASK 0x8008\r
106 #define J3D_RSIZ_SSOVL 0x8010\r
107 #define J3D_RSIZ_ADECS 0x8020\r
108 #define J3D_RSIZ_ATK   0x8040 /*Required*/\r
109 #define J3D_RSIZ_SSYMK 0x8080\r
110 #define J3D_RSIZ_MCT   0x8100 /*Not compatible with DCO*/\r
111 #define J3D_RSIZ_NLT   0x8200 /*Required*/\r
112 #define J3D_RSIZ_ASHAP 0x8400\r
113 #define J3D_RSIZ_PRQNT 0x8800\r
114 \r
115 #define J3D_CAP_10              0x00400000\r
116 /* Arbitrary transformation kernel, 15444-2 */\r
117 #define J3D_ATK_IRR 0\r
118 #define J3D_ATK_REV 1\r
119 #define J3D_ATK_ARB 0\r
120 #define J3D_ATK_WS 1\r
121 #define J3D_ATK_CON 0\r
122 /* ----------------------------------------------------------------------- */\r
123 \r
124 /**\r
125 Values that specify the status of the decoding process when decoding the main header. \r
126 These values may be combined with a | operator. \r
127 */\r
128 typedef enum J3D_STATUS {\r
129         /**< a SOC marker is expected */\r
130         J3D_STATE_MHSOC  = 0x0001, \r
131         /**< a SIZ marker is expected */\r
132         J3D_STATE_MHSIZ  = 0x0002, \r
133         /**< the decoding process is in the main header */\r
134         J3D_STATE_MH     = 0x0004, \r
135         /**< the decoding process is in a tile part header and expects a SOT marker */\r
136         J3D_STATE_TPHSOT = 0x0008, \r
137         /**< the decoding process is in a tile part header */\r
138         J3D_STATE_TPH    = 0x0010, \r
139         /**< the EOC marker has just been read */\r
140         J3D_STATE_MT     = 0x0020, \r
141         /**< the decoding process must not expect a EOC marker because the codestream is truncated */\r
142         J3D_STATE_NEOC   = 0x0040  \r
143 } J3D_STATUS;\r
144 \r
145 \r
146 \r
147 /**\r
148 Arbitrary transformation kernel\r
149 */\r
150 typedef struct opj_atk {\r
151 /** index of wavelet kernel */\r
152         int index;\r
153 /** Numerical type of scaling factor and lifting step parameters */\r
154         int coeff_typ;          \r
155 /** Wavelet filter category */\r
156         int filt_cat;           \r
157 /** Wavelet transformation type (REV/IRR) */\r
158         int wt_typ;                     \r
159 /** Initial odd/even subsequence */\r
160         int minit;                      \r
161 /** Boundary extension method (constant CON / whole-sample symmetric WS) */\r
162         int exten;                      \r
163 /** Scaling factor. Only for wt_typ=IRR */\r
164         double Katk;                    \r
165 /** Number of lifting steps */\r
166         int Natk;                       \r
167 /** Offset for lifting step s. Only for filt_cat=ARB */\r
168         int Oatk[256];          \r
169 /** Base 2 scaling exponent for lifting step s. Only for wt_typ=REV */\r
170         int Eatk[256];          \r
171 /** Additive residue for lifting step s. Only for wt_typ=REV */\r
172         int Batk[256];          \r
173 /** Number of lifting coefficients signaled for lifting step s  */\r
174         int LCatk[256]; \r
175 /** Lifting coefficient k for lifting step s */\r
176         double Aatk[256][256];  \r
177 } opj_atk_t;\r
178 \r
179 \r
180 /**\r
181 Quantization stepsize\r
182 */\r
183 typedef struct opj_stepsize {\r
184 /** exponent */\r
185         int expn;       \r
186 /** mantissa */\r
187         int mant;       \r
188 } opj_stepsize_t;\r
189 \r
190 /**\r
191 Tile-component coding parameters\r
192 */\r
193 typedef struct opj_tccp {\r
194         /** coding style */\r
195         int csty;                                                       \r
196         /** number of resolutions of x, y and z-axis */\r
197         int numresolution[3];   \r
198         /** code-blocks width height & depth*/\r
199         int cblk[3];                    \r
200         /** code-block coding style */\r
201         int cblksty;                    \r
202         /** 0: no ATK (only 9-7 or 5-3) 1: ATK defined WT*/\r
203         int atk_wt[3];                          \r
204         /** Arbitrary transformation kernel (15444-2)*/\r
205         opj_atk_t *atk;                 \r
206         /** DWT identifier for x, y and z-axis (0:WT9-7 1:WT5-3 >1:WT-atk->index) */\r
207         int dwtid[3];\r
208         /** reversible/irreversible wavelet transfomation (0:irrev 1:reversible)*/      \r
209         int reversible;                 \r
210         /** quantisation style */\r
211         int qntsty;                             \r
212         /** stepsizes used for quantization */\r
213         opj_stepsize_t stepsizes[J3D_MAXBANDS]; \r
214         /** number of guard bits. Table A28 de 15444-1*/\r
215         int numgbits;                   \r
216         /** Region Of Interest shift */\r
217         int roishift;                   \r
218         /** precinct width heigth & depth*/\r
219         int prctsiz[3][J3D_MAXRLVLS];           \r
220 } opj_tccp_t;\r
221 \r
222 /**\r
223 Tile coding parameters : coding/decoding parameters common to all tiles \r
224 (information like COD, COC in main header)\r
225 */\r
226 typedef struct opj_tcp {\r
227 /** 1 : first part-tile of a tile */\r
228         int first;                              \r
229         /** coding style */\r
230         int csty;                               \r
231         /** progression order */\r
232         OPJ_PROG_ORDER prg;             \r
233         /** number of layers */\r
234         int numlayers;                  \r
235         /** multi-component transform identifier */\r
236         int mct;                                \r
237         /** rates of layers */\r
238         float rates[100];                       \r
239         /** number of progression order changes */\r
240         int numpocs;                    \r
241         /** indicates if a POC marker has been used O:NO, 1:YES */\r
242         int POC;                                \r
243         /** progression order changes */\r
244         opj_poc_t pocs[J3D_MAXRLVLS - 1];\r
245         /** add fixed_quality */\r
246         float distoratio[100];\r
247         /** tile-component coding parameters */\r
248         opj_tccp_t *tccps;              \r
249 /** packet header store there for futur use in t2_decode_packet */\r
250         unsigned char *ppt_data;                \r
251         /** pointer remaining on the first byte of the first header if ppt is used */\r
252         unsigned char *ppt_data_first;  \r
253         /** If ppt == 1 --> there was a PPT marker for the present tile */\r
254         int ppt;                \r
255         /** used in case of multiple marker PPT (number of info already stored) */\r
256         int ppt_store;  \r
257         int ppt_len;    \r
258 } opj_tcp_t;\r
259 \r
260 /**\r
261 Coding parameters\r
262 */\r
263 typedef struct opj_cp {\r
264 /** transform format 0: 2DWT, 1: 2D1P, 2: 3DWT, 3: 3RLS */\r
265         OPJ_TRANSFORM transform_format;         \r
266         /** entropy coding format 0: 2EB, 1: 3EB, 2: 2GR, 3: 3GR, 4: GRI*/\r
267         OPJ_ENTROPY_CODING encoding_format;     \r
268         /** allocation by rate/distortion */\r
269         int disto_alloc;        \r
270         /** allocation by fixed layer */\r
271         int fixed_alloc;        \r
272         /** add fixed_quality */\r
273         int fixed_quality;      \r
274         /** Rsiz: capabilities */\r
275         int rsiz;                       \r
276         /** if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, volume is decoded to the full resolution */\r
277         int reduce[3];          \r
278         /** if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers are decoded */\r
279         int layer;                      \r
280         /** 0 = no index || 1 = index */\r
281         int index_on;           \r
282         /** Big-Endian/Little-endian order */\r
283         int bigendian;\r
284         /** XTOsiz */\r
285         int tx0;        \r
286         /** YTOsiz */\r
287         int ty0;                \r
288         /** ZTOsiz */\r
289         int tz0;        \r
290         /** XTsiz */\r
291         int tdx;        \r
292         /** YTsiz */\r
293         int tdy;        \r
294         /** ZTsiz */\r
295         int tdz;        \r
296         /** comment for coding */\r
297         char *comment;          \r
298         /** number of tiles in width, heigth and depth */\r
299         int tw;         \r
300         int th;\r
301         int tl;\r
302         /** ID number of the tiles present in the codestream */\r
303         int *tileno;    \r
304         /** size of the vector tileno */\r
305         int tileno_size;\r
306         /** tile coding parameters */\r
307         opj_tcp_t *tcps;\r
308         /** fixed layer */\r
309         int *matrice;           \r
310 \r
311         /** packet header store there for futur use in t2_decode_packet */\r
312         unsigned char *ppm_data;                \r
313         /** pointer remaining on the first byte of the first header if ppm is used */\r
314         unsigned char *ppm_data_first;  \r
315         /** if ppm == 1 --> there was a PPM marker for the present tile */\r
316         int ppm;                        \r
317         /** use in case of multiple marker PPM (number of info already store) */\r
318         int ppm_store;          \r
319         /** use in case of multiple marker PPM (case on non-finished previous info) */\r
320         int ppm_previous;       \r
321         int ppm_len;            \r
322 } opj_cp_t;\r
323 \r
324 /**\r
325 Information concerning a packet inside tile\r
326 */\r
327 typedef struct opj_packet_info {\r
328         /** start position */\r
329         int start_pos;  \r
330         /** end position */\r
331         int end_pos;    \r
332         /** distorsion introduced */\r
333         double disto;   \r
334 } opj_packet_info_t;\r
335 \r
336 /**\r
337 Index structure : information regarding tiles inside volume\r
338 */\r
339 typedef struct opj_tile_info {\r
340         /** value of thresh for each layer by tile cfr. Marcela   */\r
341         double *thresh;         \r
342         /** number of tile */\r
343         int num_tile;           \r
344         /** start position */\r
345         int start_pos;          \r
346         /** end position of the header */\r
347         int end_header;         \r
348         /** end position */\r
349         int end_pos;            \r
350         /** precinct number for each resolution level (width, heigth and depth) */\r
351         int prctno[3][J3D_MAXRLVLS];    \r
352         /** precinct size (in power of 2), in X for each resolution level */\r
353         int prctsiz[3][J3D_MAXRLVLS];   \r
354         /** information concerning packets inside tile */\r
355         opj_packet_info_t *packet;              \r
356         \r
357         /** add fixed_quality */\r
358         int nbpix;                      \r
359         /** add fixed_quality */\r
360         double distotile;       \r
361 } opj_tile_info_t;\r
362 \r
363 /**\r
364 Index structure\r
365 */\r
366 typedef struct opj_volume_info {\r
367         \r
368         /** transform format 0: 2DWT, 1: 2D1P, 2: 3DWT, 3: 3RLS */\r
369         OPJ_TRANSFORM transform_format;         \r
370         /** output file format 0: 2EB, 1: 3EB, 2: 2GR, 3: 3GR, 4: GRI*/\r
371         OPJ_ENTROPY_CODING encoding_format;     /** 0 = no index || 1 = index */\r
372         int index_on;   \r
373         /** 0 = wt 9-7 || 1 = wt 5-3 || >=2 wt atk defined */\r
374         int dwtid[3];   \r
375         /** maximum distortion reduction on the whole volume (add for Marcela) */\r
376         double D_max;   \r
377         /** packet number */\r
378         int num;                \r
379         /** writing the packet in the index with t2_encode_packets */\r
380         int index_write;        \r
381         /** volume width, height and depth */\r
382         int volume_w;   \r
383         int volume_h;\r
384         int volume_l;\r
385         /** progression order */\r
386         OPJ_PROG_ORDER prog;    \r
387         /** tile size in x, y and z */\r
388         int tile_x;             \r
389         int tile_y;\r
390         int tile_z;\r
391         /** tile origin in x, y and z */\r
392         int tile_Ox;    \r
393         int tile_Oy;\r
394         int tile_Oz;\r
395         /** number of tiles in X, Y and Z */\r
396         int tw;                 \r
397         int th;\r
398         int tl;\r
399         /** component numbers */\r
400         int comp;                               \r
401         /** number of layer */\r
402         int layer;                              \r
403         /** number of decomposition in X, Y and Z*/\r
404         int decomposition[3];   \r
405         /** DC offset (15444-2) */\r
406         int dcoffset;   \r
407         /** main header position */\r
408         int main_head_end;              \r
409         /** codestream's size */\r
410         int codestream_size;    \r
411         /** information regarding tiles inside volume */\r
412         opj_tile_info_t *tile;  \r
413 } opj_volume_info_t;\r
414 \r
415 /**\r
416 JPEG-2000 codestream reader/writer\r
417 */\r
418 typedef struct opj_j3d {\r
419         /** codec context */\r
420         opj_common_ptr cinfo;   \r
421         /** locate in which part of the codestream the decoder is (main header, tile header, end) */\r
422         int state;                              \r
423         /** number of the tile curently concern by coding/decoding */\r
424         int curtileno;                  \r
425         /** locate the position of the end of the tile in the codestream, used to detect a truncated codestream (in j3d_read_sod)       */\r
426         unsigned char *eot;     \r
427         /**     locate the start position of the SOT marker of the current coded tile:  */\r
428         int sot_start;          \r
429         /*  after encoding the tile, a jump (in j3d_write_sod) is done to the SOT marker to store the value of its length. */\r
430         int sod_start;          \r
431         /**     as the J3D-file is written in several parts during encoding, it enables to make the right correction in position return by cio_tell     */\r
432         int pos_correction;     \r
433         /** array used to store the data of each tile */\r
434         unsigned char **tile_data;      \r
435         /** array used to store the length of each tile */\r
436         int *tile_len;                          \r
437 \r
438         /** decompression only : store decoding parameters common to all tiles */\r
439         opj_tcp_t *default_tcp;         \r
440         /** pointer to the encoded / decoded volume */\r
441         opj_volume_t *volume;           \r
442         /** pointer to the coding parameters */\r
443         opj_cp_t *cp;                           \r
444         /** helper used to write the index file */\r
445         opj_volume_info_t *volume_info; \r
446         /** pointer to the byte i/o stream */\r
447     opj_cio_t *cio;                                             \r
448 } opj_j3d_t;\r
449 \r
450 /** @name Funciones generales */\r
451 /*@{*/\r
452 /* ----------------------------------------------------------------------- */\r
453 /**\r
454 Creates a J3D decompression structure\r
455 @param cinfo Codec context info\r
456 @return Returns a handle to a J3D decompressor if successful, returns NULL otherwise\r
457 */\r
458 opj_j3d_t* j3d_create_decompress(opj_common_ptr cinfo);\r
459 /**\r
460 Destroy a J3D decompressor handle\r
461 @param j3d J3D decompressor handle to destroy\r
462 */\r
463 void j3d_destroy_decompress(opj_j3d_t *j3d);\r
464 /**\r
465 Setup the decoder decoding parameters using user parameters.\r
466 Decoding parameters are returned in j3d->cp. \r
467 @param j3d J3D decompressor handle\r
468 @param parameters decompression parameters\r
469 */\r
470 void j3d_setup_decoder(opj_j3d_t *j3d, opj_dparameters_t *parameters);\r
471 /**\r
472 Decode an volume from a JPEG-2000 codestream\r
473 @param j3d J3D decompressor handle\r
474 @param cio Input buffer stream\r
475 @return Returns a decoded volume if successful, returns NULL otherwise\r
476 */\r
477 opj_volume_t* j3d_decode(opj_j3d_t *j3d, opj_cio_t *cio);\r
478 /**\r
479 Decode an volume form a JPT-stream (JPEG 2000, JPIP)\r
480 @param j3d J3D decompressor handle\r
481 @param cio Input buffer stream\r
482 @return Returns a decoded volume if successful, returns NULL otherwise\r
483 */\r
484 opj_volume_t* j3d_decode_jpt_stream(opj_j3d_t *j3d, opj_cio_t *cio);\r
485 /**\r
486 Creates a J3D compression structure\r
487 @param cinfo Codec context info\r
488 @return Returns a handle to a J3D compressor if successful, returns NULL otherwise\r
489 */\r
490 opj_j3d_t* j3d_create_compress(opj_common_ptr cinfo);\r
491 /**\r
492 Destroy a J3D compressor handle\r
493 @param j3d J3D compressor handle to destroy\r
494 */\r
495 void j3d_destroy_compress(opj_j3d_t *j3d);\r
496 /**\r
497 Setup the encoder parameters using the current volume and using user parameters. \r
498 Coding parameters are returned in j3d->cp. \r
499 @param j3d J3D compressor handle\r
500 @param parameters compression parameters\r
501 @param volume input filled volume\r
502 */\r
503 void j3d_setup_encoder(opj_j3d_t *j3d, opj_cparameters_t *parameters, opj_volume_t *volume);\r
504 /**\r
505 Encode an volume into a JPEG-2000 codestream\r
506 @param j3d J3D compressor handle\r
507 @param cio Output buffer stream\r
508 @param volume Volume to encode\r
509 @param index Name of the index file if required, NULL otherwise\r
510 @return Returns true if successful, returns false otherwise\r
511 */\r
512 bool j3d_encode(opj_j3d_t *j3d, opj_cio_t *cio, opj_volume_t *volume, char *index);\r
513 /* ----------------------------------------------------------------------- */\r
514 /*@}*/\r
515 \r
516 /*@}*/\r
517 \r
518 #endif /* __J3D_H */\r