38.6.13.2 Horizontal Scaler Main Configuration
LCDC_HEOCFG4.XMEMSIZE indicates the horizontal size minus one of the image in the system memory. LCDC_HEOCFG3.XSIZE contains the horizontal size minus one of the window.
The YCbCr upsampling process requires that the horizontal scaler is composed of two channels. The first channel processes A and Y components (alph/luma) and the second channel processes Cb and Cr (chroma) components. Thus different scaling configurations are available for both channels. In modes other than YCbCr 4:2:2 or YCbCr 4:2:0, both channels must be configured similarly to preserve image integrity.
LCDC_HEOCFG23.HXSYEN and LCDC_HEOCFG23.HXSCEN, respectively for Alpha/Luma and chroma channels, are used to activate the scaler. The scaling factors are programmed in LCDC_HEOCFG26.HXSYFACT and LCDC_HEOCFG27.HXSCFACT, respectively for alpha/luma and chroma channels.
The following equation calculates the horizontal scaling factor (HFACTOR) value:
The values in HXSYFACT and HXSCFACT are 24 bits wide (4-bit integer part, 20-bit fractional part), hence the horizontal downsampling capacity is limited to 16.0.
When YCbCr 4:2:2, or YCbCr 4:2:0 formats are used to resample the output window, the value of HXSCFACT must consider chroma upsampling by taking the half of HFACTOR.
When YCbCr 4:2:2, or YCbCr 4:2:0 formats are used without resampling the output window, , LCDC_HEOCFG23.HXSYEN and LCDC_HEOCFG23.HXSCEN can be set to zero. The scaler engine is then internally configured to process chroma upsampling without any configuration of LCDC_HEOCFG26 and LCDC_HEOCFG27.
Scaler Use Cases gives register values according to the context.