diff options
Diffstat (limited to 'recordmydesktop/src')
-rw-r--r-- | recordmydesktop/src/bgr_to_yuv.c | 24 | ||||
-rw-r--r-- | recordmydesktop/src/recordmydesktop.c | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/recordmydesktop/src/bgr_to_yuv.c b/recordmydesktop/src/bgr_to_yuv.c index 9441e5d..413f1fa 100644 --- a/recordmydesktop/src/bgr_to_yuv.c +++ b/recordmydesktop/src/bgr_to_yuv.c @@ -72,3 +72,27 @@ void UpdateYUVBufferIm(yuv_buffer *yuv,unsigned char *data,int x,int y,int width } } +void MakeMatrices(){ + int i; + for(i=0;i<256;i++) + Yr[i]=0.299*i; + for(i=0;i<256;i++) + Yg[i]=0.587*i; + for(i=0;i<256;i++) + Yb[i]=0.114*i; + + for(i=0;i<256;i++) + Ur[i]=43.1-0.169*i; + for(i=0;i<256;i++) + Ug[i]=84.41-0.331*i; + for(i=0;i<256;i++) + Ub[i]=0.5*i; + + for(i=0;i<256;i++) + Vr[i]=0.5*i; + for(i=0;i<256;i++) + Vg[i]=107-0.419*i; + for(i=0;i<256;i++) + Vb[i]=21-0.081*i; +} + diff --git a/recordmydesktop/src/recordmydesktop.c b/recordmydesktop/src/recordmydesktop.c index 89f9892..7eb76df 100644 --- a/recordmydesktop/src/recordmydesktop.c +++ b/recordmydesktop/src/recordmydesktop.c @@ -69,7 +69,7 @@ int main(int argc,char **argv){ if(!pdata.args.scshot){ fprintf(stderr,"Initializing...\n"); - + MakeMatrices(); if(pdata.args.have_dummy_cursor){ pdata.dummy_pointer=MakeDummyPointer(&pdata.specs,16,pdata.args.cursor_color,0,&pdata.npxl); pdata.dummy_p_size=16; |