shithub: jbig2

Download patch

ref: 57a4ce1d8e2f01a9c9229d6c7a38e2ce6b3caefe
parent: e4253bb1b503849fcab5c44a269842c585931d7c
author: Sebastian Rasmussen <sebras@gmail.com>
date: Wed Jul 4 18:19:34 EDT 2018

jbig2dec: Make local functions static.

--- a/jbig2_halftone.c
+++ b/jbig2_halftone.c
@@ -39,7 +39,7 @@
 /**
  * jbig2_hd_new: create a new dictionary from a collective bitmap
  */
-Jbig2PatternDict *
+static Jbig2PatternDict *
 jbig2_hd_new(Jbig2Ctx *ctx, const Jbig2PatternDictParams *params, Jbig2Image *image)
 {
     Jbig2PatternDict *new;
@@ -258,7 +258,7 @@
  * returns: array of gray-scale values with GSW x GSH width/height
  *          0 on failure
  **/
-uint8_t **
+static uint8_t **
 jbig2_decode_gray_scale_image(Jbig2Ctx *ctx, Jbig2Segment *segment,
                               const byte *data, const size_t size,
                               bool GSMMR, uint32_t GSW, uint32_t GSH,
@@ -409,7 +409,7 @@
  * returns: pattern dictionary
  *          0 if search failed
  **/
-Jbig2PatternDict *
+static Jbig2PatternDict *
 jbig2_decode_ht_region_get_hpats(Jbig2Ctx *ctx, Jbig2Segment *segment)
 {
     int index = 0;
@@ -447,7 +447,7 @@
  * returns: 0 on success
  *         <0 on failure
  **/
-int
+static int
 jbig2_decode_halftone_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
                              Jbig2HalftoneRegionParams *params, const byte *data, const size_t size, Jbig2Image *image, Jbig2ArithCx *GB_stats)
 {
--- a/jbig2_halftone.h
+++ b/jbig2_halftone.h
@@ -51,20 +51,7 @@
     bool HDEFPIXEL;
 } Jbig2HalftoneRegionParams;
 
-Jbig2PatternDict *jbig2_hd_new(Jbig2Ctx *ctx, const Jbig2PatternDictParams *params, Jbig2Image *image);
-
 void jbig2_hd_release(Jbig2Ctx *ctx, Jbig2PatternDict *dict);
-
-uint8_t **jbig2_decode_gray_scale_image(Jbig2Ctx *ctx, Jbig2Segment *segment,
-                                        const byte *data, const size_t size,
-                                        bool GSMMR, uint32_t GSW, uint32_t GSH,
-                                        uint32_t GSBPP, bool GSUSESKIP, Jbig2Image *GSKIP, int GSTEMPLATE, Jbig2ArithCx *GB_stats);
-
-Jbig2PatternDict *jbig2_decode_ht_region_get_hpats(Jbig2Ctx *ctx, Jbig2Segment *segment);
-
-int
-jbig2_decode_halftone_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
-                             Jbig2HalftoneRegionParams *params, const byte *data, const size_t size, Jbig2Image *image, Jbig2ArithCx *GB_stats);
 
 int jbig2_halftone_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data);
 int jbig2_pattern_dictionary(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data);