SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
When the picture input is 4:2:2, the chroma must be downsampled to 4:2:0 before it is stored into DRAM for later compression by the imaging subsystem. The downsampling is performed by an averaging filter.
An array with chroma samples must be used- CIN[] with range from 0 to N-1. (CIN[0] is the topmost chroma sample and CIN[N-1] is bottom chroma sample) .
The output array COUT( ranging from 0 to N/2 - 1) is calculated by the following formula:
COUT[i] = CLIP[(CIN[2i] + CIN[2i+1]) / 2]CLIP[x] (x= 0 to 255).
This filter performs simple averaging of two input lines into one output line.