summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/util/render/dither/colorTableHighBit.h
blob: 9945414d86373f0578ff2945efb5d4cecdb42d4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
  colorTables for 16,32 Bit depth
  Copyright (C) 2000  Martin Vogt

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Library General Public License as published by
  the Free Software Foundation.

  For more information look at the file COPYRIGHT in this package

 */


#ifndef __COLORTABLEHIGHBIT_H
#define __COLORTABLEHIGHBIT_H

#include "ditherDef.h"




class ColorTableHighBit {

  TABTYPE *L_tab;
  TABTYPE *Cr_r_tab;
  TABTYPE *Cr_g_tab;
  TABTYPE *Cb_g_tab;
  TABTYPE *Cb_b_tab;
  TABTYPE *colortab;
  
  
  PIXVAL *r_2_pix;
  PIXVAL *g_2_pix;
  PIXVAL *b_2_pix;
  PIXVAL *rgb_2_pix;

  PIXVAL *r_2_pix_alloc;
  PIXVAL *g_2_pix_alloc;
  PIXVAL *b_2_pix_alloc;



  // init stuff
  int bpp;
  // colorMask
  unsigned int redMask;
  unsigned int greenMask;
  unsigned int blueMask;

 public:
  ColorTableHighBit(int bpp,unsigned int redMask,
		    unsigned int greenMask,unsigned int blueMask);
  ~ColorTableHighBit();

  inline TABTYPE* getL_tab()        { return L_tab     ; }
  inline TABTYPE* getCr_r_tab()     { return Cr_r_tab  ; }
  inline TABTYPE* getCr_g_tab()     { return Cr_g_tab  ; }
  inline TABTYPE* getCb_g_tab()     { return Cb_g_tab  ; }
  inline TABTYPE* getCb_b_tab()     { return Cb_b_tab  ; }

  
  inline PIXVAL* getr_2_pix()       { return r_2_pix   ; }
  inline PIXVAL* getg_2_pix()       { return g_2_pix   ; }
  inline PIXVAL* getb_2_pix()       { return b_2_pix   ; }



 private:
  void initHighColor(int thirty2,unsigned int redMask,
		     unsigned int greenMask,unsigned int blueMask);

};
#endif