nengel@0: /* nengel@0: * Small jpeg decoder library (header file) nengel@0: * nengel@0: * Copyright (c) 2006, Luc Saillard nengel@0: * All rights reserved. nengel@0: * Redistribution and use in source and binary forms, with or without nengel@0: * modification, are permitted provided that the following conditions are met: nengel@0: * nengel@0: * - Redistributions of source code must retain the above copyright notice, nengel@0: * this list of conditions and the following disclaimer. nengel@0: * nengel@0: * - Redistributions in binary form must reproduce the above copyright notice, nengel@0: * this list of conditions and the following disclaimer in the documentation nengel@0: * and/or other materials provided with the distribution. nengel@0: * nengel@0: * - Neither the name of the author nor the names of its contributors may be nengel@0: * used to endorse or promote products derived from this software without nengel@0: * specific prior written permission. nengel@0: * nengel@0: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" nengel@0: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE nengel@0: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE nengel@0: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE nengel@0: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR nengel@0: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF nengel@0: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS nengel@0: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN nengel@0: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) nengel@0: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE nengel@0: * POSSIBILITY OF SUCH DAMAGE. nengel@0: * nengel@0: */ nengel@0: nengel@0: #ifndef __JPEGDEC_H__ nengel@0: #define __JPEGDEC_H__ nengel@0: nengel@0: #include "tinyjpeg-internal.h" nengel@0: nengel@0: #include "VSs_impl/VSs.h" nengel@0: nengel@0: /* Flags that can be set by any applications */ nengel@0: #define TINYJPEG_FLAGS_MJPEG_TABLE (1<<1) nengel@0: nengel@0: #define TINYJPEG_FMT_RGB24 3 nengel@0: nengel@0: #define RGB_DEPTH 3 nengel@0: #define MCU_X_STRIDE 16 nengel@0: #define MCU_Y_STRIDE 16 nengel@0: nengel@0: struct jdec_private *tinyjpeg_init(void); nengel@0: void tinyjpeg_free(struct jdec_private *priv); nengel@0: struct jdec_private *create_jdec_priv_task(struct jdec_private *priv, int tasknum); nengel@0: nengel@0: int tinyjpeg_parse_header(struct jdec_private *priv, const unsigned char *buf, unsigned int size); nengel@0: nengel@0: nengel@0: typedef struct{ nengel@0: struct jdec_private *priv; nengel@0: uint8_t* context; nengel@0: } tinyjpeg_decode_task_args; nengel@0: nengel@0: //#pragma omp task input(*priv) output(*context) nengel@0: void tinyjpeg_decode_task(void *data, SlaveVP *animatingSlv ); nengel@0: nengel@0: VSsTaskType *tinyjpegTaskType; seanhalle@1: SlaveVP* seedSlv; nengel@0: nengel@0: void convert_one_image_wrapper( void *_params, SlaveVP *animSlv ); nengel@0: nengel@0: const char *tinyjpeg_get_errorstring(); nengel@0: void tinyjpeg_get_size(struct jdec_private *priv, unsigned int *width, unsigned int *height); nengel@0: int tinyjpeg_get_components(struct jdec_private *priv, unsigned char **components); nengel@0: int tinyjpeg_set_components(struct jdec_private *priv, unsigned char **components, unsigned int ncomponents); nengel@0: int tinyjpeg_set_flags(struct jdec_private *priv, int flags); nengel@0: nengel@0: #endif nengel@0: nengel@0: nengel@0: