OSDSurface Class Reference

#include <osdsurface.h>

List of all members.


Detailed Description

Definition at line 19 of file osdsurface.h.


Public Member Functions

 OSDSurface (int w, int h)
 ~OSDSurface ()
void Clear (void)
void ClearUsed (void)
bool IsClear ()
bool IntersectsDrawn (QRect &newrect)
void AddRect (QRect &newrect)
bool Changed (void)
void SetChanged (bool change)
int GetRevision ()
void BlendToYV12 (unsigned char *yptr, unsigned char *uptr, unsigned char *vptr, int ystride, int ustride, int vstride) const
 Alpha blends OSDSurface to yuv buffer of the same size.
void BlendToARGB (unsigned char *argbptr, uint stride, uint height, bool blendtoblack=false, uint threshold=0) const
 Alpha blends OSDSurface to ARGB buffer.
void DitherToI44 (unsigned char *outbuf, bool ifirst, uint stride, uint height) const
 Copies and converts OSDSurface to either a greyscale IA44 or AI44 buffer.
void DitherToIA44 (unsigned char *outbuf, uint stride, uint height) const
 Copies and converts OSDSurface to a greyscale IA44 buffer.
void DitherToAI44 (unsigned char *outbuf, uint stride, uint height) const
 Copies and converts OSDSurface to a greyscale AI44 buffer.

Public Attributes

int revision
unsigned char * yuvbuffer
unsigned char * y
unsigned char * u
unsigned char * v
unsigned char * alpha
int width
int height
int size
QRegion usedRegions
QMutex usedRegionsLock
short int rec_lut [256]
short int * rec_lut
unsigned char pow_lut [256][256]
blendregion_ptr blendregionfunc
blendcolumn2_ptr blendcolumn2func
blendcolumn_ptr blendcolumnfunc
blendcolor_ptr blendcolorfunc
blendconst_ptr blendconstfunc
bool changed
bool usemmx
unsigned char cropTbl [256+2 *MAX_NEG_CROP]
unsigned char * cm

Constructor & Destructor Documentation

OSDSurface::OSDSurface ( int  w,
int  h 
)

Definition at line 19 of file osdsurface.cpp.

OSDSurface::~OSDSurface (  ) 

Definition at line 80 of file osdsurface.cpp.


Member Function Documentation

void OSDSurface::Clear ( void   ) 

Definition at line 86 of file osdsurface.cpp.

Referenced by OSDSurface().

void OSDSurface::ClearUsed ( void   ) 

Definition at line 96 of file osdsurface.cpp.

Referenced by OSD::Display(), and OSD::Reinit().

bool OSDSurface::IsClear ( void   ) 

Definition at line 139 of file osdsurface.cpp.

Referenced by OSD::Display().

bool OSDSurface::IntersectsDrawn ( QRect &  newrect  ) 

Definition at line 144 of file osdsurface.cpp.

Referenced by OSDTypeBox::Draw(), and OSDTypeImage::Draw().

void OSDSurface::AddRect ( QRect &  newrect  ) 

bool OSDSurface::Changed ( void   )  [inline]

void OSDSurface::SetChanged ( bool  change  )  [inline]

Definition at line 33 of file osdsurface.h.

Referenced by OSD::Display().

int OSDSurface::GetRevision (  )  [inline]

void OSDSurface::BlendToYV12 ( unsigned char *  yptr,
unsigned char *  uptr,
unsigned char *  vptr,
int  ystride,
int  ustride,
int  vstride 
) const

Alpha blends OSDSurface to yuv buffer of the same size.

Parameters:
yptrdest Pointer to Y buffer to blend OSD to.
uptrdest Pointer to U buffer to blend OSD to.
vptrdest Pointer to V buffer to blend OSD to.

Definition at line 566 of file osdsurface.cpp.

Referenced by VideoOutput::DisplayOSD().

void OSDSurface::BlendToARGB ( unsigned char *  argbptr,
uint  stride,
uint  height,
bool  blendtoblack = false,
uint  threshold = 0 
) const

Alpha blends OSDSurface to ARGB buffer.

