~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to mpeglib/lib/util/render/dither/colorTable8Bit.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  colorTables for 8 Bit depth
 
3
  Copyright (C) 2000  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Library General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
#ifndef __COLORTABLE8BIT_H
 
15
#define __COLORTABLE8BIT_H
 
16
 
 
17
#include "ditherDef.h"
 
18
 
 
19
 
 
20
class ColorTable8Bit {
 
21
  
 
22
  // Arrays holding quantized value ranged for lum, cr, and cb. 
 
23
  // (used for 8 Bit)
 
24
  
 
25
  int* lum_values;
 
26
  int* cr_values;
 
27
  int* cb_values;
 
28
  
 
29
 
 
30
 
 
31
 
 
32
  TABTYPE *L_tab;
 
33
  TABTYPE *Cr_r_tab;
 
34
  TABTYPE *Cr_g_tab;
 
35
  TABTYPE *Cb_g_tab;
 
36
  TABTYPE *Cb_b_tab;
 
37
  TABTYPE *colortab;
 
38
 
 
39
 
 
40
 public:
 
41
  ColorTable8Bit();
 
42
  ~ColorTable8Bit();
 
43
 
 
44
  inline int* getLumValues() { return lum_values; }
 
45
  inline int* getCrValues()  { return cr_values; }
 
46
  inline int* getCbValues() { return cb_values; }
 
47
  
 
48
  void ConvertColor(unsigned int l, unsigned int cr, unsigned int cb,
 
49
                    unsigned char* r, unsigned char* g, unsigned char* b);
 
50
 
 
51
 
 
52
 private:
 
53
  void init8BitColor();
 
54
 
 
55
 
 
56
};
 
57
#endif