jabcode
 All Classes Files Functions Variables Enumerations Macros
decoder.h File Reference

Decoder header. More...

Go to the source code of this file.

Macros

#define DECODE_METADATA_FAILED   -1
 
#define FATAL_ERROR   -2
 
#define MASTER_METADATA_X   6
 
#define MASTER_METADATA_Y   1
 
#define MASTER_METADATA_PART1_LENGTH   6
 
#define MASTER_METADATA_PART2_LENGTH   12
 
#define MASTER_METADATA_PART3_MAX_LENGTH   32
 

Enumerations

enum  jab_encode_mode {
  None = -1, Upper = 0, Lower, Numeric,
  Punct, Mixed, Alphanumeric, Byte,
  ECI, FNC1
}
 Encoding mode.
 

Functions

jab_int32 decodeMaster (jab_bitmap *matrix, jab_decoded_symbol *symbol)
 Decode master symbol. More...
 
jab_int32 decodeSlave (jab_bitmap *matrix, jab_decoded_symbol *symbol)
 Decode slave symbol. More...
 
jab_datadecodeData (jab_data *bits)
 Interpret decoded bits. More...
 
void deinterleaveData (jab_data *data, jab_float *p)
 In-place deinterleaving. More...
 
void getNextMetadataModuleInMaster (jab_int32 matrix_height, jab_int32 matrix_width, jab_int32 next_module_count, jab_int32 *x, jab_int32 *y)
 Get the coordinate of the next metadata module in master symbol. More...
 
void demaskSymbol (jab_data *data, jab_byte *data_map, jab_vector2d symbol_size, jab_int32 mask_type, jab_int32 color_number)
 Demask modules. More...
 
jab_int32 readColorPaletteInMaster (jab_bitmap *matrix, jab_decoded_symbol *symbol, jab_byte *data_map, jab_int32 *module_count, jab_int32 *x, jab_int32 *y)
 Read the color palettes in master symbol. More...
 
jab_int32 readColorPaletteInSlave (jab_bitmap *matrix, jab_decoded_symbol *symbol, jab_byte *data_map)
 Read the color palettes in master symbol. More...
 

Detailed Description

Decoder header.

libjabcode - JABCode Encoding/Decoding Library

Copyright 2016 by Fraunhofer SIT. All rights reserved. See LICENSE file for full terms of use and distribution.

Contact: Huajian Liu liu@s.nosp@m.it.f.nosp@m.raunh.nosp@m.ofer.nosp@m..de Waldemar Berchtold walde.nosp@m.mar..nosp@m.berch.nosp@m.told.nosp@m.@sit..nosp@m.frau.nosp@m.nhofe.nosp@m.r.de

Function Documentation

jab_data* decodeData ( jab_data bits)

Interpret decoded bits.

Parameters
bitsthe input bits
Returns
the data message
jab_int32 decodeMaster ( jab_bitmap matrix,
jab_decoded_symbol symbol 
)

Decode master symbol.

Parameters
matrixthe symbol matrix
symbolthe master symbol
Returns
JAB_SUCCESS | JAB_FAILURE | FATAL_ERROR
jab_int32 decodeSlave ( jab_bitmap matrix,
jab_decoded_symbol symbol 
)

Decode slave symbol.

Parameters
matrixthe symbol matrix
symbolthe slave symbol
Returns
JAB_SUCCESS | JAB_FAILURE | FATAL_ERROR
void deinterleaveData ( jab_data data,
jab_float *  p 
)

In-place deinterleaving.

Parameters
datathe first input data to be deinterleaved
pthe second input data to be deinterleaved
void demaskSymbol ( jab_data data,
jab_byte *  data_map,
jab_vector2d  symbol_size,
jab_int32  mask_type,
jab_int32  color_number 
)

Demask modules.

Parameters
datathe decoded data module values
data_mapthe data module positions
symbol_sizethe symbol size in module
mask_typethe mask pattern reference
color_numberthe number of module colors
void getNextMetadataModuleInMaster ( jab_int32  matrix_height,
jab_int32  matrix_width,
jab_int32  next_module_count,
jab_int32 *  x,
jab_int32 *  y 
)

Get the coordinate of the next metadata module in master symbol.

Parameters
matrix_heightthe height of the matrix
matrix_widththe width of the matrix
next_module_countthe index number of the next module
xthe x coordinate of the current and the next module
ythe y coordinate of the current and the next module
jab_int32 readColorPaletteInMaster ( jab_bitmap matrix,
jab_decoded_symbol symbol,
jab_byte *  data_map,
jab_int32 *  module_count,
jab_int32 *  x,
jab_int32 *  y 
)

Read the color palettes in master symbol.

Parameters
matrixthe symbol matrix
symbolthe master symbol
data_mapthe data module positions
module_countthe start module index
xthe x coordinate of the start module
ythe y coordinate of the start module
Returns
JAB_SUCCESS | FATAL_ERROR
jab_int32 readColorPaletteInSlave ( jab_bitmap matrix,
jab_decoded_symbol symbol,
jab_byte *  data_map 
)

Read the color palettes in master symbol.

Parameters
matrixthe symbol matrix
symbolthe slave symbol
data_mapthe data module positions
Returns
JAB_SUCCESS | FATAL_ERROR