ZBar bar code reader . http://zbar.sourceforge.net/ ZBar is licensed under the GNU LGPL 2.1 to enable development of both open source and commercial projects.
Dependents: GR-PEACH_Camera_in_barcode levkov_ov7670
LICENSE
The ZBar Bar Code Reader is Copyright (C) 2007-2009 Jeff Brown <spadix@users.sourceforge.net> The QR Code reader is Copyright (C) 1999-2009 Timothy B. Terriberry <tterribe@xiph.org>
You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
ISAAC is based on the public domain implementation by Robert J. Jenkins Jr., and is itself public domain.
Portions of the bit stream reader are copyright (C) The Xiph.Org Foundation 1994-2008, and are licensed under a BSD-style license.
The Reed-Solomon decoder is derived from an implementation (C) 1991-1995 Henry Minsky (hqm@ua.com, hqm@ai.mit.edu), and is licensed under the LGPL with permission.
Diff: zbar/qrcode/isaac.h
- Revision:
- 0:56c5742b9e2b
diff -r 000000000000 -r 56c5742b9e2b zbar/qrcode/isaac.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zbar/qrcode/isaac.h Tue Apr 19 02:00:37 2016 +0000 @@ -0,0 +1,42 @@ +/*Written by Timothy B. Terriberry (tterribe@xiph.org) 1999-2009 public domain. + Based on the public domain implementation by Robert J. Jenkins Jr.*/ +#if !defined(_isaac_H) +# define _isaac_H (1) + + + +typedef struct isaac_ctx isaac_ctx; + + + +#define ISAAC_SZ_LOG (8) +#define ISAAC_SZ (1<<ISAAC_SZ_LOG) +#define ISAAC_SEED_SZ_MAX (ISAAC_SZ<<2) + + + +/*ISAAC is the most advanced of a series of Pseudo-Random Number Generators + designed by Robert J. Jenkins Jr. in 1996. + http://www.burtleburtle.net/bob/rand/isaac.html + To quote: + No efficient method is known for deducing their internal states. + ISAAC requires an amortized 18.75 instructions to produce a 32-bit value. + There are no cycles in ISAAC shorter than 2**40 values. + The expected cycle length is 2**8295 values.*/ +struct isaac_ctx{ + unsigned n; + unsigned r[ISAAC_SZ]; + unsigned m[ISAAC_SZ]; + unsigned a; + unsigned b; + unsigned c; +}; + + +void isaac_init(isaac_ctx *_ctx,const void *_seed,int _nseed); + +unsigned isaac_next_uint32(isaac_ctx *_ctx); +unsigned isaac_next_uint(isaac_ctx *_ctx,unsigned _n); + +#endif +