"L. Spiro Engine"

F:/My Projects/LSEngine/Modules/LSImageLib/Src/Jpeg/LSIOpenJpeg.h

00001  /*
00002  * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain ( UCL ), Belgium
00003  * Copyright (c) 2002-2007, Professor Benoit Macq
00004  * Copyright (c) 2001-2003, David Janssens
00005  * Copyright (c) 2002-2003, Yannick Verschueren
00006  * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
00007  * Copyright (c) 2005, Herve Drolon, FreeImage Team
00008  * Copyright (c) 2006-2007, Parvatha Elangovan
00009  * All rights reserved.
00010  *
00011  * Redistribution and use in source and binary forms, with or without
00012  * modification, are permitted provided that the following conditions
00013  * are met:
00014  * 1. Redistributions of source code must retain the above copyright
00015  *    notice, this list of conditions and the following disclaimer.
00016  * 2. Redistributions in binary form must reproduce the above copyright
00017  *    notice, this list of conditions and the following disclaimer in the
00018  *    documentation and/or other materials provided with the distribution.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00023  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00024  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00025  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00026  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00027  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00028  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00029  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00030  * POSSIBILITY OF SUCH DAMAGE.
00031  */
00032 
00033 
00034 #ifndef __LSI_OPENJPEG_H__
00035 #define __LSI_OPENJPEG_H__
00036 
00037 #include "../LSIImageLib.h"
00038 #include "LSICio.h"
00039 #include "LSIJpegCommonStructs.h"
00040 #include "LSIJpegImage.h"
00041 
00042 
00043 
00044 namespace lsi {
00045 
00052         class COpenJpeg {
00053         public :
00054                 // == Functions.
00063                 static CJpegCommonStructs::opj_event_mgr_t * LSE_CALL           opj_set_event_mgr( CJpegCommonStructs::opj_common_ptr _cpInfo, CJpegCommonStructs::opj_event_mgr_t * _pemEventManager, LSVOID * _pvContext );
00064 
00071                 static CJpegCommonStructs::opj_dinfo_t * LSE_CALL                       opj_create_decompress( OPJ_CODEC_FORMAT _cfFormat );
00072 
00078                 static LSVOID LSE_CALL                                                                          opj_destroy_decompress( CJpegCommonStructs::opj_dinfo_t * _pdInfo );
00079 
00085                 static LSVOID LSE_CALL                                                                          opj_set_default_decoder_parameters( CJpegCommonStructs::opj_dparameters_t * _pdParameters );
00086 
00094                 static LSVOID LSE_CALL                                                                          opj_setup_decoder( CJpegCommonStructs::opj_dinfo_t * _pdInfo, CJpegCommonStructs::opj_dparameters_t * _pdParameters );
00095 
00103                 static CJpegImage::opj_image_t * LSE_CALL                                               opj_decode( CJpegCommonStructs::opj_dinfo_t * _pdInfo, CCio::opj_cio_t * _pcCio );
00104 
00113                 static CJpegImage::opj_image_t * LSE_CALL                                               opj_decode_with_info( CJpegCommonStructs::opj_dinfo_t * _pdInfo, CCio::opj_cio_t * _pcCio, CJpegCommonStructs::opj_codestream_info_t * _pciInfo );
00114 
00121                 static CJpegCommonStructs::opj_cinfo_t * LSE_CALL                       opj_create_compress( OPJ_CODEC_FORMAT _cfFormat );
00122 
00128                 static LSVOID LSE_CALL                                                                          opj_destroy_compress( CJpegCommonStructs::opj_cinfo_t * _cpInfo );
00129 
00152                 static LSVOID LSE_CALL                                                                          opj_set_default_encoder_parameters( CJpegCommonStructs::opj_cparameters_t * _pdParameters );
00153 
00161                 static LSVOID LSE_CALL                                                                          opj_setup_encoder( CJpegCommonStructs::opj_cinfo_t * _cpInfo, CJpegCommonStructs::opj_cparameters_t * _pdParameters, CJpegImage::opj_image_t * _piImage );
00162 
00171                 static LSBOOL LSE_CALL                                                                          opj_encode( CJpegCommonStructs::opj_cinfo_t * _cpInfo, CCio::opj_cio_t * _pcCio, CJpegImage::opj_image_t * _piImage );
00172 
00182                 static LSBOOL LSE_CALL                                                                          opj_encode_with_info( CJpegCommonStructs::opj_cinfo_t * _cpInfo, CCio::opj_cio_t * _pcCio, CJpegImage::opj_image_t * _piImage, CJpegCommonStructs::opj_codestream_info_t * _pciInfo );
00183 
00189                 static LSVOID LSE_CALL                                                                          opj_destroy_cstr_info( CJpegCommonStructs::opj_codestream_info_t * _pciInfo );
00190         };
00191 
00192 }       // namespace lsi
00193 
00194 #endif  // __LSI_OPENJPEG_H__
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator