summaryrefslogtreecommitdiff
path: root/dxr3interface_spu_encoder.h
diff options
context:
space:
mode:
authorscop <scop>2005-04-19 18:19:34 +0000
committerscop <scop>2005-04-19 18:19:34 +0000
commitf9c59e544ada17055c3ed15b3d80f0d285c3928d (patch)
treecd7b038c17b040beb435e0a16aab02346854c9ad /dxr3interface_spu_encoder.h
parentdea137eddfe1017e9ff85a8c221aee2bca4647ad (diff)
downloadvdr-plugin-dxr3-f9c59e544ada17055c3ed15b3d80f0d285c3928d.tar.gz
vdr-plugin-dxr3-f9c59e544ada17055c3ed15b3d80f0d285c3928d.tar.bz2
Mass indentation/whitespace cleanup.
Diffstat (limited to 'dxr3interface_spu_encoder.h')
-rw-r--r--dxr3interface_spu_encoder.h100
1 files changed, 53 insertions, 47 deletions
diff --git a/dxr3interface_spu_encoder.h b/dxr3interface_spu_encoder.h
index 09fdc2a..2e7027e 100644
--- a/dxr3interface_spu_encoder.h
+++ b/dxr3interface_spu_encoder.h
@@ -48,12 +48,12 @@
// used to get active osd area
struct sRectal
{
- sRectal() : x0(0), x1(0), y0(0), y1(0) {}
+ sRectal() : x0(0), x1(0), y0(0), y1(0) {}
- size_t x0;
- size_t x1;
- size_t y0;
- size_t y1;
+ size_t x0;
+ size_t x1;
+ size_t y0;
+ size_t y1;
};
// ==================================
@@ -61,80 +61,86 @@ struct sRectal
class cSpuData
{
public:
- cSpuData(): count(0), malloc_size(0) {}
- ~cSpuData();
+ cSpuData(): count(0), malloc_size(0) {}
+ ~cSpuData();
- void Clear();
- u_char* GetData() const { return data; }
+ void Clear();
+ u_char* GetData() const
+ {
+ return data;
+ }
- // write operations
- void WriteByte(uint8_t byte);
- void WriteNibble(int *higher_nibble, uint8_t nibble);
- void WriteRle(int *higher_nibble, int length, int color);
+ // write operations
+ void WriteByte(uint8_t byte);
+ void WriteNibble(int *higher_nibble, uint8_t nibble);
+ void WriteRle(int *higher_nibble, int length, int color);
private:
- u_char *data;
- size_t count; // the count of bytes written
- size_t malloc_size; // size of data
+ u_char *data;
+ size_t count; // the count of bytes written
+ size_t malloc_size; // size of data
};
// ==================================
struct pixbuf
{
- int x, y;
- u_int rgb[4];
- u_char* pixels;
+ int x, y;
+ u_int rgb[4];
+ u_char* pixels;
};
// ==================================
struct encodedata
{
- u_char data[DATASIZE];
- int count; // the count of bytes written
- int oddstart;
- int nibblewaiting;
+ u_char data[DATASIZE];
+ int count; // the count of bytes written
+ int oddstart;
+ int nibblewaiting;
};
// ==================================
class cSPUEncoder : public Singleton<cSPUEncoder>
{
public:
- cSPUEncoder();
+ cSPUEncoder();
~cSPUEncoder() {}
- int Flush(cPalette *Palette);
- void CopyBlockIntoOSD(int numWindow, int linewidth, int x0,int y0, int x1, int y1, const tIndex *data);
- void StopSpu(void);
- void SetPalette(int numWindow, cPalette* commonPalette, cPalette* windowPalette);
- void Clear(void);
+ int Flush(cPalette *Palette);
+ void CopyBlockIntoOSD(int numWindow, int linewidth,
+ int x0,int y0, int x1, int y1, const tIndex *data);
+ void StopSpu(void);
+ void SetPalette(int numWindow, cPalette* commonPalette,
+ cPalette* windowPalette);
+ void Clear(void);
private:
cSPUEncoder(cSPUEncoder&); // no copy constructor
- // helper functions
- void EncodePixelbufRle(int x, int y, int w, int h, u_char *inbuf, int stride, encodedata *ed);
+ // helper functions
+ void EncodePixelbufRle(int x, int y, int w, int h,
+ u_char *inbuf, int stride, encodedata *ed);
#ifndef USE_XINE_SCALER
- void ScaleOSD(double fac, unsigned char* buf, unsigned char NumColors=4);
+ void ScaleOSD(double fac, unsigned char* buf, unsigned char NumColors=4);
#endif
- void encode_put_nibble(encodedata* ed, u_char nibble);
- void encode_pixels(encodedata* ed, int color, int number);
- void encode_eol(encodedata* ed);
- void encode_do_row(encodedata* ed, pixbuf* pb, int row);
- void encode_do_control(int x,int y, encodedata* ed, pixbuf* pb);
+ void encode_put_nibble(encodedata* ed, u_char nibble);
+ void encode_pixels(encodedata* ed, int color, int number);
+ void encode_eol(encodedata* ed);
+ void encode_do_row(encodedata* ed, pixbuf* pb, int row);
+ void encode_do_control(int x,int y, encodedata* ed, pixbuf* pb);
- void CalculateActiveOsdArea();
+ void CalculateActiveOsdArea();
- int bitmapcolor[8][16];
- cColorManager* m_ColorManager;
- encodedata m_encodeddata;
+ int bitmapcolor[8][16];
+ cColorManager* m_ColorManager;
+ encodedata m_encodeddata;
- // our osd :)
- u_char OSD_Screen[OSDWIDTH * OSDHEIGHT];
- u_char OSD_Screen2[OSDWIDTH * OSDHEIGHT];
- u_char OSD_Screen3[OSDWIDTH * OSDHEIGHT];
+ // our osd :)
+ u_char OSD_Screen[OSDWIDTH * OSDHEIGHT];
+ u_char OSD_Screen2[OSDWIDTH * OSDHEIGHT];
+ u_char OSD_Screen3[OSDWIDTH * OSDHEIGHT];
- // 'active' osd sizes
- sRectal m_active_osd;
+ // 'active' osd sizes
+ sRectal m_active_osd;
};
#endif /*_DXR3_INTERFACE_SPU_ENCODER_*/