$ git clone http://tcclient.ion.nu/tc_client.git
commit 50af716edc70c20159aead7cbb99e42b3bbc217f
Author: Alicia <...>
Date:   Tue Sep 13 13:54:00 2016 +0200

    tc_client-gtk and camviewer: specify a scaling algorithm for libswscale (mandatory for older versions of libswscale)

diff --git a/ChangeLog b/ChangeLog
index fb84f37..cb84004 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@ tc_client-gtk: limit the camera preview to 640 by 480, scaling down if the input
 tc_client-gtk: when resizing the window, resize the camera pane before the chat pane.
 tc_client-gtk and camviewer: fixed compatibility with newer libavutil.
 tc_client-gtk and camviewer: added compatibility fallbacks for av_image_get_buffer_size() and av_packet_unref()
+tc_client-gtk and camviewer: specify a scaling algorithm for libswscale (mandatory for older versions of libswscale)
 libcamera(v4l2): if we failed to read the frame, give grey instead.
 irchack: fixed the order of messages around joining a channel (should fix compatibility with IRC clients a bit pickier than irssi)
 0.38:
diff --git a/utilities/camviewer/camviewer.c b/utilities/camviewer/camviewer.c
index 6930c59..ba4ec46 100644
--- a/utilities/camviewer/camviewer.c
+++ b/utilities/camviewer/camviewer.c
@@ -355,7 +355,7 @@ gboolean handledata(GIOChannel* channel, GIOCondition condition, gpointer datap)
   unsigned char buf[bufsize];
   cam->dstframe->data[0]=buf;
   cam->dstframe->linesize[0]=cam->frame->width*3;
-  struct SwsContext* swsctx=sws_getContext(cam->frame->width, cam->frame->height, cam->frame->format, cam->frame->width, cam->frame->height, AV_PIX_FMT_RGB24, 0, 0, 0, 0);
+  struct SwsContext* swsctx=sws_getContext(cam->frame->width, cam->frame->height, cam->frame->format, cam->frame->width, cam->frame->height, AV_PIX_FMT_RGB24, SWS_FAST_BILINEAR, 0, 0, 0);
   sws_scale(swsctx, (const uint8_t*const*)cam->frame->data, cam->frame->linesize, 0, cam->frame->height, cam->dstframe->data, cam->dstframe->linesize);
   sws_freeContext(swsctx);
 
@@ -449,7 +449,7 @@ void togglecam(GtkButton* button, struct viddata* data)
     dstframe->height=ctx->height;
     av_image_alloc(dstframe->data, dstframe->linesize, ctx->width, ctx->height, ctx->pix_fmt, 1);
 
-    struct SwsContext* swsctx=sws_getContext(frame->width, frame->height, AV_PIX_FMT_RGB24, frame->width, frame->height, AV_PIX_FMT_YUV420P, 0, 0, 0, 0);
+    struct SwsContext* swsctx=sws_getContext(frame->width, frame->height, AV_PIX_FMT_RGB24, frame->width, frame->height, AV_PIX_FMT_YUV420P, SWS_FAST_BILINEAR, 0, 0, 0);
 
     while(1)
     {
diff --git a/utilities/gtk/camviewer.c b/utilities/gtk/camviewer.c
index afab7fd..d9d0713 100644
--- a/utilities/gtk/camviewer.c
+++ b/utilities/gtk/camviewer.c
@@ -582,7 +582,7 @@ gboolean handledata(GIOChannel* iochannel, GIOCondition condition, gpointer data
   unsigned char* buf=malloc(bufsize);
   cam->dstframe->data[0]=buf;
   cam->dstframe->linesize[0]=camsize_scale.width*3;
-  struct SwsContext* swsctx=sws_getContext(cam->frame->width, cam->frame->height, cam->frame->format, camsize_scale.width, camsize_scale.height, AV_PIX_FMT_RGB24, 0, 0, 0, 0);
+  struct SwsContext* swsctx=sws_getContext(cam->frame->width, cam->frame->height, cam->frame->format, camsize_scale.width, camsize_scale.height, AV_PIX_FMT_RGB24, SWS_BICUBIC, 0, 0, 0);
   sws_scale(swsctx, (const uint8_t*const*)cam->frame->data, cam->frame->linesize, 0, cam->frame->height, cam->dstframe->data, cam->dstframe->linesize);
   sws_freeContext(swsctx);
   camera_postproc(cam, cam->dstframe->data[0], camsize_scale.width, camsize_scale.height);
diff --git a/utilities/gtk/media.c b/utilities/gtk/media.c
index b1bf129..e589b41 100644
--- a/utilities/gtk/media.c
+++ b/utilities/gtk/media.c
@@ -248,7 +248,7 @@ gboolean cam_encode(GIOChannel* iochannel, GIOCondition condition, gpointer data
   g_object_unref(oldpixbuf);
   if(preview){return 1;}
   // Encode
-  struct SwsContext* swsctx=sws_getContext(cam->frame->width, cam->frame->height, cam->frame->format, cam->frame->width, cam->frame->height, AV_PIX_FMT_YUV420P, 0, 0, 0, 0);
+  struct SwsContext* swsctx=sws_getContext(cam->frame->width, cam->frame->height, cam->frame->format, cam->frame->width, cam->frame->height, AV_PIX_FMT_YUV420P, SWS_FAST_BILINEAR, 0, 0, 0);
   sws_scale(swsctx, (const uint8_t*const*)cam->frame->data, cam->frame->linesize, 0, cam->frame->height, cam->dstframe->data, cam->dstframe->linesize);
   sws_freeContext(swsctx);
   int gotpacket;