summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/update_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'recordmydesktop/src/update_image.c')
-rw-r--r--recordmydesktop/src/update_image.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/recordmydesktop/src/update_image.c b/recordmydesktop/src/update_image.c
index bf319e2..0de3f0a 100644
--- a/recordmydesktop/src/update_image.c
+++ b/recordmydesktop/src/update_image.c
@@ -35,7 +35,8 @@ void UpdateImage(Display * dpy,
BRWindow *brwin,
EncData *enc,
char *datatemp,
- int noshmem){
+ int noshmem,
+ int no_quick_subsample){
RectArea *temp;
unsigned char *dtap=(unsigned char*)datatemp;
temp=*root;
@@ -52,18 +53,30 @@ void UpdateImage(Display * dpy,
temp->geom.height);
pthread_mutex_lock(yuv_mutex);
-
- 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));
+ 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));
-
+ }
}
temp=temp->next;
© All Rights Reserved