[jbig2-cvs] rev 319 - trunk
giles at ghostscript.com
giles at ghostscript.com
Tue Aug 17 18:03:15 PDT 2004
Author: giles
Date: 2004-08-17 18:03:14 -0700 (Tue, 17 Aug 2004)
New Revision: 319
Added:
trunk/jbig2_refinement.c
Modified:
trunk/jbig2_generic.c
Log:
It looks like templates aren't shared between generic and generic refinement decoding, so split
the routines into separate files.
Modified: trunk/jbig2_generic.c
===================================================================
--- trunk/jbig2_generic.c 2004-08-13 00:00:17 UTC (rev 318)
+++ trunk/jbig2_generic.c 2004-08-18 01:03:14 UTC (rev 319)
@@ -366,6 +366,9 @@
return -1;
}
+/** Handler for immediate generic region segments
+ *
+ */
int
jbig2_immediate_generic_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
const byte *segment_data)
@@ -458,32 +461,3 @@
return code;
}
-
-/**
- * jbig2_decode_refinement_region: Decode a generic refinement region.
- * @ctx: The context for allocation and error reporting.
- * @segment: A segment reference for error reporting.
- * @params: Decoding parameter set.
- * @as: Arithmetic decoder state.
- * @image: Where to store the decoded data.
- * @GB_stats: Arithmetic stats.
- *
- * Decodes a generic region, according to section 6.2. The caller should
- * pass an already allocated Jbig2Image object for @image
- *
- * Because this API is based on an arithmetic decoding state, it is
- * not suitable for MMR decoding.
- *
- * Return code: 0 on success.
- **/
-int
-jbig2_decode_refinement_region(Jbig2Ctx *ctx,
- Jbig2Segment *segment,
- const Jbig2RefinementRegionParams *params,
- Jbig2ArithState *as,
- Jbig2Image *image,
- Jbig2ArithCx *GB_stats)
-{
-
-}
-
Added: trunk/jbig2_refinement.c
===================================================================
--- trunk/jbig2_refinement.c 2004-08-13 00:00:17 UTC (rev 318)
+++ trunk/jbig2_refinement.c 2004-08-18 01:03:14 UTC (rev 319)
@@ -0,0 +1,70 @@
+/*
+ jbig2dec
+
+ Copyright (c) 2002-2004 artofcode LLC.
+
+ This software is provided AS-IS with no warranty,
+ either express or implied.
+
+ This software is distributed under license and may not
+ be copied, modified or distributed except as expressly
+ authorized under the terms of the license contained in
+ the file LICENSE in this distribution.
+
+ For information on commercial licensing, go to
+ http://www.artifex.com/licensing/ or contact
+ Artifex Software, Inc., 101 Lucas Valley Road #110,
+ San Rafael, CA 94903, U.S.A., +1(415)492-9861.
+
+ $Id: jbig2_refinement.c 318 2004-08-13 00:00:17Z giles $
+*/
+
+/**
+ * Generic Refinement region handlers.
+ **/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "os_types.h"
+
+#include <stddef.h>
+#include <string.h> /* memcpy(), memset() */
+
+#ifdef OUTPUT_PBM
+#include <stdio.h>
+#endif
+
+#include "jbig2.h"
+#include "jbig2_priv.h"
+#include "jbig2_arith.h"
+#include "jbig2_generic.h"
+#include "jbig2_mmr.h"
+
+/**
+ * jbig2_decode_refinement_region: Decode a generic refinement region.
+ * @ctx: The context for allocation and error reporting.
+ * @segment: A segment reference for error reporting.
+ * @params: Decoding parameter set.
+ * @as: Arithmetic decoder state.
+ * @image: Where to store the decoded data.
+ * @GB_stats: Arithmetic stats.
+ *
+ * Decodes a generic region, according to section 6.2. The caller should
+ * pass an already allocated Jbig2Image object for @image
+ *
+ * Because this API is based on an arithmetic decoding state, it is
+ * not suitable for MMR decoding.
+ *
+ * Return code: 0 on success.
+ **/
+int
+jbig2_decode_refinement_region(Jbig2Ctx *ctx,
+ Jbig2Segment *segment,
+ const Jbig2RefinementRegionParams *params,
+ Jbig2ArithState *as,
+ Jbig2Image *image,
+ Jbig2ArithCx *GB_stats)
+{
+
+}
More information about the jbig2-cvs
mailing list