Video and Image Processing Suite User Guide

ID 683416
Date 4/04/2022
Public
Document Table of Contents

20.3.2. Polyphase Algorithmic Description

The algorithmic operations of the polyphase scaler can be modeled using a frame-based method.

The filtering part of the polyphase scaler works by passing a windowed sinc function over the input data.

  • For up scaling, this function performs interpolation.
  • For down scaling, it acts as a low-pass filter to remove high-frequency data that would cause aliasing in the smaller output image.

During the filtering process, the mid-point of the sinc function must be at the mid-point of the pixel to output. This is achieved by applying a phase shift to the filtering function.

If a polyphase filter has Nv vertical taps and Nh horizontal taps, the filter is a Nv ×Nh square filter.

Counting the coordinate space of the filter from the top-left corner, (0, 0), the mid-point of the filter lies at ((Nv –1)/2, (Nh –1)/2). As in the bilinear case, to produce an output pixel at (i, j), the mid-point of the kernel is placed at where ini and inj are calculated using the algorithmic description equations. The difference between the real and integer solutions to these equations determines the position of the filter function during scaling.

The filter function is positioned over the real solution by adjusting the function’s phase:

The results of the vertical filtering are then found by taking the set of coefficients from phasej and applying them to each column in the square filter. Each of these Nh results is then divided down to fit in the number of bits chosen for the horizontal kernel. The horizontal kernel is applied to the coefficients from phasei , to produce a single value. This value is then divided down to the output bit width before being written out as a result.