diff VSs_tinyjpeg/tinyjpeg.h @ 0:a8af8b3fc99d

initial commit
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Thu, 05 Jul 2012 11:35:03 +0200
parents
children 7e13c9ecc89c
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/VSs_tinyjpeg/tinyjpeg.h	Thu Jul 05 11:35:03 2012 +0200
     1.3 @@ -0,0 +1,79 @@
     1.4 +/*
     1.5 + * Small jpeg decoder library (header file)
     1.6 + *
     1.7 + * Copyright (c) 2006, Luc Saillard <luc@saillard.org>
     1.8 + * All rights reserved.
     1.9 + * Redistribution and use in source and binary forms, with or without
    1.10 + * modification, are permitted provided that the following conditions are met:
    1.11 + *
    1.12 + * - Redistributions of source code must retain the above copyright notice,
    1.13 + *  this list of conditions and the following disclaimer.
    1.14 + *
    1.15 + * - Redistributions in binary form must reproduce the above copyright notice,
    1.16 + *  this list of conditions and the following disclaimer in the documentation
    1.17 + *  and/or other materials provided with the distribution.
    1.18 + *
    1.19 + * - Neither the name of the author nor the names of its contributors may be
    1.20 + *  used to endorse or promote products derived from this software without
    1.21 + *  specific prior written permission.
    1.22 + *
    1.23 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    1.24 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1.25 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    1.26 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    1.27 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    1.28 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    1.29 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    1.30 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    1.31 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    1.32 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    1.33 + * POSSIBILITY OF SUCH DAMAGE.
    1.34 + *
    1.35 + */
    1.36 +
    1.37 +#ifndef __JPEGDEC_H__
    1.38 +#define __JPEGDEC_H__
    1.39 +
    1.40 +#include "tinyjpeg-internal.h"
    1.41 +
    1.42 +#include "VSs_impl/VSs.h"
    1.43 +
    1.44 +/* Flags that can be set by any applications */
    1.45 +#define TINYJPEG_FLAGS_MJPEG_TABLE	(1<<1)
    1.46 +
    1.47 +#define TINYJPEG_FMT_RGB24 3
    1.48 +
    1.49 +#define RGB_DEPTH 3
    1.50 +#define MCU_X_STRIDE 16
    1.51 +#define MCU_Y_STRIDE 16
    1.52 +
    1.53 +struct jdec_private *tinyjpeg_init(void);
    1.54 +void tinyjpeg_free(struct jdec_private *priv);
    1.55 +struct jdec_private *create_jdec_priv_task(struct jdec_private *priv, int tasknum);
    1.56 +
    1.57 +int tinyjpeg_parse_header(struct jdec_private *priv, const unsigned char *buf, unsigned int size);
    1.58 +
    1.59 +
    1.60 +typedef struct{
    1.61 +        struct jdec_private *priv;
    1.62 +        uint8_t* context;
    1.63 +} tinyjpeg_decode_task_args;
    1.64 +
    1.65 +//#pragma omp task input(*priv) output(*context)
    1.66 +void tinyjpeg_decode_task(void *data, SlaveVP *animatingSlv );
    1.67 +
    1.68 +VSsTaskType *tinyjpegTaskType;
    1.69 +SlaveVP* master;
    1.70 +
    1.71 +void convert_one_image_wrapper( void *_params, SlaveVP *animSlv );
    1.72 +
    1.73 +const char *tinyjpeg_get_errorstring();
    1.74 +void tinyjpeg_get_size(struct jdec_private *priv, unsigned int *width, unsigned int *height);
    1.75 +int tinyjpeg_get_components(struct jdec_private *priv, unsigned char **components);
    1.76 +int tinyjpeg_set_components(struct jdec_private *priv, unsigned char **components, unsigned int ncomponents);
    1.77 +int tinyjpeg_set_flags(struct jdec_private *priv, int flags);
    1.78 +
    1.79 +#endif
    1.80 +
    1.81 +
    1.82 +