summaryrefslogtreecommitdiff
path: root/plugins/dfxvideo/draw.c
diff options
context:
space:
mode:
authorSND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-03-12 18:54:28 +0000
committerSND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-03-12 18:54:28 +0000
commita58cfdac407bc1d8fedc11acd924b275ba28cc51 (patch)
treeb4c2e08c34ef1bfe0ba947ef8eed931c9a43fc0e /plugins/dfxvideo/draw.c
parent9bdd06684bcc627c06ddcf4c406f6b48f0dfe389 (diff)
downloadpcsxr-a58cfdac407bc1d8fedc11acd924b275ba28cc51.tar.gz
Commited patch in issue #8171 (by darktjm).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64524 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfxvideo/draw.c')
-rw-r--r--plugins/dfxvideo/draw.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c
index 53451ad7..52d665a9 100644
--- a/plugins/dfxvideo/draw.c
+++ b/plugins/dfxvideo/draw.c
@@ -63,8 +63,6 @@ int xv_vsync = 0;
XShmSegmentInfo shminfo;
int finalw,finalh;
-extern XvImage *XvShmCreateImage(Display*, XvPortID, int, char*, int, int, XShmSegmentInfo*);
-
#include <time.h>
// prototypes
@@ -105,7 +103,7 @@ static __inline int GetResult2(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E)
}
/* Convert RGB to YUV */
-__inline uint32_t rgb_to_yuv(uint8_t R, uint8_t G, uint8_t B) {
+static __inline uint32_t rgb_to_yuv(uint8_t R, uint8_t G, uint8_t B) {
uint8_t Y = min(abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13, 235);
uint8_t U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240);
uint8_t V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240);
@@ -127,7 +125,7 @@ __inline uint32_t rgb_to_yuv(uint8_t R, uint8_t G, uint8_t B) {
+ ((((A & qlowpixelMask8) + (B & qlowpixelMask8) + (C & qlowpixelMask8) + (D & qlowpixelMask8)) >> 2) & qlowpixelMask8))))
-void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch,
+static void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch,
unsigned char *dstBitmap, int width, int height)
{
DWORD dstPitch = srcPitch<<1;
@@ -275,7 +273,7 @@ void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch,
////////////////////////////////////////////////////////////////////////
-void Std2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch,
+static void Std2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch,
unsigned char *dstBitmap, int width, int height)
{
DWORD dstPitch = srcPitch<<1;
@@ -481,7 +479,7 @@ void Std2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch,
////////////////////////////////////////////////////////////////////////
-void SuperEagle_ex8(unsigned char *srcPtr, DWORD srcPitch,
+static void SuperEagle_ex8(unsigned char *srcPtr, DWORD srcPitch,
unsigned char *dstBitmap, int width, int height)
{
DWORD dstPitch = srcPitch<<1;
@@ -711,7 +709,7 @@ static __inline void scale2x_32_def_whole(uint32_t* dst0, uint32_t* dst1, const
}
}
-void Scale2x_ex8(unsigned char *srcPtr, DWORD srcPitch,
+static void Scale2x_ex8(unsigned char *srcPtr, DWORD srcPitch,
unsigned char *dstPtr, int width, int height)
{
//const int srcpitch = srcPitch;
@@ -840,7 +838,7 @@ static __inline void scale3x_32_def_whole(uint32_t* dst0, uint32_t* dst1, uint32
}
-void Scale3x_ex8(unsigned char *srcPtr, DWORD srcPitch,
+static void Scale3x_ex8(unsigned char *srcPtr, DWORD srcPitch,
unsigned char *dstPtr, int width, int height)
{
int count = height;
@@ -937,7 +935,7 @@ static Atom xv_intern_atom_if_exists( Display *display, char const * atom_name )
// close display
-void DestroyDisplay(void)
+static void DestroyDisplay(void)
{
if(display)
{
@@ -979,7 +977,7 @@ int root_window_id=0;
// Create display
-void CreateDisplay(void)
+static void CreateDisplay(void)
{
XSetWindowAttributes winattr;
int myscreen;
@@ -1336,7 +1334,7 @@ shminfo.readOnly = 0;
void (*p2XSaIFunc) (unsigned char *, DWORD, unsigned char *, int, int);
unsigned char *pBackBuffer = 0;
-void BlitScreen32(unsigned char *surf, int32_t x, int32_t y)
+static void BlitScreen32(unsigned char *surf, int32_t x, int32_t y)
{
unsigned char *pD;
unsigned int startxy;
@@ -1405,7 +1403,7 @@ void BlitScreen32(unsigned char *surf, int32_t x, int32_t y)
-void BlitToYUV(unsigned char * surf,int32_t x,int32_t y)
+static void BlitToYUV(unsigned char * surf,int32_t x,int32_t y)
{
unsigned char * pD;
unsigned int startxy;
@@ -1498,7 +1496,7 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y)
}
//dst will have half the pitch (32bit to 16bit)
-void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d)
+static void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d)
{
int x,y;
int R,G,B, Y1,Y2,U,V;
@@ -1531,13 +1529,11 @@ void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d)
}
}
-extern time_t tStart;
-
/* compute the position and the size of output screen
* The aspect of the psx output mode is preserved.
* Note: dest dx,dy,dw,dh are both input and output variables
*/
-__inline void MaintainAspect(uint32_t * dx, uint32_t * dy, uint32_t * dw, uint32_t * dh)
+static __inline void MaintainAspect(uint32_t * dx, uint32_t * dy, uint32_t * dw, uint32_t * dh)
{
double ratio_x = ((double)*dw) / ((double)PSXDisplay.DisplayMode.x) ;
@@ -1673,7 +1669,7 @@ void DoClearFrontBuffer(void) // CLEAR DX BUFFER
XSync(display,False);*/
}
-int Xinitialize()
+static int Xinitialize()
{
iDesktopCol=32;
@@ -1739,7 +1735,7 @@ int Xinitialize()
return 0;
}
-void Xcleanup() // X CLEANUP
+static void Xcleanup() // X CLEANUP
{
CloseMenu();