# DSP_CalcScalingFactor*

## Definition

    f32 DSP_CalcScalingFactorF32(
    		const u16 src_size,
    		const u16 dst_size
    	);

    fx32 DSP_CalcScalingFactorFx32(
    		const u16 src_size,
    		const u16 dst_size
    	);

## Arguments

src_size | Source data size for scaling.
dst_size | Desired size for the output data after scaling.

## Return Values

A factor that was reverse-calculated from, and uses the same type as, the specified values.

## Description

Performs reverse calculations to get the factor for arguments specified with the desired output size from the `DSP_Scaling*` and `DSP_ScalingFx*` functions. The result and the arguments have the same type.

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.

## See Also

`DSP_Scaling*`
`DSP_ScalingFx*`

## Revision History

2009/03/20 Added a note on calculation errors in Description.
2008/08/28 Initial version.

CONFIDENTIAL