Просмотр исходного кода

Allow parallel decoding of Tight JPEG rects

The cost is some more load on malloc(), but it should be small
compared to the gains of spreading the CPU heavy JPEG decoding
over multiple CPUs.
tags/v1.6.90
Pierre Ossman 8 лет назад
Родитель
Сommit
bf431a6b98
2 измененных файлов: 2 добавлений и 6 удалений
  1. 2
    5
      common/rfb/TightDecoder.cxx
  2. 0
    1
      common/rfb/TightDecoder.h

+ 2
- 5
common/rfb/TightDecoder.cxx Просмотреть файл

@@ -173,11 +173,6 @@ bool TightDecoder::doRectsConflict(const Rect& rectA,
if (((comp_ctl_a & 0x0f) & (comp_ctl_b & 0x0f)) != 0)
return true;

// We have a shared JpegDecompressor, so one at a time
if (((comp_ctl_a >> 4) == tightJpeg) &&
((comp_ctl_b >> 4) == tightJpeg))
return true;

return false;
}

@@ -229,6 +224,8 @@ void TightDecoder::decodeRect(const Rect& r, const void* buffer,
int stride;
rdr::U8 *buf;

JpegDecompressor jd;

assert(buflen >= 4);

memcpy(&len, bufptr, 4);

+ 0
- 1
common/rfb/TightDecoder.h Просмотреть файл

@@ -67,7 +67,6 @@ namespace rfb {

private:
rdr::ZlibInStream zis[4];
JpegDecompressor jd;
};
}


Загрузка…
Отмена
Сохранить