CPU, SMP and GPU implementations of Nohalo level 1, a fast co-convex antialiasing image resampler

  • Authors:
  • Nicolas Robidoux;Minglun Gong;John Cupitt;Adam Turcotte;Kirk Martinez

  • Affiliations:
  • Université Laurentienne, Sudbury ON, Canada;Memorial University of Newfoundland, St. John's NL, Canada;Imperial College, London;Laurentian University, Sudbury ON, Canada;University of Southampton, Southampton, UK

  • Venue:
  • C3S2E '09 Proceedings of the 2nd Canadian Conference on Computer Science and Software Engineering
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

This article introduces Nohalo level 1 ("Nohalo"), the simplest member of a family of image resamplers which straighten diagonal interfaces without adding noticeable nonlinear artifacts. Nohalo is interpolatory, co-monotone, co-convex, antialiasing, local average preserving, continuous, and exact on linears. Like many edge-enhancing methods, Nohalo has two main stages: first, nonlinear interpolation is used to create a double-density version of the original image; this double-density image is then resampled with bilinear interpolation. Nohalo is especially suited for GPU computing because the nonlinear slopes can be computed once and stored in a low bit-depth texture without rounding error, because the final bilinear stage can be performed in hardware, and because monotonicity allows full use of the texture's dynamic range. Demand-driven implementations for CPU's and SMPs are more complex, and require extra work to fix bottlenecks. Efficient implementations of the minmod function are key to performance. Three implementations of Nohalo are presented and bench-marked: a CPU version in C for the graphics library GEGL, an SMP version in C++ for the graphics library VIPS and a GPU version in HLSL for DirectX. The GPU implementation is branch-free thanks to the discovery of a simple formula for the pixel values of the double density image. Branches are eliminated in the demand-driven C/C++ implementations by reflecting, if needed, Nohalo's 12-point stencil with pointer shifts. Overall, Nohalo is not much slower than standard bicubic resamplers. Compared to twenty-three alternatives in tests involving the re-enlargement of images downsampled with nearest neighbour, Nohalo gets the best PSNRs.