Blame jbig2_generic.h

Packit 3f21c4
/* Copyright (C) 2001-2012 Artifex Software, Inc.
Packit 3f21c4
   All Rights Reserved.
Packit 3f21c4
Packit 3f21c4
   This software is provided AS-IS with no warranty, either express or
Packit 3f21c4
   implied.
Packit 3f21c4
Packit 3f21c4
   This software is distributed under license and may not be copied,
Packit 3f21c4
   modified or distributed except as expressly authorized under the terms
Packit 3f21c4
   of the license contained in the file LICENSE in this distribution.
Packit 3f21c4
Packit 3f21c4
   Refer to licensing information at http://www.artifex.com or contact
Packit 3f21c4
   Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134, San Rafael,
Packit 3f21c4
   CA  94903, U.S.A., +1(415)492-9861, for further information.
Packit 3f21c4
*/
Packit 3f21c4
Packit 3f21c4
/*
Packit 3f21c4
    jbig2dec
Packit 3f21c4
*/
Packit 3f21c4
Packit 3f21c4
/**
Packit 3f21c4
 * Headers for Generic and Generic Refinement region handling
Packit 3f21c4
 **/
Packit 3f21c4
Packit 3f21c4
/* 6.4 Table 2 */
Packit 3f21c4
typedef struct {
Packit 3f21c4
    bool MMR;
Packit 3f21c4
    /* GBW */
Packit 3f21c4
    /* GBH */
Packit 3f21c4
    int GBTEMPLATE;
Packit 3f21c4
    bool TPGDON;
Packit 3f21c4
    bool USESKIP;
Packit 3f21c4
    /* SKIP */
Packit 3f21c4
    int8_t gbat[8];
Packit 3f21c4
} Jbig2GenericRegionParams;
Packit 3f21c4
Packit 3f21c4
/* return the appropriate context size for the given template */
Packit 3f21c4
int jbig2_generic_stats_size(Jbig2Ctx *ctx, int template);
Packit 3f21c4
Packit 3f21c4
int
Packit 3f21c4
jbig2_decode_generic_region(Jbig2Ctx *ctx,
Packit 3f21c4
                            Jbig2Segment *segment, const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats);
Packit 3f21c4
Packit 3f21c4
/* 6.3 Table 6 */
Packit 3f21c4
typedef struct {
Packit 3f21c4
    /* GRW */
Packit 3f21c4
    /* GRH */
Packit 3f21c4
    bool GRTEMPLATE;
Packit 3f21c4
    Jbig2Image *reference;
Packit 3f21c4
    int32_t DX, DY;
Packit 3f21c4
    bool TPGRON;
Packit 3f21c4
    int8_t grat[4];
Packit 3f21c4
} Jbig2RefinementRegionParams;
Packit 3f21c4
Packit 3f21c4
int
Packit 3f21c4
jbig2_decode_refinement_region(Jbig2Ctx *ctx,
Packit 3f21c4
                               Jbig2Segment *segment,
Packit 3f21c4
                               const Jbig2RefinementRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats);