Commit 07bc6037 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/qpeg: Optimize full width runs in qpeg_decode_intra()

This improves the speed of decoding large patches of constant color

Fixes: Timeout
Fixes: 10967/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QPEG_fuzzer-5630803793936384

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ff3b4f91
......@@ -85,6 +85,12 @@ static void qpeg_decode_intra(QpegContext *qctx, uint8_t *dst,
filled = 0;
dst -= stride;
rows_to_go--;
while (run - i > width && rows_to_go > 0) {
memset(dst, p, width);
dst -= stride;
rows_to_go--;
i += width;
}
if(rows_to_go <= 0)
break;
}
......
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