1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> 5<meta http-equiv="Content-Style-Type" content="text/css" /> 6<title>DSP_CalcScalingFactor</title> 7<link rel="stylesheet" href="../../css/nitro.css" type="text/css" /> 8</head> 9<body> 10 11<h1>DSP_CalcScalingFactor* <IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Definition</H2> 13 14<pre><code> 15f32 DSP_CalcScalingFactorF32( 16 const u16 src_size, 17 const u16 dst_size 18 ); 19 20fx32 DSP_CalcScalingFactorFx32( 21 const u16 src_size, 22 const u16 dst_size 23 ); 24</code></pre> 25 26<h2>Arguments</h2> 27<table style="width:100%"> 28<tbody> 29<tr> 30<td style="width:13%"><em><strong>src_size</strong></em></td> 31<td style="width:87%">Source data size for scaling.</td> 32</tr> 33<tr> 34<td style="width:13%"><em><strong>dst_size</strong></em></td> 35<td style="width:87%">Desired size for the output data after scaling.</td> 36</tr> 37</tbody> 38</table> 39 40<h2>Return Values</h2> 41<p>A factor that was reverse-calculated from, and uses the same type as, the specified values. 42</p> 43 44<h2>Description</h2> 45<p>Performs reverse calculations to get the factor for arguments specified with the desired output size from the <a href="DSP_Scaling.html"><CODE>DSP_Scaling*</CODE></a> and <a href="DSP_ScalingFx.html"><CODE>DSP_ScalingFx*</CODE></a> functions. The result and the arguments have the same type. 46</p> 47<p>For some specified input and output sizes, however, the correct factor may not be obtainable because of factor restrictions. It must be between 31 and 0.001, and will be truncated after the third decimal place. For example, even specifying a factor obtained from this function may cause a 1- or 2-line deficiency to appear as an error if the original image data was large, exceeding 1000 pixels. In this case, adjust either the resolution of the original image data or the output size specified to this function. 48</p> 49 50<h2>See Also</h2> 51<p><a href="DSP_Scaling.html"><CODE>DSP_Scaling*</CODE></a><BR> <a href="DSP_ScalingFx.html"><CODE>DSP_ScalingFx*</CODE></a></p> 52 53<h2>Revision History</h2> 54<p> 552009/03/20 Added a note on calculation errors in <B>Description</B>. <br>2008/08/28 Initial version. 56</p> 57<hr><p>CONFIDENTIAL</p></body> 58</html> 59