- Description:
- This function reads the halfword-oriented pixel data, zero-extends it, and then writes it to the appropriate result array. Both the luma and chroma values are expected to be unsigned.
- The data is expected to be in an order consistent with reading byte oriented data from a word-oriented peripheral that is operating in BIG ENDIAN mode, while the CPU is in LITTLE ENDIAN mode. This results in a pixel ordering which is not immediately obvious. This function correctly reorders the pixel values so that further processing may proceed in LITTLE ENDIAN mode.
- Parameters:
-
| n | Number of luma pixels |
| yc | Interleaved luma/chroma |
| y | Luma plane (16-bit) |
| cr | Cr chroma plane (16-bit) |
| cb | Cb chroma plane (16-bit) |
- Algorithm:
- The input array 'yc' is expected to be an interleaved 4:2:2 video stream. The input is expected in BIG ENDIAN byte order within each 4-byte word. This is consistent with reading the video stream from a word-oriented BIG ENDIAN device while the C6000 device is in a LITTLE ENDIAN configuration.
- In other words, the expected pixel order is:
Word 0 Word 1 Word 2
+---------------+---------------+---------------+--
Byte# | 0 1 2 3 | 4 5 6 7 | 8 9 10 11 |...
| cb0 y1 | cr0 y0 | cb1 y2 |...
+---------------+---------------+---------------+--
The output arrays 'y', 'cr', and 'cb' are expected to not overlap. The de-interleaved pixels are written as half-words in LITTLE ENDIAN order.
- Assumptions:
- Input and output arrays should be 32-bit aligned.
- The input must be a multiple of 16 luma pixels
- Implementation Notes:
- This code is fully interruptible and fully reentrant
- This code is compatible with C66x processors (though not optimized)
- The loop has been unrolled a total of 16 times to allow for processing 8 pixels in each datapath.
- Benchmarks:
- See IMGLIB_Test_Report.html for cycle and memory information.