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
bch15_5.h
00001 /*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org) 00002 You can redistribute this library and/or modify it under the terms of the 00003 GNU Lesser General Public License as published by the Free Software 00004 Foundation; either version 2.1 of the License, or (at your option) any later 00005 version.*/ 00006 #if !defined(_bch15_5_H) 00007 # define _bch15_5_H (1) 00008 00009 /*Encodes a raw 5-bit value _x into a 15-bit BCH(15,5) code. 00010 This is capable of correcting up to 3 bit errors, and detecting as many as 00011 5 bit errors in some cases.*/ 00012 unsigned bch15_5_encode(unsigned _x); 00013 00014 /*Corrects the received code *_y, if possible. 00015 The original data is located in the top five bits. 00016 Returns the number of errors corrected, or a negative value if decoding 00017 failed due to too many bit errors, in which case *_y is left unchanged.*/ 00018 int bch15_5_correct(unsigned *_y); 00019 00020 #endif 00021
Generated on Tue Jul 12 2022 18:54:12 by 1.7.2