[RFC weston 0/3] add scaling filter support

Sameer Lattannavar sameer.lattannavar at intel.com
Fri Dec 20 06:56:06 UTC 2019


Background:
Blurry outputs during upscaling the video buffer, is a generic problem
of graphics industry. One of the major reason behind this blurriness is
the interpolation of pixel values used by most of the upscaling hardware.

Nearest-neighbor is a scaling filter type, which works by filling in the 
missing color values in the upscaled image with that of the coordinate-mapped
nearest source pixel value.

Nearest-neighbor can produce (almost) non-blurry scaling outputs when
the scaling ratio is complete integer. For example:
- input buffer resolution: 1280x720(HD)
- output buffer resolution: 3840x2160(UHD/4K)
- scaling ratio (h) = 3840/1280 = 3  
- scaling ratio (v) = 2160/720 = 3

In such scenarios, we should try to pick Nearest-neighbor as scaling
method when possible.

This patch series: 
To address this feature kernel driver exposes new CRTC property called 
"SCALING_FILTERS" and gives an option to userspace to set it based on the use 
cases.
Kernel RFC can be found here: https://patchwork.freedesktop.org/series/68378/

This patchset add support for utilizing CRTC scaling filter property based on 
client's usecase.

Sameer Lattannavar (3):
  libweston: add set_scaling_filter API and implementation
  drm-backend: drm-backend changes for setting scaling_fitler
  client: image client requesting for scaling filter type.

 clients/image.c                      | 49 +++++++++++++++++++++++-----
 clients/window.c                     |  7 ++++
 clients/window.h                     |  4 +++
 include/libweston/libweston.h        |  7 ++++
 libweston/backend-drm/drm-internal.h | 18 ++++++++++
 libweston/backend-drm/drm.c          | 41 +++++++++++++++++++++--
 libweston/backend-drm/kms.c          | 14 ++++++++
 libweston/compositor.c               | 25 +++++++++++++-
 8 files changed, 154 insertions(+), 11 deletions(-)

-- 
2.17.1



More information about the wayland-devel mailing list