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>TMCCJPEGDecDecode</title> 9<LINK rel="stylesheet" href="../../CSS/revolution.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">TMCCJPEGDecDecode</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <revolution/tmcc_jpeg.h></CODE><BR> <BR> 20 <PRE><CODE>s32 TMCCJPEGDecDecode( 21 void *pWorkArea, 22 void *pJpegStream, 23 u32 jpegStreamSize, 24 void *pTexBuffer, 25 u32 texBufferSize, 26 GXTexFmt texFormat, 27 s32 resolution, 28 u8 thumbnail 29); 30</CODE></PRE></dd> 31</dl> 32 33<h2>Arguments</h2> 34<TABLE border="1" width="100%"> 35 <TBODY> 36 <TR> 37<TD width="13%"><EM><STRONG>*pWorkArea</STRONG></EM></TD> 38<TD width="87%">Configure the starting address of the work area. 39 40</TD> 41 </TR> 42 <TR> 43<TD width="13%"><EM><STRONG>*pJpegStream</STRONG></EM></TD> 44<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.) 45 46</TD> 47 </TR> 48 <TR> 49<TD width="13%"><EM><STRONG>jpegStreamSize</STRONG></EM></TD> 50<TD width="87%">Specify the size of the input JPEG data. 51</TD> 52 </TR> 53 54 <TR> 55<TD width="13%"><EM><STRONG>*pTexBuffer</STRONG></EM></TD> 56<TD width="87%">Specify the starting address of the work memory for the output texture data. 57</TD> 58 </TR> 59 <TR> 60<TD width="13%"><EM><STRONG>texBufferSize</STRONG></EM></TD> 61<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.) 62 63 64</TD> 65 </TR> 66 67 <TR> 68<TD width="13%"><EM><STRONG>texFormat</STRONG></EM></TD> 69<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>.) 70 71</TD> 72 </TR> 73 74 <TR> 75<TD width="13%"><EM><STRONG>resolution</STRONG></EM></TD> 76<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> 77 </TR> 78 79 <TR> 80<TD width="13%"><EM><STRONG>thumbnail</STRONG></EM></TD> 81<TD width="87%">Enter 1 to expand thumbnails. When 0, the main image is expanded.<br>(A <CODE>TMCC_JPEG_OPT_ERR</CODE> error code is returned for input that is not 0 or 1.) 82</TD> 83 </TR> 84 85 </TBODY> 86</TABLE> 87 88 89<h2>Return Values</h2> 90<TABLE border="1"> 91 <TBODY> 92 <TR> 93 <TD width="30%"><CODE>0</CODE></TD> 94<TD width="70%">Function completed successfully.</TD> 95 </TR> 96 <TR> 97<TD width="30%"><CODE>Negative</CODE></TD> 98<TD width="70%">Abnormal exit (error code).</TD> 99 </TR> 100 </TBODY> 101</TABLE> 102 103<H2>Description</H2> 104<P>Takes JPEG data as input, expands it, and outputs texture data. <BR> 105</P> 106 107<h2>See Also</h2> 108<p><CODE><A href="errorcode.html">Error Codes</A></CODE></p> 109<H2>Revision History</H2> 110<P> 1112009/10/19 Made changes to the description of the <CODE>include</CODE> file in line with integration into the Revolution SDK.<BR> 2007/02/02 Initial version.</P> 112<hr><p>CONFIDENTIAL</p></body> 113</html> 114