From 47efafb324bb3c7cff0f658c25792773ac82b4f5 Mon Sep 17 00:00:00 2001 From: biocrasher Date: Sun, 16 Jul 2006 07:24:50 +0000 Subject: *** empty log message *** git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@17 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/include/recordmydesktop.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'recordmydesktop/include') 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;ky[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 -- cgit v1.2.1