TMCCJPEGDecGetSizeEX

Syntax

#include <revolution/tmcc_jpeg.h>

s32 TMCCJPEGDecGetSizeEx(
        void *pWorkArea,
        void *pJpegStream,
        u32 jpegStreamSize,
        GXTexFmt texFormat,
        s32 resolution,
        u16 srcX,
        u16 srcY,
        u16 srcWidth,
        u16 srcHeight,
        TMCCJPEGJpegSize *jpegSize
);

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.
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.
(A TMCC_JPEG_OPT_ERR error code is returned for input that is not 1, 2, 4, or 8.)
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 invalid input.)
*jpegSize Size information for the JPEG data.
(See the TMCCJPEGJpegSize structure.)

Return Values

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

Description

Gets the number of pixels in the specified region of the JPEG input data.

See Also

TMCCJPEGJpegSize
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