OpenJPEG: jp2k_decoder.h Source File

OpenJPEG 2.4.0

jp2k_decoder.h
Go to the documentation of this file.
1 /*
2 * $Id$
3 *
4 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
5 * Copyright (c) 2002-2014, Professor Benoit Macq
6 * Copyright (c) 2010-2011, Kaori Hagihara
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef JP2K_DECODER_H_
32 # define JP2K_DECODER_H_
33
34 #include "byte_manager.h"
35 #include "ihdrbox_manager.h"
36
37 Byte_t * j2k_to_pnm(const char *fn, ihdrbox_param_t **ihdrbox);
38
39 #endif /* !JP2K_DECODER_H_ */
opj_set_error_handler
OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the error handler use by openjpeg.
Definition: openjpeg.c:74
imagetopnm
static Byte_t * imagetopnm(opj_image_t *image, ihdrbox_param_t **ihdrbox)
Definition: jp2k_decoder.c:164
warning_callback
static void warning_callback(const char *msg, void *client_data)
sample warning callback expecting a FILE* client object
Definition: jp2k_decoder.c:148
opj_set_info_handler
OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the info handler use by openjpeg.
Definition: openjpeg.c:44
opj_dparameters::DA_y1
OPJ_UINT32 DA_y1
Decoding area bottom boundary.
Definition: openjpeg.h:581
opj_image::numcomps
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:713
opj_setup_decoder
OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, opj_dparameters_t *parameters)
Setup the decoder with decompression parameters provided by the user and with the message handler pro...
Definition: openjpeg.c:398
opj_image_comp::data
OPJ_INT32 * data
image component data
Definition: openjpeg.h:695
Byte_t
uint8_t Byte_t
Definition: byte_manager.h:37
opj_set_decode_area
OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(opj_codec_t *p_codec, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y)
Sets the given area to be decoded.
Definition: openjpeg.c:492
opj_stream_t
void * opj_stream_t
Definition: openjpeg.h:660
opj_codec_t
void * opj_codec_t
JPEG2000 codec V2.
Definition: openjpeg.h:612
info_callback
static void info_callback(const char *msg, void *client_data)
sample debug callback expecting no client object
Definition: jp2k_decoder.c:156
OPJ_SIZE_T
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
opj_image_destroy
void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition: image.c:92
opj_image_comp::sgnd
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:689
opj_dparameters::DA_x0
OPJ_UINT32 DA_x0
Decoding area left boundary.
Definition: openjpeg.h:575
j2k_to_pnm
Byte_t * j2k_to_pnm(const char *fn, ihdrbox_param_t **ihdrbox)
Definition: jp2k_decoder.c:46
opj_image_comp::h
OPJ_UINT32 h
data height
Definition: openjpeg.h:679
opj_image_comp::prec
OPJ_UINT32 prec
precision
Definition: openjpeg.h:685
error_callback
static void error_callback(const char *msg, void *client_data)
sample error callback expecting a FILE* client object
Definition: jp2k_decoder.c:140
ihdrbox_param::width
Byte4_t width
Definition: ihdrbox_manager.h:41
opj_stream_create_default_file_stream
opj_stream_t *OPJ_CALLCONV opj_stream_create_default_file_stream(const char *fname, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with default parameters (helper function)
Definition: openjpeg.c:1039
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:111
openjpeg.h
opj_read_header
OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream, opj_codec_t *p_codec, opj_image_t **p_image)
Decodes an image header.
Definition: openjpeg.c:418
jp2k_decoder.h
opj_decode
OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_codec, opj_stream_t *p_stream, opj_image_t *p_image)
Decode an image from a JPEG-2000 codestream.
Definition: openjpeg.c:471
ihdrbox_manager.h
opj_set_warning_handler
OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the warning handler use by openjpeg.
Definition: openjpeg.c:59
opj_image_comp::w
OPJ_UINT32 w
data width
Definition: openjpeg.h:677
opj_set_default_decoder_parameters
void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters)
Set decoding parameters to default values.
Definition: openjpeg.c:364
opj_dparameters
Decompression parameters.
Definition: openjpeg.h:546
opj_image::comps
opj_image_comp_t * comps
image components
Definition: openjpeg.h:717
byte_manager.h
opj_destroy_codec
void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
Destroy a decompressor handle.
Definition: openjpeg.c:958
OPJ_UINT32
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
opj_stream_destroy
void OPJ_CALLCONV opj_stream_destroy(opj_stream_t *p_stream)
Destroys a stream created by opj_create_stream.
Definition: cio.c:199
opj_create_decompress
opj_codec_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
Creates a J2K/JP2 decompression structure.
Definition: openjpeg.c:168
Byte2_t
uint16_t Byte2_t
Definition: byte_manager.h:38
ihdrbox_param
I.5.3.1 Image Header box.
Definition: ihdrbox_manager.h:39
j2k_to_pnm
Byte_t * j2k_to_pnm(const char *fn, ihdrbox_param_t **ihdrbox)
Definition: jp2k_decoder.c:46
opj_dparameters::DA_y0
OPJ_UINT32 DA_y0
Decoding area up boundary.
Definition: openjpeg.h:579
opj_dparameters::DA_x1
OPJ_UINT32 DA_x1
Decoding area right boundary.
Definition: openjpeg.h:577
opj_image
Defines image data and characteristics.
Definition: openjpeg.h:703
opj_end_decompress
OPJ_BOOL OPJ_CALLCONV opj_end_decompress(opj_codec_t *p_codec, opj_stream_t *p_stream)
Read after the codestream if necessary.
Definition: openjpeg.c:881
OPJ_CODEC_J2K
@ OPJ_CODEC_J2K
JPEG-2000 codestream : read/write.
Definition: openjpeg.h:324