TMCCJPEGDecDecodeEX

Syntax

#include <revolution/tmcc_jpeg.h>

s32 TMCCJPEGDecDecodeEx(
        void *pWorkArea,
        void *pJpegStream,
        u32 jpegStreamSize,
        void *pTexBuffer,
        u32 texBufferSize,
        GXTexFmt texFormat,
        s32 resolution,
        u16 srcX,
        u16 srcY,
        u16 srcWidth,
        u16 srcHeight,
);

Arguments

*pWorkArea Configure the starting address of the work area.
*pJpegStream Configure the starting address of the input JPEG data.
(The starting address for the JPEG data should be 32-byte aligned. A TMCC_JPEG_OPT_ERR error code is returned if not 32-byte aligned.)
jpegStreamSize Specify the size of the input JPEG data.
*pTexBuffer Specify the starting address of the work memory for the output texture data.
texBufferSize Specify the size of the work memory for the output texture data.
(If it appears that the texture output size will exceed the work memory size, a TMCC_JPEG_ERR_BUFFER error code is returned.)
texFormat Specify the texture format.
(A TMCC_JPEG_TEXT_ERR error code is returned for input that is neither GX_TF_RGB565 nor GX_TF_RGBA8.)
resolution Configure the resolution-reduction conversion level. The following values can be specified: 1, 2, 4, or 8. (Only the setting value 1 is enabled when enlarging a thumbnail.)
The width and height of the output image are each set respectively to 1/resolution of the input JPEG data.
(The error code TMCC_JPEG_OPT_ERR is returned for invalid input.)
srcX Specify the upper-left X coordinate of the expanded region. Only a multiple of 32 can be set (including 0).
(The error code TMCC_JPEG_OPT_ERR is returned for input that does not satisfy conditions.)
srcY Specify the upper-left Y coordinate of the expanded region. Only zero or a multiple of 32 can be set.
(The error code TMCC_JPEG_OPT_ERR is returned for invalid input.)
srcWidth Specify the width of the expanded region. Multiples of 32 greater than or equal to 32 (that is, not zero) or the size to the right end of the source image can be input.
(The error code TMCC_JPEG_OPT_ERR is returned for invalid input.)
srcHeight Specify the height of the expanded region. Multiples of 32 greater than or equal to 32 (that is, not zero) or the size to the bottom end of the source image can be input.
(The error code TMCC_JPEG_OPT_ERR is returned for input that does not satisfy conditions.)

Return Values

0 Function completed successfully.
Negative Abnormal exit (error code).

Description

Takes JPEG data as input, expands it, and outputs texture data. It is possible to specify the region to expand in the original image.

See Also

Error Codes

Revision History

2009/10/19 Made changes to the description of the include file in line with integration into the Revolution SDK.
2008/03/11 Changed the type for the srcX, srcY, srcWidth and srcHeight arguments.
2007/02/02 Initial version.


CONFIDENTIAL