Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
pwc-dec23.c File Reference
#include "pwc-timon.h"
#include "pwc-kiara.h"
#include "pwc-dec23.h"
#include <linux/string.h>
#include <linux/slab.h>

Go to the source code of this file.

Macros

#define USE_LOOKUP_TABLE_TO_CLAMP   1
 
#define UNROLL_LOOP_FOR_COPY   1
 
#define USE_LOOKUP_TABLE_TO_CLAMP   1
 
#define SCALEBITS   15
 
#define ONE_HALF   (1UL << (SCALEBITS - 1))
 
#define MAX_OUTER_CROP_VALUE   (512)
 
#define CLAMP(x)   (pwc_crop_table[MAX_OUTER_CROP_VALUE+(x)])
 
#define fill_nbits(pdec, nbits_wanted)
 
#define skip_nbits(pdec, nbits_to_skip)
 
#define get_nbits(pdec, nbits_wanted, result)
 
#define __get_nbits(pdec, nbits_wanted, result)
 
#define look_nbits(pdec, nbits_wanted)   ((pdec->reservoir) & ((1U<<(nbits_wanted))-1))
 

Functions

void pwc_dec23_init (struct pwc_device *pdev, const unsigned char *cmd)
 
void pwc_dec23_decompress (struct pwc_device *pdev, const void *src, void *dst)
 

Macro Definition Documentation

#define __get_nbits (   pdec,
  nbits_wanted,
  result 
)
Value:
do { \
result = (pdec->reservoir) & ((1U<<(nbits_wanted))-1); \
skip_nbits(pdec, nbits_wanted); \
} while(0);

Definition at line 488 of file pwc-dec23.c.

#define CLAMP (   x)    (pwc_crop_table[MAX_OUTER_CROP_VALUE+(x)])

Definition at line 290 of file pwc-dec23.c.

#define fill_nbits (   pdec,
  nbits_wanted 
)
Value:
do { \
while (pdec->nbits_in_reservoir<(nbits_wanted)) \
{ \
pdec->reservoir |= (*(pdec->stream)++) << (pdec->nbits_in_reservoir); \
pdec->nbits_in_reservoir += 8; \
} \
} while(0);

Definition at line 469 of file pwc-dec23.c.

#define get_nbits (   pdec,
  nbits_wanted,
  result 
)
Value:
do { \
fill_nbits(pdec, nbits_wanted); \
result = (pdec->reservoir) & ((1U<<(nbits_wanted))-1); \
skip_nbits(pdec, nbits_wanted); \
} while(0);

Definition at line 482 of file pwc-dec23.c.

#define look_nbits (   pdec,
  nbits_wanted 
)    ((pdec->reservoir) & ((1U<<(nbits_wanted))-1))

Definition at line 493 of file pwc-dec23.c.

#define MAX_OUTER_CROP_VALUE   (512)

Definition at line 288 of file pwc-dec23.c.

#define ONE_HALF   (1UL << (SCALEBITS - 1))
#define SCALEBITS   15
#define skip_nbits (   pdec,
  nbits_to_skip 
)
Value:
do { \
pdec->reservoir >>= (nbits_to_skip); \
pdec->nbits_in_reservoir -= (nbits_to_skip); \
} while(0);

Definition at line 477 of file pwc-dec23.c.

#define UNROLL_LOOP_FOR_COPY   1

Definition at line 47 of file pwc-dec23.c.

#define USE_LOOKUP_TABLE_TO_CLAMP   1

Definition at line 50 of file pwc-dec23.c.

#define USE_LOOKUP_TABLE_TO_CLAMP   1

Definition at line 50 of file pwc-dec23.c.

Function Documentation

void pwc_dec23_decompress ( struct pwc_device pdev,
const void src,
void dst 
)

Uncompress a pwc23 buffer.

src: raw data dst: image output

Definition at line 658 of file pwc-dec23.c.

void pwc_dec23_init ( struct pwc_device pdev,
const unsigned char cmd 
)

Definition at line 297 of file pwc-dec23.c.