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_LoadGraphics</title>
7<link rel="stylesheet" href="../../css/nitro.css" type="text/css" />
8</head>
9<body>
10
11<h1>DSP_LoadGraphics <IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13
14<pre><code>
15BOOL DSP_LoadGraphics(FSFile *file, int slotB, int slotC);
16</code></pre>
17
18<h2>Arguments</h2>
19<table style="width:100%">
20<tbody>
21<tr>
22<td style="width:13%"><em><strong>file</strong></em></td>
23<td style="width:87%">Graphics component file.<br />You must either provide this using the <code><a href="DSP_OpenStaticComponentGraphics.html">DSP_OpenStaticComponentGraphics</a></code> function, or open the <CODE>$TwlSDK/dspcomponents/graphics/graphics.a</CODE> file image that was saved to ROM in advance. The file will be used within this function alone and does not need to be maintained after the function has been called.</td>
24</tr>
25<tr>
26<td style="width:13%"><em><strong>slotB</strong></em></td>
27<td style="width:87%">Bit field that shows the WRAM-B slots that may be used for DSP code memory.<br />For example, this would be specified as <CODE>(1&lt;&lt;4)|(1&lt;&lt;5)|(1&lt;&lt;6)=0x70</CODE> to provide slots 4, 5, and 6 for the DSP.</td>
28</tr>
29<tr>
30<td style="width:13%"><em><strong>slotC</strong></em></td>
31<td style="width:87%">Bit field that shows the WRAM-C slots that may be used for DSP code memory.<br />For example, this would be specified as <CODE>(1&lt;&lt;4)|(1&lt;&lt;5)|(1&lt;&lt;6)=0x70</CODE> to provide slots 4, 5, and 6 for the DSP.</td>
32</tr>
33</tbody>
34</table>
35
36
37<h2>Return Values</h2>
38<p>Returns <CODE>TRUE</CODE> if the graphics component was successfully loaded to the DSP.<br />Returns <CODE>FALSE</CODE> if loading failed due to an insufficient number of open WRAM-B or WRAM-C slots.</p>
39
40<h2>Description</h2>
41<p>Loads to the DSP a component to support image data scaling and color space conversion. Calling this function allows you to use the following functions.</p>
42<ul><code>
43<li><a href="DSP_ConvertYuvToRgb.html">DSP_ConvertYuvToRgb()</a></li>
44<li><a href="DSP_Scaling.html">DSP_Scaling()</a></li>
45<li><a href="DSP_Scaling.html">DSP_ScalingEx()</a></li>
46<li><a href="DSP_Scaling.html">DSP_ScalingAsync()</a></li>
47<li><a href="DSP_Scaling.html">DSP_ScalingAsyncEx()</a></li>
48</code></ul>
49<p>While loading, the library will automatically allocate only the necessary number of WRAM-B and WRAM-C slots. The number of required WRAM-B and WRAM-C slots are each defined by the following macros.</p>
50<ul>
51<li>DSP_SLOT_B_COMPONENT_GRAPHICS</li>
52<li>DSP_SLOT_C_COMPONENT_GRAPHICS</li>
53</ul>
54<p>You can use the <code><a href="DSP_UnloadGraphics.html">DSP_UnloadGraphics</a></code> function to unload the graphics component if it is no longer necessary.</p>
55
56<h2>Note</h2>
57<ul>
58<li>Always specify only component files that are saved in the SDK library currently being used. Operations will not be guaranteed if the versions do not match each other.</li>
59</ul>
60
61<h2>See Also</h2>
62<p><code><a href="DSP_OpenStaticComponentGraphics.html">DSP_OpenStaticComponentGraphics</a>, <a href="DSP_UnloadGraphics.html">DSP_UnloadGraphics</a>, <a href="DSP_ConvertYuvToRgb.html">DSP_ConvertYuvToRgb</a>, <a href="DSP_ConvertYuvToRgb.html">DSP_ConvertYuvToRgbAsync</a>,<br> <a href="DSP_Scaling.html">DSP_Scaling</a>, <a href="DSP_Scaling.html">DSP_ScalingEx</a>, <a href="DSP_Scaling.html">DSP_ScalingAsync</a>, <a href="DSP_Scaling.html">DSP_ScalingAsyncEx</a></code></p>
63
64<h2>Revision History</h2>
65<p>
662008/06/13 Added definitions for the WRAM slots required to load the component. <br />2008/05/22 Initial version.
67</p>
68<hr><p>CONFIDENTIAL</p></body>
69</html>
70