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

« back to all changes in this revision

Viewing changes to mpeglib/lib/util/render/dither/ditherWrapper.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
  wrapper for X11 Window
 
3
  Copyright (C) 1999  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 __DITHERWRAPPER_H
 
15
#define __DITHERWRAPPER_H
 
16
 
 
17
 
 
18
#include "../../mmx.h"
 
19
 
 
20
#include "../yuvPicture.h"
 
21
#include "../imageBase.h"
 
22
#include <stdlib.h>
 
23
#include "ditherMMX.h"
 
24
#include "dither8Bit.h"
 
25
#include "dither16Bit.h"
 
26
#include "dither32Bit.h"
 
27
#include "ditherRGB_flipped.h"
 
28
#include "ditherRGB.h"
 
29
 
 
30
 
 
31
/**
 
32
   Wraps all calls to software ditherer and the different 
 
33
   resolutions,mmx enhancements, and doublesize ditherers.
 
34
*/
 
35
 
 
36
 
 
37
class DitherWrapper {
 
38
 
 
39
  int lmmx;
 
40
 
 
41
  int bpp;
 
42
  // colorMask
 
43
  unsigned int redMask;
 
44
  unsigned int greenMask;
 
45
  unsigned int blueMask;
 
46
 
 
47
  Dither8Bit* dither8Bit;
 
48
  Dither16Bit* dither16Bit;
 
49
  Dither32Bit* dither32Bit;
 
50
  DitherRGB_flipped* ditherRGB_flipped;
 
51
  DitherRGB* ditherRGB;
 
52
  
 
53
 public:
 
54
  DitherWrapper(int bpp,unsigned int redMask,
 
55
                unsigned int greenMask,unsigned int blueMask,
 
56
                unsigned char pixel[256]);
 
57
  ~DitherWrapper();
 
58
  
 
59
/*    int getDitherSize(); */
 
60
/*    void setDitherSize(int ditherMode); */
 
61
 
 
62
  void doDither(YUVPicture* pic,int depth,int imageMode,
 
63
                unsigned char* dest,int offset);
 
64
  
 
65
 
 
66
 private:
 
67
  void doDitherYUV(YUVPicture* pic,int depth,int imageMode,
 
68
                   unsigned char* dest,int offset);
 
69
  void doDitherRGB(YUVPicture* pic,int depth,int imageMode,
 
70
                   unsigned char* dest,int offset);
 
71
  void doDitherRGB_NORMAL(YUVPicture* pic,int depth,int imageMode,
 
72
                          unsigned char* dest,int offset);
 
73
  void doDitherRGB_FLIPPED(YUVPicture* pic,int depth,int imageMode,
 
74
                           unsigned char* dest,int offset);
 
75
     
 
76
  void doDither_std(YUVPicture* pic,int depth,unsigned char* dest,int offset);
 
77
  void doDither_x2(YUVPicture* pic,int depth,unsigned char* dest,int offset);
 
78
};
 
79
 
 
80
#endif