jbig2_generic.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Copyright (C) 2001-2023 Artifex Software, Inc.
  2. All Rights Reserved.
  3. This software is provided AS-IS with no warranty, either express or
  4. implied.
  5. This software is distributed under license and may not be copied,
  6. modified or distributed except as expressly authorized under the terms
  7. of the license contained in the file LICENSE in this distribution.
  8. Refer to licensing information at http://www.artifex.com or contact
  9. Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
  10. CA 94129, USA, for further information.
  11. */
  12. /*
  13. jbig2dec
  14. */
  15. #ifndef _JBIG2_GENERIC_H
  16. #define _JBIG2_GENERIC_H
  17. /**
  18. * Headers for Generic and Generic Refinement region handling
  19. **/
  20. /* 6.4 Table 2 */
  21. typedef struct {
  22. bool MMR;
  23. /* GBW */
  24. /* GBH */
  25. int GBTEMPLATE;
  26. bool TPGDON;
  27. bool USESKIP;
  28. Jbig2Image *SKIP;
  29. int8_t gbat[8];
  30. } Jbig2GenericRegionParams;
  31. /* return the appropriate context size for the given template */
  32. int jbig2_generic_stats_size(Jbig2Ctx *ctx, int template);
  33. int
  34. jbig2_decode_generic_region(Jbig2Ctx *ctx,
  35. Jbig2Segment *segment, const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats);
  36. /* 7.4 */
  37. int jbig2_immediate_generic_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data);
  38. #endif /* _JBIG2_GENERIC_H */