OpenJPEG  1.5.1
cidx_manager.h
Go to the documentation of this file.
1 /*
2  * $Id: cidx_manager.h 897 2011-08-28 21:43:57Z Kaori.Hagihara@gmail.com $
3  *
4  * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
5  * Copyright (c) 2002-2011, Professor Benoit Macq
6  * Copyright (c) 2003-2004, Yannick Verschueren
7  * Copyright (c) 2010-2011, Kaori Hagihara
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
37 #ifndef CIDX_MANAGER_H_
38 # define CIDX_MANAGER_H_
39 
40 #include "openjpeg.h"
41 
42 
43 /*
44  * Write Codestream index box (superbox)
45  *
46  * @param[in] offset offset of j2k codestream
47  * @param[in] cio file output handle
48  * @param[in] image image data
49  * @param[in] cstr_info codestream information
50  * @param[in] j2klen length of j2k codestream
51  * @return length of cidx box
52  */
53 int write_cidx( int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t cstr_info, int j2klen);
54 
55 
56 #endif /* !CIDX_MANAGER_H_ */
opj_free
#define opj_free(m)
Deallocates or frees a memory block.
Definition: opj_malloc.h:152
opj_marker_info_t::type
unsigned short int type
marker type
Definition: openjpeg.h:605
opj_jp2_box::type
int type
Definition: jp2.h:152
opj_marker_info_t::len
int len
length, marker val included
Definition: openjpeg.h:609
opj_marker_info_t
Marker structure.
Definition: openjpeg.h:603
JPIP_THIX
#define JPIP_THIX
Definition: indexbox_manager.h:49
write_ppix
int write_ppix(int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio)
Definition: ppix_manager.c:54
write_cptr
void write_cptr(int coff, int clen, opj_cio_t *cio)
Definition: cidx_manager.c:126
JPIP_MHIX
#define JPIP_MHIX
Definition: indexbox_manager.h:47
JPIP_PHIX
#define JPIP_PHIX
Definition: indexbox_manager.h:51
opj_codestream_info::main_head_start
int main_head_start
main header position
Definition: openjpeg.h:712
check_EPHuse
opj_bool check_EPHuse(int coff, opj_marker_info_t *markers, int marknum, opj_cio_t *cio)
Definition: cidx_manager.c:190
opj_calloc
#define opj_calloc(num, size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.h:63
cio_read
unsigned int cio_read(opj_cio_t *cio, int n)
Read some bytes.
Definition: cio.c:183
write_tpix
int write_tpix(int coff, opj_codestream_info_t cstr_info, int j2klen, opj_cio_t *cio)
Definition: tpix_manager.c:55
write_thix
int write_thix(int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio)
Definition: thix_manager.c:52
write_cidx
int write_cidx(int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t cstr_info, int j2klen)
Definition: cidx_manager.c:68
cio_write
unsigned int cio_write(opj_cio_t *cio, unsigned int64 v, int n)
Write some bytes.
Definition: cio.c:167
opj_includes.h
opj_cio
Byte input-output stream (CIO)
Definition: openjpeg.h:475
opj_codestream_info::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:707
opj_jp2_box
JP2 Box.
Definition: jp2.h:150
write_mainmhix
int write_mainmhix(int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio)
Definition: cidx_manager.c:164
write_cidx
int write_cidx(int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t cstr_info, int j2klen)
Definition: cidx_manager.c:68
cio_tell
int OPJ_CALLCONV cio_tell(opj_cio_t *cio)
Get position in byte stream.
Definition: cio.c:100
JPIP_CPTR
#define JPIP_CPTR
Definition: indexbox_manager.h:44
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:64
openjpeg.h
cio_skip
void cio_skip(opj_cio_t *cio, int n)
Skip some bytes.
Definition: cio.c:198
JPIP_PPIX
#define JPIP_PPIX
Definition: indexbox_manager.h:50
JPIP_MANF
#define JPIP_MANF
Definition: indexbox_manager.h:45
opj_codestream_info::main_head_end
int main_head_end
main header position
Definition: openjpeg.h:714
write_manf
void write_manf(int second, int v, opj_jp2_box_t *box, opj_cio_t *cio)
Definition: cidx_manager.c:143
JPIP_TPIX
#define JPIP_TPIX
Definition: indexbox_manager.h:48
opj_bool
int opj_bool
Definition: openjpeg.h:63
write_phix
int write_phix(int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio)
Definition: phix_manager.c:53
opj_marker_info_t::pos
int pos
position in codestream
Definition: openjpeg.h:607
cio_seek
void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos)
Set position in byte stream.
Definition: cio.c:109
opj_codestream_info
Index structure of the codestream.
Definition: openjpeg.h:672
JPIP_CIDX
#define JPIP_CIDX
Definition: indexbox_manager.h:43
opj_jp2_box::length
int length
Definition: jp2.h:151
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:65
J2K_MS_COD
#define J2K_MS_COD
COD marker value.
Definition: j2k.h:65
opj_image
Defines image data and characteristics.
Definition: openjpeg.h:533
opj_codestream_info::marknum
int marknum
number of markers
Definition: openjpeg.h:705
opj_codestream_info::codestream_size
int codestream_size
codestream's size
Definition: openjpeg.h:716