44.6.16 4:4:4 To 4:2:2 Chrominance Horizontal Subsampler (SUB422) Module
The color space conversion output stream is a full-bandwidth YCbCr 4:4:4 signal. The chrominance subsampling divides the horizontal chrominance sampling rate by two. A horizontal low pass filter is applied to avoid aliasing effect. The SUB422 module samples 444 full scale YCbCr cbc_data[29:0] 30-bit data, performs horizontal subsampling and generates the sub422_data[39:0] 40-bit data bus with its validity signal sub422_valid.
ISC_SUB422_CTRL.ENABLE | ISC_SUB422_CFG.CCIR | SUB422_DATA Slice | Value |
---|---|---|---|
0 | 0 | sub422_data[29:0] | cbc_data[29:0] |
1 | 0 | sub422_data[39:30] | Y1= cbc_data1[29:20] |
sub422_data[29:20] | Y0 = cbc_data0[29:20] | ||
sub422_data[19:10] | Cb = filter_hor(cbc_data[19:10]) | ||
sub422_data[9:0] | Cr = filter_hor(cbc_data[9:0]) | ||
1 | 1 | sub422_data[39:30] | Y1 = cbc_data[9:0] |
sub422_data[29:20] | Y0 = cbc_data[9:0] | ||
sub422_data[19:10] | Cb = cbc_data[9:0] | ||
sub422_data[9:0] | Cr = cbc_data[9:0] |
The filter_hor function included in the sub422 module is the chrominance horizontal filter.
sub422 Data Slice | YCbCr Mapping |
---|---|
sub422_data[39:30] | Y1 (sample n) |
sub422_data[29:20] | Y0 (sample n-1) |
sub422_data[19:10] | Cb (from filter) |
sub422_data[9:0] | Cr (from filter) |
The filter chrominance position is selectable through the use of ISC_SUB422_CFG.FILTER.
The SUB422 module performs luminance and chrominance packing. When the line length is odd, the missing luminance is a copy of the last but one luminance. It also means that the final dma stream written to memory is equal to the original horizontal size plus one when the line length is odd.
SUB422_DATA Slice | Even Line Length | Odd Line Length |
---|---|---|
sub422_data[39:30] | Y(n) | Y(n-1) |
sub422_data[29:20] | Y(n-1) | Y(n-1) |
sub422_data[19:10] | Cb (filtered) | Cb (filtered) |
sub422_data[9:0] | Cr (filtered) | Cr (filtered) |