TMCCJPEGDecDecode

Syntax

#include <revolution/tmcc_jpeg.h>

s32 TMCCJPEGDecDecode(
        void *pWorkArea,
        void *pJpegStream,
        u32 jpegStreamSize,
        void *pTexBuffer,
        u32 texBufferSize,
        GXTexFmt texFormat,
        s32 resolution,
        u8 thumbnail
);

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.)
thumbnail Enter 1 to expand thumbnails. When 0, the main image is expanded.
(A TMCC_JPEG_OPT_ERR error code is returned for input that is not 0 or 1.)

Return Values

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

Description

Takes JPEG data as input, expands it, and outputs texture data.

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.
2007/02/02 Initial version.


CONFIDENTIAL