1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* Linux driver for Philips webcam 3 (C) 2004-2006 Luc Saillard (luc@saillard.org) 4 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. 10 11 */ 12 13 #ifndef PWC_DEC23_H 14 #define PWC_DEC23_H 15 16 struct pwc_device; 17 18 struct pwc_dec23_private 19 { 20 struct mutex lock; 21 22 unsigned char last_cmd, last_cmd_valid; 23 24 unsigned int scalebits; 25 unsigned int nbitsmask, nbits; /* Number of bits of a color in the compressed stream */ 26 27 unsigned int reservoir; 28 unsigned int nbits_in_reservoir; 29 30 const unsigned char *stream; 31 int temp_colors[16]; 32 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]; 38 39 unsigned char table_bitpowermask[8][256]; 40 unsigned int table_d800[256]; 41 unsigned int table_dc00[256]; 42 43 }; 44 45 void pwc_dec23_init(struct pwc_device *pdev, const unsigned char *cmd); 46 void pwc_dec23_decompress(struct pwc_device *pdev, 47 const void *src, 48 void *dst); 49 #endif 50