Commit 79183d3c authored by Reimar Döffinger's avatar Reimar Döffinger

mszh decompression: add a special case for an all-0 mask, i.e. 32 uncompressed

bytes in a row.
About 15% faster mszh_decomp on an Atom N270 for
http://samples.mplayerhq.hu/V-codecs/mszh-zlib/avimzsh_sample.avi

Originally committed as revision 19068 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a7bfbe4e
......@@ -102,6 +102,13 @@ static unsigned int mszh_decomp(const unsigned char * srcptr, int srclen, unsign
maskbit >>= 1;
if (!maskbit) {
mask = *srcptr++;
while (!mask) {
if (destptr_end - destptr < 32 || srcptr_end - srcptr < 32) break;
memcpy(destptr, srcptr, 32);
destptr += 32;
srcptr += 32;
mask = *srcptr++;
}
maskbit = 0x80;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment