1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Linux driver for Philips webcam
3 (C) 2004-2006 Luc Saillard (luc@saillard.org)
5 NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
6 driver and thus may have bugs that are not present in the original version.
7 Please send bug reports and support requests to <luc@saillard.org>.
8 The decompression routines have been implemented by reverse-engineering the
9 Nemosoft binary pwcx module. Caveat emptor.
18 struct pwc_dec23_private
22 unsigned char last_cmd
, last_cmd_valid
;
24 unsigned int scalebits
;
25 unsigned int nbitsmask
, nbits
; /* Number of bits of a color in the compressed stream */
27 unsigned int reservoir
;
28 unsigned int nbits_in_reservoir
;
30 const unsigned char *stream
;
33 unsigned char table_0004_pass1
[16][1024];
34 unsigned char table_0004_pass2
[16][1024];
35 unsigned char table_8004_pass1
[16][256];
36 unsigned char table_8004_pass2
[16][256];
37 unsigned int table_subblock
[256][12];
39 unsigned char table_bitpowermask
[8][256];
40 unsigned int table_d800
[256];
41 unsigned int table_dc00
[256];
45 void pwc_dec23_init(struct pwc_device
*pdev
, const unsigned char *cmd
);
46 void pwc_dec23_decompress(struct pwc_device
*pdev
,