Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h

Issue 589243004: Update openjpeg (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Update to openjpeg r2891 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * The copyright in this software is being made available under the 2-clauses 2 * The copyright in this software is being made available under the 2-clauses
3 * BSD License, included below. This software may be subject to other third 3 * BSD License, included below. This software may be subject to other third
4 * party and contributor rights, including patent rights, and no such rights 4 * party and contributor rights, including patent rights, and no such rights
5 * are granted under this license. 5 * are granted under this license.
6 * 6 *
7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium 7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
8 * Copyright (c) 2002-2014, Professor Benoit Macq 8 * Copyright (c) 2002-2014, Professor Benoit Macq
9 * Copyright (c) 2001-2003, David Janssens 9 * Copyright (c) 2001-2003, David Janssens
10 * Copyright (c) 2002-2003, Yannick Verschueren 10 * Copyright (c) 2002-2003, Yannick Verschueren
(...skipping 24 matching lines...) Expand all
35 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 35 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 36 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 37 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 38 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 39 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 * POSSIBILITY OF SUCH DAMAGE. 40 * POSSIBILITY OF SUCH DAMAGE.
41 */ 41 */
42 #ifndef OPENJPEG_H 42 #ifndef OPENJPEG_H
43 #define OPENJPEG_H 43 #define OPENJPEG_H
44 44
45 #ifndef OPJ_STATIC
46 #define OPJ_STATIC
47 #endif
48
49
50 45
51 /* 46 /*
52 ========================================================== 47 ==========================================================
53 Compiler directives 48 Compiler directives
54 ========================================================== 49 ==========================================================
55 */ 50 */
56 51
57 /* 52 /*
58 The inline keyword is supported by C99 but not by C90. 53 The inline keyword is supported by C99 but not by C90.
59 Most compilers implement their own version of this keyword ... 54 Most compilers implement their own version of this keyword ...
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #endif /* !OPJ_STATIC || !_WIN32 */ 104 #endif /* !OPJ_STATIC || !_WIN32 */
110 105
111 typedef int OPJ_BOOL; 106 typedef int OPJ_BOOL;
112 #define OPJ_TRUE 1 107 #define OPJ_TRUE 1
113 #define OPJ_FALSE 0 108 #define OPJ_FALSE 0
114 109
115 typedef char OPJ_CHAR; 110 typedef char OPJ_CHAR;
116 typedef float OPJ_FLOAT32; 111 typedef float OPJ_FLOAT32;
117 typedef double OPJ_FLOAT64; 112 typedef double OPJ_FLOAT64;
118 typedef unsigned char OPJ_BYTE; 113 typedef unsigned char OPJ_BYTE;
114
119 #include "opj_stdint.h" 115 #include "opj_stdint.h"
120 116
121 typedef int8_t OPJ_INT8; 117 typedef int8_t OPJ_INT8;
122 typedef uint8_t OPJ_UINT8; 118 typedef uint8_t OPJ_UINT8;
123 typedef int16_t OPJ_INT16; 119 typedef int16_t OPJ_INT16;
124 typedef uint16_t OPJ_UINT16; 120 typedef uint16_t OPJ_UINT16;
125 typedef int32_t OPJ_INT32; 121 typedef int32_t OPJ_INT32;
126 typedef uint32_t OPJ_UINT32; 122 typedef uint32_t OPJ_UINT32;
127 typedef int64_t OPJ_INT64; 123 typedef int64_t OPJ_INT64;
128 typedef uint64_t OPJ_UINT64; 124 typedef uint64_t OPJ_UINT64;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 #define OPJ_IMG_INFO 1 /**< Basic image information provided to the user */ 166 #define OPJ_IMG_INFO 1 /**< Basic image information provided to the user */
171 #define OPJ_J2K_MH_INFO 2 /**< Codestream information based only o n the main header */ 167 #define OPJ_J2K_MH_INFO 2 /**< Codestream information based only o n the main header */
172 #define OPJ_J2K_TH_INFO 4 /**< Tile information based on the curre nt tile header */ 168 #define OPJ_J2K_TH_INFO 4 /**< Tile information based on the curre nt tile header */
173 #define OPJ_J2K_TCH_INFO 8 /**< Tile/Component information of all t iles */ 169 #define OPJ_J2K_TCH_INFO 8 /**< Tile/Component information of all t iles */
174 #define OPJ_J2K_MH_IND 16 /**< Codestream index based only on the main header */ 170 #define OPJ_J2K_MH_IND 16 /**< Codestream index based only on the main header */
175 #define OPJ_J2K_TH_IND 32 /**< Tile index based on the current til e */ 171 #define OPJ_J2K_TH_IND 32 /**< Tile index based on the current til e */
176 /*FIXME #define OPJ_J2K_CSTR_IND 48*/ /**< */ 172 /*FIXME #define OPJ_J2K_CSTR_IND 48*/ /**< */
177 #define OPJ_JP2_INFO 128 /**< JP2 file information */ 173 #define OPJ_JP2_INFO 128 /**< JP2 file information */
178 #define OPJ_JP2_IND 256 /**< JP2 file index */ 174 #define OPJ_JP2_IND 256 /**< JP2 file index */
179 175
176 /**
177 * JPEG 2000 Profiles, see Table A.10 from 15444-1 (updated in various AMD)
178 * These values help chosing the RSIZ value for the J2K codestream.
179 * The RSIZ value triggers various encoding options, as detailed in Table A.10.
180 * If OPJ_PROFILE_PART2 is chosen, it has to be combined with one or more extens ions
181 * described hereunder.
182 * Example: rsiz = OPJ_PROFILE_PART2 | OPJ_EXTENSION_MCT;
183 * For broadcast profiles, the OPJ_PROFILE value has to be combined with the tar geted
184 * mainlevel (3-0 LSB, value between 0 and 11):
185 * Example: rsiz = OPJ_PROFILE_BC_MULTI | 0x0005; (here mainlevel 5)
186 * For IMF profiles, the OPJ_PROFILE value has to be combined with the targeted mainlevel
187 * (3-0 LSB, value between 0 and 11) and sublevel (7-4 LSB, value between 0 and 9):
188 * Example: rsiz = OPJ_PROFILE_IMF_2K | 0x0040 | 0x0005; (here main 5 and subl evel 4)
189 * */
190 #define OPJ_PROFILE_NONE 0x0000 /** no profile, conform to 15444-1 */
191 #define OPJ_PROFILE_0 0x0001 /** Profile 0 as described in 15444-1,Tab le A.45 */
192 #define OPJ_PROFILE_1 0x0002 /** Profile 1 as described in 15444-1,Tab le A.45 */
193 #define OPJ_PROFILE_PART2 0x8000 /** At least 1 extension defined in 15444 -2 (Part-2) */
194 #define OPJ_PROFILE_CINEMA_2K 0x0003 /** 2K cinema profile defined in 15444-1 AMD1 */
195 #define OPJ_PROFILE_CINEMA_4K 0x0004 /** 4K cinema profile defined in 15444-1 AMD1 */
196 #define OPJ_PROFILE_CINEMA_S2K 0x0005 /** Scalable 2K cinema profile defined in 15444-1 AMD2 */
197 #define OPJ_PROFILE_CINEMA_S4K 0x0006 /** Scalable 4K cinema profile defined in 15444-1 AMD2 */
198 #define OPJ_PROFILE_CINEMA_LTS 0x0007 /** Long term storage cinema profile defi ned in 15444-1 AMD2 */
199 #define OPJ_PROFILE_BC_SINGLE 0x0100 /** Single Tile Broadcast profile defined in 15444-1 AMD3 */
200 #define OPJ_PROFILE_BC_MULTI 0x0200 /** Multi Tile Broadcast profile defined in 15444-1 AMD3 */
201 #define OPJ_PROFILE_BC_MULTI_R 0x0300 /** Multi Tile Reversible Broadcast profi le defined in 15444-1 AMD3 */
202 #define OPJ_PROFILE_IMF_2K 0x0400 /** 2K Single Tile Lossy IMF profile defi ned in 15444-1 AMD 8 */
203 #define OPJ_PROFILE_IMF_4K 0x0401 /** 4K Single Tile Lossy IMF profile defi ned in 15444-1 AMD 8 */
204 #define OPJ_PROFILE_IMF_8K 0x0402 /** 8K Single Tile Lossy IMF profile defi ned in 15444-1 AMD 8 */
205 #define OPJ_PROFILE_IMF_2K_R 0x0403 /** 2K Single/Multi Tile Reversible IMF p rofile defined in 15444-1 AMD 8 */
206 #define OPJ_PROFILE_IMF_4K_R 0x0800 /** 4K Single/Multi Tile Reversible IMF p rofile defined in 15444-1 AMD 8 */
207 #define OPJ_PROFILE_IMF_8K_R 0x0801 /** 8K Single/Multi Tile Reversible IMF profile defined in 15444-1 AMD 8 */
208
209 /**
210 * JPEG 2000 Part-2 extensions
211 * */
212 #define OPJ_EXTENSION_NONE 0x0000 /** No Part-2 extension */
213 #define OPJ_EXTENSION_MCT 0x0100 /** Custom MCT support */
214
215 /**
216 * JPEG 2000 profile macros
217 * */
218 #define OPJ_IS_CINEMA(v) (((v) >= OPJ_PROFILE_CINEMA_2K)&&((v) <= OPJ_PROFIL E_CINEMA_S4K))
219 #define OPJ_IS_STORAGE(v) ((v) == OPJ_PROFILE_CINEMA_LTS)
220 #define OPJ_IS_BROADCAST(v) (((v) >= OPJ_PROFILE_BC_SINGLE)&&((v) <= ((OPJ_PROF ILE_BC_MULTI_R) | (0x000b))))
221 #define OPJ_IS_IMF(v) (((v) >= OPJ_PROFILE_IMF_2K)&&((v) <= ((OPJ_PROFILE _IMF_8K_R) | (0x009b))))
222 #define OPJ_IS_PART2(v) ((v) & OPJ_PROFILE_PART2)
223
224 /**
225 * JPEG 2000 codestream and component size limits in cinema profiles
226 * */
227 #define OPJ_CINEMA_24_CS 1302083 /** Maximum codestream length for 24fps */
228 #define OPJ_CINEMA_48_CS 651041 /** Maximum codestream length for 48fps */
229 #define OPJ_CINEMA_24_COMP 1041666 /** Maximum size per color component for 2K & 4K @ 24fps */
230 #define OPJ_CINEMA_48_COMP 520833 /** Maximum size per color compo nent for 2K @ 48fps */
180 231
181 /* 232 /*
182 ========================================================== 233 ==========================================================
183 enum definitions 234 enum definitions
184 ========================================================== 235 ==========================================================
185 */ 236 */
186 /** 237
238 /**
239 * DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead
187 * Rsiz Capabilities 240 * Rsiz Capabilities
188 * */ 241 * */
189 typedef enum RSIZ_CAPABILITIES { 242 typedef enum RSIZ_CAPABILITIES {
190 » OPJ_STD_RSIZ = 0,» » /** Standard JPEG2000 profile*/ 243 OPJ_STD_RSIZ = 0,» » /** Standard JPEG2000 profile*/
191 » OPJ_CINEMA2K = 3,» » /** Profile name for a 2K image*/ 244 OPJ_CINEMA2K = 3,» » /** Profile name for a 2K image*/
192 » OPJ_CINEMA4K = 4,» » /** Profile name for a 4K image*/ 245 OPJ_CINEMA4K = 4,» » /** Profile name for a 4K image*/
193 » OPJ_MCT = 0x8100 246 OPJ_MCT = 0x8100
194 } OPJ_RSIZ_CAPABILITIES; 247 } OPJ_RSIZ_CAPABILITIES;
195 248
196 /** 249 /**
250 * DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead
197 * Digital cinema operation mode 251 * Digital cinema operation mode
198 * */ 252 * */
199 typedef enum CINEMA_MODE { 253 typedef enum CINEMA_MODE {
200 » OPJ_OFF = 0,» » » /** Not Digital Cinema*/ 254 OPJ_OFF = 0,» » » /** Not Digital Cinema*/
201 » OPJ_CINEMA2K_24 = 1,» /** 2K Digital Cinema at 24 fps*/ 255 OPJ_CINEMA2K_24 = 1,» /** 2K Digital Cinema at 24 fps*/
202 » OPJ_CINEMA2K_48 = 2,» /** 2K Digital Cinema at 48 fps*/ 256 OPJ_CINEMA2K_48 = 2,» /** 2K Digital Cinema at 48 fps*/
203 » OPJ_CINEMA4K_24 = 3» » /** 4K Digital Cinema at 24 fps*/ 257 OPJ_CINEMA4K_24 = 3»» /** 4K Digital Cinema at 24 fps*/
204 }OPJ_CINEMA_MODE; 258 }OPJ_CINEMA_MODE;
205 259
206 /** 260 /**
207 * Progression order 261 * Progression order
208 * */ 262 * */
209 typedef enum PROG_ORDER { 263 typedef enum PROG_ORDER {
210 OPJ_PROG_UNKNOWN = -1, /**< place-holder */ 264 OPJ_PROG_UNKNOWN = -1, /**< place-holder */
211 OPJ_LRCP = 0, /**< layer-resolution-component-precinct order */ 265 OPJ_LRCP = 0, /**< layer-resolution-component-precinct order */
212 OPJ_RLCP = 1, /**< resolution-layer-component-precinct order */ 266 OPJ_RLCP = 1, /**< resolution-layer-component-precinct order */
213 OPJ_RPCL = 2, /**< resolution-precinct-component-layer order */ 267 OPJ_RPCL = 2, /**< resolution-precinct-component-layer order */
214 OPJ_PCRL = 3, /**< precinct-component-resolution-layer order */ 268 OPJ_PCRL = 3, /**< precinct-component-resolution-layer order */
215 OPJ_CPRL = 4 /**< component-precinct-resolution-layer order */ 269 OPJ_CPRL = 4 /**< component-precinct-resolution-layer order */
216 } OPJ_PROG_ORDER; 270 } OPJ_PROG_ORDER;
217 271
218 /** 272 /**
219 * Supported image color spaces 273 * Supported image color spaces
220 */ 274 */
221 typedef enum COLOR_SPACE { 275 typedef enum COLOR_SPACE {
222 » OPJ_CLRSPC_UNKNOWN = -1,» /**< not supported by the library */ 276 OPJ_CLRSPC_UNKNOWN = -1,» /**< not supported by the library */
223 » OPJ_CLRSPC_UNSPECIFIED = 0,» /**< not specified in the codestream */ 277 OPJ_CLRSPC_UNSPECIFIED = 0,»/**< not specified in the codestream */
224 » OPJ_CLRSPC_SRGB = 1,» » /**< sRGB */ 278 OPJ_CLRSPC_SRGB = 1,» » /**< sRGB */
225 » OPJ_CLRSPC_GRAY = 2,» » /**< grayscale */ 279 OPJ_CLRSPC_GRAY = 2,» » /**< grayscale */
226 » OPJ_CLRSPC_SYCC = 3,» » /**< YUV */ 280 OPJ_CLRSPC_SYCC = 3,» » /**< YUV */
227 OPJ_CLRSPC_EYCC = 4» » /**< e-YCC */ 281 OPJ_CLRSPC_EYCC = 4, /**< e-YCC */
282 OPJ_CLRSPC_CMYK = 5 /**< CMYK */
228 } OPJ_COLOR_SPACE; 283 } OPJ_COLOR_SPACE;
229 284
230 /** 285 /**
231 * Supported codec 286 * Supported codec
232 */ 287 */
233 typedef enum CODEC_FORMAT { 288 typedef enum CODEC_FORMAT {
234 OPJ_CODEC_UNKNOWN = -1, /**< place-holder */ 289 OPJ_CODEC_UNKNOWN = -1, /**< place-holder */
235 OPJ_CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write * / 290 OPJ_CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write * /
236 OPJ_CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read only */ 291 OPJ_CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read only */
237 » OPJ_CODEC_JP2 = 2 » » /**< JPEG-2000 file format : read/write */ 292 OPJ_CODEC_JP2 = 2,»» /**< JP2 file format : read/write */
293 OPJ_CODEC_JPP = 3,»» /**< JPP-stream (JPEG 2000, JPIP) : to be coded */
294 OPJ_CODEC_JPX = 4» » /**< JPX file format (JPEG 2000 Part-2) : to be coded */
238 } OPJ_CODEC_FORMAT; 295 } OPJ_CODEC_FORMAT;
239 296
240 297
241 /* 298 /*
242 ========================================================== 299 ==========================================================
243 event manager typedef definitions 300 event manager typedef definitions
244 ========================================================== 301 ==========================================================
245 */ 302 */
246 303
247 /** 304 /**
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 /** csty : coding style */ 370 /** csty : coding style */
314 int csty; 371 int csty;
315 /** progression order (default OPJ_LRCP) */ 372 /** progression order (default OPJ_LRCP) */
316 OPJ_PROG_ORDER prog_order; 373 OPJ_PROG_ORDER prog_order;
317 /** progression order changes */ 374 /** progression order changes */
318 opj_poc_t POC[32]; 375 opj_poc_t POC[32];
319 /** number of progression order changes (POC), default to 0 */ 376 /** number of progression order changes (POC), default to 0 */
320 OPJ_UINT32 numpocs; 377 OPJ_UINT32 numpocs;
321 /** number of layers */ 378 /** number of layers */
322 int tcp_numlayers; 379 int tcp_numlayers;
323 » /** rates of layers */ 380 /** rates of layers - might be subsequently limited by the max_cs_size field */
324 float tcp_rates[100]; 381 float tcp_rates[100];
325 /** different psnr for successive layers */ 382 /** different psnr for successive layers */
326 float tcp_distoratio[100]; 383 float tcp_distoratio[100];
327 /** number of resolutions */ 384 /** number of resolutions */
328 int numresolution; 385 int numresolution;
329 /** initial code block width, default to 64 */ 386 /** initial code block width, default to 64 */
330 int cblockw_init; 387 int cblockw_init;
331 /** initial code block height, default to 64 */ 388 /** initial code block height, default to 64 */
332 int cblockh_init; 389 int cblockh_init;
333 /** mode switch (cblk_style) */ 390 /** mode switch (cblk_style) */
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 int jpwl_sens_range; 451 int jpwl_sens_range;
395 /** sensitivity method for MH (-1=no,0-7) */ 452 /** sensitivity method for MH (-1=no,0-7) */
396 int jpwl_sens_MH; 453 int jpwl_sens_MH;
397 /** tile number of sensitivity specification (>=0) */ 454 /** tile number of sensitivity specification (>=0) */
398 int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; 455 int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS];
399 /** sensitivity methods for TPHs (-1=no,0-7) */ 456 /** sensitivity methods for TPHs (-1=no,0-7) */
400 int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]; 457 int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS];
401 /*@}*/ 458 /*@}*/
402 /* <<UniPG */ 459 /* <<UniPG */
403 460
404 » /** Digital Cinema compliance 0-not compliant, 1-compliant*/ 461 /**
405 » OPJ_CINEMA_MODE cp_cinema; 462 * DEPRECATED: use RSIZ, OPJ_PROFILE_* and MAX_COMP_SIZE instead
406 » /** Maximum rate for each component. If == 0, component size limitation is not considered */ 463 * Digital Cinema compliance 0-not compliant, 1-compliant
464 * */
465 OPJ_CINEMA_MODE cp_cinema;
466 /**
467 * Maximum size (in bytes) for each component.
468 * If == 0, component size limitation is not considered
469 * */
407 int max_comp_size; 470 int max_comp_size;
408 » /** Profile name*/ 471 /**
409 » OPJ_RSIZ_CAPABILITIES cp_rsiz; 472 * DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead
473 * Profile name
474 * */
475 OPJ_RSIZ_CAPABILITIES cp_rsiz;
410 /** Tile part generation*/ 476 /** Tile part generation*/
411 char tp_on; 477 char tp_on;
412 /** Flag for Tile part generation*/ 478 /** Flag for Tile part generation*/
413 char tp_flag; 479 char tp_flag;
414 /** MCT (multiple component transform) */ 480 /** MCT (multiple component transform) */
415 char tcp_mct; 481 char tcp_mct;
416 /** Enable JPIP indexing*/ 482 /** Enable JPIP indexing*/
417 OPJ_BOOL jpip_on; 483 OPJ_BOOL jpip_on;
418 /** Naive implementation of MCT restricted to a single reversible array based 484 /** Naive implementation of MCT restricted to a single reversible array based
419 encoding without offset concerning all the components. */ 485 encoding without offset concerning all the components. */
420 void * mct_data; 486 void * mct_data;
487 /**
488 * Maximum size (in bytes) for the whole codestream.
489 * If == 0, codestream size limitation is not considered
490 * If it does not comply with tcp_rates, max_cs_size prevails
491 * and a warning is issued.
492 * */
493 int max_cs_size;
494 /** RSIZ value
495 To be used to combine OPJ_PROFILE_*, OPJ_EXTENSION_* and (sub)levels val ues. */
496 OPJ_UINT16 rsiz;
421 } opj_cparameters_t; 497 } opj_cparameters_t;
422 498
423 #define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG 0x0001 499 #define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG 0x0001
424 500
425 /** 501 /**
426 * Decompression parameters 502 * Decompression parameters
427 * */ 503 * */
428 typedef struct opj_dparameters { 504 typedef struct opj_dparameters {
429 /** 505 /**
430 Set the number of highest resolution levels to be discarded. 506 Set the number of highest resolution levels to be discarded.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 /** number of components in the image */ 666 /** number of components in the image */
591 OPJ_UINT32 numcomps; 667 OPJ_UINT32 numcomps;
592 /** color space: sRGB, Greyscale or YUV */ 668 /** color space: sRGB, Greyscale or YUV */
593 OPJ_COLOR_SPACE color_space; 669 OPJ_COLOR_SPACE color_space;
594 /** image components */ 670 /** image components */
595 opj_image_comp_t *comps; 671 opj_image_comp_t *comps;
596 /** 'restricted' ICC profile */ 672 /** 'restricted' ICC profile */
597 OPJ_BYTE *icc_profile_buf; 673 OPJ_BYTE *icc_profile_buf;
598 /** size of ICC profile */ 674 /** size of ICC profile */
599 OPJ_UINT32 icc_profile_len; 675 OPJ_UINT32 icc_profile_len;
600
601 OPJ_INT8 useColorSpace; //liang
602 } opj_image_t; 676 } opj_image_t;
603 677
604 678
605 /** 679 /**
606 * Component parameters structure used by the opj_image_create function 680 * Component parameters structure used by the opj_image_create function
607 * */ 681 * */
608 typedef struct opj_image_comptparm { 682 typedef struct opj_image_comptparm {
609 /** XRsiz: horizontal separation of a sample of ith component with respe ct to the reference grid */ 683 /** XRsiz: horizontal separation of a sample of ith component with respe ct to the reference grid */
610 OPJ_UINT32 dx; 684 OPJ_UINT32 dx;
611 /** YRsiz: vertical separation of a sample of ith component with respect to the reference grid */ 685 /** YRsiz: vertical separation of a sample of ith component with respect to the reference grid */
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 */ 1109 */
1036 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, O PJ_BOOL p_is_input); 1110 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, O PJ_BOOL p_is_input);
1037 1111
1038 /** 1112 /**
1039 * Destroys a stream created by opj_create_stream. This function does NOT close the abstract stream. If needed the user must 1113 * Destroys a stream created by opj_create_stream. This function does NOT close the abstract stream. If needed the user must
1040 * close its own implementation of the stream. 1114 * close its own implementation of the stream.
1041 * 1115 *
1042 * @param p_stream the stream to destroy. 1116 * @param p_stream the stream to destroy.
1043 */ 1117 */
1044 OPJ_API void OPJ_CALLCONV opj_stream_destroy(opj_stream_t* p_stream); 1118 OPJ_API void OPJ_CALLCONV opj_stream_destroy(opj_stream_t* p_stream);
1045
1046 /**
1047 * Destroys a stream created by opj_create_stream. This function does NOT close the abstract stream.
1048 * If needed the user must close its own implementation of the stream.
1049 *
1050 * @param p_stream the stream to destroy.
1051 */
1052 OPJ_API void OPJ_CALLCONV opj_stream_destroy_v3(opj_stream_t* p_stream);
1053 1119
1054 /** 1120 /**
1055 * Sets the given function to be used as a read function. 1121 * Sets the given function to be used as a read function.
1056 * @param p_stream the stream to modify 1122 * @param p_stream the stream to modify
1057 * @param p_function the function to use a read function. 1123 * @param p_function the function to use a read function.
1058 */ 1124 */
1059 OPJ_API void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t* p_stream, o pj_stream_read_fn p_function); 1125 OPJ_API void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t* p_stream, o pj_stream_read_fn p_function);
1060 1126
1061 /** 1127 /**
1062 * Sets the given function to be used as a write function. 1128 * Sets the given function to be used as a write function.
(...skipping 13 matching lines...) Expand all
1076 * Sets the given function to be used as a seek function, the stream is then see kable. 1142 * Sets the given function to be used as a seek function, the stream is then see kable.
1077 * @param p_stream the stream to modify 1143 * @param p_stream the stream to modify
1078 * @param p_function the function to use a skip function. 1144 * @param p_function the function to use a skip function.
1079 */ 1145 */
1080 OPJ_API void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t* p_stream, o pj_stream_seek_fn p_function); 1146 OPJ_API void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t* p_stream, o pj_stream_seek_fn p_function);
1081 1147
1082 /** 1148 /**
1083 * Sets the given data to be used as a user data for the stream. 1149 * Sets the given data to be used as a user data for the stream.
1084 * @param p_stream the stream to modify 1150 * @param p_stream the stream to modify
1085 * @param p_data the data to set. 1151 * @param p_data the data to set.
1086 * @warning depending on your source object p_stream this function may leak, use opj_stream_set_user_data_v3
1087 */
1088 OPJ_DEPRECATED(OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data));
1089
1090 /**
1091 * Sets the given data to be used as a user data for the stream.
1092 * @param p_stream the stream to modify
1093 * @param p_data the data to set.
1094 * @param p_function the function to free p_data when opj_str eam_destroy() is called. 1152 * @param p_function the function to free p_data when opj_str eam_destroy() is called.
1095 */ 1153 */
1096 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_v3 (opj_stream_t* p_stream, v oid * p_data, opj_stream_free_user_data_fn p_function); 1154 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);
1097 1155
1098 /** 1156 /**
1099 * Sets the length of the user data for the stream. 1157 * Sets the length of the user data for the stream.
1100 * 1158 *
1101 * @param p_stream the stream to modify 1159 * @param p_stream the stream to modify
1102 * @param data_length length of the user_data. 1160 * @param data_length length of the user_data.
1103 */ 1161 */
1104 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t* p_stream , OPJ_UINT64 data_length); 1162 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t* p_stream , OPJ_UINT64 data_length);
1105 1163
1106 /** 1164 /**
1107 * Create a stream from a file identified with its filename with default paramet ers (helper function) 1165 * Create a stream from a file identified with its filename with default paramet ers (helper function)
1108 * @param fname the filename of the file to stream 1166 * @param fname the filename of the file to stream
1109 * @param p_is_read_stream whether the stream is a read stream (true) or not (f alse) 1167 * @param p_is_read_stream whether the stream is a read stream (true) or not (f alse)
1110 */ 1168 */
1111 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream_v3 (con st char *fname, OPJ_BOOL p_is_read_stream); 1169 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream (const char *fname, OPJ_BOOL p_is_read_stream);
1112 1170
1113 /** Create a stream from a file identified with its filename with a specific buf fer size 1171 /** Create a stream from a file identified with its filename with a specific buf fer size
1114 * @param fname the filename of the file to stream 1172 * @param fname the filename of the file to stream
1115 * @param p_buffer_size size of the chunk used to stream 1173 * @param p_buffer_size size of the chunk used to stream
1116 * @param p_is_read_stream whether the stream is a read stream (true) or not (f alse) 1174 * @param p_is_read_stream whether the stream is a read stream (true) or not (f alse)
1117 */ 1175 */
1118 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream_v3 (const char *fname, 1176 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream (const char *fn ame,
1119 OPJ_SIZE_T p_buffer_size, 1177 OPJ_SIZE_T p_buffer_size,
1120 OPJ_BOOL p_ is_read_stream); 1178 OPJ_BOOL p_ is_read_stream);
1121 1179
1122 /* 1180 /*
1123 ========================================================== 1181 ==========================================================
1124 event manager functions definitions 1182 event manager functions definitions
1125 ========================================================== 1183 ==========================================================
1126 */ 1184 */
1127 /** 1185 /**
1128 * Set the info handler use by openjpeg. 1186 * Set the info handler use by openjpeg.
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 OPJ_INT32 * p_dc_shift, 1550 OPJ_INT32 * p_dc_shift,
1493 OPJ_UINT32 pNbComp); 1551 OPJ_UINT32 pNbComp);
1494 1552
1495 1553
1496 1554
1497 #ifdef __cplusplus 1555 #ifdef __cplusplus
1498 } 1556 }
1499 #endif 1557 #endif
1500 1558
1501 #endif /* OPENJPEG_H */ 1559 #endif /* OPENJPEG_H */
OLDNEW
« no previous file with comments | « core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c ('k') | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698