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
if (((comp_ctl_a & 0x0f) & (comp_ctl_b & 0x0f)) != 0) | if (((comp_ctl_a & 0x0f) & (comp_ctl_b & 0x0f)) != 0) | ||||
return true; | 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; | return false; | ||||
} | } | ||||
int stride; | int stride; | ||||
rdr::U8 *buf; | rdr::U8 *buf; | ||||
JpegDecompressor jd; | |||||
assert(buflen >= 4); | assert(buflen >= 4); | ||||
memcpy(&len, bufptr, 4); | memcpy(&len, bufptr, 4); |
private: | private: | ||||
rdr::ZlibInStream zis[4]; | rdr::ZlibInStream zis[4]; | ||||
JpegDecompressor jd; | |||||
}; | }; | ||||
} | } | ||||