summaryrefslogtreecommitdiff
path: root/dxr3interface_spu_encoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'dxr3interface_spu_encoder.h')
-rw-r--r--dxr3interface_spu_encoder.h112
1 files changed, 56 insertions, 56 deletions
diff --git a/dxr3interface_spu_encoder.h b/dxr3interface_spu_encoder.h
index f92067b..d7161c1 100644
--- a/dxr3interface_spu_encoder.h
+++ b/dxr3interface_spu_encoder.h
@@ -48,93 +48,93 @@
// 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;
};
// ==================================
// our spu(data) with all needed routines
class cSpuData
{
- public:
- cSpuData(): count(0), malloc_size(0) {}
- ~cSpuData();
-
- 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);
-
- private:
- u_char *data;
- size_t count; // the count of bytes written
- size_t malloc_size; // size of data
+public:
+ cSpuData(): count(0), malloc_size(0) {}
+ ~cSpuData();
+
+ 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);
+
+private:
+ 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() {}
+public:
+ 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
+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_*/