OpenJPEG  1.5.1
raw.h
Go to the documentation of this file.
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) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
00005  * Copyright (c) 2005, Herve Drolon, FreeImage Team
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
00018  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00021  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00022  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00023  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00024  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00025  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00026  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00027  * POSSIBILITY OF SUCH DAMAGE.
00028  */
00029 
00030 #ifndef __RAW_H
00031 #define __RAW_H
00032 
00042 
00046 typedef struct opj_raw {
00048         unsigned char c;
00050         unsigned int ct;
00052         unsigned int lenmax;
00054         unsigned int len;
00056         unsigned char *bp;
00058         unsigned char *start;
00060         unsigned char *end;
00061 } opj_raw_t;
00062 
00065 /* ----------------------------------------------------------------------- */
00070 opj_raw_t* raw_create(void);
00075 void raw_destroy(opj_raw_t *raw);
00081 int raw_numbytes(opj_raw_t *raw);
00088 void raw_init_dec(opj_raw_t *raw, unsigned char *bp, int len);
00094 int raw_decode(opj_raw_t *raw);
00095 /* ----------------------------------------------------------------------- */
00099 
00100 #endif /* __RAW_H */