Todo:
Currently blend_to_black is implemented as a post process on the whole frame, it would make sense to make this more efficient by integrating it into the process.
Parameters:
stride Length of each line in output buffer in bytes
outheight Number of lines in output buffer
blend_to_black Uses Alpha to blend buffer to black
threshold Alpha threshold above which to perform blending

Definition at line 690 of file osdsurface.cpp.

Referenced by VideoOutput::DisplayOSD(), and ChromaKeyOSD::ProcessOSD().

void OSDSurface::DitherToI44 ( unsigned char *  outbuf,
bool  ifirst,
uint  stride,
uint  height 
) const

Copies and converts OSDSurface to either a greyscale IA44 or AI44 buffer.

See also:
DitherToIA44(unsigned char*,uint,uint) const, DitherToAI44(unsigned char*,uint,uint) const.
Parameters:
outbuf Output buffer
ifirst If true output buffer is AI44, otherwise it is IA44
stride Length of each line in output buffer in bytes
outheight Number of lines in output buffer

Definition at line 778 of file osdsurface.cpp.

Referenced by DitherToAI44(), and DitherToIA44().

void OSDSurface::DitherToIA44 ( unsigned char *  outbuf,
uint  stride,
uint  height 
) const

Copies and converts OSDSurface to a greyscale IA44 buffer.

Parameters:
outbuf Output buffer
stride Length of each line in output buffer in bytes
outheight Number of lines in output buffer
See also:
DitherToI44(unsigned char*,bool,uint,uint) const, DitherToAI44(unsigned char*,uint,uint) const.

Definition at line 876 of file osdsurface.cpp.

Referenced by VideoOutput::DisplayOSD().

void OSDSurface::DitherToAI44 ( unsigned char *  outbuf,
uint  stride,
uint  height 
) const

Copies and converts OSDSurface to a greyscale AI44 buffer.

Parameters:
outbuf Output buffer
stride Length of each line in output buffer in bytes
outheight Number of lines in output buffer
See also:
DitherToI44(unsigned char*,bool,uint,uint) const, DitherToIA44(unsigned char*,uint,uint) const.

Definition at line 891 of file osdsurface.cpp.

Referenced by VideoOutput::DisplayOSD().


Member Data Documentation

Definition at line 53 of file osdsurface.h.

Referenced by GetRevision(), OSDSurface(), and SetChanged().

unsigned char* OSDSurface::yuvbuffer

Definition at line 55 of file osdsurface.h.

Referenced by VideoOutputXv::DisplayOSD(), OSDSurface(), and ~OSDSurface().

unsigned char* OSDSurface::y

unsigned char* OSDSurface::u

unsigned char* OSDSurface::v

unsigned char* OSDSurface::alpha

Definition at line 66 of file osdsurface.h.

Referenced by Clear(), and OSDSurface().

QMutex OSDSurface::usedRegionsLock [mutable]

short int OSDSurface::rec_lut[256]

short int* OSDSurface::rec_lut

Definition at line 74 of file osdsurface.h.

unsigned char OSDSurface::pow_lut[256][256]

Definition at line 78 of file osdsurface.h.

Referenced by OSDTypeImage::Draw(), and OSDSurface().

Definition at line 79 of file osdsurface.h.

Referenced by OSDTypeEditSlider::Draw(), and OSDSurface().

Definition at line 80 of file osdsurface.h.

Referenced by OSDTypeImage::Draw(), and OSDSurface().

Definition at line 81 of file osdsurface.h.

Referenced by TTFFont::merge_text(), and OSDSurface().

Definition at line 82 of file osdsurface.h.

Referenced by OSDTypeBox::Draw(), and OSDSurface().

Definition at line 84 of file osdsurface.h.

Referenced by Changed(), and SetChanged().

Definition at line 86 of file osdsurface.h.

Referenced by blendtoargb_8_init(), blendtoyv12_8_init(), and OSDSurface().

unsigned char OSDSurface::cropTbl[256+2 *MAX_NEG_CROP]

Definition at line 88 of file osdsurface.h.

Referenced by OSDSurface().

unsigned char* OSDSurface::cm

Definition at line 89 of file osdsurface.h.

Referenced by BlendToARGB(), blendtoargb_8_c(), and OSDSurface().


The documentation for this class was generated from the following files:

Generated on Sat Dec 18 05:16:09 2010 for MythTV by  doxygen 1.5.5