diff options
author | scop <scop> | 2005-04-19 18:19:34 +0000 |
---|---|---|
committer | scop <scop> | 2005-04-19 18:19:34 +0000 |
commit | f9c59e544ada17055c3ed15b3d80f0d285c3928d (patch) | |
tree | cd7b038c17b040beb435e0a16aab02346854c9ad /dxr3spudecoder.h | |
parent | dea137eddfe1017e9ff85a8c221aee2bca4647ad (diff) | |
download | vdr-plugin-dxr3-f9c59e544ada17055c3ed15b3d80f0d285c3928d.tar.gz vdr-plugin-dxr3-f9c59e544ada17055c3ed15b3d80f0d285c3928d.tar.bz2 |
Mass indentation/whitespace cleanup.
Diffstat (limited to 'dxr3spudecoder.h')
-rw-r--r-- | dxr3spudecoder.h | 98 |
1 files changed, 59 insertions, 39 deletions
diff --git a/dxr3spudecoder.h b/dxr3spudecoder.h index 85eac98..d44040a 100644 --- a/dxr3spudecoder.h +++ b/dxr3spudecoder.h @@ -21,77 +21,81 @@ #ifndef _DXR3SPUDECODER_H_ #define _DXR3SPUDECODER_H_ - + #include "dxr3vdrincludes.h" #include <inttypes.h> // ================================== -typedef struct sDxr3SpuPalDescr +typedef struct sDxr3SpuPalDescr { 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 +struct sDxr3SpuRect { int x1, y1; int x2, y2; - int width() - { - return x2 - x1 + 1; + int width() + { + return x2 - x1 + 1; }; - int height() - { - return y2 - y1 + 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; + bool operator != (const sDxr3SpuRect r) const + { + return r.x1 != x1 || r.y1 != y1 || r.x2 != x2 || r.y2 != y2; }; }; // ================================== -class cDxr3SpuPalette +class cDxr3SpuPalette { private: uint32_t palette[16]; - + public: void setPalette(const uint32_t * pal); uint32_t getColor(uint8_t idx, uint8_t trans) const; }; // ================================== -class cDxr3SpuBitmap +class cDxr3SpuBitmap { 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); - + public: - cDxr3SpuBitmap(sDxr3SpuRect size, uint8_t * fodd, uint8_t * eodd, uint8_t * feven, uint8_t * eeven); + 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 +class cDxr3SpuDecoder : public cSpuDecoder { -public: +public: cDxr3SpuDecoder(); ~cDxr3SpuDecoder(); @@ -100,7 +104,8 @@ public: 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 setHighlight(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, + uint32_t palette); void clearHighlight(); void Empty(); #if VDRVERSNUM >= 10318 @@ -109,11 +114,14 @@ public: void processSPU(uint32_t pts, uint8_t * buf); #endif - #if VDRVERSNUM >= 10311 +#if VDRVERSNUM >= 10311 void Hide(); void Draw(); - bool IsVisible() { return osd != NULL; } - #endif + bool IsVisible() + { + return osd != NULL; + } +#endif private: cOsd * osd; @@ -123,31 +131,43 @@ private: uint32_t spupts; bool clean; bool ready; - - enum spFlag { spNONE, spHIDE, spSHOW, spMENU }; + + enum spFlag + { + spNONE, + spHIDE, + spSHOW, + spMENU + }; spFlag state; - + cSpuDecoder::eScaleMode scaleMode; - + // highligh area bool highlight; sDxr3SpuRect hlpsize; aDxr3SpuPalDescr hlpDescr; - + // palette cDxr3SpuPalette palette; - + // spu info's sDxr3SpuRect size; aDxr3SpuPalDescr palDescr; - + uint16_t DCSQ_offset; uint16_t prev_DCSQ_offset; - + 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); |