Video and Image Processing Suite User Guide

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

13.1.1. Nearest Neighbor

Nearest neighbor is the lowest quality resampling algorithm, with the lowest device resource usage.

  • For horizontal downsampling (4:4:4 to 4:2:2), it simply drops every other Cb and Cr sample.
  • For horizontal upsampling (4:2:2 to 4:4:4), it simply repeats each Cb and Cr sample.
  • For vertical downsampling (4:2:2 to 4:2:0) the chroma data from every other video line is discarded.
  • For vertical upsampling (4:2:0 to 4:2:2) the chroma data is repeated for two lines of luma data.
Figure 47. Nearest Neighbor for Horizontal ResamplingThe nearest neighbor algorithm uses left siting (co-siting) for the 4:2:2 chroma samples—both the Cb and Cr samples from the even indexed Y samples are retained during downsampling.
Figure 48. Nearest Neighbor for Vertical ResamplingThe nearest neighbor algorithm uses top siting (co-siting) for both the Cb and Cr planes, for example, the chroma data from lines 0, 2, 4, and so on is preserved in downsampling, while the data from lines 1, 3, 5, and so on is discarded.