On 10/31/18 6:28 PM, Frediano Ziglio wrote:
Support for protocol version 1 was dropped in commit f77a1d50.
Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
Acked-by: Uri Lublin <uril@xxxxxxxxxx>
Uri.
---
src/channel-display-mjpeg.c | 25 ++++++-------------------
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/src/channel-display-mjpeg.c b/src/channel-display-mjpeg.c
index 6f7ded65..83cd391b 100644
--- a/src/channel-display-mjpeg.c
+++ b/src/channel-display-mjpeg.c
@@ -92,7 +92,6 @@ static void mjpeg_decoder_schedule(MJpegDecoder *decoder);
static gboolean mjpeg_decoder_decode_frame(gpointer video_decoder)
{
MJpegDecoder *decoder = (MJpegDecoder*)video_decoder;
- gboolean back_compat = decoder->base.stream->channel->priv->peer_hdr.major_version == 1;
JDIMENSION width, height;
uint8_t *dest;
uint8_t *lines[4];
@@ -109,10 +108,7 @@ static gboolean mjpeg_decoder_decode_frame(gpointer video_decoder)
#ifdef JCS_EXTENSIONS
// requires jpeg-turbo
- if (back_compat)
- decoder->mjpeg_cinfo.out_color_space = JCS_EXT_RGBX;
- else
- decoder->mjpeg_cinfo.out_color_space = JCS_EXT_BGRX;
+ decoder->mjpeg_cinfo.out_color_space = JCS_EXT_BGRX;
#else
#warning "You should consider building with libjpeg-turbo"
decoder->mjpeg_cinfo.out_color_space = JCS_RGB;
@@ -153,20 +149,11 @@ static gboolean mjpeg_decoder_decode_frame(gpointer video_decoder)
uint8_t *s = lines[0];
uint32_t *d = SPICE_ALIGNED_CAST(uint32_t *, s);
- if (back_compat) {
- for (unsigned int j = lines_read * width; j > 0; ) {
- j -= 1; // reverse order, bad for cache?
- d[j] = s[j * 3 + 0] |
- s[j * 3 + 1] << 8 |
- s[j * 3 + 2] << 16;
- }
- } else {
- for (unsigned int j = lines_read * width; j > 0; ) {
- j -= 1; // reverse order, bad for cache?
- d[j] = s[j * 3 + 0] << 16 |
- s[j * 3 + 1] << 8 |
- s[j * 3 + 2];
- }
+ for (unsigned int j = lines_read * width; j > 0; ) {
+ j -= 1; // reverse order, bad for cache?
+ d[j] = s[j * 3 + 0] << 16 |
+ s[j * 3 + 1] << 8 |
+ s[j * 3 + 2];
}
}
#endif
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel