qrencode
4.1.1
About: libqrencode is a fast and compact library and command-line utility for encoding data in a QR Code symbol.
![]() ![]() |
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include "qrencode.h"
#include "qrspec.h"
#include "mask.h"
Go to the source code of this file.
Macros | |
#define | N1 (3) |
Demerit coefficients. More... | |
#define | N2 (3) |
#define | N3 (40) |
#define | N4 (10) |
#define | MASKMAKER(__exp__) |
#define | maskNum (8) |
Typedefs | |
typedef int | MaskMaker(int, const unsigned char *, unsigned char *) |
Functions | |
STATIC_IN_RELEASE int | Mask_writeFormatInformation (int width, unsigned char *frame, int mask, QRecLevel level) |
static int | Mask_mask0 (int width, const unsigned char *s, unsigned char *d) |
static int | Mask_mask1 (int width, const unsigned char *s, unsigned char *d) |
static int | Mask_mask2 (int width, const unsigned char *s, unsigned char *d) |
static int | Mask_mask3 (int width, const unsigned char *s, unsigned char *d) |
static int | Mask_mask4 (int width, const unsigned char *s, unsigned char *d) |
static int | Mask_mask5 (int width, const unsigned char *s, unsigned char *d) |
static int | Mask_mask6 (int width, const unsigned char *s, unsigned char *d) |
static int | Mask_mask7 (int width, const unsigned char *s, unsigned char *d) |
unsigned char * | Mask_makeMask (int width, unsigned char *frame, int mask, QRecLevel level) |
STATIC_IN_RELEASE int | Mask_calcN1N3 (int length, int *runLength) |
STATIC_IN_RELEASE int | Mask_calcN2 (int width, unsigned char *frame) |
STATIC_IN_RELEASE int | Mask_calcRunLengthH (int width, unsigned char *frame, int *runLength) |
STATIC_IN_RELEASE int | Mask_calcRunLengthV (int width, unsigned char *frame, int *runLength) |
STATIC_IN_RELEASE int | Mask_evaluateSymbol (int width, unsigned char *frame) |
unsigned char * | Mask_mask (int width, unsigned char *frame, QRecLevel level) |
Variables | |
static MaskMaker * | maskMakers [(8)] |
#define MASKMAKER | ( | __exp__ | ) |
#define N1 (3) |
typedef int MaskMaker(int, const unsigned char *, unsigned char *) |
STATIC_IN_RELEASE int Mask_calcN1N3 | ( | int | length, |
int * | runLength | ||
) |
STATIC_IN_RELEASE int Mask_calcN2 | ( | int | width, |
unsigned char * | frame | ||
) |
STATIC_IN_RELEASE int Mask_calcRunLengthH | ( | int | width, |
unsigned char * | frame, | ||
int * | runLength | ||
) |
Definition at line 244 of file mask.c.
Referenced by Mask_evaluateSymbol().
STATIC_IN_RELEASE int Mask_calcRunLengthV | ( | int | width, |
unsigned char * | frame, | ||
int * | runLength | ||
) |
Definition at line 272 of file mask.c.
Referenced by Mask_evaluateSymbol().
STATIC_IN_RELEASE int Mask_evaluateSymbol | ( | int | width, |
unsigned char * | frame | ||
) |
Definition at line 300 of file mask.c.
References Mask_calcN1N3(), Mask_calcN2(), Mask_calcRunLengthH(), Mask_calcRunLengthV(), and QRSPEC_WIDTH_MAX.
Referenced by Mask_mask().
unsigned char * Mask_makeMask | ( | int | width, |
unsigned char * | frame, | ||
int | mask, | ||
QRecLevel | level | ||
) |
Definition at line 164 of file mask.c.
References level, Mask_writeFormatInformation(), maskMakers, and maskNum.
Referenced by QRcode_encodeMask().
unsigned char * Mask_mask | ( | int | width, |
unsigned char * | frame, | ||
QRecLevel | level | ||
) |
Definition at line 322 of file mask.c.
References level, Mask_evaluateSymbol(), Mask_writeFormatInformation(), maskMakers, maskNum, and N4.
Referenced by QRcode_encodeMask().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
STATIC_IN_RELEASE int Mask_writeFormatInformation | ( | int | width, |
unsigned char * | frame, | ||
int | mask, | ||
QRecLevel | level | ||
) |
Definition at line 34 of file mask.c.
References level, and QRspec_getFormatInfo().
Referenced by Mask_makeMask(), and Mask_mask().
|
static |
Definition at line 145 of file mask.c.
Referenced by Mask_makeMask(), and Mask_mask().