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>StartMpDecoderLR</title>
8  </head>
9  <body>
10<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/jpeg/Overview.html">jpeg</a>::<a href="../../../../nn/jpeg/CTR/Overview.html">CTR</a>::<a href="../../../../nn/jpeg/CTR/JpegMpDecoder/Overview.html">JpegMpDecoder</a>::StartMpDecoderLR</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 StartMpDecoderLR(
16     void * dstL,
17     void * dstR,
18     size_t dstSize,
19     const <a href="../../../../nn_types/u8.html">u8</a> * src,
20     size_t srcSize,
21     <a href="../../../../nn_types/u32.html">u32</a> maxWidth,
22     <a href="../../../../nn_types/u32.html">u32</a> maxHeight,
23     <a href="../../../../nn/jpeg/CTR/PixelFormat.html">PixelFormat</a> dstPixelFormat
24);
25</pre>
26    </div>
27<h2>Parameters</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>dstL</th>
40<td>Specifies the buffer for storing the decoded result of the starting image.<br />The alignment of this buffer must match the output pixel format specified by the <SPAN class="argument">dstPixelFormat</SPAN> argument.</td>
41        </tr>
42        <tr>
43<td>out</td>
44<th>dstR</th>
45<td>Specifies the buffer for storing the decoded result of the next individual image.<br />The alignment of this buffer must match the output pixel format specified by the <SPAN class="argument">dstPixelFormat</SPAN> argument.</td>
46        </tr>
47        <tr>
48<td>in</td>
49<th>dstSize</th>
50<td>Specifies the size of <SPAN class="argument">dstL</SPAN> and <SPAN class="argument">dstR</SPAN> in bytes.<br />This value indicates the size of a single image, not the total size of the two images.<br />Specify the return value of <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetDstBufferSize.html">GetDstBufferSize</a></CODE>.</td>
51        </tr>
52        <tr>
53<td>in</td>
54<th>src</th>
55<td>Specifies the MP-format data to decode.</td>
56        </tr>
57        <tr>
58<td>in</td>
59<th>srcSize</th>
60<td>Specifies the size of <SPAN class="argument">src</SPAN> in bytes.</td>
61        </tr>
62        <tr>
63<td>in</td>
64<th>maxWidth</th>
65<td>Specifies the maximum width (in pixels) of an image that can be decoded (equal to or less than 65536). After decoding successfully completes, you can use the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastWidth.html">GetLastWidth</a></CODE> function to get the actual image width and the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastOutputBufferWidth.html">GetLastOutputBufferWidth</a></CODE> function to get the buffer width (for one image).</td>
66        </tr>
67        <tr>
68<td>in</td>
69<th>maxHeight</th>
70<td>Specifies the maximum height (in pixels) of an image that can be decoded (equal to or less than 65536). After decoding successfully completes, you can use the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastHeight.html">GetLastHeight</a></CODE> function to get the actual image height and the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastOutputBufferHeight.html">GetLastOutputBufferHeight</a></CODE> function to get the buffer height (for one image).</td>
71        </tr>
72        <tr>
73<td>in</td>
74<th>dstPixelFormat</th>
75<td>Specifies the output pixel format.</td>
76        </tr> </table>
77    </div>
78<h2>Return Values</h2>
79<div class="section">On success, returns the size (in bytes) of the buffer storing the decoded result.<br />This value indicates the size of a single image, not the total size of the two images.<br />Returns <CODE>0</CODE> on failure.<br />Use the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpEncoder/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 on a pair of images stored in MP format.</p><p>Much as for the <CODE><a href="../../../../nn/jpeg/CTR/JpegMpDecoder/StartJpegDecoder.html">StartJpegDecoder</a></CODE> function, processing takes longer if the image size is not a multiple of 8 or 16 pixels. The same is true of the alignment of the <SPAN class="argument">dst</SPAN> argument.</p><p>The MP type (<a href="../../../../nn/jpeg/CTR/MpTypeCode.html">MpTypeCode</a>) of the image data stored in MP format is looked up in MP entry storage order, and only two stereoscopic images are decoded. The lookup does not check if the first stereoscopic image found is for the left eye, however, nor if the next image is for the right eye.</p><p>This function requires that both primary images are the same size. After this function completes successfully, call the <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastWidth.html"><CODE>GetLastWidth</CODE></a> and <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastHeight.html"><CODE>GetLastHeight</CODE></a> functions to get the primary image's dimensions. If the sizes do not match, decoding fails. The function also fails if fewer than 2 primary images could be decoded. Thumbnails are not decoded.</p><p>If JPEG_DECODER_OPTION_MATCH_WIDTH_HEIGHT is specified using <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/SetOption.html">SetOption</a>, the values of arguments maxWidth and maxHeight must match, otherwise decoding will fail. Even if this option is not specified, the size of the two primary images must match as mentioned above.</p><p>After successful decoding, this function decodes the EXIF information for two stereoscopic images in the order that the MP entries are stored.<br />When the following functions are used to obtain EXIF information, what they obtain is the EXIF information for the last image decoded (stored as the second MP entry).</p><p><UL> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastDateTime.html"><CODE>GetLastDateTime</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastDateTimePointer.html"><CODE>GetLastDateTimePointer</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastSoftwarePointer.html"><CODE>GetLastSoftwarePointer</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastSoftwareLength.html"><CODE>GetLastSoftwareLength</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastUserMakerNotePointer.html"><CODE>GetLastUserMakerNotePointer</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastUserMakerNoteSize.html"><CODE>GetLastUserMakerNoteSize</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastImageUid.html"><CODE>GetLastImageUid</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastOrientation.html"><CODE>GetLastOrientation</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastGpsData.html">GetLastGpsData</a> </LI></UL></p><p>The following functions also work without causing problems, but we do not recommend using them.</p><p><UL> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastTwlPhotoMakerNote.html"><CODE>GetLastTwlPhotoMakerNote</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastTwlUserMakerNotePointer.html"><CODE>GetLastTwlUserMakerNotePointer</CODE></a> <LI> <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/GetLastTwlUserMakerNoteSize.html"><CODE>GetLastTwlUserMakerNoteSize</CODE></a> </LI></UL></p><p>To get the EXIF information for each image, decode each individually without using this function, or use the <a href="../../../../nn/jpeg/CTR/JpegMpDecoder/ExtractExif.html"><CODE>ExtractExif</CODE></a> function.</p><!-- write here --></div>
83<h2>Revision History</h2>
84    <div class="section">
85      <dl class="history">
86        <dt>2011/03/03</dt>
87<dd>Added <CODE>GetLastDateTimePointer</CODE> to the list of functions that retrieve Exif data.<br />
88        </dd>
89        <dt>2010/10/21</dt>
90<dd>Added a description of <CODE>SetOption</CODE>.<br />
91        </dd>
92        <dt>2010/04/14</dt>
93<dd>Initial version.<br />
94        </dd>
95      </dl>
96    </div>
97  <hr><p>CONFIDENTIAL</p></body>
98</html>
99