kmLoadYUVTexture
Reads the YUV-format texture data.
Description:
This function converts the YUV420-data/YUV422-data in main memory specified by
pTexture into Non-Twiddled YUV422 texture and reads it into a texture memory area
allocated by
kmCreateTextureSurface/kmCreateCombinedTextureSurface/kmCreateContiguousTextureSurface/
kmCreateFixedTextureArea.
In doing so, the YUV-data converter built into tiling accelerator of the CLX1/2 is
used. Because the output of the YUV-data converter is Non-Twiddled, the texture
surface at the read destination specified by this API must be in either of the following
formats:
KM_TEXTURE_RECTANGLE | | | KM_TEXTURE_YUV422 | //Rectangular |
KM_TEXTURE_STRIDE | | | KM_TEXTURE_YUV422 | //Rectangular (with stride specification) |
Parameters:
ppSurfaceDesc(input)
Texture surface allocated by kmCreateTextureSurface/kmCreateCombinedTextureSurface/
kmCreateContiguousTextureSurface/kmCreateFixedTextureArea.
This parameter is a pointer to KMSURFACEDESC-type structure.
pTexture(input)
This parameter is a pointer indicating YUV420-data/YUV422-data in main memory. Specify an address aligned
with a 32-byte boundary.
If the address is not on a 32-byte boundary, the YUV converter cannot operate because
of hardware constraints.
In this case, KMSTATUS_INVALID_ADDRESS is returned.
nWidth, nHeight(input)
nFormat(input)
This parameter specifies the format of the data to read in. One from each of the following categories can be selected and combined logically.
Color mode
Color mode | Description |
---|---|
KM_TEXTURE_YUV420 | Indicates that the input data is YUV420-data. |
KM_TEXTURE_YUV422 | Indicates that the input data is YUV422-data. |
Addressing Mode | Description |
---|---|
KM_TEXTURE_YUV_MULTI | The input data consists of multiple 16x16 YUV-data. |
KM_TEXTURE_YUV_SINGLE | The input data consists of one nWidth x nHeight YUV-data. |
Return values:
Value | Explanation |
---|---|
KMSTATUS_SUCCESS | Success |
KMSTATUS_INVALID_TEXTURE_TYPE | Invalid texture specified. |
KMSTATUS_INVALID_ADDRESS | pTexture not on a 32-byte boundary. |
kmLoadYUVTexture