SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The VC-1 range mapping unit is used when the video frame picture is decoded using a VC-1 codec by the video accelerator. It remaps the Y, Cb, and Cr components. The unit is used primarily for YUV4:2:0-NV12 and YUV4:2:0-NV21 pixel formats but also can be applied to YUV4:2:2 pixel formats (YUV2 and UYVY).
The VC-1 range mapping unit is enabled by setting the DISPC_VIDp_ATTRIBUTES2[0] VC1ENABLE bit to 0x1. The DISPC_VIDp_ATTRIBUTES2[3:1] VC1_RANGE_Y and DISPC_VIDp_ATTRIBUTES2[6:4] VC1_RANGE_CBCR bit fields are two 3-bit values programmed by the user and are independent for each video pipeline. The module is governed by the equations:
Yout = CLIP(((( Yint – 128) × (VC1_RANGE_Y + 9) + 4) / 8) + 128)
Cb = CLIP(((( Cb – 128) × (VC1_RANGE_CBCR + 9) + 4) / 8) + 128)
Cr = CLIP(((( Cr – 128) × (VC1_RANGE_CBCR + 9) + 4) / 8) + 128)
The input and output pixel values are unsigned (Y, Cr, and Cb).
The function CLIP () clips to 0 or 255 when minimum or maximum, respectively, are reached; otherwise, the resulting output remains identical.