1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-24 12:26:00 +00:00

QRCODE: implement pre-calculated QR/MICROQR masks ala BWIPP for a

slight performance gain (2-3%), see
  https://sourceforge.net/p/zint/mailman/message/59278637/
  - generated by "backend/tools/gen_qr_masks.php"
test suite: update BWIPP to latest
This commit is contained in:
gitlost
2026-01-06 11:50:06 +00:00
parent 973594a624
commit 64aa8e654c
5 changed files with 138 additions and 62 deletions

View File

@@ -1,7 +1,7 @@
/* channel.c - Handles Channel */
/*
libzint - the open source barcode library
Copyright (C) 2008-2025 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2008-2026 Robin Stuart <rstuart114@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -87,7 +87,8 @@ static int channel_copy_precalc(channel_precalc *const precalc, int B[8], int S[
assume no liability for the use of this document." */
static void CHNCHR(int channels, int target_value, int B[8], int S[8]) {
/* Use of initial pre-calculations taken from Barcode Writer in Pure PostScript (BWIPP)
* Copyright (c) 2004-2020 Terry Burton (MIT/X-Consortium license) */
Copyright (c) 2004-2026 Terry Burton */
/* SPDX-License-Identifier: MIT */
static channel_precalc initial_precalcs[6] = {
{ 0, { 1, 1, 1, 1, 1, 2, 1, 2, }, { 1, 1, 1, 1, 1, 1, 1, 3, }, { 1, 1, 1, 1, 1, 3, 2, },
{ 1, 1, 1, 1, 1, 3, 3, }, },