diff options
author | scop <scop> | 2005-04-18 19:26:16 +0000 |
---|---|---|
committer | scop <scop> | 2005-04-18 19:26:16 +0000 |
commit | f8a3d81fc0b548a0f76e205fee433e4c94a4ee57 (patch) | |
tree | 2f69513d7d57e15b920c8eb4bb4b4a877d5b0881 /dxr3spudecoder.h | |
parent | 37c4c7b0a4a388d6c933e95756ddd30dd0cca6fd (diff) | |
download | vdr-plugin-dxr3-f8a3d81fc0b548a0f76e205fee433e4c94a4ee57.tar.gz vdr-plugin-dxr3-f8a3d81fc0b548a0f76e205fee433e4c94a4ee57.tar.bz2 |
Oops, wrong tree... revert.
Diffstat (limited to 'dxr3spudecoder.h')
-rw-r--r-- | dxr3spudecoder.h | 172 |
1 files changed, 86 insertions, 86 deletions
diff --git a/dxr3spudecoder.h b/dxr3spudecoder.h index e168629..f8b0ab7 100644 --- a/dxr3spudecoder.h +++ b/dxr3spudecoder.h @@ -28,137 +28,137 @@ // ================================== typedef struct sDxr3SpuPalDescr { - uint8_t index; - uint8_t trans; + uint8_t index; + uint8_t trans; - bool operator != (const sDxr3SpuPalDescr pd) const { - return index != pd.index && trans != pd.trans; - }; + bool operator != (const sDxr3SpuPalDescr pd) const { + return index != pd.index && trans != pd.trans; + }; } aDxr3SpuPalDescr[4]; // ================================== struct sDxr3SpuRect { - int x1, y1; - int x2, y2; - - int width() - { - return x2 - x1 + 1; - }; - - int height() - { - return y2 - y1 + 1; - }; - - bool operator != (const sDxr3SpuRect r) const - { - return r.x1 != x1 || r.y1 != y1 || r.x2 != x2 || r.y2 != y2; - }; + int x1, y1; + int x2, y2; + + int width() + { + return x2 - x1 + 1; + }; + + int height() + { + return y2 - y1 + 1; + }; + + bool operator != (const sDxr3SpuRect r) const + { + return r.x1 != x1 || r.y1 != y1 || r.x2 != x2 || r.y2 != y2; + }; }; // ================================== class cDxr3SpuPalette { - private: - uint32_t palette[16]; +private: + uint32_t palette[16]; - public: - void setPalette(const uint32_t * pal); - uint32_t getColor(uint8_t idx, uint8_t trans) const; +public: + void setPalette(const uint32_t * pal); + uint32_t getColor(uint8_t idx, uint8_t trans) const; }; // ================================== class cDxr3SpuBitmap { - private: - sDxr3SpuRect bmpsize; - sDxr3SpuRect minsize[4]; - uint8_t *bmp; +private: + sDxr3SpuRect bmpsize; + sDxr3SpuRect minsize[4]; + uint8_t *bmp; - void putPixel(int xp, int yp, int len, uint8_t colorid); - void putFieldData(int field, uint8_t * data, uint8_t * endp); + void putPixel(int xp, int yp, int len, uint8_t colorid); + void putFieldData(int field, uint8_t * data, uint8_t * endp); - public: - cDxr3SpuBitmap(sDxr3SpuRect size, uint8_t * fodd, uint8_t * eodd, uint8_t * feven, uint8_t * eeven); - ~cDxr3SpuBitmap(); +public: + cDxr3SpuBitmap(sDxr3SpuRect size, uint8_t * fodd, uint8_t * eodd, uint8_t * feven, uint8_t * eeven); + ~cDxr3SpuBitmap(); - bool getMinSize(const aDxr3SpuPalDescr paldescr, sDxr3SpuRect & size) const; - cBitmap *getBitmap(const aDxr3SpuPalDescr paldescr, const cDxr3SpuPalette & pal, sDxr3SpuRect & size) const; + bool getMinSize(const aDxr3SpuPalDescr paldescr, sDxr3SpuRect & size) const; + cBitmap *getBitmap(const aDxr3SpuPalDescr paldescr, const cDxr3SpuPalette & pal, sDxr3SpuRect & size) const; }; // ================================== class cDxr3SpuDecoder : public cSpuDecoder { - public: - cDxr3SpuDecoder(); - ~cDxr3SpuDecoder(); - - int setTime(uint32_t pts); - - cSpuDecoder::eScaleMode getScaleMode(void); - void setScaleMode(cSpuDecoder::eScaleMode ScaleMode); - void setPalette(uint32_t * pal); - void setHighlight(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint32_t palette); - void clearHighlight(); - void Empty(); +public: + cDxr3SpuDecoder(); + ~cDxr3SpuDecoder(); + + int setTime(uint32_t pts); + + cSpuDecoder::eScaleMode getScaleMode(void); + void setScaleMode(cSpuDecoder::eScaleMode ScaleMode); + void setPalette(uint32_t * pal); + void setHighlight(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint32_t palette); + void clearHighlight(); + void Empty(); #if VDRVERSNUM >= 10318 - void processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow); + void processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow); #else - void processSPU(uint32_t pts, uint8_t * buf); + void processSPU(uint32_t pts, uint8_t * buf); #endif -#if VDRVERSNUM >= 10311 - void Hide(); - void Draw(); - bool IsVisible() { return osd != NULL; } -#endif + #if VDRVERSNUM >= 10311 + void Hide(); + void Draw(); + bool IsVisible() { return osd != NULL; } + #endif - private: - cOsd * osd; +private: + cOsd * osd; - // processing state - uint8_t *spu; - uint32_t spupts; - bool clean; - bool ready; + // processing state + uint8_t *spu; + uint32_t spupts; + bool clean; + bool ready; - enum spFlag { spNONE, spHIDE, spSHOW, spMENU }; - spFlag state; + enum spFlag { spNONE, spHIDE, spSHOW, spMENU }; + spFlag state; - cSpuDecoder::eScaleMode scaleMode; + cSpuDecoder::eScaleMode scaleMode; - // highligh area - bool highlight; - sDxr3SpuRect hlpsize; - aDxr3SpuPalDescr hlpDescr; + // highligh area + bool highlight; + sDxr3SpuRect hlpsize; + aDxr3SpuPalDescr hlpDescr; - // palette - cDxr3SpuPalette palette; + // palette + cDxr3SpuPalette palette; - // spu info's - sDxr3SpuRect size; - aDxr3SpuPalDescr palDescr; + // spu info's + sDxr3SpuRect size; + aDxr3SpuPalDescr palDescr; - uint16_t DCSQ_offset; - uint16_t prev_DCSQ_offset; + uint16_t DCSQ_offset; + uint16_t prev_DCSQ_offset; - cDxr3SpuBitmap *spubmp; + cDxr3SpuBitmap *spubmp; - int cmdOffs() { return ((spu[2] << 8) | spu[3]); } - int spuSize() { return ((spu[0] << 8) | spu[1]); } + int cmdOffs() { return ((spu[2] << 8) | spu[3]); } + int spuSize() { return ((spu[0] << 8) | spu[1]); } - int ScaleYcoord(int value); - int ScaleYres(int value); - void DrawBmp(sDxr3SpuRect & size, cBitmap * bmp); + int ScaleYcoord(int value); + int ScaleYres(int value); + void DrawBmp(sDxr3SpuRect & size, cBitmap * bmp); }; // ================================== inline uint32_t cDxr3SpuPalette::getColor(uint8_t idx, uint8_t trans) const { - uint8_t t = trans == 0x0f ? 0xff : trans << 4; - return palette[idx] | (t << 24); + uint8_t t = trans == 0x0f ? 0xff : trans << 4; + return palette[idx] | (t << 24); } #endif /*_DXR3SPUDECODER_H_*/ |