summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/update_image.c
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-01-20 22:21:28 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-01-20 22:21:28 +0000
commitfa96f09ceadcad5247a84245ad933782b4b71ee6 (patch)
treee4e4b1d3d5d6f95b7122c4c01141fea60b72ce1f /recordmydesktop/src/update_image.c
parent27ef1920cf848e9add94c4106f8a76230efe787a (diff)
Concatated all UPDATE_YUV_BUFFER_* macros into one, UPDATE_YUV_BUFFER.
This one is further broken into UPDATE_(X)_PLANE(S)_(Y) macros, where X is Y or UV and Y is 32 or 16(color depth). This will allow easier incorporation of 16bpp support, without code duplication(where it can be avoided) and without bloating the toplevel calls of these macros with multiple similar blocks of code. Also changed toplevel check of depth, to allow running on 16 bpp git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@259 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/update_image.c')
-rw-r--r--recordmydesktop/src/update_image.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/recordmydesktop/src/update_image.c b/recordmydesktop/src/update_image.c
index 2725011..1bf0cd5 100644
--- a/recordmydesktop/src/update_image.c
+++ b/recordmydesktop/src/update_image.c
@@ -40,7 +40,7 @@ void UpdateImage(Display * dpy,
RectArea *temp;
unsigned char *dtap=(unsigned char*)datatemp;
temp=*root;
-
+
if(temp!=NULL){
do{
if(noshmem){
@@ -51,34 +51,14 @@ void UpdateImage(Display * dpy,
temp->geom.y,
temp->geom.width,
temp->geom.height);
-
- pthread_mutex_lock(yuv_mutex);
- if(no_quick_subsample){
- UPDATE_YUV_BUFFER_IM_AVG(yuv,dtap,
- (temp->geom.x-brwin->rgeom.x+enc->x_offset),(temp->geom.y-brwin->rgeom.y+enc->y_offset),
- (temp->geom.width),(temp->geom.height));
- }
- else{
- UPDATE_YUV_BUFFER_IM(yuv,dtap,
- (temp->geom.x-brwin->rgeom.x+enc->x_offset),(temp->geom.y-brwin->rgeom.y+enc->y_offset),
- (temp->geom.width),(temp->geom.height));
- }
-
- pthread_mutex_unlock(yuv_mutex);
- }
- else{
- if(no_quick_subsample){
- UPDATE_YUV_BUFFER_SH_AVG(yuv,dtap,
- (temp->geom.x-brwin->rgeom.x+enc->x_offset),(temp->geom.y-brwin->rgeom.y+enc->y_offset),
- (temp->geom.width),(temp->geom.height));
- }
- else{
- UPDATE_YUV_BUFFER_SH(yuv,dtap,
- (temp->geom.x-brwin->rgeom.x+enc->x_offset),(temp->geom.y-brwin->rgeom.y+enc->y_offset),
- (temp->geom.width),(temp->geom.height));
- }
-
}
+ pthread_mutex_lock(yuv_mutex);
+ UPDATE_YUV_BUFFER(yuv,dtap,
+ (temp->geom.x-brwin->rgeom.x+enc->x_offset),
+ (temp->geom.y-brwin->rgeom.y+enc->y_offset),
+ (temp->geom.width),(temp->geom.height),
+ noshmem,no_quick_subsample);
+ pthread_mutex_unlock(yuv_mutex);
temp=temp->next;
}while(temp!=NULL);
}
© All Rights Reserved