diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-16 21:53:27 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-20 06:57:30 +0200 |
commit | 9e32f2ebfd19e0266537e7d92f52ba53242c9520 (patch) | |
tree | a46a14efc3936422feebe104608d0f02505de637 | |
parent | 10dfbb05027ef8bc06705b167aed9d9eeca8d66e (diff) | |
download | ffmpeg-9e32f2ebfd19e0266537e7d92f52ba53242c9520.tar.gz |
avcodec/h261: Use ptrdiff_t for stride
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/h261.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/h261.c b/libavcodec/h261.c index 7dfaee7dc4..8e0e13459a 100644 --- a/libavcodec/h261.c +++ b/libavcodec/h261.c @@ -30,9 +30,9 @@ #define IS_FIL(a) ((a) & MB_TYPE_H261_FIL) -static void h261_loop_filter(uint8_t *src, int stride) +static void h261_loop_filter(uint8_t *src, ptrdiff_t stride) { - int x, y, xy, yz; + int x, y; int temp[64]; for (x = 0; x < 8; x++) { @@ -41,8 +41,8 @@ static void h261_loop_filter(uint8_t *src, int stride) } for (y = 1; y < 7; y++) { for (x = 0; x < 8; x++) { - xy = y * stride + x; - yz = y * 8 + x; + ptrdiff_t xy = y * stride + x; + ptrdiff_t yz = y * 8 + x; temp[yz] = src[xy - stride] + 2 * src[xy] + src[xy + stride]; } } @@ -51,8 +51,8 @@ static void h261_loop_filter(uint8_t *src, int stride) src[y * stride] = (temp[y * 8] + 2) >> 2; src[y * stride + 7] = (temp[y * 8 + 7] + 2) >> 2; for (x = 1; x < 7; x++) { - xy = y * stride + x; - yz = y * 8 + x; + ptrdiff_t xy = y * stride + x; + ptrdiff_t yz = y * 8 + x; src[xy] = (temp[yz - 1] + 2 * temp[yz] + temp[yz + 1] + 8) >> 4; } } @@ -61,8 +61,8 @@ static void h261_loop_filter(uint8_t *src, int stride) void ff_h261_loop_filter(MpegEncContext *s) { H261Context *const h = s->private_ctx; - const int linesize = s->linesize; - const int uvlinesize = s->uvlinesize; + const ptrdiff_t linesize = s->linesize; + const ptrdiff_t uvlinesize = s->uvlinesize; uint8_t *dest_y = s->dest[0]; uint8_t *dest_cb = s->dest[1]; uint8_t *dest_cr = s->dest[2]; |