diff options
Diffstat (limited to 'recordmydesktop')
-rw-r--r-- | recordmydesktop/src/bgr_to_yuv.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/recordmydesktop/src/bgr_to_yuv.c b/recordmydesktop/src/bgr_to_yuv.c index c3730ad..e1774f9 100644 --- a/recordmydesktop/src/bgr_to_yuv.c +++ b/recordmydesktop/src/bgr_to_yuv.c @@ -29,25 +29,26 @@ void MakeMatrices(){ int i; + for(i=0;i<256;i++) - Yr[i]=0.299*i; + Yr[i]=(2104.0*i)/8192.0+8.0; for(i=0;i<256;i++) - Yg[i]=0.587*i; + Yg[i]=(4130.0*i)/8192.0+8.0; for(i=0;i<256;i++) - Yb[i]=0.114*i; + Yb[i]=(802.0*i)/8192.0; for(i=0;i<256;i++) - Ur[i]=43.1-0.169*i; + Ur[i]=37.8-(1204.0*i)/8192.0+8.0; for(i=0;i<256;i++) - Ug[i]=84.41-0.331*i; + Ug[i]=74.2-(2384.0*i)/8192.0+8.0; for(i=0;i<256;i++) - Ub[i]=0.5*i; + Ub[i]=(3598.0*i)/8192.0 ; for(i=0;i<256;i++) - Vr[i]=0.5*i; + Vr[i]=(3598.0*i)/8192.0; for(i=0;i<256;i++) - Vg[i]=107-0.419*i; + Vg[i]=93.8-(3013.0*i)/8192.0+8.0; for(i=0;i<256;i++) - Vb[i]=21-0.081*i; + Vb[i]=18.2-(585.0*i)/8192.0+8.0; } |