summaryrefslogtreecommitdiff
path: root/recordmydesktop/include
diff options
context:
space:
mode:
authorbiocrasher <biocrasher@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-07-16 07:24:50 +0000
committerbiocrasher <biocrasher@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-07-16 07:24:50 +0000
commit47efafb324bb3c7cff0f658c25792773ac82b4f5 (patch)
tree56472ef01b5faeb663d3269a93b7af9f111a6af5 /recordmydesktop/include
parent7f8f2bccb8d258ba6095d576f89fde0d3968d09c (diff)
*** empty log message ***
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@17 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/include')
-rw-r--r--recordmydesktop/include/recordmydesktop.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/recordmydesktop/include/recordmydesktop.h b/recordmydesktop/include/recordmydesktop.h
index 9f1be8d..6430024 100644
--- a/recordmydesktop/include/recordmydesktop.h
+++ b/recordmydesktop/include/recordmydesktop.h
@@ -196,7 +196,9 @@ typedef struct _ProgData{
int Paused,*Running,Aborted;
pthread_cond_t *time_cond,*pause_cond;
-
+unsigned char Yr[256],Yg[256],Yb[256],
+ Ur[256],Ug[256],Ub[256],
+ Vr[256],Vg[256],Vb[256];
/**Macros*/
@@ -306,7 +308,7 @@ pthread_cond_t *time_cond,*pause_cond;
}\
}
-#define UPDATE_YUV_BUFFER_IM(yuv,data,x_tm,y_tm,width_tm,height_tm){\
+#define UPDATE_YUV_BUFFER_IMO(yuv,data,x_tm,y_tm,width_tm,height_tm){\
int i,k,j=0;\
int x_2=x_tm/2,y_2=y_tm/2,y_width_2=yuv->y_width/2;\
for(k=0;k<height_tm;k++){\
@@ -322,6 +324,24 @@ pthread_cond_t *time_cond,*pause_cond;
}\
}
+#define UPDATE_YUV_BUFFER_IM(yuv,data,x_tm,y_tm,width_tm,height_tm){\
+ int i,k,j=0;\
+ int x_2=x_tm/2,y_2=y_tm/2;\
+ for(k=0;k<height_tm;k++){\
+ for(i=0;i<width_tm;i++){\
+ yuv->y[x_tm+i+(k+y_tm)*yuv->y_width]=Yr[data[(j*4)+2]] + Yg[data[(j*4)+1]] + Yb[data[(j*4)]] ;\
+ if((k%2)&&(i%2)){\
+ yuv->u[x_2+i/2+(k/2+y_2)*yuv->uv_width]=\
+ Ur[data[(k*width_tm+i)*4+2]] + Ug[data[(k*width_tm+i)*4+1]] + Ub[data[(k*width_tm+i)*4]];\
+ yuv->v[x_2+i/2+(k/2+y_2)*yuv->uv_width]=\
+ Vr[data[(k*width_tm+i)*4+2]] + Vg[data[(k*width_tm+i)*4+1]] + Vb[data[(k*width_tm+i)*4]];\
+ }\
+ \
+ j++;\
+ }\
+ }\
+}
+
#define DUMMY_POINTER_TO_YUV(yuv,data_tm,x_tm,y_tm,width_tm,height_tm,no_pixel){\
int i,k,j=0;\
int x_2=x_tm/2,y_2=y_tm/2,y_width_2=(yuv)->y_width/2;\
@@ -367,6 +387,6 @@ void *CaptureSound(void *pdata);
void *EncodeSoundBuffer(void *pdata);
snd_pcm_t *OpenDev(const char *pcm_dev,unsigned int channels,unsigned int *frequency,snd_pcm_uframes_t *periodsize,unsigned int *periodtime,int *hardpause);
void InitEncoder(ProgData *pdata,EncData *enc_data_t);
-
+void MakeMatrices();
#endif
© All Rights Reserved