OpenJPEG  2.5.0
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-2014, Universite catholique de Louvain (UCL), Belgium
5  * Copyright (c) 2002-2014, 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 opj_write_cidx(int offset, opj_stream_private_t *cio,
54  opj_codestream_info_t cstr_info, int j2klen,
55  opj_event_mgr_t * p_manager);
56 
57 /*
58  * Check if EPH option is used
59  *
60  * @param[in] coff offset of j2k codestream
61  * @param[in] markers marker information
62  * @param[in] marknum number of markers
63  * @param[in] cio file output handle
64  * @return true if EPH is used
65  */
66 OPJ_BOOL opj_check_EPHuse(int coff, opj_marker_info_t *markers, int marknum,
68  opj_event_mgr_t * p_manager);
69 
70 #endif /* !CIDX_MANAGER_H_ */
opj_check_EPHuse
OPJ_BOOL opj_check_EPHuse(int coff, opj_marker_info_t *markers, int marknum, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: cidx_manager.c:233
OPJ_BYTE
unsigned char OPJ_BYTE
Definition: openjpeg.h:123
opj_stream_write_data
OPJ_SIZE_T opj_stream_write_data(opj_stream_private_t *p_stream, const OPJ_BYTE *p_buffer, OPJ_SIZE_T p_size, opj_event_mgr_t *p_event_mgr)
Writes some bytes to the stream.
Definition: cio.c:385
opj_calloc
void * opj_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.c:198
opj_write_cptr
void opj_write_cptr(int coff, int clen, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: cidx_manager.c:128
JPIP_THIX
#define JPIP_THIX
Definition: indexbox_manager.h:49
opj_write_phix
int opj_write_phix(int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: phix_manager.c:51
JPIP_MHIX
#define JPIP_MHIX
Definition: indexbox_manager.h:47
JPIP_PHIX
#define JPIP_PHIX
Definition: indexbox_manager.h:51
OPJ_OFF_T
int64_t OPJ_OFF_T
Definition: openjpeg.h:136
opj_stream_skip
OPJ_OFF_T opj_stream_skip(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, opj_event_mgr_t *p_event_mgr)
Skips a number of bytes from the stream.
Definition: cio.c:593
opj_stream_seek
OPJ_BOOL opj_stream_seek(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)
Seeks a number of bytes from the stream.
Definition: cio.c:641
opj_codestream_info::main_head_start
int main_head_start
main header position
Definition: openjpeg.h:891
opj_event_mgr
Message handler object used for.
Definition: event.h:50
opj_stream_tell
OPJ_OFF_T opj_stream_tell(const opj_stream_private_t *p_stream)
Tells the byte offset on the stream (similar to ftell).
Definition: cio.c:579
opj_jp2_box::type
OPJ_UINT32 type
Definition: jp2.h:200
opj_stream_private
Byte input-output stream.
Definition: cio.h:81
opj_write_manf
void opj_write_manf(int second, int v, opj_jp2_box_t *box, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: cidx_manager.c:157
OPJ_BOOL
int OPJ_BOOL
Definition: openjpeg.h:116
opj_includes.h
opj_codestream_info::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:886
opj_jp2_box
JP2 Box.
Definition: jp2.h:198
opj_write_cidx
int opj_write_cidx(int offset, opj_stream_private_t *cio, opj_codestream_info_t cstr_info, int j2klen, opj_event_mgr_t *p_manager)
Definition: cidx_manager.c:50
opj_marker_info::len
int len
length, marker val included
Definition: openjpeg.h:788
opj_marker_info::pos
OPJ_OFF_T pos
position in codestream
Definition: openjpeg.h:786
opj_write_thix
int opj_write_thix(int coff, opj_codestream_info_t cstr_info, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: thix_manager.c:40
opj_write_tpix
int opj_write_tpix(int coff, opj_codestream_info_t cstr_info, int j2klen, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: tpix_manager.c:60
JPIP_CPTR
#define JPIP_CPTR
Definition: indexbox_manager.h:44
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:117
openjpeg.h
opj_free
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
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:893
opj_marker_info::type
unsigned short int type
marker type
Definition: openjpeg.h:784
JPIP_TPIX
#define JPIP_TPIX
Definition: indexbox_manager.h:48
opj_jp2_box::length
OPJ_UINT32 length
Definition: jp2.h:199
opj_check_EPHuse
OPJ_BOOL opj_check_EPHuse(int coff, opj_marker_info_t *markers, int marknum, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: cidx_manager.c:233
opj_codestream_info
Index structure of the codestream.
Definition: openjpeg.h:851
opj_read_bytes
#define opj_read_bytes
Definition: cio.h:65
OPJ_UINT32
uint32_t OPJ_UINT32
Definition: openjpeg.h:132
opj_write_mainmhix
int opj_write_mainmhix(int coff, opj_codestream_info_t cstr_info, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: cidx_manager.c:192
JPIP_CIDX
#define JPIP_CIDX
Definition: indexbox_manager.h:43
opj_write_ppix
int opj_write_ppix(int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: ppix_manager.c:51
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:118
opj_write_cidx
int opj_write_cidx(int offset, opj_stream_private_t *cio, opj_codestream_info_t cstr_info, int j2klen, opj_event_mgr_t *p_manager)
Definition: cidx_manager.c:50
opj_write_bytes
#define opj_write_bytes
Definition: cio.h:64
J2K_MS_COD
#define J2K_MS_COD
COD marker value.
Definition: j2k.h:78
opj_marker_info
Marker structure.
Definition: openjpeg.h:782
opj_stream_read_data
OPJ_SIZE_T opj_stream_read_data(opj_stream_private_t *p_stream, OPJ_BYTE *p_buffer, OPJ_SIZE_T p_size, opj_event_mgr_t *p_event_mgr)
Reads some bytes from the stream.
Definition: cio.c:281
opj_codestream_info::marknum
int marknum
number of markers
Definition: openjpeg.h:884
opj_codestream_info::codestream_size
int codestream_size
codestream's size
Definition: openjpeg.h:895