1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=utf-8"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 8<title>TMCCJPEGDecDecodeEX</title> 9<LINK rel="stylesheet" href="../../CSS/revolution.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">TMCCJPEGDecDecodeEX</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <revolution/tmcc_jpeg.h></CODE><BR> <BR> 20 <PRE><CODE>s32 TMCCJPEGDecDecodeEx( 21 void *pWorkArea, 22 void *pJpegStream, 23 u32 jpegStreamSize, 24 void *pTexBuffer, 25 u32 texBufferSize, 26 GXTexFmt texFormat, 27 s32 resolution, 28 u16 srcX, 29 u16 srcY, 30 u16 srcWidth, 31 u16 srcHeight, 32); 33</CODE></PRE></dd> 34</dl> 35 36<h2>Arguments</h2> 37<TABLE border="1" width="100%"> 38 <TBODY> 39 <TR> 40<TD width="13%"><EM><STRONG>*pWorkArea</STRONG></EM></TD> 41<TD width="87%">Configure the starting address of the work area. 42 43</TD> 44 </TR> 45 <TR> 46<TD width="13%"><EM><STRONG>*pJpegStream</STRONG></EM></TD> 47<TD width="87%">Configure the starting address of the input JPEG data.<BR>(The starting address for the JPEG data should be 32-byte aligned. A <CODE>TMCC_JPEG_OPT_ERR</CODE> error code is returned if not 32-byte aligned.) 48 49 50 51</TD> 52 </TR> 53 <TR> 54<TD width="13%"><EM><STRONG>jpegStreamSize</STRONG></EM></TD> 55<TD width="87%">Specify the size of the input JPEG data. 56</TD> 57 </TR> 58 59 <TR> 60<TD width="13%"><EM><STRONG>*pTexBuffer</STRONG></EM></TD> 61<TD width="87%">Specify the starting address of the work memory for the output texture data. 62</TD> 63 </TR> 64 <TR> 65<TD width="13%"><EM><STRONG>texBufferSize</STRONG></EM></TD> 66<TD width="87%">Specify the size of the work memory for the output texture data.<br>(If it appears that the texture output size will exceed the work memory size, a <CODE>TMCC_JPEG_ERR_BUFFER</CODE> error code is returned.) 67 68 69 70</TD> 71 </TR> 72 73 <TR> 74<TD width="13%"><EM><STRONG>texFormat</STRONG></EM></TD> 75<TD width="87%">Specify the texture format. <br>(A <CODE>TMCC_JPEG_TEXT_ERR</CODE> error code is returned for input that is neither <CODE>GX_TF_RGB565</CODE> nor <CODE>GX_TF_RGBA8</CODE>.) 76</TD> 77 </TR> 78 79 <TR> 80<TD width="13%"><EM><STRONG>resolution</STRONG></EM></TD> 81<TD width="87%">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.)<BR> The width and height of the output image are each set respectively to 1/<CODE>resolution</CODE> of the input JPEG data.<br>(The error code <CODE>TMCC_JPEG_OPT_ERR</CODE> is returned for invalid input.)</TD> 82 </TR> 83 84 <TR> 85<TD width="13%"><EM><STRONG>srcX</STRONG></EM></TD> 86<TD width="87%">Specify the upper-left X coordinate of the expanded region. Only a multiple of 32 can be set (including 0).<BR>(The error code <CODE>TMCC_JPEG_OPT_ERR</CODE> is returned for input that does not satisfy conditions.)</TD> 87 </TR> 88 <TR> 89<TD width="13%"><EM><STRONG>srcY</STRONG></EM></TD> 90<TD width="87%">Specify the upper-left Y coordinate of the expanded region. Only zero or a multiple of 32 can be set.<BR> (The error code <CODE>TMCC_JPEG_OPT_ERR</CODE> is returned for invalid input.)</TD> 91 </TR> 92 93 <TR> 94<TD width="13%"><EM><STRONG>srcWidth</STRONG></EM></TD> 95<TD width="87%">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.<BR> (The error code <CODE>TMCC_JPEG_OPT_ERR</CODE> is returned for invalid input.)</TD> 96 </TR> 97 98 <TR> 99<TD width="13%"><EM><STRONG>srcHeight</STRONG></EM></TD> 100<TD width="87%">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.<BR>(The error code <CODE>TMCC_JPEG_OPT_ERR</CODE> is returned for input that does not satisfy conditions.)</TD> 101 </TR> 102 103 104 </TBODY> 105</TABLE> 106 107 108<h2>Return Values</h2> 109<TABLE border="1"> 110 <TBODY> 111 <TR> 112 <TD width="30%"><CODE>0</CODE></TD> 113<TD width="70%">Function completed successfully.</TD> 114 </TR> 115 <TR> 116<TD width="30%"><CODE>Negative</CODE></TD> 117<TD width="70%">Abnormal exit (error code).</TD> 118 </TR> 119 </TBODY> 120</TABLE> 121 122<H2>Description</H2> 123<P>Takes JPEG data as input, expands it, and outputs texture data. It is possible to specify the region to expand in the original image. 124 125<BR> 126</P> 127 128<h2>See Also</h2> 129<p><CODE><A href="errorcode.html">Error Codes</A></CODE></p> 130<H2>Revision History</H2> 131<P> 1322009/10/19 Made changes to the description of the <CODE>include</CODE> file in line with integration into the Revolution SDK.<BR>2008/03/11 Changed the type for the <I>srcX</I>, <I>srcY</I>, <I>srcWidth</I> and <I>srcHeight</I> arguments.<BR> 2007/02/02 Initial version.</P> 133<hr><p>CONFIDENTIAL</p></body> 134</html> 135