| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* Linux driver for Philips webcam |
|---|
| 2 | 3 | Decompression for chipset version 2 et 3 |
|---|
| 3 | 4 | (C) 2004-2006 Luc Saillard (luc@saillard.org) |
|---|
| .. | .. |
|---|
| 8 | 9 | The decompression routines have been implemented by reverse-engineering the |
|---|
| 9 | 10 | Nemosoft binary pwcx module. Caveat emptor. |
|---|
| 10 | 11 | |
|---|
| 11 | | - This program is free software; you can redistribute it and/or modify |
|---|
| 12 | | - it under the terms of the GNU General Public License as published by |
|---|
| 13 | | - the Free Software Foundation; either version 2 of the License, or |
|---|
| 14 | | - (at your option) any later version. |
|---|
| 15 | | - |
|---|
| 16 | | - This program is distributed in the hope that it will be useful, |
|---|
| 17 | | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 18 | | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 19 | | - GNU General Public License for more details. |
|---|
| 20 | | - |
|---|
| 21 | | - You should have received a copy of the GNU General Public License |
|---|
| 22 | | - along with this program; if not, write to the Free Software |
|---|
| 23 | | - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 24 | 12 | |
|---|
| 25 | 13 | */ |
|---|
| 26 | 14 | |
|---|
| .. | .. |
|---|
| 41 | 29 | * UNROLL_LOOP_FOR_COPYING_BLOCK |
|---|
| 42 | 30 | * 0: use a loop for a smaller code (but little slower) |
|---|
| 43 | 31 | * 1: when unrolling the loop, gcc produces some faster code (perhaps only |
|---|
| 44 | | - * valid for intel processor class). Activating this option, automaticaly |
|---|
| 32 | + * valid for intel processor class). Activating this option, automatically |
|---|
| 45 | 33 | * activate USE_LOOKUP_TABLE_TO_CLAMP |
|---|
| 46 | 34 | */ |
|---|
| 47 | 35 | #define UNROLL_LOOP_FOR_COPY 1 |
|---|
| .. | .. |
|---|
| 332 | 320 | build_table_color(TimonRomTable[version][1], pdec->table_0004_pass2, pdec->table_8004_pass2); |
|---|
| 333 | 321 | } |
|---|
| 334 | 322 | |
|---|
| 335 | | - /* Informations can be coded on a variable number of bits but never less than 8 */ |
|---|
| 323 | + /* Information can be coded on a variable number of bits but never less than 8 */ |
|---|
| 336 | 324 | shift = 8 - pdec->nbits; |
|---|
| 337 | 325 | pdec->scalebits = SCALEBITS - shift; |
|---|
| 338 | 326 | pdec->nbitsmask = 0xFF >> shift; |
|---|