1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../../css/manpage.css" type="text/css" />
7<title>StartJpegDecoder</title>
8  </head>
9  <body>
10<h1><CODE>nn::jpeg::CTR::JpegMpDecoder::StartJpegDecoder</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">#include &lt;nn/jpeg.h&gt;
14
15size_t StartJpegDecoder(
16     void * dst,
17     size_t dstSize,
18     const u8 * src,
19     size_t srcSize,
20     u32 maxWidth,
21     u32 maxHeight,
22     <a href="../../../../nn/jpeg/CTR/PixelFormat.html">PixelFormat</a> dstPixelFormat,
23     bool decodeThumbnail
24);
25</pre>
26    </div>
27<h2>Arguments</h2>
28    <div class="section">
29      <table class="arguments">
30        <thead>
31          <tr>
32            <td width="15" />
33<th>Name</th>
34<td>Description</td>
35          </tr>
36        </thead>
37        <tr>
38<td>out</td>
39<th>dst</th>
40<td>Specifies the buffer that stores the decoded result.<br />Must be 4-byte aligned.<br />Must be 128-byte aligned if you are accessing the output buffer directly as a GPU texture. (This function won't perform this check.)</td>
41        </tr>
42        <tr>
43<td>in</td>
44<th>dstSize</th>
45<td>Specifies the size of <SPAN class="argument">dst</SPAN> in bytes.<br />Specify the  return value of <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetDstBufferSize.html">GetDstBufferSize</a></CODE>.</td>
46        </tr>
47        <tr>
48<td>in</td>
49<th>src</th>
50<td>Specifies the JPEG data to decode.</td>
51        </tr>
52        <tr>
53<td>in</td>
54<th>srcSize</th>
55<td>Specifies the size of <SPAN class="argument">src</SPAN> in bytes.</td>
56        </tr>
57        <tr>
58<td>in</td>
59<th>maxWidth</th>
60<td>Specifies the maximum width (in pixels) of an image that can be decoded. (Up to 65536) <br />After decoding successfully completes, use the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastWidth.html">GetLastWidth</a></CODE> function to get the width of the actual image and the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastOutputBufferWidth.html">GetLastOutputBufferWidth</a></CODE> function to get the width in the buffer.</td>
61        </tr>
62        <tr>
63<td>in</td>
64<th>maxHeight</th>
65<td>Specifies the maximum height (in pixels) of an image that can be decoded. (Up to 65536) <br />After decoding successfully completes, use the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastHeight.html">GetLastHeight</a></CODE> function to get the height of the actual image and the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastOutputBufferHeight.html">GetLastOutputBufferHeight</a> </CODE> function to get the height in the buffer.</td>
66        </tr>
67        <tr>
68<td>in</td>
69<th>dstPixelFormat</th>
70<td>Specifies the output pixel format.</td>
71        </tr>
72        <tr>
73<td>in</td>
74<th>decodeThumbnail</th>
75<td>Specify <CODE>true</CODE> to decode the thumbnail.<br />Specify <CODE>false</CODE> to decode the main image.</td>
76        </tr> </table>
77    </div>
78<h2>Return Values</h2>
79<div class="section">When the function succeeds, the resulting buffer size (in bytes) is returned.<br />If the function fails it returns <CODE>0</CODE>.<br />Use the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastError.html">GetLastError</a></CODE> function to get the reason for failure. </div>
80<h2>Description</h2>
81    <div class="section">
82<p>Runs the JPEG decoder.</p><p>Processing takes longer if the image size is not a multiple of 8 or 16 pixels.<br />For the given pixel sampling formats, images that meet the following size conditions can be decoded faster:<br />・For <CODE>PIXEL_SAMPLING_YUV444</CODE>, images whose width and height are both multiples of 8.<br />・For <CODE>PIXEL_SAMPLING_YUV420</CODE>, images whose width and height are both multiples of 16.<br />・For <CODE>PIXEL_SAMPLING_YUV422</CODE>, images whose height is multiple of 8 and width is multiple of 16.<br /></p><!-- write here --></div>
83<h2>Revision History</h2>
84    <div class="section">
85      <dl class="history">
86        <dt>2010/04/14</dt>
87<dd>Initial version.<br />
88        </dd>
89      </dl>
90    </div>
91  <hr><p>CONFIDENTIAL</p></body>
92</html>