In order to measure compression time, you mean the time between jpeg_start_compress() and jpeg_finish_compress, or the time of encode_frame() function?<br><br><div class="gmail_quote">2011/7/5 Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com">cfergeau@redhat.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I finally ran some performance test on these changes on a small theora<br>
clip, average compression time goes down from 17,7 ms per frame to 14 ms<br>
per frame which corresponds to a 20% improvement.<br>
<font color="#888888"><br>
Christophe<br>
</font><div><div class="h5"><br>
On Tue, Jun 28, 2011 at 01:18:01PM +0200, Christophe Fergeau wrote:<br>
> Hi,<br>
><br>
> Currently, the mjpeg encoder has to preprocess the images it gets from<br>
> spice-server to make sure the pixel order is the one libjpeg expects (RGB).<br>
> This means iterating over the whole images swapping pixels since the input<br>
> images are BGR or BGRX.<br>
> However, libjpeg-turbo, in addition to SIMD optimization to JPEG decoding,<br>
> also brings additional input colorspaces, including BGR and BGRX. This patch<br>
> series make use of these new colorspaces in the mjpeg encoder to avoid<br>
> the conversion step.<br>
> libjpeg-turbo use is optional and the code will still do the conversion<br>
> step if libjpeg-turbo wasn't present at compile time. Most of these patches<br>
> are refactoring, the one introducing the libjpeg-turbo code is the one<br>
> before the last.<br>
><br>
> Christophe<br>
><br>
> Christophe Fergeau (9):<br>
> red_worker: remove 2 empty functions<br>
> red_worker: factor pixel conversion code<br>
> mjpeg_encoder: rework output buffer allocation<br>
> red_worker: simplify red_rgb_to_24bpp prototype<br>
> mjpeg_encoder: add mjpeg_encoder_encode_scanline<br>
> mjpeg_encoder: add mjpeg_encoder_get_bytes_per_pixel<br>
> red_worker: use new mjpeg_encoder_encode_scanline API<br>
> mjpeg_encoder: use libjpeg-turbo extra colorspaces<br>
> mjpeg_encoder: remove unused functions<br>
><br>
> server/mjpeg_encoder.c | 226 +++++++++++++++++++++++++++++++++++++++++-------<br>
> server/mjpeg_encoder.h | 10 ++-<br>
> server/red_worker.c | 178 +++-----------------------------------<br>
> 3 files changed, 213 insertions(+), 201 deletions(-)<br>
><br>
> --<br>
> 1.7.5.4<br>
><br>
> _______________________________________________<br>
> Spice-devel mailing list<br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</div></div><br>_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
<br></blockquote></div><br>