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>SSP_StartJpegEncoderWithEncodeData</title>
7<link rel="stylesheet" href="../../css/nitro.css" type="text/css" />
8</head>
9<body>
10
11<h1>SSP_StartJpegEncoderWithEncodeData <img src="../../image/NTR.gif" align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13
14<pre><code>
15u32 SSP_StartJpegEncoderWithEncodeData(u8 *dst, u32 limit, u8 *wrk, u32 width, u32 height, u32 quality, u32 sampling, u32 option);
16</code></pre>
17
18<h2>Arguments</h2>
19<table style="width:100%">
20<tbody>
21<tr>
22<td style="width:13%"><SPAN class="argument">dst</SPAN></td>
23<td style="width:87%">Buffer that stores encoded results.</td>
24</tr>
25<tr>
26<td style="width:13%"><SPAN class="argument">limit</SPAN></td>
27<td style="width:87%">Represents the <SPAN class="argument">dst</SPAN> size.<br>Encoding fails if this size is exceeded.</td>
28</tr>
29<tr>
30<td style="width:13%"><SPAN class="argument">wrk</SPAN></td>
31<td style="width:87%">Work buffer.<br>Use the same specifications as for the <a href="SSP_ConvertJpegEncodeData.html"><CODE>SSP_ConvertJpegEncodeData</CODE></a> function.</td>
32</tr>
33<tr>
34<td style="width:13%"><SPAN class="argument">width</SPAN></td>
35<td style="width:87%">The width (in pixels) of the image to be encoded.<br>Make the same specifications as for the <a href="SSP_ConvertJpegEncodeData.html"><CODE>SSP_ConvertJpegEncodeData</CODE></a> function.</td>
36</tr>
37<tr>
38<td style="width:13%"><SPAN class="argument">height</SPAN></td>
39<td style="width:87%">The height (in pixels) of the image to be encoded.<br>Make the same specifications as for the <a href="SSP_ConvertJpegEncodeData.html"><CODE>SSP_ConvertJpegEncodeData</CODE></a> function.</td>
40</tr>
41<tr>
42<td style="width:13%"><SPAN class="argument">quality</SPAN></td>
43<td style="width:87%">Encoding quality.<br>Values from 1 to 100 can be specified, where 100 represents the highest quality and the largest size.</td>
44</tr>
45<tr>
46<td style="width:13%"><SPAN class="argument">sampling</SPAN></td>
47<td style="width:87%">The main image output format (<CODE>SSP_JPEG_OUTPUT_YUV444</CODE>, <CODE>SSP_JPEG_OUTPUT_YUV420</CODE>, or <CODE>SSP_JPEG_OUTPUT_YUV422</CODE>).<br> Make the same specifications as for the <a href="SSP_ConvertJpegEncodeData.html"><CODE>SSP_ConvertJpegEncodeData</CODE></a> function.</td>
48</tr>
49<tr>
50<td style="width:13%"><SPAN class="argument">option</SPAN></td>
51<td style="width:87%">The encoding option (<CODE>SSP_JPEG_RGB555</CODE>, <CODE>SSP_JPEG_YUV422</CODE>, or <CODE>SSP_JPEG_THUMBNAIL</CODE>).<br> Make the same specifications as for the <a href="SSP_ConvertJpegEncodeData.html"><CODE>SSP_ConvertJpegEncodeData</CODE></a> function.</td>
52</tr>
53</tbody>
54</table>
55
56
57<h2>Return Values</h2>
58<p>Returns the size of the created JPEG file when successful.<BR> Returns 0 when it fails.</p>
59
60<h2>Description</h2>
61<p>Encodes image data converted into a JPEG file using the <a href="SSP_ConvertJpegEncodeData.html"><CODE>SSP_ConvertJpegEncodeData</CODE></a> function.<br> The <SPAN class="argument">wrk</SPAN>, <SPAN class="argument">width</SPAN>, <SPAN class="argument">height</SPAN>, <SPAN class="argument">sampling</SPAN>, and <SPAN class="argument">option</SPAN> arguments must be specified in the same manner as for the <a href="SSP_ConvertJpegEncodeData.html"><CODE>SSP_ConvertJpegEncodeData</CODE></a> function.<br> If you want to perform the conversion and encoding processes at once, use the <a href="SSP_StartJpegEncoder.html"><CODE>SSP_StartJpegEncoder</CODE></a> function.<br> <br> <font color="red"><B>Note:</B></font><br> Regardless of whether this function succeeds or fails at encoding, after completion the values set by the <a href="SSP_SetJpegEncoderDateTime.html"><CODE>SSP_SetJpegEncoderDateTime</CODE></a>,<a href="SSP_SetJpegEncoderDateTimeNow.html"><CODE>SSP_SetJpegEncoderDateTimeNow</CODE></a>,<a href="SSP_SetJpegEncoderMakerNote.html"><CODE>SSP_SetJpegEncoderMakerNote</CODE></a>, and <a href="SSP_SetJpegEncoderMakerNoteEx.html"><CODE>SSP_SetJpegEncoderMakerNoteEx</CODE></a> functions are cleared.<br> If the <a href="SSP_SetJpegEncoderDateTime.html"><CODE>SSP_SetJpegEncoderDateTime</CODE></a> or <a href="SSP_SetJpegEncoderDateTimeNow.html"><CODE>SSP_SetJpegEncoderDateTimeNow</CODE></a> functions are not called, the <a href="../../rtc/RTC_GetDateTime.html"><CODE>RTC_GetDateTime</CODE></a> function is called internally.
62</p>
63
64<h2>See Also</h2>
65<p><a href="SSP_SetJpegEncoderDateTime.html"><CODE>SSP_SetJpegEncoderDateTime</CODE></a><BR> <a href="SSP_SetJpegEncoderDateTimeNow.html"><CODE>SSP_SetJpegEncoderDateTimeNow</CODE></a><BR> <a href="SSP_ConvertJpegEncodeData.html"><CODE>SSP_ConvertJpegEncodeData</CODE></a><BR> <a href="SSP_StartJpegEncoder.html"><CODE>SSP_StartJpegEncodder</CODE></a></p>
66
67<h2>Revision History</h2>
68<p>
692008/11/14 Initial version.
70</p>
71<hr><p>CONFIDENTIAL</p></body>
72</html>
73