| rev |
line source |
|
nengel@0
|
1 /*
|
|
nengel@0
|
2 * Small jpeg decoder library (header file)
|
|
nengel@0
|
3 *
|
|
nengel@0
|
4 * Copyright (c) 2006, Luc Saillard <luc@saillard.org>
|
|
nengel@0
|
5 * All rights reserved.
|
|
nengel@0
|
6 * Redistribution and use in source and binary forms, with or without
|
|
nengel@0
|
7 * modification, are permitted provided that the following conditions are met:
|
|
nengel@0
|
8 *
|
|
nengel@0
|
9 * - Redistributions of source code must retain the above copyright notice,
|
|
nengel@0
|
10 * this list of conditions and the following disclaimer.
|
|
nengel@0
|
11 *
|
|
nengel@0
|
12 * - Redistributions in binary form must reproduce the above copyright notice,
|
|
nengel@0
|
13 * this list of conditions and the following disclaimer in the documentation
|
|
nengel@0
|
14 * and/or other materials provided with the distribution.
|
|
nengel@0
|
15 *
|
|
nengel@0
|
16 * - Neither the name of the author nor the names of its contributors may be
|
|
nengel@0
|
17 * used to endorse or promote products derived from this software without
|
|
nengel@0
|
18 * specific prior written permission.
|
|
nengel@0
|
19 *
|
|
nengel@0
|
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
nengel@0
|
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
nengel@0
|
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
nengel@0
|
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
nengel@0
|
24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
nengel@0
|
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
nengel@0
|
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
nengel@0
|
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
nengel@0
|
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
nengel@0
|
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
nengel@0
|
30 * POSSIBILITY OF SUCH DAMAGE.
|
|
nengel@0
|
31 *
|
|
nengel@0
|
32 */
|
|
nengel@0
|
33
|
|
nengel@0
|
34 #ifndef __JPEGDEC_H__
|
|
nengel@0
|
35 #define __JPEGDEC_H__
|
|
nengel@0
|
36
|
|
nengel@0
|
37 #include "tinyjpeg-internal.h"
|
|
nengel@0
|
38
|
|
nengel@0
|
39 #include "VSs_impl/VSs.h"
|
|
nengel@0
|
40
|
|
nengel@0
|
41 /* Flags that can be set by any applications */
|
|
nengel@0
|
42 #define TINYJPEG_FLAGS_MJPEG_TABLE (1<<1)
|
|
nengel@0
|
43
|
|
nengel@0
|
44 #define TINYJPEG_FMT_RGB24 3
|
|
nengel@0
|
45
|
|
nengel@0
|
46 #define RGB_DEPTH 3
|
|
nengel@0
|
47 #define MCU_X_STRIDE 16
|
|
nengel@0
|
48 #define MCU_Y_STRIDE 16
|
|
nengel@0
|
49
|
|
nengel@0
|
50 struct jdec_private *tinyjpeg_init(void);
|
|
nengel@0
|
51 void tinyjpeg_free(struct jdec_private *priv);
|
|
nengel@0
|
52 struct jdec_private *create_jdec_priv_task(struct jdec_private *priv, int tasknum);
|
|
nengel@0
|
53
|
|
nengel@0
|
54 int tinyjpeg_parse_header(struct jdec_private *priv, const unsigned char *buf, unsigned int size);
|
|
nengel@0
|
55
|
|
nengel@0
|
56
|
|
nengel@0
|
57 typedef struct{
|
|
nengel@0
|
58 struct jdec_private *priv;
|
|
nengel@0
|
59 uint8_t* context;
|
|
nengel@0
|
60 } tinyjpeg_decode_task_args;
|
|
nengel@0
|
61
|
|
nengel@0
|
62 //#pragma omp task input(*priv) output(*context)
|
|
nengel@0
|
63 void tinyjpeg_decode_task(void *data, SlaveVP *animatingSlv );
|
|
nengel@0
|
64
|
|
nengel@0
|
65 VSsTaskType *tinyjpegTaskType;
|
|
seanhalle@1
|
66 SlaveVP* seedSlv;
|
|
nengel@0
|
67
|
|
nengel@0
|
68 void convert_one_image_wrapper( void *_params, SlaveVP *animSlv );
|
|
nengel@0
|
69
|
|
nengel@0
|
70 const char *tinyjpeg_get_errorstring();
|
|
nengel@0
|
71 void tinyjpeg_get_size(struct jdec_private *priv, unsigned int *width, unsigned int *height);
|
|
nengel@0
|
72 int tinyjpeg_get_components(struct jdec_private *priv, unsigned char **components);
|
|
nengel@0
|
73 int tinyjpeg_set_components(struct jdec_private *priv, unsigned char **components, unsigned int ncomponents);
|
|
nengel@0
|
74 int tinyjpeg_set_flags(struct jdec_private *priv, int flags);
|
|
nengel@0
|
75
|
|
nengel@0
|
76 #endif
|
|
nengel@0
|
77
|
|
nengel@0
|
78
|
|
nengel@0
|
79
|