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<title>TMCCJPEGEncGetOutputSize</title> 8<LINK rel="stylesheet" href="../../CSS/revolution.css" type="text/css"> 9</head> 10 11<body> 12 13<h1 align="left">TMCCJPEGEncGetOutputSize</h1> 14<h2>Syntax</h2> 15 16<dl> 17 <dd> 18<CODE>#include <revolution/tmcc_jpeg.h></CODE><BR> <BR> 19 <PRE><CODE>s32 TMCCJPEGEncGetOutputSize( 20 void *pWorkArea, 21 void *pTex, 22 u16 srcWidth, 23 u16 srcHeight, 24 GXTexFmt texFormat, 25 u32 *poutputSize, 26 u32 QFactor 27); 28</CODE></PRE></dd> 29</dl> 30 31<h2>Arguments</h2> 32<TABLE border="1" width="100%"> 33 <TBODY> 34 <TR> 35<TD width="13%"><EM><STRONG>*pWorkArea</STRONG></EM></TD> 36<TD width="87%">Configure the starting address of the work area. 37 38</TD> 39 </TR> 40 <TR> 41<TD width="13%"><EM><STRONG>*pTex</STRONG></EM></TD> 42<TD width="87%">Configure the starting address of the input texture data. 43 44</TD> 45 </TR> 46 <TR> 47<TD width="13%"><EM><STRONG>srcWidth</STRONG></EM></TD> 48<TD width="87%">Specify the effective image width of the input texture.<br>(When the texture size does not match the effective image region, fill the remaining parts with dummy data. A <CODE>TMCC_JPEG_OPT_ERR</CODE> error code is returned for input that exceeds the range of 1 to 65,535.) 49</TD> 50 </TR> 51 52 <TR> 53<TD width="13%"><EM><STRONG>srcHeight</STRONG></EM></TD> 54<TD width="87%">Specify the effective image height of the input texture.<br>(When the texture size does not match the effective image region, fill the remaining parts with dummy data. A <CODE>TMCC_JPEG_OPT_ERR</CODE> error code is returned for input that exceeds the range of 1 to 65,535.) 55</TD> 56 </TR> 57 <TR> 58<TD width="13%"><EM><STRONG>texFormat</STRONG></EM></TD> 59<TD width="87%">Specify the texture format. <br>(A <CODE>TMCC_JPEG_TEXT_ERR</CODE> error code will be returned for input that is neither <CODE>GX_TF_RGB565</CODE> nor <CODE>GX_TF_RGBA8</CODE>.) 60 61</TD> 62 </TR> 63 64 <TR> 65<TD width="13%"><EM><STRONG>*poutputSize</STRONG></EM></TD> 66<TD width="87%">Size that is possible to output, given <CODE>QFactor</CODE>. 67</TD> 68 </TR> 69 70 <TR> 71<TD width="13%"><EM><STRONG>QFactor</STRONG></EM></TD> 72<TD width="87%">Specify the quality factor.<br>(A <CODE>TMCC_JPEG_OPT_ERR</CODE> error code will be returned for input that exceeds the range of 1 to 500.) 73</TD> 74 </TR> 75 76 </TBODY> 77</TABLE> 78 79 80<h2>Return Values</h2> 81<TABLE border="1"> 82 <TBODY> 83 <TR> 84 <TD width="30%"><CODE>0</CODE></TD> 85<TD width="70%">Function completed successfully.</TD> 86 </TR> 87 <TR> 88<TD width="30%"><CODE>Negative</CODE></TD> 89<TD width="70%">Abnormal exit (error code).</TD> 90 </TR> 91 </TBODY> 92</TABLE> 93 94<H2>Description</H2> 95<P>Determines the actual output size for a given image quality factor. Returns the actual output size (<CODE>*poutputSize</CODE>) when the input texture image data is compressed by the specified image quality factor (<CODE>QFactor</CODE>). <BR> 96</P> 97 98<h2>See Also</h2> 99<p><CODE><A href="errorcode.html">Error Codes</A></CODE></p> 100<H2>Revision History</H2> 101<P> 1022009/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 <CODE>srcWidth</CODE> and <CODE>srcHeight</CODE> arguments.<BR> 2007/02/02 Initial version.</P> 103<hr><p>CONFIDENTIAL</p></body> 104</html> 105