Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /* Linux driver for Philips webcam
0003    (C) 2004-2006 Luc Saillard (luc@saillard.org)
0004 
0005    NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
0006    driver and thus may have bugs that are not present in the original version.
0007    Please send bug reports and support requests to <luc@saillard.org>.
0008    The decompression routines have been implemented by reverse-engineering the
0009    Nemosoft binary pwcx module. Caveat emptor.
0010 
0011 */
0012 
0013 #ifndef PWC_DEC23_H
0014 #define PWC_DEC23_H
0015 
0016 struct pwc_device;
0017 
0018 struct pwc_dec23_private
0019 {
0020     struct mutex lock;
0021 
0022     unsigned char last_cmd, last_cmd_valid;
0023 
0024   unsigned int scalebits;
0025   unsigned int nbitsmask, nbits; /* Number of bits of a color in the compressed stream */
0026 
0027   unsigned int reservoir;
0028   unsigned int nbits_in_reservoir;
0029 
0030   const unsigned char *stream;
0031   int temp_colors[16];
0032 
0033   unsigned char table_0004_pass1[16][1024];
0034   unsigned char table_0004_pass2[16][1024];
0035   unsigned char table_8004_pass1[16][256];
0036   unsigned char table_8004_pass2[16][256];
0037   unsigned int  table_subblock[256][12];
0038 
0039   unsigned char table_bitpowermask[8][256];
0040   unsigned int  table_d800[256];
0041   unsigned int  table_dc00[256];
0042 
0043 };
0044 
0045 void pwc_dec23_init(struct pwc_device *pdev, const unsigned char *cmd);
0046 void pwc_dec23_decompress(struct pwc_device *pdev,
0047               const void *src,
0048               void *dst);
0049 #endif