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_StartJpegEncoderLite</title> 7<link rel="stylesheet" href="../../css/nitro.css" type="text/css" /> 8</head> 9<body> 10 11<h1>SSP_StartJpegEncoderLite <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_StartJpegEncoderLite(const void* src, 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">src</SPAN></td> 23<td style="width:87%">Image data to encode (RGB555 or YUV422). Must be 4-byte aligned.</td> 24</tr> 25<tr> 26<td style="width:13%"><SPAN class="argument">dst</SPAN></td> 27<td style="width:87%">Buffer to store the encoding results. Must be 4-byte aligned.</td> 28</tr> 29<tr> 30<td style="width:13%"><SPAN class="argument">limit</SPAN></td> 31<td style="width:87%">Represents the <SPAN class="argument">dst</SPAN> size.<br>Encoding fails if this size is exceeded.</td> 32</tr> 33<tr> 34<td style="width:13%"><SPAN class="argument">wrk</SPAN></td> 35<td style="width:87%">Working buffer. This must be 4-byte aligned. You can use the <a href="SSP_GetJpegEncoderLiteBufferSize.html"><CODE>SSP_GetJpegEncoderLiteBufferSize</CODE></a> function to calculate the required size.</td> 36</tr> 37<tr> 38<td style="width:13%"><SPAN class="argument">width</SPAN></td> 39<td style="width:87%">Width (in pixels) of the image to encode.</td> 40</tr> 41<tr> 42<td style="width:13%"><SPAN class="argument">height</SPAN></td> 43<td style="width:87%">Height (in pixels) of the image to encode.</td> 44</tr> 45<tr> 46<td style="width:13%"><SPAN class="argument">quality</SPAN></td> 47<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> 48</tr> 49<tr> 50<td style="width:13%"><SPAN class="argument">sampling</SPAN></td> 51<td style="width:87%">Main image output formats (<CODE>SSP_JPEG_OUTPUT_YUV444</CODE>, <CODE>SSP_JPEG_OUTPUT_YUV420</CODE>, or <CODE>SSP_JPEG_OUTPUT_YUV422</CODE>).</td> 52</tr> 53<tr> 54<td style="width:13%"><SPAN class="argument">option</SPAN></td> 55<td style="width:87%">Encoding options (<CODE>SSP_JPEG_RGB555</CODE>, <CODE>SSP_JPEG_YUV422</CODE>, or <CODE>SSP_JPEG_THUMBNAIL</CODE>).</td> 56</tr> 57</tbody> 58</table> 59 60 61<h2>Return Values</h2> 62<p>Returns the size of the created JPEG file when successful.<BR>Returns 0 when it fails.</p> 63 64<h2>Description</h2> 65<p>Encodes image data as a JPEG file. This has the same basic behavior as the <a href="SSP_StartJpegEncoder.html"><CODE>SSP_StartJpegEncoder</CODE></a> function, but it uses a much smaller working buffer (<SPAN class="argument">wrk</SPAN>). For an explanation of the parts that are in common, see the <a href="SSP_StartJpegEncoder.html"><CODE>SSP_StartJpegEncoder</CODE></a> page. 66</p> 67 68<h2>See Also</h2> 69<p><a href="SSP_StartJpegEncoder.html"><CODE>SSP_StartJpegEncoder</CODE></a><BR> <a href="SSP_GetJpegEncoderLiteBufferSize.html"><CODE>SSP_GetJpegEncoderLiteBufferSize</CODE></a></p> 70 71<h2>Revision History</h2> 72<p> 732009/04/27 Initial version. 74</p> 75<hr><p>CONFIDENTIAL</p></body> 76</html> 77