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

Christophe Fergeau cfergeau at redhat.com
Tue Jun 28 04:18:01 PDT 2011


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



More information about the Spice-devel mailing list