diff options
author | Andreas Regel <andreas.regel@powarman.de> | 2008-04-27 18:44:00 +0200 |
---|---|---|
committer | Andreas Regel <andreas.regel@powarman.de> | 2008-04-27 18:44:00 +0200 |
commit | cac6362d2207752926f9339c1c547d60d5c2a6a0 (patch) | |
tree | c8c4ae6d3b5e0bca179b3b28468f6aca736d14c7 /quantize.h | |
parent | 4df61fcc16983f71ca5ab1d539840f7d04b9d48f (diff) | |
download | vdr-plugin-osdpip-0.0.9.tar.gz vdr-plugin-osdpip-0.0.9.tar.bz2 |
Release version 0.0.9v0.0.9
- dropped support for VDR version lower than 1.3.47.
- Now using palette replacemen introduced in VDR 1.4.27, so palette
setting workaround is not needed any longer. This simplifies code a
bit.
- added support for VDR 1.6. Now 1.4 and 1.6 are supported (tested with
1.4.7 and 1.6.0)
- added gettext localization support introduced with VDR 1.5.7.
- Do not decode B frames when dropping them.
- Use cCondWait::SleepMs instead of usleep.
- Fixed automatic closing of OSD after some minutes.
- Fixed showing wrong channel information.
- Added missing inclusion of <vdr/device.h>.
- Added new colour reduction mode using 256 dithered colours (thanks to
Martin Wache).
- Added french translations (thanks to micky979)
Diffstat (limited to 'quantize.h')
-rw-r--r-- | quantize.h | 94 |
1 files changed, 47 insertions, 47 deletions
@@ -12,49 +12,49 @@ class cQuantize { protected: - unsigned int paletteOutput[MAXCOLOR]; - unsigned char imageOutput[1024*1024]; + unsigned int paletteOutput[MAXCOLOR]; + unsigned char imageOutput[1024*1024]; public: - cQuantize(); - virtual ~cQuantize(); - virtual int Quantize(unsigned char * input, int size, int colors) = 0; - unsigned int * OutputPalette() { return paletteOutput; } - unsigned char * OutputImage() { return imageOutput; } + cQuantize(); + virtual ~cQuantize(); + virtual int Quantize(unsigned char * input, int size, int colors) = 0; + unsigned int * OutputPalette() { return paletteOutput; } + unsigned char * OutputImage() { return imageOutput; } }; class cQuantizeFixed : public cQuantize { private: - unsigned char * imageInput; - int imageSize; + unsigned char * imageInput; + int imageSize; - unsigned char redLevels[32]; - unsigned char greenLevels[32]; - unsigned char blueLevels[32]; - int redLevelCount; - int greenLevelCount; - int blueLevelCount; + unsigned char redLevels[32]; + unsigned char greenLevels[32]; + unsigned char blueLevels[32]; + int redLevelCount; + int greenLevelCount; + int blueLevelCount; public: - cQuantizeFixed(); - virtual ~cQuantizeFixed(); - virtual int Quantize(unsigned char * input, int size, int colors); + cQuantizeFixed(); + virtual ~cQuantizeFixed(); + virtual int Quantize(unsigned char * input, int size, int colors); }; #define RED 2 -#define GREEN 1 +#define GREEN 1 #define BLUE 0 //#define NOINVERT // RGB or BGR struct box { - int r0; - int r1; - int g0; - int g1; - int b0; - int b1; - int vol; + int r0; + int r1; + int g0; + int g1; + int b0; + int b1; + int vol; }; // Histogram is in elements 1..HISTSIZE along each axis, @@ -65,31 +65,31 @@ struct box class cQuantizeWu : public cQuantize { private: - long wt[BOX][BOX][BOX]; - long mr[BOX][BOX][BOX]; - long mg[BOX][BOX][BOX]; - long mb[BOX][BOX][BOX]; - float m2[BOX][BOX][BOX]; + long wt[BOX][BOX][BOX]; + long mr[BOX][BOX][BOX]; + long mg[BOX][BOX][BOX]; + long mb[BOX][BOX][BOX]; + float m2[BOX][BOX][BOX]; - unsigned short * Qadd; + unsigned short * Qadd; - unsigned char * imageInput; - int imageSize; - int palSize; + unsigned char * imageInput; + int imageSize; + int palSize; - void Hist3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2); - void Momt3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2); - int Cut(struct box * set1, struct box * set2); - long Vol(struct box * cube, long mmt[BOX][BOX][BOX]); - float Maximize(struct box * cube, unsigned char dir, int first, int last, int * cut, long whole_r, long whole_g, long whole_b, long whole_w); - float Var(struct box * cube); - long Top(struct box * cube, unsigned char dir, int pos, long mmt[BOX][BOX][BOX]); - long Bottom(struct box * cube, unsigned char dir, long mmt[BOX][BOX][BOX]); - void Mark(struct box * cube, int label, unsigned char * tag); + void Hist3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2); + void Momt3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2); + int Cut(struct box * set1, struct box * set2); + long Vol(struct box * cube, long mmt[BOX][BOX][BOX]); + float Maximize(struct box * cube, unsigned char dir, int first, int last, int * cut, long whole_r, long whole_g, long whole_b, long whole_w); + float Var(struct box * cube); + long Top(struct box * cube, unsigned char dir, int pos, long mmt[BOX][BOX][BOX]); + long Bottom(struct box * cube, unsigned char dir, long mmt[BOX][BOX][BOX]); + void Mark(struct box * cube, int label, unsigned char * tag); public: - cQuantizeWu(); - virtual ~cQuantizeWu(); - virtual int Quantize(unsigned char * input, int size, int colors); + cQuantizeWu(); + virtual ~cQuantizeWu(); + virtual int Quantize(unsigned char * input, int size, int colors); }; #endif // VDR_OSDPIP_QUANTIZE_H |