Commit 20916f9b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/screenpresso: Optimize sum_delta_flipped()

553 -> 332 sec

Testcase: 20280/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCREENPRESSO_fuzzer-6238663432470528
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6e8e8431
......@@ -94,8 +94,9 @@ static void sum_delta_flipped(uint8_t *dst, int dst_linesize,
{
int i;
for (; height > 0; height--) {
const uint8_t *src1 = &src[(height - 1) * src_linesize];
for (i = 0; i < bytewidth; i++)
dst[i] += src[(height - 1) * src_linesize + i];
dst[i] += src1[i];
dst += dst_linesize;
}
}
......
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