[Spice-devel] [PATCH 0/9] add optional libjpeg-turbo use to spice-server mjpeg encoder

Andrea Celestino celestino.andrea at gmail.com
Wed Jul 6 02:48:54 PDT 2011


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?

2011/7/5 Christophe Fergeau <cfergeau at redhat.com>

> I finally ran some performance test on these changes on a small theora
> clip, average compression time goes down from 17,7 ms per frame to 14 ms
> per frame which corresponds to a 20% improvement.
>
> Christophe
>
> On Tue, Jun 28, 2011 at 01:18:01PM +0200, Christophe Fergeau wrote:
> > Hi,
> >
> > Currently, the mjpeg encoder has to preprocess the images it gets from
> > spice-server to make sure the pixel order is the one libjpeg expects
> (RGB).
> > This means iterating over the whole images swapping pixels since the
> input
> > images are BGR or BGRX.
> > However, libjpeg-turbo, in addition to SIMD optimization to JPEG
> decoding,
> > also brings additional input colorspaces, including BGR and BGRX. This
> patch
> > series make use of these new colorspaces in the mjpeg encoder to avoid
> > the conversion step.
> > libjpeg-turbo use is optional and the code will still do the conversion
> > step if libjpeg-turbo wasn't present at compile time. Most of these
> patches
> > are refactoring, the one introducing the libjpeg-turbo code is the one
> > before the last.
> >
> > Christophe
> >
> > Christophe Fergeau (9):
> >   red_worker: remove 2 empty functions
> >   red_worker: factor pixel conversion code
> >   mjpeg_encoder: rework output buffer allocation
> >   red_worker: simplify red_rgb_to_24bpp prototype
> >   mjpeg_encoder: add mjpeg_encoder_encode_scanline
> >   mjpeg_encoder: add mjpeg_encoder_get_bytes_per_pixel
> >   red_worker: use new mjpeg_encoder_encode_scanline API
> >   mjpeg_encoder: use libjpeg-turbo extra colorspaces
> >   mjpeg_encoder: remove unused functions
> >
> >  server/mjpeg_encoder.c |  226
> +++++++++++++++++++++++++++++++++++++++++-------
> >  server/mjpeg_encoder.h |   10 ++-
> >  server/red_worker.c    |  178 +++-----------------------------------
> >  3 files changed, 213 insertions(+), 201 deletions(-)
> >
> > --
> > 1.7.5.4
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110706/d35ff79d/attachment.html>


More information about the Spice-devel mailing list