diff options
author | Yi Sun <yi.sun@intel.com> | 2015-03-09 14:42:27 +0800 |
---|---|---|
committer | Yi Sun <yi.sun@intel.com> | 2015-03-09 14:56:28 +0800 |
commit | b0ab87600433fcfc382d70fef376c60636f1fa65 (patch) | |
tree | 49958ea35549d5ccdb3d13a72802ba85ba8be3ce | |
parent | 0d3028d8a9f3c1b80d994a4bfd9905762688c964 (diff) |
Tuning for unbuntu 14 support.
Signed-off-by: Yang Wei <yangweix.shui@intel.com>
-rw-r--r-- | include/qrerror.h | 40 | ||||
-rw-r--r-- | include/qrtypes.h | 42 | ||||
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/QRdecode4Display.cpp | 2 |
4 files changed, 84 insertions, 2 deletions
diff --git a/include/qrerror.h b/include/qrerror.h new file mode 100644 index 0000000..b3ac292 --- /dev/null +++ b/include/qrerror.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////// +// +// qrerror.h --a part of libdecodeqr +// +// Copyright(C) 2007 NISHI Takao <zophos@koka-in.org> +// JMA (Japan Medical Association) +// NaCl (Network Applied Communication Laboratory Ltd.) +// +// This is free software with ABSOLUTELY NO WARRANTY. +// You can redistribute and/or modify it under the terms of LGPL. +// +// $Id$ +// +#ifndef __QR_ERROR_CODE__ +#define __QR_ERROR_CODE__ + +#define QR_IMAGEREADER_WORKING 0x1000 +#define QR_IMAGEREADER_DECODED 0x2000 + +#define QR_VERSIONINFO_ERROR 0x0f00 +#define QR_VERSIONINFO_INVALID 0x0100 +#define QR_VERSIONINFO_MISMATCH 0x0200 +#define QR_VERSIONINFO_UNRECOVERABLE 0x0800 + +#define QR_FORMATINFO_ERROR 0x00f0 +#define QR_FORMATINFO_INVALID_LEVEL 0x0010 +#define QR_FORMATINFO_UNRECOVERABLE 0x0080 + +#define QR_CODEDATA_ERROR 0x000f +#define QR_CODEDATA_NOT_SUPPORT_ECI 0x0001 +#define QR_CODEDATA_LENGTH_MISMATCH 0x0002 +#define QR_CODEDATA_UNRECOVERABLE 0x0008 + +#define QR_IMAGEREADER_ERROR 0x4000 +#define QR_IMAGEREADER_NOT_INVALID_SRC_IMAGE 0x0100 +#define QR_IMAGEREADER_NOT_FOUND_FINDER_PATTERN 0x0200 +#define QR_IMAGEREADER_NOT_FOUND_CODE_AREA 0x0400 +#define QR_IMAGEREADER_NOT_DETERMINABLE_CODE_AREA 0x0800 + +#endif diff --git a/include/qrtypes.h b/include/qrtypes.h new file mode 100644 index 0000000..53d81ed --- /dev/null +++ b/include/qrtypes.h @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////// +// +// qrtypes.h --a part of libdecodeqr +// +// Copyright(C) 2007 NISHI Takao <zophos@koka-in.org> +// JMA (Japan Medical Association) +// NaCl (Network Applied Communication Laboratory Ltd.) +// +// This is free software with ABSOLUTELY NO WARRANTY. +// You can redistribute and/or modify it under the terms of LGPL. +// +// $Id$ +// +#ifndef __QR_TYPES__ +#define __QR_TYPES__ + +#define QR_LEVEL_M 0 +#define QR_LEVEL_L 1 +#define QR_LEVEL_H 2 +#define QR_LEVEL_Q 3 + +#define QR_MODE_NUMBER 1 +#define QR_MODE_ALPHABET 2 +#define QR_MODE_JOINT 3 +#define QR_MODE_8BIT 4 +#define QR_MODE_FNC1_1 5 +#define QR_MODE_ECI 7 +#define QR_MODE_KANJI 8 +#define QR_MODE_FNC1_2 9 + +typedef void * QrDecoderHandle; +typedef struct{ + int model; + int version; + int level; + //int mode; //not supported yet + //int eci_mode; //not supported yet + int charactor_size; + int byte_size; +} QrCodeHeader; + +#endif diff --git a/tests/Makefile.am b/tests/Makefile.am index fc568eb..8a30680 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,7 +15,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ $(OPENCV_CFLAGS) \ $(NULL) -LDADD = ../lib/libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) -ldecodeqr +LDADD = ../lib/libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) ../lib/libdecodeqr.so LDADD += $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(GLIB_LIBS) $(DECODEQR_LIBS) $(OPENCV_LIBS) AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS) $(GLIB_CFLAGS) $(DECODEQR_LIBS) $(OPENCV_LIBS) diff --git a/tests/QRdecode4Display.cpp b/tests/QRdecode4Display.cpp index 8324b17..2a34e10 100644 --- a/tests/QRdecode4Display.cpp +++ b/tests/QRdecode4Display.cpp @@ -1,6 +1,6 @@ #include <stdio.h> #include <highgui.h> -#include <decodeqr.h> +#include "include/decodeqr.h" #include <opencv2/highgui/highgui.hpp> /* |