X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fscreenpresso.c;h=d73c24df834fc585f2c307ac11294e6b8d3b7ccd;hb=df6b44182e1f52e6982a55e9720d9e46620a0d8a;hp=5fac100897079a4378f4c9ffd28a2346c68826af;hpb=9ea6d2149e25d68885a24894bb911077b05388c4;p=ffmpeg diff --git a/libavcodec/screenpresso.c b/libavcodec/screenpresso.c index 5fac1008970..d73c24df834 100644 --- a/libavcodec/screenpresso.c +++ b/libavcodec/screenpresso.c @@ -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; } }